# Resource Allocation in Downlink VLC-NOMA Systems for Factory Automation Scenario
## 2 System Model
### The VLC-NOMA System
Continue to derive (7):  
\[y=h(x_{n}+p_{f}x_{f})+n_{o}. \tag{3}\]0  
\[y=h(x_{n}+p_{f}x_{f})+n_{o}. \tag{3}\]1  
Therefore,  
\[y=h(x_{n}+p_{f}x_{f})+n_{o}. \tag{3}\]2  
As shown in Figure 2, the boundary of the signal for FU is from \(\frac{hE_{b}}{2}\) regardless of the signal for NU. This means that the threshold for FU will not be changed by the existence of signals for NU. Then, as \(p_{n}+p_{f}=1\), the cases \(p_{n}+p_{f}\), which are \(p(e|1,1)\) and \(p(e|0,0)\), are considered as simple OOK BERs. As drawn in Figure 2, the decision threshold is \(\frac{hE_{b}}{2}\). Therefore, the equation for the cases \(p(e|1,1)\) and \(p(e|0,0)\) is as follows:  
\[y=h(x_{n}+p_{f}x_{f})+n_{o}. \tag{3}\]3  
Therefore,  
\[y=h(x_{n}+p_{f}x_{f})+n_{o}. \tag{3}\]4 \[y=h(x_{n}+p_{f}x_{f})+n_{o}. \tag{3}\]5  
\[y=h(x_{n}+p_{f}x_{f})+n_{o}. \tag{3}\]6 \[y=h(x_{n}+p_{f}x_{f})+n_{o}. \tag{3}\]7  
\[y=h(x_{n}+p_{f}x_{f})+n_{o}. \tag{3}\]8  
Finally, the BER for FU is calculated by (14). \[y=h(x_{n}+p_{f}x_{f})+n_{o}. \tag{3}\]9 The constellation for the received signal. Next, the BER for NU must be calculated. First, perfect SIC is assumed. The BER equation simply adds the power ratio for NU into a simple OOK BER equation. The BER equation for an NU with a perfect SIC is as follows:  
\[y_{f}=h_{f}p_{f}x_{f}+\underbrace{h_{f}p_{n}x_{n}}_{\text{Interference}}+n_{o}. \tag{4}\]0  
Based on (14) and (15), the BER equation for an NU with imperfect SIC can be derived. There are two cases of error: one wherein SIC succeeds and decoding fails, and the other wherein both SIC and decoding fail. The first case is as follows:  
\[ \begin{split} p(e|SIC)&=\bigg{[}1-\frac{1}{4} \bigg{(}erfc\bigg{(}0.5h\sqrt{\frac{E_{b}}{N_{0}}}\bigg{)}+erfc\bigg{(}(p_{f}- \frac{1}{2})h\sqrt{\frac{E_{b}}{N_{0}}}\bigg{)}\bigg{)}\bigg{]}\times\frac{1} {2}erfc\bigg{(}\frac{p_{n}h}{2}\sqrt{\frac{E_{b}}{N_{0}}}\bigg{)}\\ &\quad=\bigg{[}0.5-\frac{1}{8}\bigg{(}erfc\bigg{(}0.5h\sqrt{\frac {E_{b}}{N_{0}}}\bigg{)}+erfc\bigg{(}(p_{f}-\frac{1}{2})h\sqrt{\frac{E_{b}}{N_ {0}}}\bigg{)}\bigg{)}\bigg{]}erfc\bigg{(}\frac{p_{n}h}{2}\sqrt{\frac{E_{b}}{N _{0}}}\bigg{)}\end{split}  \tag{16}\]  
The second case is as follows:  
\[ \begin{split} p(e|failedSIC)&=\frac{1}{4}\bigg{(} erfc\bigg{(}0.5h\sqrt{\frac{E_{b}}{N_{0}}}\bigg{)}+erfc\bigg{(}(p_{f}-\frac{1}{2})h \sqrt{\frac{E_{b}}{N_{0}}}\bigg{)}\bigg{)}-\bigg{[}p(0,0)p(1,0|0,0)\\ &\quad\quad\quad\quad\quad\quad+p(0,1)p(1,1|0,1)+p(1,0)p(0,0|1,0 )+p(1,1)p(0,1|1,1)\bigg{]}.\end{split}  \tag{17}\]  
The reason for the subtraction of (14) in (17) is to take into account removing the cases wherein NU can decode its data even though the SIC fails. To continue the derivation of the equations,  
\[ \begin{split} p(0,1|1,1)&=p(0,0|1,0)\\ p(0,1|1,1)&=p(1,0|0,0),\end{split}  \tag{18}\]  
\[ \begin{split} p(0,0|1,0)&=\frac{1}{\sqrt{N_{0}\pi}} \int_{\frac{2p_{f}+p_{n}}{2}h\sqrt{\frac{E_{b}}{N_{0}}}}^{\infty}e^{\frac{-(y -p_{n}h\sqrt{E_{b}})^{2}}{N_{0}}}dy,\end{split}  \tag{19}\]  
\[ \begin{split} z&=\frac{y-p_{n}h\sqrt{E_{b}}}{\sqrt{N_ {0}}},\end{split}  \tag{20}\]  
\[ \begin{split} p(0,0|1,0)&=\frac{1}{\sqrt{\pi}}\int_{ \frac{2p_{f}-p_{n}}{2}h\sqrt{\frac{E_{b}}{N_{0}}}}^{\infty}e^{-z^{2}}dz\\ &=\frac{1}{2}erfc\bigg{(}\frac{2p_{f}-p_{n}}{2}h\sqrt{\frac{E_{b} }{N_{0}}}\bigg{)},\end{split}  \tag{21}\]  
\(p(0,1|1,1)\) is derived below:  
\[ \begin{split} p(0,1|1,1)&=\frac{1}{\sqrt{N_{0}\pi}} \int_{\frac{1}{2}\frac{E_{b}\sqrt{E_{b}}}{2}}^{\frac{p_{n}h\sqrt{E_{b}}}{2}}e^ {\frac{-(y-h\sqrt{E_{b}})^{2}}{N_{0}}}dy,\end{split}  \tag{22}\]  
\[ \begin{split} z&=\frac{y-h\sqrt{E_{b}}}{\sqrt{N_{0}}},\end{split}  \tag{23}\]  
\[ \begin{split} p(0,1|1,1)&=\frac{1}{\sqrt{\pi}}\int_ {-\frac{1}{2}h\sqrt{\frac{E_{b}}{N_{0}}}}^{\frac{p_{n}h\sqrt{E_{b}}-2h\sqrt{E_ {b}}}{2\sqrt{N_{0}}}}e^{-z^{2}}dz.\end{split}  \tag{24}\]Then, the final equation for the failed SIC is  
\[