Sum Capacity-Based Modeling and Secrecy Analysis of MISO-NOMA Cooperative IoT Framework

Non-orthogonal multiple access (NOMA) has emerged as an effective technology, aiding in latency reduction, improving security and reliability, and enhancing the spectral efficiency and capacity in Internet of Things (IoT)-enabled communication systems. In this work, an implementation of co-operative secure multiple-input single-output NOMA IoT framework is proposed and examined in a two-fold manner. First, under the consideration of standalone links, a user selection criteria which relies on the characterization of sum ergodic capacity (SEC) is investigated in the presence of an eavesdropper (ED) and beamforming constraints. Next, using the optimized beamformers, a user selection criteria which relies on the outage probability analysis is performed under cooperative relaying considerations. We demonstrate that our optimization approach achieves reduced capacity and coverage for the ED while maximizing the overall SEC and coverage of the network under multiple network configurations. The proposed optimization solution demonstrates superior performance compared to the benchmarked schemes. Derived closed-form analytical expressions are validated through simulation means.


I. INTRODUCTION
D UE TO the rising demand for increased spectral efficiency and huge connectivity for Internet of Things (IoT) applications, non-orthogonal multiple access (NOMA) has proven to be a highly sought-after scheme for future wireless communication systems.However, the unpredictable wireless environment coupled with the existence of eavesdropper (ED) in the network, constitutes a wireless safety risk in NOMA applications.Since nodes in communication networks are energy constrained, security and reliability becomes major concern towards cooperative multi-relay communication systems [1].To meet the security objectives in the vicinity of multiple EDs in emerging NOMA systems, joint power allocation (PA) and artificial noise (AN) techniques take center stage [2].Similarly, ensuring security in other NOMA use-cases such as downlink cooperative cognitive radio (CR) networks are essential since these networks enable unlicensed users to access and share spectrum resources in a dynamic and opportunistic manner [3].Furthermore, NOMA enabled wireless networks employ open broadcasting to serve massive number of nodes while sharing the same resources, any ED in the coverage area can intercept the associated data traffic leading to security risk and users' information leaks [4], [5].Due to the heightened security concerns within NOMA systems, industry professionals and researchers are collaborating to devise covert NOMA solutions that are both effective and efficient.

