# Optical CDMA MAC Evaluation in Vehicle-to-Vehicle Visible Light Communications

Emmanuel Plascencia, Oyunchimeg Shagdar, Hongyu Guan, Olivier Barrois, Luc Chassagne

► To cite this version:

Emmanuel Plascencia, Oyunchimeg Shagdar, Hongyu Guan, Olivier Barrois, Luc Chassagne. Optical CDMA MAC Evaluation in Vehicle-to-Vehicle Visible Light Communications. Electronics, 2022, 11 (9), pp.1454. 10.3390/electronics11091454. hal-03772593

HAL Id: hal-03772593

https://hal.science/hal-03772593v1

Submitted on 24 Oct 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
Article

# Optical CDMA MAC Evaluation in Vehicle-to-Vehicle Visible Light Communications

Emmanuel Plascencia <fnref n="1" />,<fnref n="2" /> ID, Oyunchimeg Shagdar <fnref n="1" /> ID, Hongyu Guan <fnref n="2" />,* ID, Olivier Barrois <fnref n="2" /> and Luc Chassagne <fnref n="2" />

<figure><img src="image_2.png" /></figure>

check for
updates

**Citation:** Plascencia, E.; Shagdar, O.;
Guan, H.; Barrois, O.; Chassagne, L.
Optical CDMA MAC Evaluation in
Vehicle-to-Vehicle Visible Light
Communications. *Electronics* **2022**, *11*,
1454. https://doi.org/10.3390/
electronics11091454

Academic Editor: João Soares

Received: 21 March 2022

Accepted: 27 April 2022

Published: 30 April 2022

**Publisher's Note:** MDPI stays neutral
with regard to jurisdictional claims in
published maps and institutional affil-
iations.

<figure><img src="image_3.png" /></figure>

**Copyright:** © 2022 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).

**Abstract:** One of the most critical challenges in vehicle-to-vehicle (V2V) visible light communications (VLCs) is the access capability of multi-users over the same channel. VLC links are known to be line of sight (LOS) and highly directional compared to the commonly used radio-frequency (RF) technologies, but multi-user interference can still be problematic. Consequently, it is necessary to develop a medium access control (MAC) protocol for VLC. In the present work, we propose a novel optical code division multiple access (OCDMA) protocol. The fundamentals of the VLC channel are presented, and the interference problem is discussed in more detail. We also explain the CDMA MAC protocol and its adaptation from optical fiber communications. The simulations with our OCDMA protocol based on pseudo-noise (PN) sequence codes are presented, and the results are compared with those obtained using a solution based on VLC and optical orthogonal codes (OOCs) from the OCDMA gold standard. Finally, the results show that PN sequence OCDMA can provide sufficiently high performance and is particularly attractive because there are no synchronization requirements between nodes in real V2V scenarios.

**Keywords:** visible light communication (VLC); multi-user interference (MUI); vehicle-to-vehicle (V2V) communication; medium access control (MAC); optical code division multiple access (OCDMA)

# 1. Introduction

Visible light communication (VLC) has emerged as a powerful alternative to support
the cooperative intelligent transport systems (C-ITS).

VLC is characterized by line-of-sight (LOS) links with a restricted field-of-view (FOV) leading to directional short-range communications. Thanks to these characteristics, VLC is well suited to a number of V2V communication applications, particularly those requiring highly secure, reliable, and low-latency communications between vehicles, such as platoons. Furthermore, the technology can coexist with RF technologies (WiFi, 4G/5G, etc.), providing a virtually unlimited spectrum increase with unrestricted access.

Much of the research efforts in VLC have focused more particularly on designing the
physical layer (PHY). Indeed, IEEE 802.15.7 [1] and 802.15.7r1 [2] standards define three
types of physical layer, PHY-I, PHY- II, and PHY-III, where PHY-I is for outdoor applications.
A VLC system with PHY-I provides ON-OFF keying (OOK) and variable pulse position
modulation (VPPM) functionalities. It was developed for outdoor applications with data
rates in the tens to hundreds of kbps. Numerous studies have demonstrated the feasibility
of VLC for V2V communications. The authors in [3–6] demonstrated the feasibility of VLC
for V2V and V2I (Vehicle-to-Infrastructure) communication at distances of between 20 and
130 m and data rates of 11 to 500 kbps.

VLC presents rich physical layer solutions but the technology cannot be used for
distributed vehicular ad hoc networks (VANETs) due to the lack of MAC protocol. In

<footnote n="1">¹ Institut VEDECOM, 23 bis Allée des Marronniers, 78000 Versailles, France;
luis-emmanuel.plascencia@vedecom.fr (E.P.); oyunchimeg.shagdar@vedecom.fr (O.S.)</footnote>

