# Relay-Enabled Task Offloading Management for Wireless Body Area Networks
## 3 System Model
### Channel Characterization  
The PL model characterizing the transmission energy attenuation between the on-body transmitting relay node and the receiving relay at distance \(d\) can be formulated as [8; 28]:  
\[PL_{dB}(d)=PL_{dB}(d_{0})+10n\log_{10}\left(\frac{d}{d_{0}}\right)+S,d\geq d_{ 0}, \tag{14}\]  
where \(d_{0}\) represents the reference distance and \(PL_{dB}(d_{0})\) is the PL value at \(d_{0}\). \(S\) represents the shadow fading effect, which follows a normal distribution with zero mean and standard deviation \(\sigma\), i.e., \(S\sim\left(0,\sigma^{2}\right)\). One should note that the PL model presented by Equation (14) is also applicable to the on-body channel, as proved in Reference [31]. The BER for M-PSK over the WBAN fading channel has been widely investigated. In this paper, the binary phase-shift keying (BPSK) modulation scheme is utilized for further analysis due to its simple structure and high efficiency. The performance of M-PSK(\(M\geq 4\)) can be found in Reference [20]. Assuming the transmitting power is \(P_{t}\) and the noise to power density ratio is \(N_{0}\), one can obtain the instantaneous signal to noise ratio (SNR) \(\gamma\) as:  
\[\gamma=\frac{P_{t}}{N_{0}\mathcal{R}_{ij}(U_{i})PL_{dB}(d)} \tag{15}\]  
The BER performance can be formulated as a function of the instantaneous SNR as:  
\[P_{e}(\gamma)=Q\Big{(}\sqrt{2\gamma}\Big{)}=\frac{1}{2}erfc(\sqrt{\gamma}) \tag{16}\]  
where \(erfc(\cdot)\) represents the Gaussian error function. The average BER of the transmission link can be expressed as:  
\[P_{e}(\overline{\gamma})=\int_{0}^{+\infty}P(\gamma)P_{e}(\gamma)d\gamma= \frac{1}{2}\int_{0}^{+\infty}P(\gamma)erfc(\sqrt{\gamma})d\gamma, \tag{17}\]  
where \(\overline{\gamma}\) and \(P(\gamma)\) represent the average value of SNR and the BER performance of the additive white Gaussian noise (AWGN) channel, respectively. Consequently, Equation (17) can be rewritten as:  
\[P_{e}(\overline{\gamma}_{m})=\frac{1}{2}\sum_{m=1}^{N}erfc(\sqrt{\gamma})P_{ m}(\gamma_{n}-\gamma_{n-1}), \tag{18}\]  
where  
\[P_{m}(\gamma_{n})=\frac{1}{\mu\gamma_{n}\sigma_{dB}}\exp\left(-\frac{\left(ln \gamma_{n}-\overline{\gamma}_{n}+\frac{1}{2}\mu^{2}\sigma_{dB}^{2}\right)^{2 }}{2\mu^{2}\sigma_{dB}^{2}}\right), \tag{19}\]  
where \(\mu=\ln 10/10\). The average BER performance of the WBAN channel under BPSK modulation can be obtained by the numerical evaluation of Equation (18). Considering data transmission over a fading channel such as a relay to relay or relay to the C-MEC, the capacity per unit bandwidth can be written as:  
\[\frac{C}{B}=\log_{2}(1+\gamma_{rec}), \tag{20}\]  
where \(C\) denotes the channel capacity. \(\gamma_{rec}\) and \(B\) represent the received SNR and the transmitting channel bandwidth, respectively. The \(\gamma_{rec}\) in dB can be given as:  
\[\gamma_{rec}=P_{rec}-10\log_{10}\mathcal{R}_{ij}(U_{i})-P_{n}, \tag{21}\]  
where \(P_{rec}\) is the received power and \(P_{n}\) can be expressed as:  
\[P_{n}=10\log_{10}(vTBN_{F}), \tag{22}\]  
where \(v\) is the Boltzmann constant and \(N_{F}\) is the noise figure. Recalling the AWGN noise with one-sided power spectral density, one can obtain that:  
\[N_{0}=v[T_{rx}+(N_{F}-1)T_{tx}], \tag{23}\]  
where \(T_{rx}\) and \(T_{tx}\) are the temperatures at the transmitter and the receiver in Kelvin (K), respectively.