A. RELATED WORKS
For secure NOMA transmission, several physical layer security (PLS) techniques have been proposed aiming to reduce the ED's decoding capabilities while improving the received signal intensity and hence the effective data detection of the target user [6].The performance of the intended node in a cognitive NOMA enabled IoT relay network under both perfect and imperfect successive interference cancellation (SIC) conditions was evaluated by the authors in [7].Therein, two iterative approaches were provided for minimization of the outage probability (OP) and maximization of the total ergodic capacity (EC) of NOMA users using a deep neural network technique under real-time environments.The authors of [8] emphasized on the performance analysis of a multiuser (MU) multiple-input single-output (MISO) NOMA IoT framework with simultaneous wireless information and power transfer (SWIPT) protocol.They proposed unique user selection approaches for the energy harvesting (EH) relay, resulting in enhanced system performance in terms of OP.An uplink CR inspired NOMA system was taken into consideration by the authors of [9], in which hybrid SIC and power control schemes integrated with AN scheme were proposed which ensured secure communication for cognitive user without degrading the quality-of-service (QoS) of the intended user.Various physical layer techniques were employed by the authors in [10] for efficient SIC implementation by identifying the channel conditions of an external ED.The authors in [11] evaluated an energy efficient NOMA-assisted secure massive machine-type communication network, in which nodes aspire to convey signals with confidentiality to the target base station (BS) through reliable relays in the locality of a passive ED.Adopting joint relay and PA levels, authors maximized the secrecy energy efficiency (EE).
For analysis of secrecy EC, a novel cooperative NOMA, i.e., C-NOMA system was proposed in [12], where the source was considered to actively provide jamming signals while the relay forwards, hence improving the security of the intended node.The authors of [13] suggested a secure communications architecture for MU-NOMA-IoT downlink system, where each user is considered as a potential ED and by making use of efficient resource allocation, authors presented an efficient method to enhance the sum secrecy rate while maintaining user QoS and power constraints.In [14], the secrecy OP of an AN-aided massive multiple-input multiple-output (MIMO) NOMA network was examined with imperfect channel state information (CSI) consideration.The authors also proposed optimization algorithms for maximization of EE and minimization of secrecy EC.Authors in [15] employed covariance shaping technique to simultaneously optimize the transmit and receive beamformers under statistical CSI considerations only.The authors of [16] aimed on developing a NOMA-enabled secure industrial IoT (IIoT) network for untrusted resource-limited devices by effective optimization of the resources utilizing Karush-Kuhn-Tucker points.For maximizing the minimal secrecy EC among devices, a joint optimization problem was developed.The authors of [17] presented a joint PLS analysis of secrecy OP and EC for cognitive IIoT networks in which nodes rely on the primary spectrum using space-time block coding in conjunction with NOMA in cognitive mode to achieve high spectrum efficiency.The analysis on SWIPT protocol based NOMA framework was considered by the authors in [18], wherein they developed three different techniques for transmit antenna selection (TAS) while keeping the complexity into consideration.Authors in [19] considered a low complexity unified resource orchestration framework for jointly performing the user association and optimal PA in NOMA equipped heterogeneous wireless network where they relied on contract theory and reinforcement learning (RL) to cater for the incompleteness in instantaneous CSI.
Authors in [20] introduced both conventional transmit beamforming and intelligent reflecting surface (IRS) enabled beamforming techniques integrated with NOMA to tackle the security threats from EDs.In [21], authors considered simultaneous transmitting and reflecting reconfigurable intelligent surface (STAR-RIS) with NOMA where an AN aided secure transmission technique was developed for the optimization of AN model and reconfigurable intelligent surface parameters, to achieve better secrecy performance with lower AN power.In [22], authors evaluated a downlink MISO-NOMA network using the STAR-RIS to enhance the secrecy performance.Authors proposed a secure transmission architecture using a joint active and passive beamforming optimization with the optimum PA.A hybrid PA and aerial jamming technique were developed by the authors in [23] considering a unmanned aerial vehicle (UAV) assisted NOMA network with a malicious ED for performance analysis of both LoS and non-LoS channels.The mobile edge computing (MEC) system for an UAV based NOMA system was presented by authors in [24] as a secure communication strategy for a flying ED.The proposed approach ensured a minimal level of security computation for each ground user while maximizing the average security computation capability of the system using sequential convex approximation and block coordinate descent methods.A NOMA equipped airborne vehicular ad-hoc framework was presented in [25] while taking into account high-altitude platforms, UAVs, and vehicles.Authors therein developed a non-convex maximization problem for the downlink transmission rate by effectively optimizing UAV height and sub-carrier allocation.
The authors of [26] addressed the PLS challenges for a 5G NOMA system with a more effective near-end user in the presence of an ED.The authors proposed optimal PA criteria under the restraint of user's data rate and total power consumption.In [27], both code and power domain NOMA systems were investigated with the PLS concerns wherein the secrecy OP was characterized using homogeneous Poisson point processes to differ between the target users and EDs.Power line communication (PLC) networks with NOMA support were studied by the authors of [28] to analyze the secrecy OP for internal and external EDs addressing the PLS challenges.For the considered system, the PLC channel was modeled by correlated log-normal fading while the noise was modeled by employing the Bernoulli-Gaussian random process.In [29], an optimization framework for enhancing the PLS of the NOMA ambient backscatter IoT system was proposed with the goal of increasing security by efficient optimization of the reflection coefficient and BS's transmit power for the backscatter node.In [30], with the existence of passive EDs, various approaches for improving the downlink PLS performance of a half-duplex C-NOMA network were proposed using AN for analysis of secrecy OP.The authors developed an efficient power allocation coefficients (PACs) method to minimize the secrecy OP for improving the PLS performance even further.Authors in [31] presented a secure transmission method using inter-user interference for an IRSassisted NOMA system without knowledge of ED's CSI in order to improve PLS.The authors developed a non-convex alternating optimization framework in order to degrade the signal-to-interference-plus-noise ratio (SINR) of the ED.The authors of [32] employed indefinite quadratic form approach to provide exact closed-form formulations for the SINR statistics of MU-MIMO systems over Rayleigh based fading channels, such as EC and leakage rate.
In [33], authors investigated hybrid SIC decoding and PLS in a NOMA assisted MEC framework in the presence of ED.A RL based approach for latency reduction was developed where combined computing resource allocation, task assignment, and PA were taken into consideration in order to address the PA challenges for NOMA and orthogonal multiple access offloading schemes.Several research directions at the cross-roads of NOMA and new generation of communication networks are given in [34] which highlight potentials and challenges of working in this area.

