Hybrid CSMA/CA and HCCA Uplink Medium Access Control Protocol for VLC based Heterogeneous Users

,


INTRODUCTION
The last decade has seen a rapid increase in both the number of connected miniature devices as well as the amount of data sent by such devices.The vast majority of such connected miniature devices, collectively referred to as Internet of Things (IoT), utilize the unlicensed radio frequency spectrum for short-range communication [1].This has massively increased the demand on unlicensed spectrum, forcing researchers and policymakers to look for additional unlicensed spectrum.
One proposed solution to alleviate the above problem is to leverage the advancement in optical wireless communication by using visible light (VL) spectrum.Therefore, visible light communication (VLC) is proposed as a complementary or an alternate technology to conventional RF communication, especially for indoor wireless networks [2,3].In VLC, light emitting diode (LED) is used at the transmitter to modulate the intensity of the emitted light, while photodiode (PD) is used as a receiver.Such VLC potentially offers high data rate, better security, and high modulation bandwidth [4].
A specific technology of VLC that supports multiple user access, mobility, handover, and high-speed wireless communication [5,6] is light fidelity (LiFi).LiFi uses the existing lighting system of the room for both illumination and communication purposes by using VL as the medium of propagation in the downlink.Similarly, IR is used to facilitate uplink communication using IR LEDs [7] without interfering with downlink VL [8] as shown in Fig. 1.Multiple prior studies have proposed the viability of LiFi in providing such services.LiFi currently works in the following way.The LiFi access point (AP) schedules the channel access for multiple users using medium access control (MAC) protocol for uplink and downlink communication [9].The MAC protocol for LiFi is standardised by the IEEE 802.15.7 standard [2], [10], [11].Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) is used as the MAC protocol to schedule the packets and provide access to the channel in this standard.
LiFi's RF counterpart, wireless fidelity (WiFi), i.e., IEEE 802.11 uses distributed coordination function (DCF) MAC mechanism to provide access to the channel [12].This mechanism employs CSMA/CA MAC protocol with binary exponential backoff algorithm.In this case, multiple users contend with each other to access the channel.If a user senses that the channel is busy then it tries to seize the channel access until the channel becomes free.This technique is widely used in practice.
Although widely used in practice, the exponential backoff algorithm suffers from a major drawback.The key drawback, known as hidden node problem, is that users not in the vicinity of the listening range of the channel may still interfere with other users during their channel access.To resolve this problem, prior notification is optionally sent to other users called Request to Send (RTS).A Clear to Send (CTS) request is sent by the access point (AP) to indicate that other stations should not send packets.This RTS/CTS mechanism mitigates the hidden node problem in WiFi [10,13] by avoiding collisions of the data packets at the cost of additional overhead.
The key challenge of LiFi networks is that it has an even more severe hidden node problem than WiFi while accessing the channel.This is because the users cannot sense each other [14], since the uplink and downlink links use different spectrums.Therefore, RTS/CTS-based CSMA/CA MAC mechanism is extensively used to resolve the hidden node problem in this case.However, this mechanism significantly reduces the number of packets transmitted due to overheads incurred by the RTS/CTS frames [13].Thus, users that require high throughput suffer from low quality of service (QoS).
One possible way of mitigating the challenge of collisions is for the LiFi to use a point coordination function (PCF), where the AP assigns a specific time slot to each user for utilization of the channel.PCF was further extended to allow the differentiated quality of service (QoS) support via the introduction of guaranteed bandwidth and time allocation, a technique known as Hybrid Coordination Function Controlled Channel Access (HCCA).Although these mechanisms are part of the optional 802.11e standard, none of them are used by today's WiFi APs [15][16][17].This is because the message overhead and admission control mechanisms make it too complicated for WiFi APs to utilize these mechanisms.
However, many of today's smaller devices, such as smartwatches, baby monitors, and fire alarms, usually referred to as IoT devices, do not require high throughput as they have limited power as compared to personal compute devices (PCDs).On the other hand, PCDs do a high level of computation and multitasking, which require high throughput.Thus, an intelligent technique of switching between DCF-based CSMA/CA and PCF-based HCCA is needed depending on the requirement.
PCF or HCCA mechanisms also face higher probability of packets colliding with one another.This is due to the fact that there is a collision between association requests as well as a collision between association requests and ACK in the access point coordinated centralized LiFi system (the devices can not sense each other) [14].Ultimately, the number of collisions increases in the PCF mechanism with an increase in the number of users.In contrast, the number of collisions reduces in the case of CSMA/CA due to the RTS/CTS transmission mechanism.
In this work, we propose to resolve this challenge of managing the trade-off between throughput and collisions by switching between HCCA and CSMA/CA.We analyze the performance of the HCCA-based MAC protocol for LiFi, using both analysis and simulation.We show that HCCA is more suitable for use in LiFi than in WiFi, as it requires multiple APs, and thus each LiFi AP is likely to handle a smaller number of devices.Moreover, admission control is relatively easy in LiFi, as the coverage area is much smaller.We also identify the cases where the number of devices becomes too large for HCCA to be suitably used in LiFi.This leads us to propose a hybrid MAC mechanism with a switching mechanism between CSMA/CA and HCCA in LiFi.

