{'fraction_non_alphanumeric': 0.038994929913510286, 'fraction_numerical': 0.006635848493886072, 'mean_word_length': 4.635714285714286, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Beam-forming for Secure Communication in Amplify-and-Forward Networks: An SNR based approach

The problem of secure communication in Amplify-and-Forward (AF) relay networks with multiple eavesdroppers is considered. Assuming that a receiver (destination or eavesdropper) can decode a message only if the received SNR is above a predefined threshold, we introduce SNR based optimization formulations to calculate optimal scaling factors for relay nodes in two scenarios. In the first scenario, we maximize the achievable rate at the legitimate destination, subject to the condition that the received SNR at each eavesdropper is below the target threshold. Due to the non-convex nature of the objective function and eavesdroppers' constraints, we transform variables and obtain a Quadratically Constrained Quadratic Program (QCQP) with convex constraints, which can be solved efficiently. When the constraints are not convex, we consider a Semi-definite relaxation (SDR). In the second scenario, we minimize the total power consumed by all relay nodes, subject to the condition that the received SNR at the legitimate destination is above the threshold and at every eavesdropper, it is below the corresponding threshold. We propose a semi-definite relaxation of the problem in this scenario and also provide an analytical lower bound.


I. INTRODUCTION
In wireless networks, generally security measures are implemented in the upper layers of protocol stack using cryptographic methods. However, current advances in computation technology pose threats for such systems, prompting researchers to explore alternatives like physical layer security [1]. In ad-hoc wireless networks, where relay nodes are constrained by hardware or available energy resources, physical-layer based schemes can indeed provide effective solutions.
In the physical-layer security literature, most results are centered around an information-theoretic measure -the secrecy capacity [2]. The secrecy capacity is the maximum rate of information transfer from the source to the destination in the presence of eavesdropper(s). However, even for many simple networks, calculating secrecy capacity for a given eavesdropper model is a tedious task as it involves solving fractional optimization problems, which are known to be NP-hard in general [3].
For amplify-and-forward (AF) relay networks, the authors in [4] evaluated secrecy capacity for a single eavesdropper, and the zero-forcing secrecy rate for multiple eavesdroppers under a total relay power constraint. In [5] and [6], techniques are devised for computing the maximum AF secrecy rate with a single and multiple eavesdroppers under both individual and total relay S. Sarma  power constraints, respectively. However, our work differs from them as we have considered an SNR based model for secure communication. The motivation for our approach arises from the results in [7], where it is shown that the secrecy capacity depends on the source-destination and the source-eavesdropper channel capacities, which in turn are functions of the respective signal-to-noise ratios (SNR).
In practical receivers, the correct decoding of the received signals is dependent on the received SNR [8]. If the received SNR is below a certain predefined threshold, then for all practical purposes, we can assume that the receiver cannot extract any information from the received signal. Following this argument, we consider a model where every eavesdropper has limited decoding capability, determined by its SNR threshold. Therefore, to ensure secure communication between the source and the destination, we strive to bring down the received SNR at each eavesdropper below its target SNR threshold. This approach is a generalization of the zero-forcing approaches for secure communication [4]. Concurrently, we also strive to improve the SNR at the legitimate destination. This leads us to our first scenario, where we maximize the achievable rate at the legitimate destination, subject to the condition that the received SNR at each eavesdropper is below its target threshold. We address this scenario in Section III. Though a similar problem was considered in [6], but unlike them we are not interested in evaluating optimal secrecy rate. Infact, as each eavesdropper can have a different threshold, therefore the optimal solution of our problem will differ from the solution of Secrecy Rate Maximization (SRM) problem considered in [6]. Also, we propose a noble transformation for this problem to obtain a Quadratic Constrained Quadratic Program (QCQP) which attains global solution under certain criteria.
The second scenario that we consider is motivated by wireless adhoc networks, where the intermediate relay nodes may be interested in minimizing total power consumption while ensuring secure communication between the source and the destination.
In such scenarios, we would like to minimize the total power consumption of relay nodes, subject to the condition that the received SNR at the legitimate destination is above a predefined threshold and at every eavesdropper it is below the respective predefined threshold. This formulation is described in Section IV.
A similar SNR based model is also considered in [9]. However, unlike the decode-and-forward (DF) relaying used in that work, we employ AF relaying as it is one of the simplest relaying schemes and even in low-SNR regimes, it can be a capacity achieving relay strategy in some scenarios [10].

II. SYSTEM MODEL
The system consists of a single source (S), a single destination (D), M relay nodes (i ∈ M = {1, 2, · · · , M }) and K eavesdroppers (k ∈ K = {1, 2, · · · , K}) as shown in Figure 1. The channel gain from a node p to a node q is denoted by a complex constant h p,q , where p ∈ {S} M and q ∈ {D} M K. We assume the availability of complete channel state information (CSI), i.e., all h p,q values are known throughout the network [4], [9]. Considering discrete time instants and neglecting propagation delays, the signal received at each relay node due to the source can be expressed as: (1) where the source signal x s [n] at time instant n, −∞ < n < ∞, are i.i.d complex Gaussian random variables with zero mean and variance P s . Further, x s [n] is assumed to be independent of z i [n], the complex white Gaussian noise (∼ CN (0, σ 2 )) at the i th relay node. Each relay node i scales the received signal from the source by β i ∈ C before transmitting: Therefore, the received signal at the destination or an eavesdropper can be expressed as: Here z l [n] ∼ CN (0, σ 2 ). We assume that z i are independent of the source symbol and of each other. For the layered relay network shown in Figure 1, the received signals at the destination and the eavesdroppers are free of intersymbol interference as they traverse paths with the same respective delays. Therefore, omitting the time index and using (1), (2) and (3) we can write: From (4), we can write the SNR at the destination or an eavesdropper as:

III. RECEIVER SNR MAXIMIZATION
In the first scenario, we consider the problem of maximizing the secrecy rate achievable with the AF-relays when the received SNR at the eavesdroppers is below their respective predefined thresholds. However, given the logarithmic dependence of the achievable information rate on the received SNR (I(P s ) ∝ log(1 + SN R)) and the monotonically increasing nature of the log(·), we have: Here, γ k is a real number and represents the predefined threshold for the k th eavesdropper. This problem is inherently nonconvex. We consider the following transformation of the variable β i .
If we consider the vector variables u = [u 1 , u 2 , · · · , u M ] t and ω = [ω 1 , ω 2 , · · · , ω M ] t , then we can write: In terms of these new variables and parameters, the objective function and constraints are expressed in the following way: where D ρ,k = diag(ρ k ) and γ k = γ k σ 2 Ps , ∀k ∈ K. By writing in terms of u and rearranging, we get: • Relay power constraint ∀i ∈ M: Therefore, the equivalent optimization problem is: is a diagonal matrix with positive entries, therefore, C k is a positive definite matrix. As the objective function and all the constraints are convex, we can obtain the global optimum using numerical routines as suggested by [11].
But, in general scenarios C k may not be positive-semidefinite. However, if a QCQP is not convex then it is hard to solve [12], [13].
, so by considering relaxation on rank one symmetric positive semi-definite (PSD) matrix U = uu † , the optimization program 6 can be written as: The • represents Frobenius product of matrices, A • B = Trace (A † B). Once the problem 7 is solved, we can find the corresponding optimal u and thereby w by applying eigenvalue decomposition on matrix U [13].
Remark 1: If we denote the optimum objective function value by SN R * d , then source can securely transmit at a rate and γ d is the SNR threshold for destination.

IV. RELAY POWER MINIMIZATION
For an energy constrained relay network, an objective would be to minimize the total relay power. Using (2), the power of the signal transmitted by the i th relay node is |β i | 2 (|h s,i | 2 P s + σ 2 ), ∀i ∈ M. Considering the SNR constraints on the destination and the eavesdroppers and individual power constraint for each relay node, the total relay power minimization problem is as follows: Similar to γ k , γ d is a real number and it represents the predefined SNR threshold for the destination. We can easily rewrite the above expression in matrix notation and rearrange to get the following Quadratic Constrained Quadratic Program (QCQP) formulation [12]: Following the procedures discussed in previous section, we formulate another semi-definite program after relaxing the symmetric positive semi-definite (PSD) matrix B = ββ † .

P2-SDR: min
B i represents the i th diagonal element of that matrix. Solving this will provide us B; we look for an eigenvector of B corresponding to the maximum eigenvalue.
All the above formulations of Problem P2 require iterative algorithms to obtain the optimal solution. Therefore, we discuss a simple analytical relaxed solution for the problem (8).
Analytical Relaxed Solution: It can be argued that to minimize the objective function value, (8b) should be satisfied with equality. Therefore, we formulate another optimization problem to calculate the analytical relaxed solution of the original objective function value.
This can be posed as the well known Rayleigh Quotient [14, p. 176] problem i.e.
If Q D is invertible, then the solution to this optimization problem is given by γ d λ min , where λ min is the minimum eigenvalue of matrix Q −1 D Q 0 and the optimal β is the corresponding eigenvector. The solution of this problem need not satisfy the eavesdroppers' constraints, but the objective function value serves as lower bound for optimization problem 9 and indicate the extra amount of power required to met the secrecy constraints.

Remark 2:
A lower bound on the achievable AF secrecy rate for the optimum scaling vector would be 1 2 log(1 + γ d ).

V. RESULTS
In Figure 2, we plot the solution of the destination SNR maximization problem, mentioned in Section III, with respect to source power (P s ) for several values of eavesdroppers' SNR threshold (γ k = γ e = constant, k ∈ K) after averaging over 100 network instances. For each instance, the channel gains are obtained from a complex Gaussian distribution with mean 0 and variance 1. We considered five relay nodes (M = 5) with equal maximum transmit power (P i = 10, i ∈ M) and five eavesdroppers (K = 5) for the evaluation. Though we have assumed equal threshold values (γ e ) for all the eavesdroppers in our plots, our formulations are valid for unequal values (γ i = γ j where i = j, i, j ∈ K) also. As γ e increases, the relay nodes can transmit signals with higher power. This results in the increase of SNR at the destination, yet the received SNRs at the eavesdroppers remain below their respective SNR thresholds. This leads to an increase in the secure communication rate with increasing γ e , which is evident from Figure 2. Figure 3 depicts the variation of optimal total relay power consumption for the total relay power minimization formulations, mentioned in Section IV, with respect to the source power (P s ). The "SDR" and "Analytical Relaxed" values are outputs of the relaxed semidefinite program P2-SDR and Rayleigh Quotient problem (11), respectively. With the increase of source power (P s ), the SNR at relay nodes increases. Therefore, to maintain the SNR at the destination at any fixed value, the relays have to consume less power. This is apparent from Figure 3, which shows decreasing total relay power consumption with the increase of P s .

VI. CONCLUSION
SNR based secure communication for Amplify-and-Forward (AF) relay networks with multiple eavesdroppers is considered.
After motivating the secure communication scheme, we formulate two optimization problems for obtaining respective optimal scaling factors. Due to the non-convexity of both the formulations, we reformulate those for obtaining computationally efficient solutions. We have considered a two hop network, but in future we plan to investigate similar SNR based model for general multihop AF networks. We also plan to study scenarios where some relay nodes act as jammers, thereby reducing the SNR at the eavesdroppers [9], [15].