B. MAJOR CONTRIBUTIONS
Most of the works mentioned above are related to NOMA enabled networks focusing on performance and secrecy analysis.To the best of our knowledge, no work has been performed on optimization of beamformers to simultaneously maximize the sum ergodic capacity (SEC) and minimize the EC of ED.Also, the SEC based optimized beamformers are not utilized in performance measures of other KPIs such OP.These are the areas that are addressed in this work.The significant contributions of this work are as follows.
1) Under standalone and non-relaying configuration, closed-form analytical expressions are derived for the EC of all user equipments (UEs), IoT device and ED.Using the closed-form expressions, a new user selection mechanism is developed for the cooperative transmission.2) Employing the sequential quadratic programming approach, an optimization problem is formulated with beamforming vectors as optimization variables which yield maximized SEC and minimized EC for the ED. 3) Within the framework of a cooperative relaying mechanism and leveraging optimized beamforming vectors, a closed-form expression for OP is presented, accompanied by a user selection criterion based on this metric.

C. ORGANIZATION OF THE PAPER
The remainder of the paper is organized as follows.Section II describes the considered system model and the formulations for signal-to-noise ratio (SNR) and SINR at each UE, IoT device and ED.In Section III, the algorithm for user selection mechanism and the characterization of SEC are presented for non-relaying setup.Section IV discusses the considered optimization problem for improvement of SEC.In Section V, OP characterization for cooperative relaying and relevant user selections schemes are discussed.Validation and analysis of results is given in Section VI.Lastly, the conclusion drawn from the analysis is presented in Section VII.

II. SYSTEM MODEL
For downlink transmissions, MU-MISO-NOMA IoT system is shown in Figure 1, where multiple UEs, an IoT device and an ED capable of wiretapping the information of other nodes is deployed randomly.The BS consists of N transmit antennas while the end nodes are equipped with single antenna element.Both the IoT device and ED are located in close proximity to the cell-edge with non-zero probability that the message of IoT device may be decoded by the ED.The channels from BS to UE, IoT device, and ED are referred to as h u , h d , and h e , respectively.Similarly, the channels involved in relaying from UE to IoT device, and UE to ED are denoted by h ud and h ue , respectively.For all the wireless channels, Rayleigh based fading is considered having zero mean.Besides, n u and n d denote the zero mean additive white Gaussian noise (AWGN) for UE and IoT device, respectively, with noise power as σ 2 u and σ 2 d .Furthermore, the relaying channel gain is given by the . Here, β represent the attenuation in signal's power, d UE→D is the distance from UE to IoT device, d o is the reference distance and is the path-loss exponent.
The nodes are designed to utilize hybrid time-switching and power-splitting (TS/PS) mechanism employing SWIPT

