# Secrecy Rate of Resource-Constrained Mobile Relay Model under Two-Way Wiretap Channel
## 2 Materials and Methods
### Local Optimal Solution to P1
#### 2.3.1 Convex Approximation via Taylor Expansion  
We first consider the constraints of (10a) and (10b) because of the nonlinear coupling between \(\{t_{m}\}\) and \(\{p_{m}\}\), \(\{t_{m}\}\) and \(\{q_{m}\}\). We replace \(\{q_{m}\}\) with a new variable \(\{Q_{m}\}\) such that \(\{Q_{m}:=q_{m}t_{m}\}\). Similarly, \(\{p_{m}\}\) is replaced with a new variable \(\{P_{m}\}\) satisfying \(\{P_{m}:=p_{m}t_{m}\}\). Therefore, the above constraints of (10a), (10b), and (10e)-(10g) of P1 are equal to the following:\[\sum_{m=1}^{M}\left[t_{m}log_{2}(1+\frac{Q_{m}||\mathbf{h}_{m}||^{2}/ \sigma_{r}^{2}}{t_{m}})-t_{m}log_{2}(1+\frac{Q_{m}||h_{e}|^{2}/\sigma_{e}^{2}}{t _{m}})\right]\geq TR^{Scc} \tag{11}\] \[\sum_{m=1}^{M}\left[t_{m}log_{2}(1+\frac{P_{m}||\mathbf{g}_{m}||^ {2}/\sigma_{u}^{2}}{t_{m}})-t_{m}log_{2}(1+\frac{P_{m}||\mathbf{g}_{e,m}||^{2} /(\sigma_{e}^{2})}{t_{m}})\right]\geq TR^{Scc}\] (12) \[\sum_{m=1}^{M}P_{m}+\zeta(a)\sum_{m=1}^{M}\sum_{j=1}^{M}Z_{m,j}D_{ m,j}\leq E\] (13) \[\sum_{m=1}^{M}Q_{m}\leq Q\] (14) \[(1-s_{m})(t_{m}^{2}+P_{m}+Q_{m})=0,\quad t_{m}\geq 0,P_{m}\geq 0,Q_{m}\geq 0\] \[\forall m=1,\cdots,M \tag{15}\]  
Due to the non-convexity of the above Equations (11) and (12) [22], we need some transformations. For simplicity, we define four functions as follows:  
\[f1(t_{m},Q_{m}) :=t_{m}log_{2}(1+\frac{Q_{m}||\mathbf{h}_{m}||^{2}/\sigma_{r}^{2} }{t_{m}}) \tag{16}\] \[f2(t_{m},Q_{m}) :=t_{m}log_{2}(1+\frac{Q_{m}|h_{e}|^{2}/\sigma_{e}^{2}}{t_{m}})\] (17) \[g1(t_{m},P_{m}) :=t_{m}log_{2}(1+\frac{P_{m}||\mathbf{g}_{m}||^{2}/\sigma_{u}^{2} }{t_{m}})\] (18) \[g2(t_{m},P_{m}) :=t_{m}log_{2}(1+\frac{P_{m}||\mathbf{g}_{e,m}||^{2}/\sigma_{e}^{ 2}}{t_{m}}) \tag{19}\]  
According to [22], we can obtain the following theorem and properties.  
**Theorem 1**.: _Perspective function has convexity._  
**Property 1**.: \(f1(t_{m},Q_{m})\)_, \(f2(t_{m},Q_{m})\), \(g1(t_{m},P_{m})\), and \(g2(t_{m},P_{m})\) are concave with respect to \(\{t_{m},Q_{m}\}\) and \(\{t_{m},P_{m}\}\), respectively._  
**Proof of Property 1.** Since \(t_{m}log_{2}(1+\frac{A(m)}{t_{m}})\) is the perspective transformation of \(log_{2}(1+A(m))\), where \(A(m)\) represents any numerator of (16)-(19), according to Theorem 1, \(t_{m}log_{2}(1+\frac{A(m)}{t_{m}})\) has the same convexity as \(log_{2}(1+A(m))\)[22], which is a concave function. Therefore, \(f1(t_{m},Q_{m}),f2(t_{m},Q_{m}),g1(t_{m},P_{m})\), and \(g2(t_{m},P_{m})\) are concave with respect to \(\{t_{m},Q_{m}\}\) and \(\{t_{m},P_{m}\}, respectively\). \(\Box\)  
**Property 2**.: \(f2(t_{m},Q_{m})\) _and \(g2(t_{m},Q_{m})\) are monotonically increasing functions of \(\{t_{m},Q_{m}\}\) for all \(m\)._  
**Proof of Property 2.** Follows a similar proof to [14] (Property 1). \(\Box\)  
Duo to the concavity and monotonically increasing property, we can take derivatives of \(f2(t_{m},Q_{m})\) and \(g2(t_{m},P_{m})\) and have the following equivalent inequalities of constraints of (10a) and (10b) by applying the first-order [PERSON] expansion at the given points \((t_{m}^{0},Q_{m}^{0})\) and \((t_{m}^{0},P_{m}^{0})\),\[TR^{Scc}-\sum_{m=1}^{M}f1(t_{m},Q_{m})+\sum_{m=1}^{M}\left[f2(t_{m}^{0},Q_{m}^{0}) +\frac{\partial f2(t_{m},Q_{m}^{0})}{\partial t_{m}}\Big{|}_{t_{m}=t_{m}^{0}}(t _{m}-t_{m}^{0})+\frac{\partial f2(t_{m},Q_{m}^{0})}{\partial Q_{m}}\Big{|}_{Q_{ m}=Q_{m}^{0}}(Q_{m}-Q_{m}^{0})\right]\leq 0 \tag{20}\]  
\[TR^{Scc}-\sum_{m=1}^{M}g1(t_{m},P_{m})+\sum_{m=1}^{M}\left[g2(t_{m}^{0},P_{m}^{0} )+\frac{\partial g2(t_{m},P_{m}^{0})}{\partial t_{m}}\Big{|}_{t_{m}=t_{m}^{0}} (t_{m}-t_{m}^{0})+\frac{\partial g2(t_{m},P_{m})}{\partial P_{m}}\Big{|}_{P_{m }=P_{m}^{0}}(P_{m}-P_{m}^{0})\right]\leq 0 \tag{21}\]