A. Literature Review and Motivation
Multiple studies have proposed handling of interference, maximizing throughput, hidden node, and exposed node problems by modifying the CSMA/CA mechanism [5,18,19].For example, [5] integrates WiFi and LiFi by reducing interference without considering the MAC layer.The authors in [18] have focused on optimizing feedback to achieve maximum throughput in bidirectional communication.The work [19] addressed the hidden node and exposed node problems and proposed an optical hardcore point process (OHCPP) to characterize optical CSMA for uplink indoor VLC.However, these works did not investigate MAC to serve the different throughput requirements of users.
Several studies have also suggested different MAC protocols to improve throughout while dealing with highly dense traffic.For example, [20] provides access to the medium using CSMA/CA MAC mechanism whereas allocates the resource using TDMA to improve the network throughput in highly dense IoT-based networks.In addition, [11] proposes an analytical model for CSMA/CA MAC protocol to deal with highly dense traffic according to the IEEE 802.15.7 standard to improve the performance of the LiFi network.However, none of these works investigate for specific MAC mechanism which can be used to serve different types of users together such as high-power PCD users and low-power IoT devices, according to their throughput requirements.
As mentioned above, CSMA/CA is used for LiFi networks as well as for dense IoT-enabled networks.Apart from CSMA/CA, a special MAC protocol, HCCA is available in IEEE 802.11eWLAN.It is a controlled MAC mechanism that provides QoS while enforcing admission control for dense traffic.HCCA has a major advantage over a LiFi network due to the stronger signal in LiFi, i.e., as long as the user is in the coverage area of LiFi AP, the user can do the uplink transmission using the HCCA MAC mechanism.However, no studies have proposed the utilization of HCCA in LiFi networks so far.
HCCA MAC protocol is used in WiFi to guarantee the service time for the users connected to AP [21].The authors in [21] have investigated the average uplink latency of the HCCA MAC protocol, which focuses on throughput enhancement and fairness.Hence, a novel strategic parameters selection (SPS) algorithm is proposed in [21] to reduce the uplink latency of IEEE 802.11WLAN.[22,23] illustrate that the HCCA MAC protocol supports a high quality of service (QoS) as well as guarantees the service to the traffics in WLAN according to the transmission opportunity (TXOP) based on traffic specification (TSPEC) parameters.In [22], the authors have proposed a modified HCCA MAC protocol with an enhancement of polling mechanism for variable bit rate (VBR) video streams by providing arrival time feedback of the following video frame in the uplink traffic.Similarly, an adaptive multi-polling TXOP (AMTXOP) scheduling algorithm has been proposed in [22] for assigning TXOP dynamically in IEEE 802.11e network.Furthermore, a framework of the HCCA MAC mechanism presented in [24] gives an approach to integrate different scheduling algorithms for MAC with all flexibility.However, IEEE 802.11e provides QoS for the HCCA scheduler in case of constant bit rate traffic, which does not support the VBR traffic stream.Therefore, IDTH (immediate dynamic TXOP HCCA) algorithm is proposed in [25] for the HCCA scheduler to utilize unused available resources for the VBR traffic stream with required QoS.The delay, as well as packet queue length, are reduced by utilizing resources efficiently without modifying the HCCA central controller policy and admission control mechanism.In [26], comparative analysis has been done for DCF, PCF, and HCCA MAC mechanism of IEEE 802.11 standard to improve QoS in wireless communication.On the other hand, the authors have also discussed the limitations of each mechanism for real-time (RT) traffic scenarios.Moreover, the results illustrate that the requirement of RT traffic is preserved by the HCCA MAC mechanism with the penalty of its complex admission control MAC mechanism.This proves that HCCA supports a reduced number of stations for required QoS.Nevertheless, the above-reported works have overlooked serving different users with different throughput requirements in an indoor environment such as a home, office, hospital, etc.