FIGURE 2. SWIPT based hybrid TS/PS mechanism.
protocol in combination with the SIC as shown in Figure 2. The TS factor T is divided into three slots wherein the first time slot αT is used for harvesting energy from the BS.The second time (1 − α) T/2 is utilized in combination with PS factor ρ for the EH purposes, while the rest PS factor, i.e., (1 − ρ) is used for information processing during the same time slot.The last time slot (1 − α) T/2 is utilized during the relaying phase where relaying UE exploits the energy that it harvested during the first two time slots.Both TS and PS time parameters range from 0 < α < 1 and 0 < ρ < 1, respectively.The selection combining (SC) technique comes into play at the IoT device where both the direct and the relayed signals are combined and the one with stronger signal strength is then decoded.Now, for the SWIPT protocol described in Figure 2 and using framework in [35], the signaling overhead of the terminal nodes in our system model is found out as (1 − αT)(U + D + 1)/2.Next, the SNR/SINR expressions are elaborated in the following stages.

A. DIRECT TRANSMISSION DURING FIRST TIME SLOT αT
During αT duration, information is broadcast from BS through N transmit antennas to UEs, IoT device, and ED with different PACs while fulfilling the notion of NOMA, i.e., U k=1 α k + D d=1 α d = 1, where α k and α d denote the allocated PAC of UEs and IoT devices, respectively.During the first time slot αT, the information received at UE and IoT device is divided as follows.

1) FROM BS TO UE
The signal transmitted through N BS antennas and received by the UE is expressed as where the first term denotes uth UE's message signal, whereas second and the third terms are due to the interference from other UEs and the IoT devices, respectively.The message of intended UE, other UEs and IoT devices are represented by x u , x k , and x d , respectively.The messages are associated with their respective beamformers, i.e., w u , w k , and w d .The last term n u represents AWGN having zeromean and variance σ 2 u .Utilizing the hybrid TS/PS mechanism, the expression of total harvested energy at the UE linked with wireless channel h u is written as where the quadratic formulation [15] is utilized to achieve (2) and η represents the energy conversion coefficient ranging from 0 < η < 1.At this stage, the SIC mechanism comes into play at the UE.By adopting the NOMA superposition principle, firstly the message of all other nodes are decoded and then by subtracting the decoded message of all the other nodes, the message of intended UE is decoded.Hence, the SINR at UE for reading the message of intended IoT device is given by where the desired message to decode is , and ρ = 1 − ρ.The interference and noise terms are given as, Finally, using the quadratic formulation and whitened transformation, S 1 Here, A represents the weight matrix for the desired message signal, while B and C are termed as the interference weight matrices corresponding to the UEs and all other IoT devices except the intended one, respectively.

2) FROM BS TO IOT DEVICE
The SNR expression at IoT device during the direct transmission from the BS is characterized with the premise that IoT device is allocated with higher transmit power, and SIC has already been implemented at all other nodes.Therefore, interference at the IoT device due to all other nodes is considered as noise.Thus, to decode its own message, the SNR at IoT device is written as where the IoT device's signal is and the noise term is given by, Using the same approach as employed for (3), the expression results in, S 1 and , and the matrices are defined as Â=R d , where Â is weight matrix for desired message signal while the rest are noise weight matrices.

3) FROM BS TO ED
The information received at ED is written as where the first and second terms are message signals of UEs and IoT devices, respectively which ED taps from the BS.Now, it is assumed that the ED is capable of differentiating the messages of UEs and IoT device, therefore, the SINR for ED to eavesdrop the information of UE in close proximity is expressed as

B. RELAYING TRANSMISSION DURING (1 − α)T/2
During relaying transmission, the UE forwards information to the IoT device, which can also be wiretapped by the ED.The information received from relaying UE at IoT device and ED is discussed in the following subsections.

