# On IRS-Assisted Covert Communication with a Friendly UAV
## 3 System Optimization
### Optimal DEP for [PERSON]  
To optimize the DEP for [PERSON], we first present the definition of FAP and MDP. On the one hand, the FAP is the probability of [PERSON] determining that there is covert communication between [PERSON] and [PERSON] when no such communication exists, denoted as \(P_{FA}[t]\). According to (11), we have  
\[P_{FA}[t]=\Pr(D_{1}|H_{0})=\Pr\Bigl{(}P_{u}[t]|h_{\text{I}W}[t]|^{2}+\sigma_{ w}^{2}>\tau[t]|H_{0}\Bigr{)}. \tag{13}\]  
On the other hand, the MDP is the probability of [PERSON] determining that there is no covert message transmitted from [PERSON] to [PERSON] when in fact there is covert communication, denoted as \(P_{MD}[t]\). According to (12), we have  
\[P_{MD}[t] =\Pr(D_{0}|H_{1}) \tag{14}\] \[=\Pr\Bigl{(}P_{a}[t]\Bigl{|}h_{\text{I}W}^{H}[t]\Theta[t]h_{AI}[ t]\Bigr{|}^{2}+P_{u}[t]|h_{\text{I}W}[t]|^{2}+\sigma_{w}^{2}<\tau[t]|H_{1} \Bigr{)}.\]  
According to (13) and (14), the DEP for [PERSON] to detect covert communication between [PERSON] and [PERSON] is  
\[\xi[t]=P_{FA}[t]+P_{MD}[t], \tag{15}\]  
where \(\xi[t]\geq 1-\varepsilon\) and \(\varepsilon\) is the specific value for determining the required covertness. According to (8) and (13), the FAP for [PERSON] is expressed as  
\[P_{FA}[t]=\left\{ \begin{array}{cc}1,&\tau[t]<\sigma_{w}^{2}\\ 1-\frac{\tau[t]-\sigma_{w}^{2}}{\xi_{1}[t]},&\sigma_{w}^{2}\leq\tau[t]\leq\xi_{ 1}[t]+\sigma_{w}^{2}\\ 0,&\tau[t]>\xi_{1}[t]+\sigma_{w}^{2},\end{array} \right. \tag{16}\]  
where \(\zeta_{1}[t]=\hat{P}_{u}[t]|h_{\text{I}W}[t]|^{2}\). Equally, according to (8) and (14), [PERSON]'s MDP in the \(t\)-th time slot is  
\[P_{MD}[t]=\left\{ \begin{array}{cc}0,&\tau[t]<\zeta_{2}[t]+\sigma_{w}^{2}\\ \frac{\tau[t]-\zeta_{2}[t]-\sigma_{w}^{2}}{\zeta_{1}[t]},&\zeta_{2}[t]+\sigma_ {w}^{2}\leq\tau[t]\leq\zeta_{1}[t]+\zeta_{2}[t]+\sigma_{w}^{2}\\ 1,&\tau[t]>\zeta_{1}[t]+\zeta_{2}[t]+\sigma_{w}^{2},\end{array} \right. \tag{17}\]where \(\zeta_{2}[t]=P_{a}[t]\left|h_{\text{HV}}^{H}[t]\Theta[t]h_{AI}[t]\right|^{2}\). To optimize DEP, we can define a detection threshold \(\tau^{*}[t]\) that corresponds to an optimal detection error rate \(\xi^{*}[t]\). Then, the DEP for Willie can be expressed as  
\[\xi[t]=\left\{ \begin{array}{ll}1,&\tau[t]<\sigma_{w}^{2}\\ 1-\frac{\tau[t]-\sigma_{w}^{2}}{\zeta_{1}[t]},&\sigma_{w}^{2}\leq\tau[t]<\zeta_ {2}[t]+\sigma_{w}^{2}\\ \frac{\zeta_{1}[t]-\zeta_{2}[t]}{\zeta_{1}[t]},&\zeta_{2}[t]+\sigma_{w}^{2} \leq\tau[t]<\zeta_{1}[t]+\sigma_{w}^{2}\\ \frac{\tau[t]-\zeta_{2}[t]-\sigma_{w}^{2}}{\zeta_{1}[t]},&\zeta_{1}[t]+\sigma_ {w}^{2}\leq\tau[t]<\zeta_{1}[t]+\zeta_{2}[t]+\sigma_{w}^{2}\\ 1,&\tau[t]\geq\zeta_{1}[t]+\zeta_{2}[t]+\sigma_{w}^{2}.\end{array} \right. \tag{18}\]  
Note that \(\zeta_{1}[t]>\zeta_{2}[t]\), as the UAV is used to interfere with [PERSON]. According to (18), when \(\tau[t]<\sigma_{w}^{2}\) and \(\tau[t]\geq\zeta_{1}[t]+\zeta_{2}[t]+\sigma_{w}^{2}\), an error is detected for \(\xi[t]=1\). Therefore, these two cases are not considered by [PERSON]. When \(\sigma_{w}^{2}\leq\tau[t]<\zeta_{2}[t]+\sigma_{w}^{2}\), we have  
\[\frac{\partial\xi[t]}{\partial\tau[t]}=-\frac{1}{\zeta_{1}[t]}<0. \tag{19}\]  
Similarly, When \(\zeta_{1}[t]+\sigma_{w}^{2}\leq\tau[t]<\zeta_{1}[t]+\zeta_{2}[t]+\sigma_{w}^ {2}\), we have  
\[\frac{\partial\xi[t]}{\partial\tau[t]}=\frac{1}{\zeta_{1}[t]}>0. \tag{20}\]  
According to (18)-(20), when \(\sigma_{w}^{2}\leq\tau[t]<\zeta_{2}[t]+\sigma_{w}^{2}\), then \(\xi_{t}\) is monotone declining with regard to \(\tau_{t}\). When \(\zeta_{2}[t]+\sigma_{w}^{2}\leq\tau[t]<\zeta_{1}[t]+\sigma_{w}^{2}\), c is a constant. If \(\zeta_{1}[t]+\sigma_{w}^{2}\leq\tau[t]<\zeta_{1}[t]+\zeta_{2}[t]+\sigma_{w}^{2}\), then \(\xi[t]\) is monotone increasing with regard to \(\tau[t]\). As a result, \(\xi[t]\) is first decreasing and then increasing for \(\tau[t]\).