B. Contributions and Outcomes
A key point to note is that, unlike in WiFi networks, admission control is not a challenge in LiFi networks due to its comparatively limited coverage area.This factor, combined with the fact that HCCA also supports guarantees of high QoS motivates us to propose an HCCA MAC mechanism for the LiFi network.We perform a comparative analysis of conventional CSMA/CA and proposed HCCA MAC to observe behaviors of the protocols for various performance metrics such as average network throughput, average network collision probability, average network busy channel probability, average delay, and message overhead for indoor LiFi networks.We further build on the comparative analysis to propose a novel hybrid MAC mechanism of CSMA/CA and HCCA to serve heterogeneous set of PCD and IoT-enabled users together in an indoor LiFi communication network.
While using HCCA, providing high QoS comes with a few challenges.If the number of users connected to an AP increases, then HCCA can gradually lead to reduced throughput.To resolve this problem, we analytically identify where HCCA provides lower throughput and switch to CSMA/CA in such cases.Specifically, we find that having greater than a specific threshold number of users connected to the same LiFi AP leads to lower throughput in HCCA than in CSMA/CA.We analytically compute the threshold, which enables us to identify the situations where HCCA provides higher throughput than CSMA/CA and vice-versa.This fact leads us to propose a hybrid MAC scheme that switches between HCCA and CSMA/CA depending on the number of users connected to the LiFi AP.
The contributions of the paper are summarized as follows.
• We propose an uplink HCCA MAC protocol for LiFi network to provide higher throughput than existing CSMA/CA MAC protocol.To the best of our knowledge, the implications of using HCCA in LiFi has not been studied yet.
• We develop an analytical model of HCCA MAC mechanism for LiFi network and evaluate the network performance in terms of average network throughput, busy channel probability, and collision probability.
• We provide a comparison of HCCA and CSMA/CA MAC protocol for LiFi network using both analysis and simulation.This comparison shows that the HCCA MAC protocol is better in terms of throughput for the smaller set of users but worse for the larger set of users.
• Finally, based on the analysis of the advantages of using HCCA and CSMA/CA, we propose a hybrid MAC mechanism with an intelligent switching strategy between the two techniques, depending on the number and type of devices connected to the LiFi AP.

C. Paper Organization
The rest of this paper is organized as follows.Section II explains the background and proposed MAC protocol for the LiFi network with its analytical modeling.In Section III, performance analysis and comparison of the proposed and conventional MAC protocol have been made for various metrics.Section IV provides a detailed strategy for choosing the proposed hybrid MAC protocol switching between HCCA and CSMA/CA.Thereafter, the whole work is concluded in Section V.

PROPOSED MAC PROTOCOL FOR LIFI NETWORK
In the considered LiFi network, let N be the total number of users in the network.Let B 0 represent the event that a user has back off counter value of zero.B 0≥1 be an event that at least one user has back of counter value of zero.Similarly, B 0⊇{0} is an event that no user has a back off counter value of zero.Let, Tx ⊇{1} represents an event that any single user is transmitting.Additionally, N C 1 represents a combination of N users with any single user.This section explains the background and analytical framework of the proposed HCCA MAC protocol for LiFi network in detail.We first start with an illustration of the conventional MAC mechanism for WiFi networks based on the IEEE 802.11 standard and then explain the differences with respect to LiFi network.We further discuss a new MAC mechanism of HCCA for LiFi network.

A. Background
Distributed coordination function (DCF) is a two-way handshaking MAC mechanism used in IEEE 802.11 standard [12] which deals with access to the medium by multiple users.DCF employs random backoff to avoid collisions when more than one user tries to transmit the packet using CSMA/CA protocol.However, the user can experience collision if multiple users have the same random backoff value or if any of the users is hidden in the network.Moreover, DCF also has an optional channel sensing mechanism for multiple users to access the medium i.e., RTS/CTS based CSMA/CA four-way handshaking MAC protocol [14,27].The CSMA/CA protocol works based on carrier sense mechanism to access the channel.
LiFi network uses CSMA/CA MAC protocol for accessing the medium according to the IEEE 802.15.7 standard [28].Although this standard borrows the technique of CSMA/CA from WiFi, LiFi user devices can not sense each other to get the information about the busy channel, unlike WiFi devices [14,18].As a result, the LiFi network suffers from a severe hidden user problem.Therefore, LiFi AP is used as point coordinator (PC) to send the busy channel notification to the users by broadcasting channel busy tone [14].However, the point coordination function (PCF) is used in CSMA/CA MAC protocol for LiFi network; because AP is acting as coordinator to control the access of the medium.Thus, the conventional four-way handshaking RTS/CTS based CSMA/CA MAC protocol and PCF together mitigate the severe hidden user problem in LiFi network.
The MAC protocol distinguishes packets based on different QoS requirements (e.g., throughput or latency) of the user [23,26].Thus, the coexistence of DCF and PCF guarantees the QoS requirement by ensuring service differentiation for the individual user.This coexistence of DCF and PCF is called as hybrid coordination function (HCF), and the HCF enabled MAC protocol is known as HCF controlled access (HCCA) [23].The HCCA MAC protocol has a central polling scheme to provide the support of QoS requirements for different traffic according to the users' request [17].The HCCA MAC protocol can be used for limited number of real-time users due to admission control mechanism [29].This limitation preserves the use of HCCA MAC protocol for LiFi network.Since the LiFi attocell [30] can accommodate fewer users than the WiFi network due to the coverage area constraint of the LiFi network.However, LiFi networks show fewer packet losses than WiFi network due to less impact of multipath fading and directional light communication [31][32][33].Therefore, intuitively HCCA MAC protocol can perform better in LiFi network.We now analytically justify this intuition in the next subsection.

