# Smartphone-Based Task Scheduling in UAV Networks for Disaster Relief
## 4 Task Computation Model  
### Energy Consumption and Transmission Delay Calculation  
Let us suppose that the position of UAV \(n\) is \(L_{n}=[x_{n},y_{n},h_{n}]\), where \(h_{n}=h\). The position of SP \(m\) located in the DRC is denoted by \(L_{m}=[x_{m},y_{m},h_{m}]\), where \(h_{m}=0\).  
According to the 3 GPP technical report [23], the path loss from UAV \(n\) to SP \(m\) is given by  
\[\xi_{n,m}=\frac{\epsilon_{ref,n}}{(x_{n}-x_{m})^{2}+(y_{n}-y_{m})^{2}+h_{n}^{2}} \tag{7}\]  
where \(\epsilon_{ref,n}\) denotes the received power at reference distance \(\Omega_{ref}\).  
The data transfer rate between UAV \(n\) and SP \(m\) is  
\[r_{n,m}=B_{n,m}\log_{2}\left(1+\frac{P_{n,m}\xi_{n,m}}{B_{n,m}\sigma^{2}}\right) \tag{8}\]  
where \(B_{n,m}\) is the channel bandwidth between UAV \(n\) and SP \(m\), \(\sigma^{2}\) is the power spectral density of Gaussian Noise, and \(P_{n,m}\) denotes the transmitted power between UAV \(n\) and SP \(m\).  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Application** & **Delay (s)** &
\begin{tabular}{c} **Transmission Rate (bit/s)** \\ \end{tabular} & **Bit Error Rate** & **Packet Error Rate** \\ \hline Real-time data & 0.1 & \(<\)10\({}^{7}\) & 0 & 0 \\ Image & 1 & \(9.7\times 10^{2}\) & \(10^{-4}\) & \(10^{9}\) \\ Audio & 0.25 & \(6.4\times 10^{4}\) & \(<\)10\({}^{-1}\) & \(<\)10\({}^{-1}\) \\ Uncompressed video & 0.25 & \(10^{8}\) & \(10^{-2}\) & \(10^{-3}\) \\ Compressed video & 0.3 & \(9.7\times 10^{2}\) & \(10^{-6}\) & \(10^{-9}\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Typical QoS requirements of various applications.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Application** & **Delay** & **Energy** \\ \hline Real-time data & \(l_{3}\) & \(l_{4}\) \\ Image & \(l_{1}\) & \(l_{1}\) \\ Audio & \(l_{2}\) & \(l_{3}\) \\ Uncompressed video & \(l_{4}\) & \(l_{3}\) \\ Compressed video & \(l_{1}\) & \(l_{2}\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: QoS preference levels for different task types.  
Given \(r_{n,m}\), the transmission delay between UAV \(n\) and SP \(m\) for delivery task \(t_{i}\) is expressed as  
\[T_{n,i}^{tra}=\frac{S_{i}}{r_{n,m}} \tag{9}\]  
UAV \(n\) performs a certain degree of data pre-processing before transmitting data to SP \(m\). The local data pre-processing delay of task \(t_{i}\) at UAV \(n\) are  
\[T_{n,i}^{pre}=\frac{S_{i}*C}{f_{n}/I} \tag{10}\]  
where \(f_{n}\) is the CPU computational resource allocated by UAV \(n\) for task pre-processing, \(C\) is the number of CPU cycles required to process 1 bit of data, and \(I\) is the number of tasks in the task queue.  
Furthermore, based on the research study [20], the energy consumption for transmission from UAV \(n\) to SP \(m\) is given by  
\[E_{n,i}^{tra}=P_{n,m}T_{n,i}^{tra}=\frac{P_{n,m}S_{i}}{r_{n,m}} \tag{11}\]  
The local data pre-processing energy consumption at UAV \(n\) is  
\[E_{n,i}^{pre}=K_{n}(f_{n}/I)^{2}S_{i}C \tag{12}\]  
where \(K_{n}\) represents the power coefficients of UAV \(n\).  
Similarly, the computing energy consumption of SP \(m\) for executing task \(t_{i}\) is  
\[E_{m,i}^{cp}=K_{m}f_{m}^{2}S_{i}C \tag{13}\]  
where \(K_{m}\) represents the power coefficients of SP \(m\).  
In addition, SPs also generate energy consumption for receiving data, which is given by  
\[E_{m,i}^{re}=P_{m}T_{n,i}^{tra}=\frac{P_{m}S_{i}}{r_{n,m}} \tag{14}\]  
where \(P_{m}\) is the data receiving power of SP \(m\).