Physical layer security analysis of IRS-based downlink and uplink NOMA networks

In recent years, the development of intelligent reflecting surface (IRS) in wireless communications has enabled control of radio waves to reduce the detrimental impacts of natural wireless propagation. These can achieve significant spectrum and energy efficiency in wireless networks. Non-orthogonal multiple access (NOMA) technology, on the other hand, is predicted to improve the spectrum efficiency of fifth-generation and later wireless networks. Motivated by this reality, we consider the IRS-based NOMA network in the downlink and uplink scenario with a pernicious eavesdropper. Moreover, we investigated the physical layer security (PLS) of the proposed system by invoking the connection outage probability (COP), secrecy outage probability (SOP), and average secrecy rate (ASR) with analytical derivations. The simulation results reveal that (i) it is carried out to validate the analytical formulas, (ii) the number of meta-surfaces in IRS, transmit power at the base station, and power allocation parameters all play an essential role in improving the system performance, and (iii) it demonstrates the superiority of NOMA to the traditional orthogonal multiple access (OMA).


Introduction
Future wireless networks are expected to play a pivotal role in society as they will offer access to intelligent applications such as autonomous driving and virtual and augmented reality.[1].In order to offer ubiquitous services, though, wireless connectivity should be provided for everyone and everywhere [2].Recently, intelligent reflecting surfaces (IRSs) have been proposed as one of the important technologies to realize wireless communication smart radio environment (SRE) systems [2].A IRS is specifically made up of a number of small, inexpensive, almost passive reflecting elements (REs) that may be programmed and controlled by the network operator.Moreover, IRS can be modified to reflect and direct incoming signals in the desired directions [3][4][5].Additionally, the terms reflecting intelligent surfaces (RISs) and large intelligent surfaces (LISs) are also used interchangeably for IRSs in [6].The IRSs are known to have very significant spectrum efficiency (SE), as well as energy efficiency (EE) with a large number of passive REs in [7].As a result of the IRS structure's simpler installation, it is now possible to deploy it more widely across the different urban infrastructures in both indoor and outdoor settings, including factory roofs, street lights, and traffic signal poles as well as residential ceilings and rooftops.As a result, IRS is simple to integrate into the current wireless communication networks [8][9][10].
Furthermore, the increased demand for wireless access has prompted researchers to look beyond the traditional multiple access strategies in which users are multiplexed orthogonally according to time, frequency, or codes.The terms for multiplexing in time, frequency, and code are time division multiple access (TDMA), frequency division multiple access (FDMA), and code division multiple access (CDMA), respectively.Non-orthogonal multiple access (NOMA) has recently drawn a lot of interest and is now thought to be a strong contender for future wireless networks [11][12][13][14].It is thought to support vast connectivity in addition to improving spectral efficiency when compared to orthogonal multiple access (OMA).It is possible to support more users than the number of accessible orthogonal resource blocks [15].The main goal of NOMA is to enable non-orthogonal resource allocation among users in order to achieve multiple access (MA).The superposition coding (SC) technology, in which the signals of several users are multiplexed with varied power levels, served as an inspiration for NOMA in the power domain (PD)-NOMA.The overlaid messages are decoded at receivers using successive interference cancelation (SIC) [16].Both downlink and uplink transmissions are compatible with NOMA.Users with poor channel conditions are typically given greater power for downlink NOMA so that their signals can be deciphered by treating other users' signals as noise.The base station must be able to identify signals from all users, which requires a well-designed power control mechanism for uplink NOMA [17].
In recent years, because both IRS and NOMA are extremely promising approaches, IRS was combined with NOMA in [18][19][20][21].It has been demonstrated that combining IRS and NOMA allows for high data rate transfer while improving system performance.Furthermore, IRS-assisted NOMA improves spectrum resource usage.[22] proposed a simple concept for downlink transmission of IRS-assisted NOMA, in which the IRS is deployed to effectively serve the cell-edge user by aligning the reflected beam from the IRS.In [23], the authors proposed an energy-efficient approach for IRS-assisted NOMA, where the authors explore the tradeoff between the sum rate of NOMA users and total power usage.The authors of [24] provided various strategies to increase system performance for continuous phase shifts and discontinuous phase changes of IRS elements.[25] examined the downlink transmit power minimization problem for an IRS-powered NOMA network.The author in [26] investigated the performance of downlink and uplink IRS Networks.In [27], a IRS-assisted NOMA system was compared to a classic OMA system with/without IRS and a traditional NOMA system without IRS, and simulation results revealed that the IRS-assisted NOMA system outperformed the others in terms of rate performance.
Because electromagnetic transmission has the nature of broadcasting, which makes internet of thing (IoT) communication vulnerable to eavesdropping assaults, communication security, and secret protection are highly important in wireless communication networks [28,29].Traditional security approaches rely primarily on authentication and encryption, both of which are implemented at the upper layer of a wireless communication system but are generally independent of the physical layer.However, key management is problematic using classical encryption technologies [30].From the standpoint of information theory, physical layer security (PLS) technology exploits the indeterminacy and time-variability of the wireless channel to realize secure communication of encrypted links without a key [31] and has established a potential solution for secure wireless communication.In [32], beamforming was employed to decrease the system's transmitted power under the limitation of secrecy rate.When the eavesdropper's channel is superior to the user's and both channels are highly correlated in space, joint beamforming was utilized to improve the user's secrecy rate in [33].In [34], the secrecy outage probability (SOP) was calculated in a IRS-aided wireless communication system and the effect of the number of reflectors in the IRS on secrecy performance was investigated.In [35], two techniques were described to improve the PLS of a IRS-aided multiple-input single-output (MIMO) system.In [36], a minimum-secrecy-rate maximization problem was solved to improve the overall system's secrecy performance when the system has several legitimate users and multiple eavesdroppers.The author in [37] studied the PLS of a multi-user situation for an IRS-NOMA network, providing accurate and asymptotic SOPs.An IRS was used to aid a cell-edge user in [38], where the secrecy performance in the Nakagami-m fading channel was examined.In [39], the secrecy performance and diversity order are analyzed for the IRS-based NOMA network.The SOP and average secrecy capacity (ASC) are studied of IRS-based NOMA network under the Rayleigh fading channel in [40].