B. Analytical Model of Proposed HCCA MAC Protocol
In the proposed HCCA MAC protocol for LiFi network, the user decrements the backoff counter value to zero and sends association request to the AP.The coordinator AP gives access to the user for transmission if the channel is free.Otherwise, the user enters into the DCF stage and continues with its backoff process.Consequently, a single user always gets the chance to transmit the packet.Here, the user can transmit more than one packet based on TXOP [23,24], which is the maximum duration for which the channel can be reserved for a single user.Therefore, other users will not be allowed to use the channel until the completion of transmission of the current user.Similarly, during this period, when the random backoff counter of other users becomes zero and send the association requests, there will be a collision due to multiple users' requests.Further, collision may occur because a user is waiting for an acknowledgment (ACK), and another user is sending the association request to the AP.Hence, HCCA MAC protocol provides high throughput at the expense of busy channel probability and collision probability.Therefore, this protocol can be used for high throughput requirement users in LiFi network.
We now propose analyze the performance of HCCA MAC protocol for LiFi network and validate it through simulation.

B.1. Channel Sensing Probability (ψ)
Channel sensing probability is defined as the probability of sensing the channel is busy or free.The probability of sensing the channel can be interpreted as: where P r B 0 ≥ 1 denotes the probability of at least one user has backoff counter value zero.Eq.Eq. ( 1) implies that the user is able to sense the channel when the user backoff counter decrements to zero.Alternatively, we can also write ψ as: where Pr B 0⊇{0} is defined as the probability of no user having a backoff counter value of zero.The probability of each backoff slot is 1 CW max .The contention window (CW) of each user is uniformly distributed, i.e., CW ∼ U[1, CW max ].Moreover, the probability that no user chooses CW value of 1 from N users equal to 1 − 1 Similarly, we can define the probability that the node takes CW value of 1 as Pr Hence, we can write the probability of a user takes CW for any value of k as: By using Eq. ( 3) and Eq. ( 4), we can simplify Eq. ( 2) as: In Eq. ( 5), 1 − 1 is represented as the probability of no user chooses CW size of 1, 2, ..., CW max .In contrast, RTS/CTS based CSMA/CA protocol does not utilize sensing and instead utilizes network allocation vector (NAV) to decide whether to transmit.

B.2. Busy Channel Probability (α)
The busy channel probability is defined as the probability that the channel is busy due to transmission of the packet.Let α be the busy channel probability.Thus, (1 − α) is the free channel probability.According to the proposed HCCA MAC protocol, α is also defined as the probability that any single user is transmitting among N users while other (N − 1) users are sensing the channel.This can be written as follows: where we can write the probability of transmission as : By substituting Eq. ( 7) in Eq. ( 6), we get: After simplifying Eq. ( 8), we get The probability of busy channel using HCCA MAC protocol in LiFi network is given in Eq. ( 9).In contrast, existing works [12,14] show that CSMA/CA protocol has the following busy channel probability: where p t is the transmission probability in a random time slot chosen by the user.

B.3. Collision Probability (p c )
The collision probability is defined as the probability of collision between the acknowledgement and association request as well as the collision between the association requests.Therefore, we can write the average collision probability of the network as: where p co −ACK and p co −ASC are the collision due to acknowledgement (ACK) and association (ASC) requests, respectively.The term ψ(1 − α) implies that the user senses the channel with probability ψ and gets the channel free with probability (1 − α).If a user successfully transmits the packet after sensing the channel then it needs to wait for ACK.Concurrently, if another user sends the association request to the AP then the collision occurs between the ACK and ASC request.Moreover, all these events are independent to each other.Correspondingly, the second term of Eq. (11) provides that if more than one user completes their backoff period at the same time then, they can send the association requests to the AP which also causes a collision.By considering both the terms of Eq. ( 11), the analysis of collision probability for total N number of users is further simplified as: Eq. Eq. ( 12) expresses the probability of collision in case of HCCA MAC protocol.By contrast, collision probability for conventional CSMA/CA MAC protocol [12,14] is expressed as follows : We utilize the above derived formulas to compute the performance of both HCCA-enabled and CSMA/CA-enabled (with RTS/CTS enabled) LiFi APs separately in the following section.