<footnote n="2">² LISV, UVSQ (Laboratoire d'Ingénierie des Systèmes de Versailles, Université de Versailles Saint-Quentin), Université Paris-Saclay, 78124 Vélizy-Villacoubay, France; olivier.barrois@uvsq.fr (O.B.); luc.chassagne@uvsq.fr (L.C.)</footnote>

<footnote>* Correspondence: hongyu.guan@uvsq.fr</footnote>
our previous work [7], we showed that multi-user interference (MUI) can greatly degrade packet delivery performances in medium to dense traffic scenarios. The work demonstrated the need for MAC in VLC for vehicular applications.

Current standards define four random access methods that can be used as MAC for VLC: Unslotted random access, slotted random access, unslotted carrier sense multiple access with collision avoidance (CSMA/CA), and slotted CSMA/CA [2,8]. In our opinion, in unidirectional vehicular VLC, CSMA/CA is not conceivable since it requires the transmitter to know the receiver's channel status.

First of all, carrier sensing at the VLC transmitter does not help because the transmission medium conditions at the transmitter do not represent the conditions at a VLC receiver due to the limited FOV of VLC. Hence, only carrier sensing at the VLC receiver would make sense. However, the receiver needs to provide the VLC transmitter with the information and this information exchange cannot be achieved via the same VLC link because it is very difficult to build bi-directional links in a dynamic network topology such as that of VANET. In this case, a convincing way to apply CSMA/CA for VLC would be for the VLC receiver to provide information about the transmission medium conditions via another channel using RF technology, for instance. This solution is costly as it requires both VLC and RF technologies to be installed on each node for the VLC to work.

In this paper, we propose a Code Division Multiple Access (CDMA)-based MAC protocol for vehicle-to-vehicle VLC communication. The proposed CDMA protocol does not use carrier sensing, i.e., the receiver does not need to inform the transmitter of its transmission medium conditions. We studied two types of CDMA codes: Orthogonal and non-orthogonal. We showed that non-orthogonal PN codes can provide a packet delivery ratio close to 100% and are more interesting because, unlike orthogonal codes, do not require time synchronisation between nodes.

The contributions of the current paper are as follows:

* We provide a detailed review of existing research on MAC for VLC.

* We develop a mathematical model of VLC performance under multi-user interference (MUI).

* We propose a CDMA-based MAC protocol to avoid MUI in VLC. The proposed solution allocates a CDMA code to an outgoing transmission such that interference from the two adjacent lanes is suppressed and interference from the same lane is reduced.

* Extensive simulation evaluations were carried out applying orthogonal and non-orthogonal CDMA codes. The simulation results show that the packet delivery performance of non-orthogonal PN codes is sufficiently high, no time synchronisation between nodes is necessary, and the processing time is minimal.

The rest of the present work is organized as follows. Section 2 introduces the related work. Section 3 presents the VLC performance modelling under MUI. Section 4 proposes the CDMA approaches for VLC technologies. The proposed MAC protocol is evaluated using computer simulations in Section 5. Finally, Section 6 concludes the paper.

## 2. Related Work

As mentioned earlier, VLC standards recommend using CSMA/CA for the MAC layer with VLC technology. The authors in [9] developed a VLC prototype integrating standard 802.15.7. The prototype implemented PHY-I and a minimal set of service access point (SAP) MAC layers for visible-light personal area networks (VPANs). The paper does not provide details on the behaviour of the MAC protocol implemented.

The authors in [10] conducted simulations using a hybrid communication scheme with radio-frequency (RF) and VLC technologies. They assessed the performance of the IEEE 802.11 MAC protocol adapted to the field of VLC with minimal modifications. The results show that even with the appropriate changes, it is difficult to achieve a satisfactory packet delivery ratio (PDR) for scenarios with multiple transmitters. Ishihara et al. [11], propose a hybrid model combining RF and VLC in which CSMA/CA and ALOHA protocols were
used. The simulation results show that using multiple technologies can improve the reliability of communication for platooning applications. In 2016, the authors in [12] proposed an optical CDMA based on the quality of service (QoS) required by each node in the network. The optical codewords implemented are not detailed in the paper. Mao et al. [13] proposed a MAC protocol for VLC using OCDMA with OOC and time division multiple access (TDMA) mechanisms. The authors evaluated the protocol performance through simulations and presented the average access delay for different network densities and the throughput for multiple “packets per second” values.

The authors in [14] present an RF and VLC hybrid communication simulation study for a real-life scenario. IEEE 802.11p and IEEE 802.15.7 standards were considered for the RF and VLC technologies. The simulation results show acceptable performance in terms of data rate for multiple scenarios with varying traffic densities and message generation rates. Amjad et al. [15] present a vehicular VLC prototype based on the GNU Radio framework (orthogonal frequency division multiplexing—OFDM transceiver), providing different modulation and coding schemes. The experimental results show the PDR performance of different modulation types at different distances. The work does not assess MAC. The most recent study [16], presents a Multi-Hop vehicular VLC network simulation with a CSMA/CA MAC protocol. The simulation was based on PHY-I defined in IEEE 802.15.7 standard with OOK modulation. The authors present the scenario and protocol parameters, as well as the simulation results. The performance of the MAC protocol is reliable for high traffic densities in terms of packet error rate (PER) and inter-vehicular distance in different weather conditions.

All these studies are illustrated in Figure 1. It can be seen that there has been no real trend or evolution in MAC solutions over the past decade. Most of them are based on simulations; five are based on the IEEE 802.15.7 standard with modifications and six (excluding our study) on CDMA.

The current work contributes to the literature by proposing a novel optical CDMA protocol for V2V communication taking into account two types of spreading codes: OOC and PN.

<figure><img src="image_4.png" /><figcaption>**Figure 1.** State of the Art of Vehicular VLC MAC protocols.</figcaption></figure>

**3. Modelling VLC Performance under Multi-Users Interference**

In this section, we first present a VLC channel model and then identify potential VLC links, on which visible light communications and interference are possible. Finally, packet delivery ratio (PDR) is evaluated by taking into account multi-user interference and environmental noise.
### 3.1. VLC Channel Model

The power of a VLC signal emitted by LED and received by a photodiode (PD) can be expressed as follows [17–19]:

$$ Pr = \frac{H_0(\phi, \psi)}{d^2} P_t, \qquad (1) $$

where $d$ is the distance between the LED and the PD, $P_t$ is the transmission power, and $H_0(\phi, \psi)$ can be found as

$$ H_0(\phi, \psi) = \begin{cases} \frac{A_r(m_i+1)}{2\pi} \cos^{m_i}(\phi) \cos \psi & 0 \le \psi \le \psi_c, \\ 0 & \text{elsewhere} \end{cases}. \qquad (2) $$

$A_r$ is the effective reception area of the photodiode, $m_i$ the Lambert coefficient related to the LED semi-angle at half-power, $\phi$ and $\psi$ are the irradiance and the incidence angles (see Figure 2), and finally, $\psi_c$ is the receiver field-of-view (FOV).

<figure><img src="image_5.png" /><figcaption>Figure 2. Relative positioning of a transmitter (left vehicle) and a receiver (right vehicle).</figcaption></figure>

### 3.2. Multi-Users Interference: Potential Number of Interfering Signals

In this subsection, we identify the number of simultaneous VLC links that a given receiver could have. Specifically, targeting a three-lane straight road as illustrated in Figure 3, we identify positions of transmitter vehicles that have VLC links with a given receiver, the blue vehicle on the middle lane. Vehicles can transmit VLC signals using their rear lights and the receiver receives signals using a PD installed in the middle of the front bumper.

<figure><img src="image_6.png" /><figcaption>Figure 3. Target scenario.</figcaption></figure>
For VLC, a communication link is present if only the following two conditions are met.

* LoS condition: The transmitter and the receiver has a line-of-sight (LoS) path from each other.

* FOV condition: The LoS path between the transmitter and receiver is in the FOV of the receiver ($\psi_c$).

From Figure 3, it is obvious that the above conditions are met for the emitting vehicle (green vehicle), which is immediately in front of the target vehicle (blue vehicle). These two vehicles share zero irradiance and zero incidence angles. It is also obvious that the vehicles in front of the emitting vehicle do not meet the LOS condition, and hence they do not have the VLC link with the target receiver.

Now we are going to identify vehicles on the adjacent lanes that have VLC link with the target receiver and then thus could be interfering sources. Due to the FOV condition, we can easily say that the vehicles sharing VLC link with the target receiver must be either in the front left or in the front right side of the target receiver. Letting $l$ be the length of the left lane (interchangeably, the right lane) on which we can find vehicles that have VLC link with the target receiver. Due to the LoS condition, $l$ is bounded by $L$ distance (see Figure 3), where

$$ tan(\theta) = \frac{d_w/2}{d_{inter}} = \frac{w}{L}. \qquad (3) $$

Here, $d_{inter}$ is the bumper to bumper distance between the green and blue vehicles, $d_w$ is the vehicle width, $\theta$ is the shadowing angle formed between the receiver PD and the intended transmitters vehicle body, and $w$ is the lateral distance between the receiver and transmitters on the adjacent lane (see Figure 3). Due to FOV condition, the longitudinal distance $s$, starting from which, the LOS path gets in the FOV receiver, is found as follows:

$$ s = w \times \frac{1}{\tan(\psi_c)}. \qquad (4) $$

In order to have a VLC link, both the conditions have to fulfill, and thus we can finally find $l$ on which the interfering nodes can be found:

$$ l = \max(0, L - s). \qquad (5) $$

It is clear that any vehicle $i$ on the adjacent lane that has a VLC link with the target receiver share an irradiance ($\phi_i$) and incidence ($\psi_i$) angles fulfilling the following condition:

$$ \psi_c \ge \phi_i = \psi_i \ge \theta \qquad (6) $$

We can now calculate the average total number of vehicles that have VLC links to the target vehicle:

$$ M = 2 \times \left( \frac{l}{d_{inter} + d_{len}} \right) + 1. \qquad (7) $$

Here $d_{len}$ is the vehicle length. Figure 4 shows the calculated number vehicles that have a VLC link with the target VLC receiver.

The parameters used in the calculation are listed in Table 1. The results show that, for the target highway scenario, a receiver can have up to six VLC links, and hence for a given intended signal, it can have interference from up to five vehicles.
<figure><img src="image_7.png" /><figcaption>**Figure 4.** Number of VLC links.</figcaption></figure>

<table><caption>**Table 1.** Simulation Parameters.</caption><thead><tr><td>Parameter</td><td>Value</td></tr></thead><tbody><tr><td>PD reference</td><td>SFH-206 k [20]</td></tr><tr><td>A<sub>r</sub></td><td>7.02 mm<sup>2</sup></td></tr><tr><td>PD efficiency</td><td>0.62 A/W</td></tr><tr><td>Reciver FOV (ψ<sub>c</sub>)</td><td>60°</td></tr><tr><td>LED half angle (α)</td><td>20°</td></tr><tr><td>Vehicle width (d<sub>w</sub>)</td><td>2 m</td></tr><tr><td>Vehicle length (d<sub>len</sub>)</td><td>5 m</td></tr><tr><td>PD capacitance</td><td>72 pF/m<sup>2</sup></td></tr><tr><td>Transmission frequency</td><td>500 kHz</td></tr><tr><td>Transmission power</td><td>4.5 Watt (car taillight)</td></tr><tr><td>Inter-PD separation distance</td><td>1.2 m</td></tr><tr><td>Data size (L)</td><td>32 Bytes</td></tr><tr><td>OOC Length</td><td>49 chips</td></tr><tr><td>Number of OOC codes</td><td>4</td></tr><tr><td>PN Length</td><td>9 chips</td></tr><tr><td>Number of PN codes</td><td>7</td></tr></tbody></table>

### 3.3. PDR Performance

In the previous subsection, we have identified the number of interfering VLC links. Therefore, in order to have a successful communication the signal quality has to be sufficiently high compared to the total interference power. In the following, using Matlab, we evaluate the impact of multi-user interference on the packet delivery ratio between a given transmitter and receiver on a seven-lane straight road as illustrated in Figure 5. The Matlab simulation generates a random packet of 256 bits for each vehicle. Then, those packets are encoded with the code and vehicle lane, corresponding to the ongoing simulation, except for the No-MAC simulations. Finally, the data encoded is modulated in Manchester and sent to a Simulink model. We add the channel effects to the data on the Simulink program to recover it after an analog filter. We demodulate and decode the received signal to compare it against the data sent and get the PDR. The main parameters are summarized in Table 1.
The focus of the evaluation is the multi-user interference, and hence, for the sake of simplicity, environmental noise and visible light reflection have been ignored.

The intended transmitter (white vehicle) and the receiver (green vehicle) are driving in the middle lane (lane 4) with an inter-vehicular distance of 18 m. We consider that the vehicles are travelling at a similar speed, the situation being almost a platoon configuration. The Doppler effect is then neglected. The distance corresponds to a reasonable braking distance for an autonomous vehicle at a speed of 50 km/h [21–24]. The third interfering vehicle is added (blue vehicle), to evaluate the impact of its signal emitted on the communication between the intended transmitter and the receiver depending on the position of the interfering vehicle.

More specifically, the position of the interfering vehicle was changed by 10 cm increments in each lane (see Figure 5).

<figure><img src="image_8.png" /><figcaption>**Figure 5.** Target scenario: The intended transmitter (Tx: White vehicle) and receiver (Rx: Green vehicle) are in the middle lane at a fixed distance; the interfering vehicle (blue vehicle) is in various positions in the different lanes.</figcaption></figure>

Figure 6 shows the simulation results according to the position of the interfering vehicle in the individual lanes. The results provide us with the following insights:

* PDR is 0% (i.e., no communication is possible between the intended transmitter and the receiver) when the interfering vehicle is between the transmitter and the receiver. This is because the body of the interfering vehicle is obstructing the signal. We are interested in MAC to deal with the issue of multi-user interference, so the current scenario is out of the scope of this work (we cannot solve the issue with MAC).

* PDR is 100% when the interfering vehicle is in the same lane as the transmitter and the receiver but not between the two.

* PDR can be as low as 50% if the interfering vehicle is in an adjacent lanes.

As VLC is expected to be used for safety-critical applications such as platooning, as well as lane changing and lane merging assistance, a PDR performance as low as 50% to 90% is unacceptable. The above results demonstrate the need for a MAC protocol for V2V communications and to avoid MUI.
<figure><img src="image_9.png" /><figcaption>(a) PDR Mapping.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>(b) Details of PDR per lane.</figcaption></figure>

**Figure 6.** (a) View of PDR performance from above with MUI (blue vehicle) in V2V VLC without MAC, when transmitter (gray vehicle) and receiver (green vehicle) are in lane 4 of a seven-lane road with an inter-vehicle distance of 20 m; (b) Details of PDR performance.

## 4. Proposed CDMA-Based MAC Protocol for VLC

As we can see in Figure 1, various MAC solutions, particularly TDMA, CDMA, CSMA/CA, and ALOHA, have been studied for VLC systems. The benefits and drawbacks of the different solutions are as follows:

* ALOHA and CSMA/CA cannot provide collision-free channel access, but they are robust in distributed networks. ALOHA does not require channel sensing, but its performance is known to be poorer compared to CSMA/CA. However, CSMA/CA is an improved protocol of ALOHA and is widely used for distributed radio technologies, e.g., IEEE 802.11. Nevertheless, as mentioned previously, CSMA/CA is not realistic in unidirectional VLC because it requires the transmitter to be aware of the status of the channel condition at the receiver.

* TDMA can provide collision-free channel access when the nodes are perfectly time-synchronised. The challenge with TDMA is to allocate unique slots to individual nodes (users), and the slot allocation is dynamically updated in response to the mobility (nodes join and leave the network) and requirements of the nodes (nodes need more or fewer resources). Nearly optimal TDMA MAC can be designed for centralised networks (cellular networks), where slot allocation is made by a centralised network.
coordinator, e.g., a base station. Conversely, it is much more challenging in distributed
mobile networks because nodes have to individually select slots while ensuring that
these slots are not selected by other nodes. The TDMA MAC protocols proposed for
distributed radio access networks, such as that of Mao et al. [13], require nodes to
build a consensus based on information exchange between them. Similar to the case
of CSMA/CA, such a solution is difficult to achieve or costly in VLC.

* In contrast to ALOHA, CSMA/CA, and TDMA, where nodes share the resources in the time domain (i.e., channel access is achieved by only one node at a time), in CDMA, nodes are allowed to simultaneously access the channel using spread-spectrum technology. More specifically, each node spreads (codes) the ongoing message using a spreading code. Two types of spreading codes exist: Synchronous and asynchronous. Synchronous codes, such as Gold codes, have very strong cross-correlation properties. They can perfectly eliminate the spread of interference signals using a different code subject to the signals being perfectly time-synchronised. Conversely, asynchronous codes such as PN codes have weaker cross-correlation properties but do not require time synchronisation between nodes. The key challenge of CDMA MAC protocols is code allocation. In this section, we propose a CDMA MAC protocol in which nodes independently select CDMA codes based on their position and direction. The algorithm does not require information exchange between potential interfering nodes.

* Frequency division multiple access (FDMA) could also be a solution but it is more complex and the development and installation of the platform is more difficult [25].

The proposed MAC is designed particularly for V2V communication for vehicles in a platoon [26], which is the key application of VLC. The main purposes are:

* To ensure vehicles in adjacent lanes use different codes so that interference from adjacent lanes is greatly reduced if not completely suppressed (depending on the code type),

* To reduce the probability of using the same code for vehicles in the same lane or vehicles in non-adjacent parallel lanes.

We assume that individual vehicles, particularly automated vehicles, are aware of
their positions and the road lane (i.e., the lane id) [27]. As illustrated in Figure 7, individual
lanes have distinct identifications.

<figure><img src="image_11.png" /><figcaption>**Figure 7.** Examples of lane numbering for different road configurations. (a) Highway lane numbering. (b) Intersection lane numbering.</figcaption></figure>
In the proposed scheme, we have divided the total number of available spreading codes, *N*, into *n* code groups where each code group is allocated to vehicles in particular lanes. When *N* is 24 and *n* is 4, each code group contains six codes. Each code group is assigned to vehicles in particular lanes, e.g., code group 1 is assigned to lanes 1, 5, and 9, for example.

Figure 8 depicts the proposed MAC protocol. To transmit a packet using VLC, the vehicle first identifies its position and the lane ID. Then randomly selects one code from the code group assigned to that specific lane. Individual cars, mainly automated vehicles, are supposed to be aware of their positions and the road lane (lane id) [27,28].

<figure><img src="image_12.png" /><figcaption>Figure 8. Flowchart of the proposed CDMA MAC protocol.</figcaption></figure>

The following two types of CDMA codes are considered and evaluated in the present work.

## 4.1. *Optical Orthogonal Codes (OOC)*

The OOC codes are constructed using chips (0's, 1's) of length *n* and weight *w*, with the constraints that they must be orthogonal. In 1989, the authors in [29,30] outlined the main properties and mathematics behind the design of OOC. These properties are auto-correlation and cross-correlation. To distinguish one code from another, the auto-correlation of each one must exhibit impulse behaviour (see Figure 9a). Conversely, cross-correlation between different codes must have a much smaller value, close to zero (see Figure 9b).
<figure><img src="image_13.png" /><figcaption>**Figure 9.** Auto- and cross-correlation properties of OOC. (a) OOC auto-correlation property. (b) OOC cross-correlation property.</figcaption></figure>

## 4.2. *Optical Pseudo Noise Codes (PN)*

PN codes are codes formed using 0's and 1's, that look like the channel noise but have a deterministic construction. Similar to OOC codes, PN codes must show higher auto-correlation (Figure 10a) than cross-correlation values (Figure 10b) as detailed in Mollah et al. [31]. PN codes are implemented in [32] as a proposition for an optical-fibre CDMA MAC protocol.

<figure><img src="image_14.png" /><figcaption>**Figure 10.** Auto-correlation and cross-correlation properties of the Pseudo Noise Codes. (a) PN codes auto-correlation property. (b) PN codes cross-correlation property.</figcaption></figure>

Figures 9 and 10 show the correlation properties of the two types of code. First of all, the auto-correlation and cross-correlation of the OOC codes always remain below 0.3, except when the auto-correlation is synchronized (*correlation* = 1). Consequently, OOC codes should perform well if the signals are synchronised. In contrast, for PN codes the correlation does not always have the same value. If the auto-correlation values are greater than the cross-correlation values, the PN codes can be detected in the case of asynchronous transmission which can be very useful in our case.

# 5. Performance Evaluation

In this section, we evaluate the performance of the proposed MAC protocol for a seven-lane highway scenario illustrated in Figure 5.

We implemented the proposed VLC MAC and VLC physical layer in a Matlab simulator and evaluated the PDR performance of the proposed MAC with OOC and PN codes. The results of the proposed MAC were compared with the case where no MAC was implemented (hereinafter no-MAC solution). The simulation parameters are listed in Table 1 and the Simulink model is shown in Figure 11.
The Matlab script updates the position of the interfering vehicle in 10 cm increments, randomly encodes the data generated using the PN or OOC codes depending on the case, and transmits the packet using Manchester modulation. Finally, after passing through the free-space optical (FSO) channel, the receiver filters the signal, demodulates, decodes, and stores the data received for subsequent comparison with the transmitted data.

<figure><img src="image_15.png" /><figcaption>**Figure 11.** VLC system architecture in Simulink. AFE: Analogue front end, the part including the photo-diode receiver and simulated by Matlab as described previously.</figcaption></figure>

For the sake of controllability, we manually assigned the codes to each lane and launched the simulation several times, changing the code of the respective lanes each time. We set the capability to repeat each code every 3 lanes, first for the OOC codes and then for the PN codes. Due to space limitations, hereunder we have only reported a few of the results obtained.

## 5.1. Performance of the MAC Protocol with Synchronised OOC

Figure 12 compares the PDR performance of the proposed MAC with OOC codes with the no-MAC solution when the intended and interfering signals are perfectly synchronised. The code allocation for this test trial was as follows:

* Lane 1—OOC code 1,

* Lane 2—OOC code 4,

* Lane 3—OOC code 2,

* Lane 4—OOC code 1,

* Lane 5—OOC code 2,

* Lane 6—OOC code 4,

* Lane 7—OOC code 3.

The intended transmitter and the receiver are in Lane 4, hence OOC code 1 is used. The correlation of this code with the other codes is shown in Figure 13 and a very clear auto-correlation peak can be seen (code 1 with code 1) when the codes are perfectly synchronised. The difference between this peak value and the other values is quite large, indicating the decoding capability of OOC when the signals are synchronised.

It is clear that in contrast to the no-MAC solution, which shows a PDR of 50% when the interfering nodes are in adjacent lanes, the proposed MAC provides a PDR of nearly 100% regardless of the position of the interfering vehicle. As mentioned earlier, due to the signal obstruction problem, the PDR is 0% when the interfering vehicle is placed between the intended transmitter and the receiver. However this is a problem more general to VLC that we cannot solve with a MAC protocol.
<figure><img src="image_16.png" /><figcaption>(a) PDR Mapping.</figcaption></figure>

<figure><img src="image_17.png" /><figcaption>(b) PDR comparison between OOC-CDMA MAC and no MAC.</figcaption></figure>

<figure><img src="image_18.png" /><figcaption>**Figure 13.** Correlation of OOC code 1 with the rest of the OOC codes. OOC code 1 was selected as the code for the intended transmitter-receiver pair for the simulation results in Figure 12.</figcaption></figure>
## 5.2. Performance of the MAC Protocol with PN Codes

The second set of evaluations concerns the proposed MAC protocol using PN codes. Figure 14 compares the results of the proposed MAC with those of the no-MAC solution. The PN codes were allocated as follows:

* Lane 1—PN code 6,

* Lane 2—PN code 4,

* Lane 3—PN code 7,

* Lane 4—PN code 3,

* Lane 5—PN code 5,

* Lane 6—PN code 2,

* Lane 7—PN code 1.

<figure><img src="image_19.png" /><figcaption>(a) PDR Mapping.</figcaption></figure>

<figure><img src="image_20.png" /><figcaption>(b) PDR comparison between PN-CDMA MAC and no MAC.</figcaption></figure>

**Figure 14.** (a) View of PDR performance from above with MUI in V2V VLC with PN-CDMA MAC, when the transmitter and receiver are in the centre lane of a seven-lane road with an inter-vehicle distance of 18 m; (b) Details of PDR performance.

PN code 3 was allocated to the intended transmitter in lane 4. The correlation properties of this code with the other codes are presented in Figure 15. Compared with the case of OOC (Figure 13), some noise is observed, with peaks even for cross-correlation with another code, e.g., with code 7. Nevertheless, the proposed MAC protocol with PN codes shows a sufficiently high PDR (PDR > 90%) for all the lanes in the target scenario.
However, we observed some fluctuations, particularly when the interfering vehicle was in lane 3, due to the cross-correlation properties of the codes.

<figure><img src="image_21.png" /><figcaption>**Figure 15.** Correlation of PN code 3 with the rest of the PN codes. PN code 3 was selected as the code intended for the transmitter-receiver pair for the simulation results in Figure 14.</figcaption></figure>

### 5.3. Performance of the MAC Protocol for Asynchronous Signals

As mentioned earlier, the OOC and PN codes have very distinct code correlation characteristics. For OOC, only the autocorrelation is equal to 1 for code 1. The cross-correlation with the other codes is nearly 0, showing the orthogonality between the codes. Nevertheless, for code 1, the autocorrelation is equal to 1 only when the signals are perfectly synchronised. VANETs are distributed asynchronous networks; hence it is difficult and costly to synchronize the nodes. Therefore, it is more realistic to consider that the vehicles are not synchronised and that they can transmit packets any time they need to.

To this end, in this subsection, we evaluate the performance of the proposed MAC protocol when the intended and interfering signals are not synchronised. In the simulations, the intended and interfering signals were transmitted to the channel at random time intervals, and the PDR of the intended communication was calculated.

The most critical impact of the interference vehicle is on the adjacent lane to the intended transmitter and receiver. Thus, the following results are only a two lanes scenario with the intended Tx and Rx placed in one lane. The interference vehicle changes its position along the adjacent lane as in the previous simulations. Figure 16 demonstrates that the PDR performance of the protocols does not decrease less than 90% when asynchronous OOC and PN codes are used. We can see that when the code is not synchronized with the intended emitter, the impact of the interference is reduced for both codes resulting in PDR performances over 99%.

Finally, to examine the practicality of implementing this suggested MAC protocol, we compare the latency that may be predicted by the processing time (simulation time) for encoding, transmitting, and decoding a 32 byte frame with OOC and PN codes. The transmission time is the time it takes to send a message from start to finish. Because of the length of each code and the complexity of the coding/decoding stages, the transmission time for each OCDMA code will vary.

Furthermore, transmission time should not be confused with propagation delay, which is the amount of time it takes for the initial bit to travel from transmitter to receiver and is affected by transmission frequency and frame length (hence, 9 ms for PN codes, and 49 ms for OOC codes, both at 500 kHz).
<figure><img src="image_22.png" /><figcaption>Figure 16. PDR performance comparison between PN and OOC OCDMA for asynchronous communications.</figcaption></figure>

The propagation speed of wireless communication relies on the physical channel of the connection. It is in the range of 3 × 10⁸, which is comparable to the speed of light (66.79 ns for the case of a 20 m separation between the intended Tx and Rx). As a result, the packet delivery time (PDT) or latency is defined as the time elapsed between when the first bit leaves the transmitter and when the last bit is received. We include the coding and decoding time in the simulation to illustrate the influence of complexity on the ability to code/decode the developed OCDMA code. It is written as follows:

$$ PDT = 66.79 \text{ ns} + \text{Transmission time} + \text{Coding/Decoding time} \quad (8) $$

According to the data, we can see in Table 2 that OOC codes need ten times more computational complexity to process compared to PN codes. However, it is essential to note that the complexity displayed in the plot does not represent network latency. As a result, the numbers are provided to compare the discrepancies between the codes and should not be interpreted literally as latency values. This discovery is predicted due to the various lengths of the codes; yet, it is crucial to quantify it, especially for platooning applications of autonomous vehicles, where the reaction time of the following vehicles has a significant effect on the platoon's performance.

<table><caption>Table 2. Comparison of average simulation computational complexity between the two codes implemented.</caption><thead><tr><td>Code</td><td>Computational Complexity</td></tr></thead><tbody><tr><td>OOC</td><td>0.95</td></tr><tr><td>PN</td><td>0.07</td></tr></tbody></table>

## 6. Conclusions

VLC V2V is characterised by LOS and direct links, therefore, multi-user interference becomes an issue. In this paper, we provided an overview of existing MAC protocols and proposed a CDMA-based MAC protocol. In the proposed MAC protocol, nodes individually select CDMA codes based on their position and the current lane ID. We implemented the proposed MAC protocol in the Matlab simulator and evaluated the PDR performances when OOC and PN codes were used. The simulation results show that the proposed scheme, regardless of the code type, can provide a PDR greater than 90%, with an improvement in performance of up to 40% compared to the no-MAC solution. Moreover, the simulation study on asynchronous communications revealed that the PN codes performed similar to the OOC codes, and the impact of the interference is reduced for both codes. Finally, the analysis of the computation complexity also showed that PN codes
are more attractive for automotive applications that require lower computational resources. Future work will include prototype development and testing of the proposed solution.

**Author Contributions:** investigation, E.P.; methodology, O.S., H.G., O.B. and L.C.; software, E.P.; supervision, O.S., H.G. and L.C.; validation, E.P., H.G. and O.B.; visualization, E.P.; writing—original draft preparation, E.P., O.S., H.G. and L.C.; writing—review and editing, O.S., H.G. and L.C. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Acknowledgments:** We want to thank all who gave support to complete this paper.

**Conflicts of Interest:** The authors declare no conflict of interest.

## References

1. 802.15.7-2011; IEEE Standard for Local and Metropolitan Area Networks—Part 15.7: Short-Range Wireless Optical Communication Using Visible Light. 2011. Available online: https://ieeexplore.ieee.org/document/6016195 (accessed on 1 April 2022).

2. 802.15.7-2018; IEEE Standard for Local and metropolitan area networks—Part 15.7: Short-Range Optical Wireless Communications. 2019. Available online: https://ieeexplore.ieee.org/document/8697198 (accessed on 1 April 2022).

3. Avătămăniței, S.A.; Căilean, A.M.; Zadobrischi, E.; Done, A.; Dimian, M.; Popa, V. Intensive testing of infrastructure-to-vehicle visible light communications in real outdoor scenario: Evaluation of a 50 meters link in direct sun exposure. In Proceedings of the IEEE 2019 Global LIFI Congress (GLC), Paris, France, 12–13 June 2019; pp. 1–5.

4. Cailean, A.M.; Dimian, M.; Done, A. Enhanced design of visible light communication sensor for automotive applications: Experimental demonstration of a 130 meters link. In Proceedings of the IEEE 2018 Global LIFI Congress (GLC), Paris, France, 8–9 February 2018; pp. 1–4.

5. Siddiqi, K.; Raza, A.; Muhammad, S.S. Visible light communication for V2V intelligent transport system. In Proceedings of the IEEE 2016 International Conference on Broadband Communications for Next Generation Networks and Multimedia Applications (CoBCom), Graz, Austria, 14–16 September 2016; pp. 1–4.

6. Nawaz, T.; Seminara, M.; Caputo, S.; Mucchi, L.; Catani, J. Low-Latency VLC System with Fresnel Receiver for I2V ITS Applications. *J. Sens. Actuator Netw.* **2020**, *9*, 35. [CrossRef]

7. Plascencia, E.; Shagdar, O.; Guan, H.; Chassagne, L. Study on Multi-Users Interference in Vehicle to Vehicle Visible Light Communications. In Proceedings of the VEHICULAR 2020: The Ninth International Conference on Advances in Vehicular Systems, Technologies and Applications, Porto, Portugal, 18–22 October 2020; pp. 1–7.

8. Mehr, K.A.; Nobar, S.K.; Niya, J.M. IEEE 802.15.7 MAC under unsaturated traffic: Performance analysis and queue modeling. *J. Opt. Commun. Netw.* **2015**, *7*, 875–884. [CrossRef]

9. Bellè, A.; Falcitelli, M.; Petracca, M.; Pagano, P. Development of IEEE 802.15.7 based ITS services using low cost embedded systems. In Proceedings of the IEEE 2013 13th International Conference on ITS Telecommunications (ITST), Tampere, Finland, 5–7 November 2013; pp. 419–425.

10. Tomaš, B.; Tsai, H.M.; Boban, M. Simulating vehicular visible light communication: Physical radio and MAC modeling. In Proceedings of the 2014 IEEE Vehicular Networking Conference (VNC), Paderborn, Germany, 3–5 December 2014; pp. 222–225.

11. Ishihara, S.; Rabsatt, R.V.; Gerla, M. Improving reliability of platooning control messages using radio and visible light hybrid communication. In Proceedings of the 2015 IEEE Vehicular Networking Conference (VNC), Kyoto, Japan, 16–18 December 2015; pp. 96–103.

12. Garai, M.; Sliti, M.; Boudriga, N. Access and resource reservation in vehicular visible light communication networks. In Proceedings of the IEEE 2016 18th International Conference on Transparent Optical Networks (ICTON), Trento, Italy, 10–14 July 2016; pp. 1–6.

13. Mao, Q.; Yue, P.; Xu, M.; Ji, Y.; Cui, Z. OCTMAC: A VLC based MAC protocol combining optical CDMA with TDMA for VANETs. In Proceedings of the IEEE 2017 International Conference on Computer, Information and Telecommunication Systems (CITS), Dalian, China, 21–23 July 2017; pp. 234–238.

14. Masini, B.M.; Bazzi, A.; Zanella, A. Vehicular visible light networks for urban mobile crowd sensing. *Sensors* **2018**, *18*, 1177. [CrossRef] [PubMed]

15. Amjad, M.S.; Tebruegge, C.; Memedi, A.; Kruse, S.; Kress, C.; Scheytt, C.; Dressler, F. An IEEE 802.11 compliant sdr-based system for vehicular visible light communications. In Proceedings of the ICC 2019—2019 IEEE International Conference on Communications (ICC), Shanghai, China, 20–24 May 2019; pp. 1–6.

16. Eldeeb, H.B.; Yanmaz, E.; Uysal, M. MAC Layer Performance of Multi-Hop Vehicular VLC Networks with CSMA/CA. In Proceedings of the IEEE 2020 12th International Symposium on Communication Systems, Networks and Digital Signal Processing (CSNDSP), Porto, Portugal, 20–22 July 2020; pp. 1–6.

17. Béchadergue, B. Visible Light Range-Finding and Communication Using the Automotive LED Lighting. Ph.D. Thesis, Université Paris Saclay, Paris, France, 2017.
18. Abualhoul, M. Visible Light and Radio Communication for Cooperative Autonomous Driving: Applied to Vehicle Convoy. Ph.D. Thesis, MINES ParisTech, Paris, France, 2016.

19. Ghassemlooy, Z.; Popoola, W.; Rajbhandari, S. *Optical Wireless Communications: System and Channel Modelling with Matlab®*; CRC Press: Boca Raton, FL, USA, 2019.

20. OSRAM. Radial Sidelooker Silicon PIN Photodiode. Available online: https://www.osram.com/ecat/RadialSidelookerSFH206K/com/en/class_pim_web catalogue_103489/prd_pim_device_2219558/ (accessed on 1 April 2022)

21. Patel, R.H.; Härri, J.; Bonnet, C. Braking Strategy for an Autonomous Vehicle in a Mixed Traffic Scenario. In Proceedings of the 3rd International Conference on Vehicle Technology and Intelligent Transport Systems—VEHITS 2017, Porto, Portugal, 22–24 April 2017; pp. 268–275. [CrossRef]

22. Stopping Distances on Wet and Dry Roads. Available online: https://www.qld.gov.au/transport/safety/road-safety/driving-safely/stopping-distances/graph (accessed on 1 April 2022)

23. Stopping Distance, Braking Safely. Available online: https://www.ottawasafetycouncil.ca/stopping-distances-and-distracted-driving/ (accessed on 1 April 2022).

24. Shortest Stopping Distance in Metres. Available online: https://www.td.gov.hk/en/road_safety/road_users_code/index/chapter_5_for_all_drivers/stopping_distance/_index.html (accessed on 1 April 2022)

25. Guerra-Medina, M.F.; Rojas-Guillama, B.; González, O.; Martín-González, J.A.; Poves, E.; López-Hernández, F.J. Experimental optical code-division multiple access system for visible light communications. In Proceedings of the IEEE 2011 Wireless Telecommunications Symposium (WTS), New York, NY, USA, 13–15 April 2011; pp. 1–6.

26. Abualhoul, M.Y.; Marouf, M.; Shagdar, O.; Nashashibi, F. Platooning control using visible light communications: A feasibility study. In Proceedings of the 16th International IEEE Conference on Intelligent Transportation Systems (ITSC 2013), The Hague, The Netherlands, 6–9 October 2013; pp. 1535–1540.

27. Nakata, H.; Inoue, T.; Itami, M.; Itoh, K. A study of inter vehicle communication scheme allocating PN codes to the location on the road. In Proceedings of the 2003 IEEE International Conference on Intelligent Transportation Systems, Shanghai, China, 12–15 October 2003; Volume 2, pp. 1527–1532.

28. Rizaldi, A.; Althoff, M. Formalising Traffic Rules for Accountability of Autonomous Vehicles. In Proceedings of the 2015 IEEE 18th International Conference on Intelligent Transportation Systems, Gran Canaria, Spain, 15–18 September 2015; pp. 1658–1665. [CrossRef]

29. Chung, F.R.; Salehi, J.A.; Wei, V.K. Optical orthogonal codes: Design, analysis and applications. *IEEE Trans. Inf. Theory* **1989**, *35*, 595–604. [CrossRef]

30. Salehi, J.A. Code division multiple-access techniques in optical fiber networks. I. Fundamental principles. *IEEE Trans. Commun.* **1989**, *37*, 824–833. [CrossRef]

31. Mollah, M.B.; Islam, M.R. Comparative analysis of Gold Codes with PN codes using correlation property in CDMA technology. In Proceedings of the IEEE 2012 International Conference on Computer Communication and Informatics, Coimbatore, India, 10–12 January 2012; pp. 1–6.

32. Kim, B.K.; Park, S.; Yeon, Y.; Kim, B.W. Radio-over-fiber system using fiber-grating-based optical CDMA with modified PN codes. *IEEE Photonics Technol. Lett.* **2003**, *15*, 1485–1487.