Motivation and contribution
According to the previous study, current IRS research priorities include generic IRS applications, the inherent integration of NOMA and IRS, and the PLS of IRS-aided wireless networks.The author in [40] investigated the PLS of IRS-aided NOMA for a downlink scenario under the Rayleigh fading channel.But the author does not consider for uplink scenario and the Nakagami-m fading channel for direct link.Therefore, to fill this gap, we analyzed the PLS of the IRS-aided NOMA network under the Nakagami-m fading channel for the downlink-uplink scenario.In addition, we have added Table 1 to compare the proposed work with the current literature.The detailed contributions of this study, in particular, can be summarized as follows: • We considered the downlink-uplink IRS-based NOMA network, in which a base station (BS) sends and receives the signal from user 1 ( D 1 ) and user 2 ( D 2 ), IRS reflects and receives the signals from D 2 in the presence of an eavesdropper.• We analyzed the PLS of the proposed system.Specifically, we provide the reliability and security analysis of the downlink-uplink by developing analytical formulas for the connection outage probability (COP), SOP, and ASR for the legitimate user D 1 , D 2 , an eavesdropper.• We offer thorough simulations not only to validate the theoretical analysis results but also to provide some important technical insights.Throughout the numerical results, we emphasize the critical influence of utilizing the IRS.Following that, we demonstrate the effect of the number of IRS elements on the proposed system's downlinkuplink.

Organization
The rest of this paper is structured as follows.Section 2 analyzes the system model of IRS-based NOMA networks with the downlink and uplink cases.Section 3 presents the channel model for the system.In Sect.4, the downlink performance analysis is carried out, and in Section 5, the uplink performance analysis.Section 6 depicts a simulation of the model.Section 7 concludes the paper.