PERFORMANCE ANALYSIS
In this section, the performance of the proposed MAC protocol is analyzed for an indoor environment as shown in Fig. 2. In this environment, there are heterogeneous sets of users, such as PCD and IoT users demanding various throughput.The total number of users present in the indoor scenario is represented by a set users send the request to AP for channel access using uplink communication.Consequently, the MAC protocol is decided for the system according to the type of user, throughput, message overhead, and delay requirements.We propose a hybrid MAC scheme that utilizes either CSMA/CA or HCCA MAC mechanism depending on the type of user's device and its requirements in this target indoor environment.In addition, the performance of the proposed HCCA and conventional RTS/CTS based CSMA/CA MAC protocol for the LiFi network is evaluated below for the simulation parameters (listed in Tables 1 and  2).Table 1 summarizes the simulation environment for the HCCA MAC protocol for PCD and IoT users.The packet size (L p ) for the PCD and IoT users are 400 bytes and 10 bytes according to the video streaming and smart sensing applications, respectively [35].The slot time [20], ACK time, sets of packets, and data rate are listed in Table 1 for the HCCA MAC protocol.Subsequently, Table 2 summarizes the simulation parameters for CSMA/CA MAC protocol for PCD and IoT users.The header packet time t HDR is evaluated as: t HDR = (128+272)bits/40 Mbps = 10 µs.The ACK size is considered according to [14] for CSMA/CA MAC protocol, and ACK time is calculated based on the data rate requirement of the user.The slot time and packet transmission time are considered using [14].In general, one packet can be sent by a single user at a time in the case of CSMA/CA, unlike HCCA.The data rate requirements for the applications such as heavy high definition streaming, online gaming, and downloading with a large number of connected devices or high-speed applications are in the range of 25 to 40 Mbps [36,37].Similarly, IoT device needs the data rate of around 200 Kbps for IoT applications [20,38].In RTS/CTS based CSMA/CA MAC protocol, the control information RTS/CTS, header (HDR), propagation delay (t delay ), short inter-frame space (SIFS) and distributed inter-frame space (DIFS) values have been taken from [14].In this analysis, 14 PCD users are considered with three or four IoT devices per user.

A. Average Network Throughput (S)
The average network throughput is defined as the fraction of time the network spends in successful 1 .In other words, the fraction of time in which exactly one user is transmitting.Alternatively, the average network throughput is also defined as the number of successful transmissions with respect to the total number of transmissions.We define the average network throughput analytically using the proposed busy channel probability, sensing probability, and collision probability derived in 1 Note that because we do not consider the signal messages while computing throughput, this is equivalent to the goodput.Eq. ( 5), Eq. ( 9) and Eq. ( 11) for HCCA MAC protocol as: where α N−1 is equal to The simulation and analytical results for average network throughput are compared in Fig. 3 for the proposed HCCA MAC protocol.We observe that the analytical result of average network throughput crosses the simulation result at N = 9 for the BE max = 8.This crossover point defines that the simulation model adopts an automatic variable backoff value during the simulation according to the random backoff mechanism, but it is an arbitrary constant backoff value in the analytical model.Furthermore, the above effect is analyzed by manually varying the BE max value for the analytical model to observe the trend of crossover points.However, we observe that the crossover point shifts towards the left when the BE max value decreases, i.e., the reduction in the maximum limit of backoff value, average throughput of the network also decreases in the case of the analytical model of HCCA MAC protocol.The normalized average network throughput is high, equal to the maximum values of 1 and 0.9 in the case of analytical and simulation models respectively using HCCA MAC mechanism (shown in Fig. 3).This is because the AP controls the channel access and allows one user for transmission at a time.Consequently, most of the time a user gets a chance to transmit, which enhances the average throughput of the network in case of HCCA MAC protocol.
We compare the average network throughput of LiFi network using proposed HCCA and conventional RTS/CTS based CSMA/CA MAC protocols in Fig. 4. In RTS/CTS based CSMA/CA MAC mechanism, collisions occur due to RTS frames.In this case, the throughput increases with an increase in the number of users as the number of packet transmissions increases.When the throughput reaches the maximum value, the throughput saturates and is constant for any further increase in the number of users.In contrast, the throughput decreases with increase in the number of users in case of HCCA MAC mechanism.Fig. 4 shows the average network throughput for PCD users where the number of users is less.Equivalently, it also illustrates the average network throughput for IoT users.It is assumed that each user has a maximum of three or four IoT devices, so that the total number of IoT devices cannot exceed 50.We observe that there is a crossover at N = 14 between CSMA/CA and HCCA MAC protocol.Hence, we can use HCCA for PCD users and RTS/CTS based CSMA/CA MAC mechanism for IoT users when the number of PCD and IoT users are N ≤ 14 and N > 14, respectively.The average network throughput is calculated using RTS/CTS based CSMA/CA MAC protocol [14] for PCD and IoT users.The average network throughput is expressed for CSMA/CA MAC protocol in [14] as: In Eq. ( 15), p s is probability of successful transmission and γ is busy channel probability expressed in Eq. ( 10), where t D , t c and t slot are transmission time, collision time and slot duration, respectively which are used in the analysis of CSMA/CA MAC protocol in [14].Correspondingly, other simulation parameters are listed in Table 2 for the purpose of comparison.[14].