1) UE TO IoT DEVICE
In this time slot, using the harvested energy, the relaying UE forwards the information toward IoT device.Therefore, we express the SINR received at IoT device as where ζ = ηP S ( 2α 1−α + ρ).Since, the information at IoT device is received in two stages, hence a tractable SC technique is used.Thus, the expression of SINR becomes 2) UE TO ED Similarly, while relaying transmission, ED may listen to the message signal of an IoT device.As a result, the information obtained from UE at ED is written as follows: where xd is the re-encoded version of x d .Now, the SINR received at ED to listen the message signal of IoT device relayed through UE to the ED's channel is written as At this stage, ED is decoding message of IoT device through BS and UE in two stages, therefore the same SC technique is utilized here resulting in SINR expression as

III. CHARACTERIZATION OF SEC AND USER SELECTION MECHANISM WITHOUT RELAYING
In this section, we assume perfect SIC and formulate the analytical EC expressions for the UEs, IoT devices and the ED in a standalone configuration.The SEC expressions are obtained using individual EC of each node except the EC of ED.The formulation is later used in the development of a user selection strategy.

A. CHARACTERIZATION OF SEC
Due to perfect SIC mechanism at the UE, the SNR expression to decode its own message is where For characterization of EC, the second equality is obtained by transformation approach where, c 1 = ( ρα u P S ρσ 2 u +σ 2

IDu
) and the weight matrix is defined as A=R u .Hence, EC is characterized as in [32, Prop.2] and the analytical expression for the EC at the UE becomes where E 1 is the exponential integral function and λ u is the uth eigenvalue of the matrix A.
Similarly, the SNR expression under perfect SIC condition for the IoT device becomes where ).Therefore, the analytical expression of the EC for IoT device can be written as Here, λd is the dth eigenvalue of the matrix Â.Now, we assume that ED is trying to wiretap the information of IoT device and SIC is being perfectly employed at the ED, hence the SNR expression becomes Hence, using the same approach, the analytical expression of the EC for the ED is written as Here, λk is the kth eigenvalue of the matrix Ã.
Hence, utilizing ( 16) and ( 18), we achieve the SEC expression which is written as

B. ERGODIC CAPACITY BASED USER SELECTION MECHANISM
In the proposed model, there are multiple UEs, an IoT device and an ED, and it is assumed that only UEs are capable to act as a relay forward node.In Algorithm 1,

IV. OPTIMIZED BEAMFORMING USING SEC ANALYSIS
In this section, an optimization problem is presented to ensure secure communication for the IoT device.With the assumption that IoT device is located closer to the ED.Hence, there is a risk of getting the information of IoT device wiretapped by the ED.To address this, we propose an algorithm which ensures that the ED achieves minimum EC while improving the SEC of the other nodes.The objective function given as a closed-form in ( 20) is now optimized with respect to the beamforming vector w i while taking the constraints into account.Here, w i represents the beamforming vector for all the nodes in the proposed model.Thus, we express the objective function as where the number of iterations are denoted by j.The constraint C 1 is designed to ensure that w i w H i = 1, ∀i, while C 2 achieves maximized SEC in comparison with the initialized SEC at each incremental iteration.The constraints make the optimization problem NP-hard and for such, an exhaustive search approach is considered.Since this is a single objective constrained optimization problem, hence algorithms such as 'interior-point' and 'sequential programming (sqp)' routines can be used.Since sqp method is more robust and it can recover from infeasible solutions, it is considered in this work.The computational complexity of this method relies on multiple factors.It involves an iterative process with an exhaustive search strategy within the optimization, depending on various constraints.The complexity is affected by the number of iterations required for convergence, the dimensionality of the search space concerning users, IoT devices, and beamforming vectors, and constraints such as power normalization and objective which is EC of the eavesdropper herein.A pseudo-code for optimized beamformers is given in Algorithm 2.

V. OUTAGE PROBABILITY ANALYSIS UNDER COOPERATIVE RELAYING
In this section, the analytical formulation for the OP analysis of IoT device is presented using the SINR formulations.For

