# Mobile User Connectivity in Relay-Assisted Visible Light Communications
## 3 System Model
### Relay Assisted Models
#### 3.5.2 Analytical Performance of Selective DF Relaying  
In the DF scheme the source will transmit the signal to the both relay and the destination within the 1 st time slot. Here, the relay will follow the selective DF cooperative scheme. If the relay decodes the signal correctly then it will retransmit the signal to the destination during the 2 nd time slot/phase, otherwise it will stay idle. The received signal in the DF scheme is given by:  
\[y_{D}^{DF}(t)=\sqrt{E_{s}}h_{RD}(t)\otimes s(t)+{n_{D}^{\prime}}(t) \tag{27}\]  
The equations for the signal transmitted by the source to the relay and from the source to the destination are same as (10) and (11). Due to selective relaying, the received sampled signal at the destination is given by:  
\[y_{D}^{\prime}= \begin{cases}y_{D}^{DF}+y_{D},\text{ when relay decodes correctly}\\ y_{D},\text{ when relay does not decode correctly}\end{cases}  \tag{28}\]  
It can be easily verified from (28) that when relay decodes correctly, then we have:  
\[y_{D}^{\prime}\sim\mathcal{N}(0,2\sigma_{total}^{2}),\text{ \ }for\text{ }s=0 \tag{29}\]  
\[y_{D}^{\prime}\sim\mathcal{N}((h_{SD}+h_{RD})\sqrt{E_{s}},2\sigma_{total}^{2}),\text{ \ }for\text{ }s=1 \tag{30}\]  
From (29) and (30) the LLR detection rule can be written as:  
\[\frac{1}{\sqrt{4\pi\sigma^{2}}}e^{-\frac{(y_{D}^{\prime})^{2}}{4\sigma^{2}}} \overset{0}{\underset{1}{\overset{1}{\right}}}\frac{1}{\sqrt{4\pi\sigma^{2}} }e^{-\frac{(y_{D}^{\prime}-\sqrt{E_{s}}(h_{SD}+h_{RD}))^{2}}{4\sigma^{2}}} \tag{31}\]Solving (31) results in the following detection condition:  
\[y^{{}^{\prime}}_{D}\gtrapprox\frac{1}{0}\frac{\sqrt{E_{s}}(h_{SD}+h_{RD})}{2}=\kappa ^{DF,1}_{th} \tag{32}\]  
Similarly, when the relay is in error and remains idle, we have the following detection condition:  
\[y^{{}^{\prime}}_{D}\gtrapprox\frac{1}{0}\frac{\sqrt{E_{s}}h_{SD}}{2}=\kappa^{DF,0}_ {th} \tag{33}\]  
Based on (32) and (33), the destination uses the following detection [33]:  
\[y_{D}+vy^{DF}_{D}\gtrapprox\frac{1}{0}\kappa^{DF,v}_{th} \tag{34}\]  
where \(v=1\) when relay transmits and \(v=0\) when relay does not transmit. The BER for the considered VLC system for the case _when the relay is transmitting_ can be given as:  
\[P^{DF,1}_{e}=\frac{1}{2}\Bigg{(}\int_{\kappa^{DF,1}_{th}}^{\infty}\frac{1}{ \sqrt{4\pi\sigma^{2}_{total}}}e^{-\frac{(y^{\prime}_{D})^{2}}{4\sigma^{2}_{ total}}}dy^{{}^{\prime}}_{D}+\int_{-\infty}^{\kappa^{DF,1}_{th}}\frac{1}{ \sqrt{4\pi\sigma^{2}_{total}}}e^{-\frac{(y^{\prime}_{D}-\sqrt{E_{s}}(h_{SD}+ h_{RD}))^{2}}{4\sigma^{2}_{total}}}dy^{{}^{\prime}}_{D}\Bigg{)} \tag{35}\]  
Solving (35) in a similar way as (23) the BER is given as:  
\[P^{DF,1}_{e}=Pr\big{(}y_{D}+y^{DF}_{D}<\kappa^{DF,1}_{th}|s=1\big{)}=Q\bigg{(} \frac{\sqrt{E_{s}}(h_{SD}+h_{RD})}{2\sqrt{2}\sigma_{total}}\bigg{)} \tag{36}\]  
Similarly, the BER for the case when the relay is in error and remains idle in the 2 nd phase can be found as:  
\[P^{DF,0}_{e}=Pr\big{(}y_{D}<\kappa^{DF,0}_{th}|s=1\big{)}=Q\bigg{(}\frac{\sqrt {E_{s}}h_{SD}}{2\sqrt{2}\sigma_{total}}\bigg{)} \tag{37}\]  
Further, the BER of the relay is given by:  
\[P^{R}_{e}=Q\bigg{(}\frac{\sqrt{E_{s}}h_{SR}}{2\sqrt{2}\sigma_{total}}\bigg{)} \tag{38}\]  
Using (36)-(38), and results given in [33], the overall BER for the proposed VLC system using the selective DF cooperative scheme is given as:  
\[y_{D}^{\prime}\sim\mathcal{N}((h_{SD}+h_{RD})\sqrt{E_{s}},2\sigma_{total}^{2}),\text{ \ }for\text{ }s=1 \tag{30}\]0  
Figure 4 provides a comparison of the average BER as a function of SNR for both AF and DF schemes and for different irradiance angles of the relay and the source. The mobile parameters were used from Table 2, a distance between the source and the end user was set to 3 m and the RN was located in the middle of the link. We can clearly see how DF outperforms AF. As the value of irradiance angle increases for a constant FOV, the performance of the considered VLC system degrades.