B. Average Network Collision Probability (p c )
Collisions occur when a user is waiting for ACK from AP and another user is sending the association request.Furthermore, if two users are sending the association requests together, then a collision also happens.On the other hand, the collision probability is modeled analytically with arbitrary constant backoff value in Eq. ( 12) and compared with the simulation model for different values of BE max .To analyze the effect of variable back off value on collision probability, we illustrate the simulation and analytical models in Fig. 5 for three BE max values.It can be observed that the collision probability of simulation model approaches to analytical model for BE max = 8 as shown in Fig. 5.The average network collision probability increases with an increase in the number of users.We observe that the collision probability of CSMA/CA is lesser than HCCA MAC protocol as illustrated in Fig. 6.This is due to the fact that the collision reduces in case of CSMA/CA due to RTS/CTS transmission mechanism and increases in the case of HCCA due to collision between association requests as well as collision between association request and ACK.Ultimately, the number of collisions increases in HCCA protocol with an increase in the number of  users.Moreover, in CSMA/CA protocol, the collisions are less as compared to HCCA for the reason that RTS/CTS mechanism controls the collision and maintains the maximum throughput.Fig. 6 also illustrates the average network collision probability for small set of users, N = 14 and large set of users, N = 50 for accessing the LiFi network, respectively.

C. Average Network Busy Channel Probability (α)
The busy channel probability is also modeled analytically with arbitrary constant backoff value and compared with the simulation model for different values of BE max as shown in Fig. 7.When a user is transmitting, the channel becomes busy for other users.From Fig. 8, it can be observed that the busy channel probability gets saturated at a higher number of users; because, a user always has a chance to transmit its message in HCCA protocol.In case of CSMA/CA, the busy channel probability becomes lower as shown in Fig. 8 due to increase in contention between the users after getting busy channel tone from AP, and therefore, the users get less chance for transmission.In HCCA, this probability gets saturated for a higher number of users as the channel becomes busy all the time due to one of the users always getting a chance for transmission.Fig. 8 illustrates higher busy channel probability for HCCA MAC protocol as compared to CSMA/CA for small set of users in LiFi network.For large set of users, this becomes saturated for HCCA protocol and outperforms that of CSMA/CA protocol.
From the above analysis, we can observe that the HCCA MAC protocol provides high throughput in the range of 70% − 90% for small set of users present in the network with the cost of collision probability of 0.01 to 0.29 and busy channel probability of 0.2 to 0.29.In comparison, CSMA/CA protocol-based RTS/CTS mechanism provides lower throughput of 30% − 70% for fewer users and saturates at a value of normalized throughput of 0.76 for more number of users in LiFi network.Fur-  thermore, CSMA/CA has lower collision probability and busy channel probability for small set of users.

D. Average Delay (τ)
The average delay is defined as the total time taken to transmit a packet by a user with all the possible transmission attempts.A user goes through backoff, channel sensing, transmission, and ACK stages, respectively for a single attempt to transmit a packet.Therefore, the total delay is calculated as t total = t b f f + t CCA + t Tx + t ACK , where t b f f , t CCA , t Tx and t ACK are time spent in backoff, channel sensing, transmission, and acknowledgement stages, respectively by a user for a single attempt without collision.By considering the collision, the average delay (τ) of a user is calculated as: where t total is total delay per transmission attempt and p c is collision probability.Eq. ( 16) is applicable for CSMA/CA and HCCA MAC protocol for delay calculation with their simulation parameters listed in Tables 1 and 2. Fig. 9 illustrates the average delay for PCD and IoT users in case of HCCA and CSMA/CA MAC protocols.The average delay is high in case of CSMA/CA due to RTS/CTS mechanism for PCD users.Furthermore, a similar trend follows in case of HCCA MAC for higher number of users.The comparison of delay for PCD and IoT users based on HCCA and CSMA/CA MAC protocol has been shown in Table 3.There is trade off between average throughput and delay requirements.Therefore, the MAC protocol can be chosen based on requirement of the applications preferred by the user.