Algorithm 2 Pseudo-Code for Optimized Beamformers
Input: Initialized values of the beamforming vectors.
Return optimized beamformers, EC e and SEC 10.
else if 12. until {Stop algorithm = true} the beamforming vectors, Algorithm 2 is considered albeit under simplified setup of linearly dependent beamformer considerations.Later, a user selection mechanism based on the OP of IoT device under cooperative relaying is given.

A. CHARACTERIZATION OF OUTAGE PROBABILITY
Here, we employ the framework given in [8] under the linearly dependent beamformer constraints produced using Algorithm 2 to characterize the OP of IoT device with cooperative relaying with uth user, u ∈ {1, 2, . . ., U} as. where 1−α − 1 is predefined threshold for decoding x d while R th,D is the target data rate of IoT device. 1 A detailed derivation of the above is available in [8], and it is not included herein to avoid repetition.Also, a similar OP expression can be obtained for ED, i.e., P Out E,u by incorporating the relevant channel characteristics and path-loss exponents.

B. OUTAGE PROBABILITY BASED USER SELECTION MECHANISM
For the considered model, two distinct user selection mechanism are considered.Firstly, Algorithm 3 presents the 1. u(.) represent unit step function and is the generalized incomplete gamma function defined as

VI. RESULTS AND DISCUSSIONS
In this section, we validate the closed-form expressions derived in this work and perform the proposed optimization tasks.In our simulation setup, we consider that all the nodes in the network are deployed randomly, however, in a static setup without mobility.For all the wireless channels, the path loss exponent is set to 3 and the bandwidth is 1 MHz as in [18].The simulation parameters used are given in Table 2.
We consider the network deployment as shown in Figure 3.The validation of EC based user selection for the proposed secure MU-MISO-NOMA IoT system is presented in Figure 4. From the Figure, it is observed that UE 3 achieves the maximum EC compared to the rest.However, ED is performing much better than UE 1 and IoT device, because of its better channel conditions.In comparison with the EC of UE 4 , UE 3 achieved approximately 80% more EC at −13 dB transmit SNR.Similarly, at 16 dB transmit SNR, the EC of UE 1 is observed to be approximately 66% less than the EC of UE 3 .Over the whole SNR range, UE 3 outperforms each UE in terms of EC, hence it is selected as the most efficient   node for relaying purposes.Furthermore, it also illustrates that analytical results are perfectly matching the simulation results.
The OP based user selection approach in Algorithm 3 is presented in Figure 5.The Figure illustrates that UE 3 achieves the least OP for the IoT device hence, becoming the most efficient UE to be selected for the purpose of cooperative relaying.At 2 dB transmit SNR, it is observed that the OP of IoT device computed from relaying path  through UE 1 , UE 2 , and UE 4 is approximately 69%, 56%, and 45% higher than UE 3 , respectively.By increasing number of transmit antennas, further reduction in OP can be observed for each UE.Conclusively, both the EC and OP based user selection approaches resulted in selection of the same UE 3 under the considered network configurations.Now, by considering Algorithm 4, it is observed that the best user to be selected as relay is UE 2 as the S Out D,E,2 is marginally higher than UE 3 which is 0.0071.This difference is a little higher for UE 1 and UE 4 .However, in all cases the marginal increase may pivot the user selection in favor of Algorithms 1 and 3.In the work that follows, we opt UE 3 as the cooperative relaying node.
Figure 6(a)-(c) gives insights of OP of IoT device against transmit SNR at different number of transmit antennas while considering the beamformers to be generated using Principle Eigenvector (PEV) as in [15], Gram Schmidt Orthogonalization (GSO), e.g., [36], and optimized beamformers achieved using proposed Algorithm 2. From Figure 6(b), it is depicted that at −4 dB transmit SNR, there is approximately 6% reduction in the OP of IoT device when compared with GSO technique.Similarly, at the same transmit SNR, the optimized beamformers resulted in 0.5% and 6.5% reduction in OP of IoT device when compared with PEV and GSO technique, respectively.Furthermore, the comparative analysis of Figure 6(a)-(c) indicate that due to multiple antenna elements, the OP of IoT device decreases on average by approximately 0.25%, 0.4%, and 0.45% over the predefined transmit SNR range when compared with PEV and optimized beamforming results.From Figure 6, it is concluded that GSO based beamformers performance fall short since the beamformers are random in nature while the optimized beamformers are performing comparatively better than PEV technique in terms of OP of the IoT device.
Figure 7 shows the improvement in exhaustive search algorithm over GSO and PEV based beamforming techniques.The center of each box plot represents the median, while the bottom and top edges of the box signify the 25th and 75th percentiles, respectively.It is observed that for all considered antenna elements, the improvement of both GSO and PEV is observed in the summary statistics shown through the box plots.
Figure 8 highlights the OP against PS factor (ρ), at various transmit SNR levels.The Figure indicates that at low PS factor the OP of IoT device is comparatively less at low transmit SNR level and vice versa for higher transmit SNR levels.This is because lesser PS factor is allocated for the EH process while a bigger chunk of the PS factor is left for the relaying transmissions hence, resulting in better OP of IoT device.Comparative analysis of Figure 6(a) and 8 indicate that there is an exact match between analytical and simulation results.
In Figure 9, the SEC is presented against PS factor at various SNR levels and varying number of transmit antennas N. The analysis indicates that at low transmit SNR, the SEC is much affected by the variation of PS factor, however, at high transmit SNR the SEC is better when allocated PS factor is small as smaller PS factor results to have more PS factor for information decoding.Furthermore, for PS factor ρ to be 0.5 and at 10 dB transmit SNR, the introduction of multiple transmit antennas enhanced the SEC by approximately 5%.Similarly, at the same PS factor and −10 dB transmit SNR, the increase in SEC due to multiple transmit antennas is approximately 9%.Hence, compared to higher transmit SNR, the analysis depicts that multiple antenna elements perform better at low transmit SNR.Moreover, it is observed that analytical and simulation results closely match, which again validates our approach.
Figure 10(a)-(c) presents the SEC and EC of ED as a function of SNR at different number of transmit antennas, for validation purposes.Using the 'sqp' algorithm for optimization, it is observed that SEC is improved and EC of the ED is degraded in accordance with the objective function.It can also be observed that at different number of transmit antennas, TAS method always achieved less SEC and EC for the ED when compared with the proposed optimized method.Furthermore, the affect of antenna diversity is observed by comparing Figures 10(a) and 10(c).With increase in number of transmit antennas, the optimized SEC at 10 dB transmit SNR achieved approximately 2.5% increase.In each case, it is observed that EC of ED ranges near 0 bits/sec/Hz.At N = 3, 5, 7, the optimized SEC increases on average by approximately 29%, 18%, and 26%, respectively, when compared to the analytical SEC.Similarly, an average reduction in the optimized EC of ED when compared with the analytical EC is approximately 98% which validates our proposed optimization problem.Moreover, it is demonstrated that the proposed technique always outperformed TAS technique given in [18].
The boxplots in Figure 11 demonstrates the comparative execution times of various beamforming techniques, such as PEV, GSO, and the exhaustive search approach, across different numbers of transmit antennas N. Notably, the execution times were computed using an Intel Core i3-7020U CPU @ 2.30 GHz with 8GB RAM.It is observed that the GSO method outperforms the PEV and exhaustive search methods in terms of execution time.However, it is crucial to consider the applications in distinct time contexts.The exhaustive search method is well-suited for non-realtime applications due to its comprehensive exploration of possibilities.Conversely, the GSO and PEV methods offer a balance between search efficiency and speed, making them better options for near real-time scenarios.

