# Securing Relay Networks with Artificial Noise: An Error Performance-Based Approach +
## 3 AN Maximizing Relay's SER Performance
### Assigning \(|z|\) for a Given \(E_{z}\)  
In Section 3.2, we have shown how to select the phase \(\theta_{z}\) of \(z\) if the amplitude \(|z|\) is a fixed value. In general, however, it may be optimal to assign different powers to different AN symbols for a given  
Figure 3: Thresholds for phase selection: \(h=1\) and \(g=1\). average AN power. In this subsection, we assume that the average energy per AN symbol is limited to an average symbol energy \(\overline{E}\), i.e.,  
\[E_{z}=T_{m}\mathcal{E}\left\{\left|z\right|^{2}\right\}\leq\overline{E}. \tag{18}\]  
Furthermore, we denote \(\overline{P}=\overline{E}/T_{m}\) as the average power of \(z\). Based on the results in Section 3.2, the expected SER obtained from optimal phase selection is given by,  
\[\widetilde{\text{SER}}\left(\left|z\right|\right)=\max\left\{\text{SER} \left(\pi/4,\left|z\right|\right),\text{SER}\left(0,\left|z\right|\right)\right\} \tag{19}\]  
where the \(\text{SER}\left(\theta,\left|z\right|\right)\) is defined according to Equation (8). Following the proof of Proposition 2, one can show that the first derivative of \(\text{SER}\left(\theta,\left|z\right|\right)\) in Equation (8) with respect to \(\left|z\right|\) is non-negative, and thus \(\text{SER}\left(\theta,\left|z\right|\right)\) is a monotonically increasing function of \(\left|z\right|\) for a given \(\theta\). Accordingly, \(\widetilde{\text{SER}}\left(\left|z\right|\right)\) in Equation (19) is also a monotonically increasing function of \(\left|z\right|\). Figure 4 displays the values of \(\widetilde{\text{SER}}\left(\left|z\right|\right)\) for 16-QAM and \(a/\sigma=4\), where both the analytical and the simulated results are plotted. From the figure, we can see that as \(\left|z\right|/\sigma\) increases, the rotated QAM and the QAM phase selections alternatively achieve a better SER performance. In this figure, note that \(\left|z\right|^{2}=\overline{P}\) can be viewed as a deterministic power usage. The objective of this subsection is to derive the optimal distribution of \(\left|z\right|^{2}\) to maximize the expected value of the SER in Equation (19), given the instantaneous CSI \(h\) and \(g\). Alternatively, the power needs to be smartly allocated to yield an upper bound on the SER performance with deterministic power usage. Denoting the probability density function (PDF) of \(\left|z\right|^{2}\) as \(f(\cdot)\), by taking into account the power constraint in Equation (18), the following optimization problem can be formulated:  
\[\max_{f(x)} \int_{0}^{\infty}\widetilde{\text{SER}}\left(\sqrt{x}\right)f \left(x\right)\text{d}x\] (20a) subject to \[\int_{0}^{\infty}xf\left(x\right)\text{d}x\leq\overline{P}\text{ \ (average power)} \tag{20b}\] \[\int_{0}^{\infty}f(x)\text{d}x=1\text{ \ (total probability)}\] (20c) \[f\left(x\right)\geq 0\text{, for }x\geq 0\text{ \ (non- negativity)} \tag{20d}\]  
Figure 4: Symbol error rate (SER) performance of 16–QAM modulation as a function of \(\left|z\right|/\sigma\), where \(a/\sigma=4\), \(h=1\), and \(g=1\). where the average power constraint Equation (20b) follows from Equation (18). For computational tractability, we only consider PDFs \(f(x)\) for which all integrals in Equation (20) exist. The following theorem provides interesting insights into the power allocation problem and meanwhile can greatly simplify the computation of the PDF of \(|z|\). Theorem 1: (_SER-maximizing power distribution): Any PDF \(f(x)\) solving the problem in Equation (20) has the form,_  
\[f(x)=\left(1-p\right)\delta\left(x-x_{1}\right)+p\delta\left(x-x_{2}\right) \tag{21}\]  
where \(\delta(x)\) is the Dirac delta function defined by ([47], Chapter 2),  
\[\int_{-\infty}^{\infty}\delta(t-\tau)g(t)\mathrm{d}t=g(\tau) \tag{22}\]  
for any continuous function \(g\) and any value of \(\tau\), and,  
\[E_{z}=T_{m}\mathcal{E}\left\{\left|z\right|^{2}\right\}\leq\overline{E}. \tag{18}\]0  
with \(0\leq x_{1}\leq\overline{P}\leq x_{2}\). Proof: See Appendix.