E. Message Overhead (C m )
Since the message overhead is related to the probability of failure of a transmission attempt p f , we first calculate it.We first note that a failure can happen either due to a bit error in a packet, or due to a collision, i.e.
Note that we ignore the possibility of both collision and bit error, since it is likely to be very small in value.We denote the probability of bit error corrupting the packet by p e and collision by p c .We first note that a transmission failure can happen due to either a bit error corrupting the packet or a collision.This probability p e is equal to the probability of a single bit getting lost, i.e: where ξ is the bit error rate (BER).
We have already computed the probability of collision in Section 3B.In LiFi network, the probability of packet loss is very less due to less effect of multipath propagation as the light is directional in nature, and also a maximum of three reflection components can be considered for non-line of sight (NLOS) propagation.Consequently, p e and bit error rate (BER) [39,40] are much lower in case of LiFi network as compared to WiFi.
From Fig. 10, we can calculate p e using BER values.Therefore, we have simulated BER vs. SNR performance for LiFi.To show LiFi channel performs better as compared to the WiFi, we have also analyzed the BER performance by transmitting the same data through the LiFi channel as well as the WiFi channel separately, as shown in Fig. 10.We have also observed that for a particular SNR (let's say 15dB), BER is smaller for WiFi than for LiFi.Therefore, WiFi has higher packet loss probability as compared to LiFi due to the effect of multipath propagation in WiFi.
We now discuss the message overhead.The message overhead is defined as the number of extra messages required to access the channel using MAC protocol.This can be evaluated by using packet loss probability.Because of the failure of transmission attempts, the user needs to access the channel again.Therefore, extra messages are required for making another attempt to access the channel.The total number of transmission attempts (N a ) by a user for channel access using HCCA MAC protocol is expressed as: Eq. ( 19) is simplified further by using arithmetic and geometric progression, and it is expressed as: For N users, the message complexity (C m ) is expressed as: where 0 < p f < 1.The CSMA/CA protocol also uses RTS/CTS mechanism, which requires sending and receiving a single message whenever a transmission is necessary.A successful transmission incurs an overhead of 2 messages due to sending of RTS and CTS packets, whereas a failed transmission can either lead to an overhead of either 1 message or 2 messages depending on when the collision/error happens.Since collisions in both the cases are equally probable, we take the overhead to be equal to 1.5 in case of failed transmission.Thus, the overhead in terms of the number of messages for CSMA/CA is: Again, by considering the above as an arithmetic and geometric progression and substituting p s = 1 − p f , we get: We have already shown in Fig. 6 that the collision probability (and so p f ) increases much more rapidly in HCCA than in CSMA/CA.This directly leads to higher message overhead in the case of HCCA.Fig. 11 illustrates the message complexity of HCCA and CSMA/CA MAC mechanisms.We can observe that the message overhead increases with an increase in the number of users in the case of HCCA.This is because HCCA is a centralized MAC mechanism, where every user device needs to be notified about resource allocation.However, DCF-based CSMA/CA is a distributed MAC mechanism that provides consistent message complexity with an increase in the number of users.

HYBRID MAC MECHANISM
We now propose the hybrid MAC mechanism for LiFi APs.We first note that the requirement of PCD users and IoT users differ, as PCD users demand much higher data rates than IoT users.There is a tradeoff between throughput and delay.Thus, the AP needs to make a choice between HCCA and CSMA/CA depending on the type of devices that it is primarily serving.To make this decision, we design an objective function O.The objective function takes into account the achieved data rate by each device and the delay involved in sending packets.Formally, where D i is the data rate (in Mbps) achieved by user i and τ i represents its delay (in ms).The symbol γ represents a weight factor such that user devices that require low delay get higher values of γ.This ensures that if throughput is the most important criterion, then γ should be set to zero.On the other hand, if the delay is the most important, then the value of γ should be higher.We empirically set the maximum value of γ to 4 since, from the data shown in Table 2, the delays are of the order of tens of milliseconds, whereas the data rates are at most 40 Mbps.We note that PCD users demand high data rates, whereas IoT users demand low data rates.Therefore, we have considered 40 Mbps as the highest data rate for PCD users and 200 Kbps for IoT users in this analysis.In addition, data from IoT users have less packet size as compared to PCD users for their required application of use.We have assumed 400 bytes and 10 bytes of packets are used for PCD and IoT users, respectively, in the LiFi network.However, we have compared the performance of MAC protocols for PCD and IoT users by using HCCA and CSMA/CA mechanisms for evaluation metrics such as average network throughput, collision, busy channel probability, delay, and message overhead.
There are four sets of comparisons as illustrated in Table 3.We observe that in the case of comparison I, PCD-HCCA ensures the average network throughput of 0.70 and IoT-HCCA of 0.53.The PCD-HCCA combination provides high throughput with the expenses of 0.29 of both collision probability and busy channel probability, and 0.39 ms of average delay for successful transmission.Therefore, the comparison shows that the HCCA MAC protocol performs better for PCD users as compared to IoT users.Correspondingly, in comparison II, PCD users get a throughput of 0.70 using the HCCA MAC protocol, and IoT users ensure 0.76 of average network throughput using CSMA/CA MAC protocol.The IoT users experience lower message overhead due to lower message complexity of CSMA/CA, 0.32 of collision, and busy channel probability, each with the cost of a higher delay value of 7.6 ms.This comparison shows that PCD-HCCA provides better throughput at the cost of message overhead, busy channel, and collision probability.In contrast, IoT-CSMA also ensures better throughput at the cost of a higher average delay value.Furthermore, PCD-CSMA/CA combination provides a lower throughput value of 0.68 as compared to PCD-HCCA, as mentioned in comparisons III and IV.Therefore, from all these four comparisons of different combinations of user and MAC protocol, we observe that PCD-HCCA and IoT-CSMA/CA are providing better throughput requirements as compared to other combinations of user and MAC mechanism at the cost of other metrics, which can be tolerable according to the user's requirement.Therefore, we can conclude from the above analysis that the HCCA MAC protocol is ideal for PCD users, and CSMA/CA MAC protocol is ideal for IoT users in the indoor environment of the LiFi network.If multiple colored LED's are present, a hybrid MAC mechanism to fulfill various users' requirements could be used, where one color uses HCCA for PCD users, whereas another color uses CSMA/CA for IoT users.
We also provide a strategy for choosing MAC protocol in case of hybrid MAC with respect to average throughput, packet size, and the number of users present in the room.Fig. 12 shows the average throughput for the different numbers of users with different packet sizes.We observe that the average throughput of the user using HCCA MAC protocol is higher than the average throughput using CSMA/CA MAC protocol for L p = 5 bytes and L p = 10 bytes for N ≤ 14.However, the average throughput of the user reduces using the HCCA MAC protocol for larger N values.For N = 16 onwards, CSMA/CA protocol has higher average throughput as compared to HCCA MAC protocol for all L p values.But in the case of L p = 200 bytes and 400 bytes, the differences in average throughput are not quite distinguishable for CSMA/CA and HCCA MAC protocols.Therefore, N = 16 represents better differentiation in average throughput values of these protocols for L p = 200 and 400 bytes.It is recommended that a hybrid MAC protocol that switches between CSMA/CA and HCCA performs better than using any one of the standalone protocols.Furthermore, this switching should occur for N > 14 for L P values of 5 and 10 bytes, and N = 16 for L P values of 200 and 400 bytes.We note that smaller byte packets are usually used for IoT users, so CSMA/CA is more suited for IoT users.On the other hand, larger byte packets are used for PCD users, which makes HCCA a better option for such users.Note that the throughput can be maximized in Eq. ( 24) by setting γ = 0 so that the cutoff point is used to decide between CSMA/CA and HCCA.

CONCLUSION
In this work, we present a comparison of HCCA and CSMA/CA MAC mechanisms for heterogeneous set of PCD and IoT users to access the LiFi channel for uplink communication.We show via both simulation and analysis that HCCA is a more natural choice for LiFi communication than for WiFi due to the better channel conditions.However, HCCA has a disadvantage of higher number of collisions when the number of users increases.We observed from our simulations that HCCA performs better for a lower number of LiFi users, whereas CSMA/CA performs better for more number of users.Therefore, we have proposed a hybrid MAC mechanism of HCCA and CSMA/CA based on the throughput requirements of the users in LiFi wireless network that can switch between HCCA and CSMA/CA depending on the number of users.For future work, we plan to design a more dynamic switching technique depending on requirement of the

Fig. 2 .
Fig. 2. Illustration of uplink communication using IR LED in LiFi network for different types of gadgets carried by the user.

6 Fig. 3 .
Fig. 3. Average network throughput for different BE max value using HCCA uplink MAC protocol in LiFi network.

Fig. 4 .
Fig. 4. Average network throughput analysis for PCD and IoT users using CSMA/CA and HCCA uplink MAC protocol respectively in LiFi network.

6 Fig. 5 .
Fig. 5. Average network collision probability analysis for different backoff values using HCCA uplink MAC protocol in LiFi network.

Fig. 6 .
Fig.6.Average network collision probability analysis for PCD and IoT users respectively using CSMA/CA and HCCA uplink MAC protocol in LiFi network.

6 Fig. 7 .
Fig. 7. Average network busy channel probability analysis for different backoff values using HCCA uplink MAC protocol in LiFi network.

Fig. 8 .
Fig. 8. Average network busy channel probability for PCD and IoT users respectively using CSMA/CA and HCCA uplink MAC protocol in LiFi network.

Fig. 9 .
Fig. 9. Average delay for PCD and IoT users respectively using CSMA/CA and HCCA uplink MAC protocol in LiFi network.

Fig. 11 .
Fig. 11.Comparison of message overhead for HCCA and CSMA/CA MAC mechanisms.

Fig. 12 .
Fig. 12. Choosing MAC protocol based on average throughput, packet size, and the number of users using hybrid MAC mechanism.

Table 1 .
Simulation parameters of HCCA MAC protocol

Table 2 .
Simulation parameters of CSMA/CA MAC protocol

Table 3 .
Comparison of HCCA and CSMA/CA MAC protocols for a heterogeneous set of PCD and IoT users