VII. CONCLUSION
In this work, we performed the optimization of the beamforming vector on a downlink MU-MISO NOMA IoT system in the presence of ED with the goal to maximize the SEC and minimize EC of ED.Particularly, we provided the exact closed-form expressions of SEC and EC of ED while considering TS/PS factors, and transmit antenna diversity.A user selection scheme is developed based on EC of each UE for selection of efficient relaying UE.Additionally, an optimization problem has been developed for MU scenario in the presence of IoT device and ED, which is then addressed exploiting the exhaustive search method.A secure MU-MISO NOMA communication is performed by minimizing the EC of ED, resulting in degradation of ED's performance, while improving the SEC of rest of the network.The percentage improvement/decrease in the SEC and EC of ED due to antenna diversity is presented, respectively, where the analytical results are validated by Monte Carlo simulation results.Under cooperative relaying, OP based best user selection is provided which ensures PLS in the considered network.This work can be extended to perform analysis of secrecy performance considering UAVs as relay and multiple IoT devices as end nodes in the presence of EDs and by performing efficient selection on PACs to select a best relaying UE.Also, low complexity solutions for the proposed NP-hard optimization problem needs to be investigated.

FIGURE 4 .
FIGURE 4. Ergodic capacity of each node versus transmit SNR at N = 3.