System model
In Fig. 1, we consider the IRS-based downlink and uplink NOMA network, which consists of a BS, an IRS with N reflecting elements, and two receivers, D 1 and D 2 .The net- work is communicating while being intercepted by an eavesdropper (E).In more detail, D 1 is the near user that can be directly communicated with BS, but D 2 is the far user that requires an IRS's assistance in order to communicate due to the long distance and obstructions.In addition, the reflection-coefficient matrix of IRS is denoted by � = diag α 1 e jϕ 1 , α 2 e jϕ2 , . . ., α N e jϕ N , j = √ −1 , where α n ∈ [0, 1] is the amplitude- reflection coefficient and ϕ n ∈ [0, 2π ) is the phase-shift variable of the nth element that can be adjusted by the IRS with (n = 1, 2, . . ., N ) .Furthermore, we assume all wireless links following Nakagami-m fading.Particularly, 2 lists the primary parameters and functions.

Signal model of downlink
In this downlink section, the BS sends the superposed signal s Please take note that since user D 2 is assumed to be further away than the other user, a larger portion of power must be provided for user D 2 , i.e., condition η 1 < η 2 for user fairness and assume fixed power allocation splitting between two users [22].The received signals at D 1 are given by The corresponding signal-to-interference-plus-noise ratio (SINR) at D 1 to detect s d 2 is given by (1) where ψ = P BS N 0 denotes the transmit signal-to-noise ratio (SNR) of the BS.After implementing the SIC, the corresponding SNR of D 1 when detecting the own signal is given by Next, the received signal at D 2 is given by The corresponding SINR of D 2 to detect the own signal is given by At the E, the received signal can be expressed as (4) ( g e g e s + τ e .
Fig. 1 The IRS downlink and uplink system model In this work, like [41] and [42], parallel interference cancelation (PIC) is used at E to distinguish the superimposed mixture.Then, the corresponding SNR at E can be expressed as (7) Table 2 Definitions for key parameter

Symbol Description diag(x)
Stands for a diagonal matrix for a vector x, where each diagonal element corresponds to an element in x x T The transposition of x The expectation The PDF of a random variable The CDF of a random variable k!The factorial operation Pr (.) The probability

|.|
The absolute operations The modified Bessel function of the first kind The gamma function γ (., .) The lower incomplete gamma function The transmit signals of D i

P BS
The transmit power of BS

P Di
The transmit power of D i η i The power allocation coefficients with (η 1 + η 2 = 1) The path loss exponent The additive white Gaussian noises (AWGN) at D 1 with zero mean and variance N 0

R i
The target data rate of users D i

R Ei
The secrecy rate of the user D i K Accuracy-complexity tradeoff parameter The distance from BS-IRS The channel coefficient from BS-nth reflecting element The channel coefficient from nth reflecting element-BS The channel coefficient from nth reflecting element-D 2 h u

2,n
The channel coefficient from D 2 -nth reflecting element where ψ e = P BS N e .

Signal model of uplink
In the uplink section, the received signal at the BS is written by The corresponding SINR of BS, when decoded the signal of D 1 , is given by where N 0 .Following the completion of the SIC, the corresponding SNR to detect the signal of D 2 is given by The received signal at E can be expressed as Similar to (7), we can continue to apply PIC, then the SNR at E can be written by [41,42] where ψ ei = P D i N e , (i = 1, 2).

Channel model
Based on [43], the channel gain g z follows Nakagami-m distribution with fading param- eter m g z and E g z 2 = g z with z = d, u, e, e1, e2 .Therefore, the probability density function (PDF) of g z 2 is given by Next, the cumulative distribution function (CDF) is expressed as (8) ( To obtain the best channel of BS-IRS-D 2 , we adjust the phase-shift element of IRS to maximize ,n e jϕ n .Next, by setting the optimal phase-shift ϕ n , this implies that the phases of all h v 1,n h v 2,n e jϕ n can be set to be the same.Furthermore, the generalized solution can be obtained as , where φ ∈ [0, 2π) denotes the arbi- trary constant.By applying the optimal phase-shift for ϕ n , we can express as [26] where , where m v i,n are denoted fading parameters of h v i,n .With N as a large number and applying the central limit theorem (CLT), X v follows the noncentral chi-square distribution.Next, the PDF and CDF are given by [26] and

Performance analysis for downlink
In this section, we derive the closed-form of COP, SOP, and ASR for user D i with the downlink scenario.

COP OF D 1
The COP of user D 1 is defined as the probability of an interruption occurring in the con- nection of user D 1 when the connection of user D 2 is also interrupted.Therefore, the COP of user D 1 can be expressed by [44,45] where

Proposition 1
The closed-form expression for COP at D 1 is given by . Proof From (18), COP d D 1 can be written as , note that when we set power allocation coefficients, we need to ensure that η 2 − γ th2 η 1 > 0 .Based on the CDF function of .The proof is now complete.

COP OF D 2
The COP of D 2 occurs when D 2 cannot detect correctly the own signal.So, the COP of D 2 can be defined by

Proposition 2
The closed-form expression for COP at D 2 is given by can write as (24), as shown at the top of the next page.
Similar to (20), note that when we set power allocation coefficients, we need to ensure is given by (17).COP d D 2 can be derived as The proof is now finished.

SOP analysis
Assume the eavesdropper could decode sensitive information from BS by using multi-user detection techniques.Based on ( 7) and ( 14), the closed-form of user D i can be given by [44] where

ASR OF D 1
The ASR of D 1 can be expressed as [46] (24) where [X] + = max {0, X} is to ensure the secrecy capacity strictly positive.

Proposition 3 The closed-form expression for ASR at D 1 is given by
Proof The details are given in Appendix A.

ASR OF D 2
The ASR of D 2 can be expressed as [46] Proposition 4 The closed-form expression for ASR at D 2 is given by (30), as shown at the top of the next page, where � = η 2 t k +η 2 2η 1 , t k = cos (2k−1)π

Proof
The details are given in Appendix B.

Performance analysis for uplink
In this section, we derive the closed-form of COP, SOP, and ASR for user D i with the uplink scenario.

COP OF D 1
If D 1 is unable to accurately identify its own signal, the COP of D 1 will occur.As a result, the COP for the uplink of D 1 can be described as [26] Proposition 5 The closed-form expression for COP at D 1 is given by (28) where δ = Proof The details are given in Appendix C.

COP OF D 2
Similarly to (31), when D 2 is unable to appropriately identify its own signal, the COP of D 2 happens.Consequently, the COP of D 2 can be described as follows:

SOP analysis
The SOP of user D i can be given by where g ei η i ψ ei g ei .

ASR OF D 1
The ASR of D 1 can be expressed as (32) The closed-form expression for ASR at D 1 is given by (36), as shown at the top of the next page, where φ = .

Proof
The details are given in Appendix D.

ASR OF D 2
The ASR of D 2 can be expressed as

Proposition 7
The closed-form expression for ASR at D 2 is given by ( 35)

Simulation results and discussion
In this section, we define sim.and ana.as short for simulation and analytical.Next, we verify our theoretical analysis by using Monte-Carlo simulation.In Fig. 2, we plot the COP for downlink versus ψ (dB) with varying the number of ele- ments.First, it can be easily observed that the COP curve corresponds exactly to the Monte Carlo simulation results.The simulation points of D 1 and D 2 correspond well to the analytical results obtained from ( 19) and ( 22), respectively.Furthermore, when the ψ rises, so will the system COP's performance.In terms of comparing the COPs of D 1 and D 2 , the simulation results show that user D 2 has the best scenario because it is assisted by IRS.In addition, the power allocation has a great impact on the COP performance.In addition, NOMA outperforms OMA for two users D 1 and D 2 in all SNR ranges.
Figure 3 illustrates the COP for downlink versus ψ (dB) with varying the number of elements N, we can see that the COP performance is improved by increasing the number of reflecting meta-surface elements N for D 2 .We can observe that the user D 2 supported by IRS has better COP performance than the unsupported user D 1 .The research gap between two users D 1 and D 2 increases when N is large.Moreover, in the case without IRS, we can observe the COP performance of D 1 is better than D 2 .This can be explained because the distance from BS to D 2 is larger than D 1 .In Fig. 4, the impacts of the SOP for the downlink of D 1 and D 2 versus the transmit power ψ E (dB) with varying the target data rate of two users.We can see that the SOP increases significantly with increasing ψ E (dB).Under the intended parameters, the suggested NOMA method has somewhat lower secrecy outage performance than OMA in high transmission power locations.
Fig. 2 COP for NOMA downlink system and OMA downlink system versus ψ as changing η 1 ( R 1 = 3 (bps/Hz), Figure 5 depicts the ASR for downlink versus ψ (dB) varying the path loss β , assumed to be K= 100 for the accuracy-complexity tradeoff parameter.First, it is obvious that ASR increases with transmit power ψ (dB).Second, the variation of β will change the ASR of two users D i .It means the ASR is decreased when β is increased.Finally, for D 2 , when ψ (dB) is large enough, ASR of D 2 will converge at one point.
In Fig. 6, it plots the COP for uplink versus ψ 1 = ψ 2 (dB) with varying the number of elements N. It is discovered that the simulation points of D 1 and D 2 correspond well to Fig. 4 SOP for NOMA downlink system and OMA downlink system versus ψ e as changing the analytical results obtained from ( 30) and (31), respectively.Then, we can observe that when the transmit ψ 1 = ψ 2 (dB) increases, the COP of D 1 decreases and approaches a floor.Because of the uplink NOMA principle, D 2 's signal is viewed as interference when decoding D 1 's signal.Furthermore, when N increase, the performance COP of D 2 is improve significantly.Figure 7 shows the COP for the uplink of two users D 1 and D with different fading val- ues m = 1 and m = 2.It is apparent that m = 2 leads to a better channel, which is significant in improving the performance of destinations.The fundamental reason for this is those principal SINR and SNR expressions depend on channel gains.As a result, larger channel gains result in higher SINR and SNR, and outage performance can be improved.Figure 8 shows the SOP for the uplink of two users D 1 and D 2 with different distances from D 1 and D 2 to E. We can see that the wider the distance between two users and E, the secrecy performance of the two users is better.This is because, as the distance increases, the power allocated to user D 2 expands to meet its quality of service (QoS) requirements.As a result, the power assigned to user D 1 will drop.Given a secrecy guard distance, two users perform better at a small distance than a large distance.In Fig. 9, the ASR curves for the uplink network of two users D 1 and D 2 are depicted.We observe that the simulated findings match the relevant analytical results obtained from (34) and (36).Then, we see that the ASR of user D 2 also converges to a ceiling.Moreover, the distance d 1 is large, which leads to a decrease in the ASR.

Conclusion
In this paper, we analyzed the secrecy performance for IRS-based downlink and uplink NOMA networks.Based on the proposed system, the closed-form of COP, SOP, and ASR are derived.All analytical results are verified by Monte Carlo simulations.We show numerical results for various secure performances under the influence of several parameters such as transmit SNR at the base station and the number of reflecting elements of IRS setup.In addition, the proposed IRS-based NOMA scheme is compared with OMA.The number of reflecting elements at the IRS and SNR level at the base station, as the major finding, contribute primarily to the improvement of security for IRS-aided NOMA systems.

Appendix B
From ( 29), W d 1 can be written by According to ( 17) and ( 23), (x) can be given by From ( 49) into (48), and W d 1 has to meet the requirement that x < η 2 η 1 .So, W d 1 can be expressed as Applying Gaussian-Chebyshev quadrature [47], W d 1 is given by where Similarly, Z d 2 , W d 2 can be written as We can obtain (30) by converting (51) and ( 52) into ( 29). ( (51)

Appendix E
From (37) and similar to (48) (68)  Similar to (47), with the assistance of the [47, Eq. (7.811.5)],W u 1 can be written by Similar to Z u 2 , W u 2 can write as From ( 70) and ( 71) into (37), we're able to get

τ 2
The AWGN at D 2 with zero mean and variance N 0 τ bsThe AWGN at BS τ eThe AWGN at E with the same variance N e

, W u 1 2 (
can be written by Based on (33) F γ u D x) can be calculated by Based on(42) and (68) into (67),

Table 1
A comparison of this work to related publications

.
Le et al.J Wireless Com Network (2023) 2023:105 Proof The details are given in Appendix E.