# Spectrum Slicing for Multiple Access Channels with Heterogeneous Services
## 5 Non-Orthogonal Multiple Access
### PAoI-Oriented System
In case \(\mathcal{B}\), the probability of a packet from the intermittent user being decoded in slot \(d\) is equivalent to the probability of at least one packet from the user being transmitted in the frame, and the \(K\)-th packet from the broadband user is decoded in slot \(d\). \[ \begin{split} p_{F}(d;o|\mathcal{B})=\rho p_{s}^{(1)}\sum_{m=1}^{| \mathcal{T}_{o}(d)|}p_{\text{rc}}(m-1;d,o+G)\sum_{r=0}^{|\mathcal{T}_{o}(d)|-m }\text{Bin}\bigg{(}r;|\mathcal{T}_{o}(d)|-m,(1-\varepsilon_{B})(1-\alpha)^{ \frac{U_{I}}{C}-1}\bigg{)}\\ \times(1-\varepsilon_{B})(1-\alpha)^{U_{I}}\text{Bin}\Big{(}K-1- r;d-|\mathcal{T}_{o}(d)|-1,(1-\varepsilon_{B})(1-\alpha)^{U_{I}}\Big{)}.\end{split}  \tag{42}\]  
The pmf of the decoding delay \(Y\) in case \(\mathcal{B}\) is more complicated. \[ \begin{split} p_{Y}(y;d,o|\mathcal{B})=\sum_{c=1}^{|\mathcal{T}_{ o}(d)|}(1-\varepsilon_{B})\sum_{c=0}^{|\mathcal{T}_{o}(d)|-c}\text{ Multi}((c,e);|\mathcal{T}_{o}(d)|,(\rho p_{s,I},\rho(1-p_{s,I}))\\ \times\frac{|\mathcal{T}_{o}(d)|!(|\mathcal{T}_{o}(d-y)|-c-1)!}{c |\mathcal{T}_{o}(d-y)|!}\rho p_{s,I}\sum_{r=0}^{|\mathcal{T}_{o}(d)|-m}\text{ Bin}(r;|\mathcal{T}_{o}(d)|-m,(1-\varepsilon_{B})(1-\alpha)^{\frac{U_{I}}{C}-1} )\\ \times\text{Bin}(K-1-r;d-|\mathcal{T}_{o}(d)|-1,(1- \varepsilon_{B})(1-\alpha)^{U_{I}}),\,d-y\in\mathcal{T}_{o}(d).\end{split}  \tag{43}\]  
If \(d\) is an allocated slot, we have to consider both cases, but if it is not, the only possible case is the first one. \[ \begin{split} p_{F}(d;o)=\begin{cases}p_{F}(d;o|\mathcal{A})+p_{ F}(d;o|\mathcal{B})&\text{if }d\in\mathcal{T}_{o}(d);\\ p_{F}(d;o|\mathcal{B})&\text{if }d\
otin\mathcal{T}_{o}(d).\end{cases}\end{split}  \tag{44}\]We can then compute the probability that no packets will be delivered in a frame with a given offset. \[p_{\varnothing}(o)=1-\sum_{d=K+1}^{N}p_{F}(d;o). \tag{45}\]  
Naturally, the delay of decoding events that come after the first in the frame is always 0, as SIC can instantly decode the packet from the intermittent user. We can now compute the probability of having a decoding event in a given slot \(d\), given that the first decoding event was in slot \(f\) and the offset is \(o\). \[p_{R}(d;f,o)= \begin{cases}1&\text{if }d=f;\\ \rho p_{s,I}&\text{if }d\in\mathcal{T}_{o}(N)\wedge d>f;\\ 0&\text{otherwise.}\end{cases}  \tag{46}\]  
We can then uncondition on \(f\) and get \(p_{R}(d)\):  
\[p_{R}(d)=\sum_{f=K+1}^{d}p_{R}(d;f,o)p_{F}(f;o). \tag{47}\]  
With this, we compute the probability that a decoding event in a given slot is the first in the frame:  
\[p_{E}(d;o)=\frac{p_{F}(d;o)}{p_{R}(d;o)(1-p_{N}(d;o))}. \tag{48}\]  
We can then compute the pmf of the latency \(T\) for a decoding in slot \(d\). \[p_{Y}(y;d,o)= \begin{cases}p_{E}(d;o)+(1-p_{E}(d;o))\frac{p_{E}(d;o|\mathcal{A} )}{p_{E}(d;o)}&\text{if }y=0,d\in\mathcal{T}_{o}(d);\\ p_{E}(d;o)&\text{if }y=0,d\
otin\mathcal{T}_{o}(d);\\ (1-p_{E}(d;o))p_{Y}(y;d,o|\mathcal{B})&\text{if }y>0.\end{cases}  \tag{49}\]  
The final component of the PAoI is the inter-arrival time, \(Z\). There are two separate cases for this: either the two consecutive decoding events are in the same frame, or the next one is in a future frame. We first find the probability that a given decoding event is the last in the frame:  
\[p_{L}(d;o)=(1-\rho p_{s,I})^{|\mathcal{T}_{o}(N)|-|\mathcal{T}_{o}(d)|}. \tag{50}\]  
If the next packet from the intermittent user is in the same frame, we have:  
\[p_{Z}(z;d,o,L)=\frac{\rho p_{s,I}(1-\rho p_{s,I})\hat{\varepsilon}}{1-p_{L}(d; o)},d+z\in(\mathcal{T}_{o}(N)\setminus\mathcal{T}_{o}(d)). \tag{51}\]  
If the next packet is in a future frame, we need to compute the offset for the next frames. We denote the offset for the \(i\)-th frame after the current one, which has offset \(o\), as \(\omega_{i}(o)\).