FIGURE 5 .
FIGURE 5. Outage probability of IoT device through each node versus transmit SNR at N = 3.

FIGURE 6 .
FIGURE 6. Outage Probability of IoT device using PEV, GSO and Optimized Beamformers versus transmit SNR at different number of transmit antennas N.

FIGURE 7 .
FIGURE 7. Boxplot displaying statistical significance of exhaustive search algorithm's improvement over GSO and PEV based beamforming techniques.

FIGURE 10 .
FIGURE 10.Sum ergodic capacity and EC of ED versus transmit SNR at different number of transmit antennas N.

FIGURE 11 .
FIGURE 11.Execution time of different beamforming techniques at varying number of transmit antennas N.

TABLE 1 . List of notations.
User Selection Mechanism Based on EC Input: Coordinates of UEs, IoT device and ED, simulation parameters Output: Selection of uth UE as a relay while UEs > 0 do 1.Compute EC {UE 1...U } = {EC UE 1 , EC UE 2 , . . ., EC UE U } 2. Index = arg max EC {UE 1...U } 3. U s = UE(Index) end )Algorithm 1 vector containing the EC of all the UEs.To ensure the QoS requirements of the IoT device, one of the UE with the maximum EC is chosen to act as an EH relay which has the EC representation as EC UE s .The computational complexity for the user selection based on the EC is of the order O(n), where n defines the total number of legitimate devices.Figure3refers to the user deployment scenario based on employed user selection mechanism for the considered model.The distances from BS to the IoT device, BS to selected UE, and selected UE to the IoT device are represented by d BS→D , d BS→UE and d UE→D .

Algorithm 3
User Selection Mechanism Based on OP Input: Coordinates of UEs, IoT device and ED, simulation parameters Output: Selection of uth UE as a relay while UEs > 0 do 1.Compute P Out D,UEs = {P Out D,1 , P Out D,2 , . .., P Out D,U } 2. Îndex = arg min (P Out D,UEs ) 3. Ûs = UE( Îndex) Selection of uth UE as a relay while UEs > 0 do 1.Compute S Out D,E,UEs = E P Out E,u − P Out D,uOP based user selection mechanism where the OP of IoT device through cooperative relaying is computed considering each UE as a relay forward node.Herein, P Out D,UEs represent the OP of IoT device through all UEs, whereas Ûs represent the selected UE which results in the minimum OP of IoT device.Secondly, Algorithm 4 gives a user selection mechanism which ensures the maximum secrecy rate.This is done by calculating the outage probability of IoT device and ED from each user, i.e., P Out D,u and P Out E,u , ∀u, and then taking the expectation of the differences, refereed as S Out D,E,UEs .Ūs represent the selected UE for relaying based on this mechanism.The computational complexity for the user selection methods based on the outage probability is also of the order O(n).