1 Introduction

Intelligent reflecting surfaces (IRS) improve the throughput of wireless systems as all reflections are in phase at the destination [1,2,3,4,5]. The phase shift of kth reflector depends on the phase of channel gain between the source and kth IRS reflector as well as the phase of channel gain between IRS and destination [6,7,8]. IRS for NOMA systems and fixed transmit power was recently analyzed in [9]. A set \(I_i\) of reflectors are dedicated to user \(U_i\) so that all reflections are in phase at \(U_i\). In [9], there is a single network without energy harvesting and the results cannot be applied to CRN-NOMA where the secondary source harvests energy and transmits with an adaptive transmit power. IRS have been deployed to enhance the throughput of millimeter wave communications [10, 11] as well as optical communications [12]. IRS with finite phase shifts were suggested in [13]. Asymptotic performance analysis of wireless networks using IRS was discussed in [14]. When the number of reflectors is doubled, a 6 dB enhancement in throughput was observed in [1, 15, 16]. Antenna design, prototyping and experimental results of IRS were provided in [17]. Deep and machine learning algorithms were applied to wireless networks equipped with IRS [18, 19].

In this paper, we suggest the use of IRS for CRN-NOMA where the secondary source \(S_S\) harvests energy from RF received signal from node A. \(S_S\) adapts its transmit power so that the interference at secondary destination is less than T. \(S_S\) transmits a linear combination of K symbols to NOMA users. A set \(I_i\) of IRS reflectors are dedicated to user \(U_i\) so that all reflections are in phase at \(U_i\). We derive and improve the total throughput by optimizing the harvesting process and NOMA powers. When \(N_i=8,32\) reflectors per user are employed, we obtain 24 and 41 dB gain with respect to CRN-NOMA with adaptive transmit power, energy harvesting and without IRS [20, 21]. NOMA for multi-carrier code division multiple access (MC-CDMA) has been recently suggested in [22]. The results of [22] study NOMA for MC-CDMA system with fixed powers and without IRS.

Next section describes the system model. The energy harvesting process is analyzed in Sect. 3. The throughput is derived and optimized in Sect. 4. Section 5 gives the numerical results while last section concludes the paper and suggests some perspectives.

2 System model

Figure 1 depicts the system model containing a secondary source \(S_S\) transmitting a signal to K NOMA secondary users \(U_1\), \(U_2,\ldots ,U_K\). \(S_S\) harvests energy using the received signal from node A. Then, \(S_S\) transmits a combination of K symbols to K NOMA users using an adaptive transmit power so that the generated interference at secondary destination \(S_D\) is less than threshold T. We make the analysis in the presence and absence of primary interference from primary source \(P_S\) to all users \(U_i\), \(i=1,2,\ldots ,K\).

Fig. 1
figure 1

IRS with adaptive transmit power and energy harvesting for NOMA systems

3 Energy harvesting model

The harvested energy at \(S_S\) is equal to [20]

$$\begin{aligned} E=P_A\alpha F \varepsilon \mu _0 |h|^2, \end{aligned}$$
(1)

where F is frame duration, \(0<\alpha <1\) is harvesting duration, \(P_A\) is the power of node A, \(\varepsilon \) is the efficiency of energy conversion and \(\sqrt{\mu _0} h\) is channel gain between A and \(S_S\) and \(\mu _0\) is the average power of \(\sqrt{\mu _0}h\).

The available symbol energy of \(S_S\) is written as

$$\begin{aligned} E_{s,\mathrm{available}}=\frac{E}{(1-\alpha )\frac{F}{T_s}}=\beta |h|^2, \end{aligned}$$
(2)

where

$$\begin{aligned} \beta =\frac{\mu _0E_A\varepsilon \alpha }{1-\alpha } \end{aligned}$$
(3)

where \(E_A=P_AT_s\).

The adaptive symbol energy of \(S_S\) is expressed as

$$\begin{aligned} E_s=\min \left( \frac{T}{|h_{S_SP_D}|^2},E_{s,\mathrm{available}}\right) \end{aligned}$$
(4)

where \(h_{S_SP_D}\) is the channel gain between \(S_S\) and \(P_D\). The generate interference at \(P_D\) is less than T: \(E_s |h_{S_SP_D}|^2\le T\).

The CDF of \(E_s\) is given by

$$\begin{aligned} P_{E_s}(x)=1-P\left( \min \left( \frac{T}{|h_{S_SP_D}|^2},E_{s,\mathrm{available}}\right) >x\right) \end{aligned}$$
(5)

We deduce

$$\begin{aligned} P_{E_s}(x)= & {} 1-P\left( \frac{T}{|h_{S_SP_D}|^2}>x\right) P(E_{s,\mathrm{available}}>x)\nonumber \\= & {} 1-\left[ 1-e^{\frac{-T}{x\rho _{S_SP_D}}}\right] e^{-\frac{x}{\beta }} \end{aligned}$$
(6)

where \(\rho _{S_SP_D}=E(|h_{S_SP_D}|^2)\) and E(.) is the expectation operator.

4 SINR and throughput analysis

4.1 Received signal model

In Fig. 1, the users are ranked as follows: \(U_1\) is the strongest user, \(U_i\) is the ith strong user and \(U_K\) is the weakest user. The transmitted NOMA symbol by \(S_S\) is equal to

$$\begin{aligned} s=\sqrt{E_s}\sum _{i=1}^K\sqrt{P_i}s_i, \end{aligned}$$
(7)

\(s_i\) is the symbol of user \(U_i\) and \(0<P_i<1\) is the power allocated to \(U_i\) such that \(0<P_1<P_2<..<P_K<1\) and \(\sum _{i=1}^KP_i=1.\)

As shown in Fig. 1, let \(\sqrt{\mu }f_k\) be the channel coefficient between \(S_S\) and kth reflector of IRS where \(\mu =\frac{1}{D^{ple}}=E(|\sqrt{\mu }f_k|^2)\), ple is the path loss exponent and D is the distance between \(S_S\) and IRS. Let \(\sqrt{\mu _i}g_k\) be the channel coefficient between kth reflector of IRS and user \(U_i\) where \(\mu _i=\frac{1}{D_i^{ple}}=E(|\sqrt{\mu _i}g_k|^2)\) and \(D_i\) is the distance between IRS and \(U_i\). The received signal at user \(U_i\) is written as

$$\begin{aligned} r=s\sqrt{\mu }\sqrt{\mu _i}\sum _{k\in I_i}f_kg_ke^{j\theta _k}+n \end{aligned}$$
(8)

where \(I_i\) is the set of reflectors dedicated to user \(U_i\) and n is a Gaussian noise with variance \(N_0\).

\(\theta _k\) is the phase shift of kth reflector given by [1]

$$\begin{aligned} \theta _k=b_k+d_k \end{aligned}$$
(9)

where \(b_k\), \(d_k\) are the phase of \(f_k=a_ke^{-jb_k}\) and \(g_k=c_ke^{-jd_k}\), \(a_k=|f_k|\) and \(c_k=|g_k|\).

Using (8) and (9), we obtain

$$\begin{aligned} r=s\sqrt{\mu }\sqrt{\mu _i}\sum _{k\in I_i}a_kc_k+n=s\sqrt{\mu }\sqrt{\mu _i}A_i+n, \end{aligned}$$
(10)

where

$$\begin{aligned} A_i=\sum _{k\in I_i}a_kc_k, \end{aligned}$$
(11)

We define

$$\begin{aligned} X_i=\mu \mu _iA_i^2, \end{aligned}$$
(12)

Therefore, the received signal at \(U_i\) can be written as

$$\begin{aligned} r= & {} s\sqrt{\mu }\sqrt{\mu _i}A_i+n=\sqrt{E_sX_i}\sum _{i=1}^K\sqrt{P_i}s_i+n\nonumber \\= & {} \sqrt{Y_i}\sum _{i=1}^K\sqrt{P_i}s_i+n, \end{aligned}$$
(13)

where

$$\begin{aligned} Y_i=E_sX_i \end{aligned}$$
(14)

4.2 SINR analysis

\(U_i\) performs successive interference cancelation (SIC) and detects first \(s_K\) since \(P_K>P_i, \forall i \ne K\). The corresponding SINR is

$$\begin{aligned} \varGamma ^{i\rightarrow K}=\frac{Y_iP_K}{N_0+Y_i\sum _{p=1}^{K-1}P_p} \end{aligned}$$
(15)

The contribution of the detected symbol \(s_K\) is removed and \(U_i\) detects \(s_{K-1}\) with SINR

$$\begin{aligned} \varGamma ^{i\rightarrow K-1}=\frac{Y_iP_{K-1}}{N_0+Y_i\sum _{p=1}^{K-2}P_p} \end{aligned}$$
(16)

The process is continued by detecting \(s_l\) for \(l=K,K-1,\ldots ,i\) with SINR

$$\begin{aligned} \varGamma ^{i\rightarrow l}=\frac{Y_iP_{l}}{N_0+Y_i\sum _{p=1}^{l-1}P_p} \end{aligned}$$
(17)

There is no outage at \(U_i\) if all SINR \(\varGamma ^{i\rightarrow l}\) are larger than threshold x for \(l=K,K-1,\ldots ,i\):

$$\begin{aligned} P_{out,i}(x)= & {} 1-P\left( \varGamma ^{i\rightarrow K}>x,\varGamma ^{i\rightarrow K-1}>x,\ldots ,\varGamma ^{i\rightarrow i}>x\right) \nonumber \\= & {} P_{Y_i}\left( \underset{i\le l\le K}{\max }\left( \frac{N_0x}{P_l-x\sum _{p=1}^{l-1}P_p}\right) \right) \end{aligned}$$
(18)

where \(P_{Y_i}(y)\) is the CDF of \(Y_i\) provided Sect. 4.4.

The packet error probability (PEP) at \(U_i\) is deduced from the outage probability as follows [23]

$$\begin{aligned} PEP_i(\alpha ,P_1,P_2,\ldots ,P_K)\le P_{out,i}(w_0), \end{aligned}$$
(19)

where [23]

$$\begin{aligned} w_0=\int _0^{+\infty }[1-SEP(x)]^{pl}dx, \end{aligned}$$
(20)

pl is packet length and SEP(x) is the symbol error probability (SEP) of Q-QAM [24]

$$\begin{aligned} SEP(x)=2\left( 1-\frac{1}{\sqrt{Q}}\right) erfc\left( \sqrt{\frac{3x}{Q-1}}\right) \end{aligned}$$
(21)

The throughput at \(U_i\) is computed as

$$\begin{aligned}&Thr_i(\alpha ,P_1,P_2,\ldots ,P_K)=(1-\alpha )log_2(Q)\nonumber \\&\quad \times [1-PEP_i(\alpha ,P_1,P_2,\ldots ,P_K)]. \end{aligned}$$
(22)

The total throughput of NOMA network is equal to

$$\begin{aligned} Thr(\alpha ,P_1,P_2,\ldots ,P_K)=\sum _{i=1}^KThr_i(\alpha ,P_1,P_2,\ldots ,P_K). \nonumber \\ \end{aligned}$$
(23)

We propose to optimize numerically the power allocated (OPA) to NOMA users as well as the harvesting duration \(\alpha \) to maximize the total throughput (23):

$$\begin{aligned} Thr^{\max }=\underset{0<\alpha<1,0<P_1<P_2<\cdots <P_K}{\max Thr(\alpha ,P_1,P_2,\ldots ,P_K)}. \end{aligned}$$
(24)

under constraint \(\sum _{l=1}^KP_l=1\).

4.3 Effects of primary interference

In the presence of interference from primary source \(P_S\), the SINR at user \(U_i\) to detect \(s_l\) \(l=K,K-1,\ldots ,i\) becomes

$$\begin{aligned} \varGamma ^{i\rightarrow l}=\frac{Y_iP_{l}}{N_0+I_i+Y_i\sum _{p=1}^{l-1}P_p} \end{aligned}$$
(25)

where \(I_i=E_{P_S}|h_{P_SU_i}|^2\) is the interference at \(U_i\) due to the signal of \(P_S\), \(E_{P_S}\) is the transmitted energy per symbol of \(P_S\) and \(h_{P_SU_i}\) is the channel gain between \(P_S\) and \(U_i\). For Rayleigh channels, \(I_i\) has an exponential distribution written as

$$\begin{aligned} p_{I_i}(y)=\frac{1}{\overline{I_i}}e^{-\frac{y}{\overline{I_i}}}. \end{aligned}$$
(26)

where \(\overline{I_i}=E(I_i)\) is the average interference at \(U_i\).

The outage probability at \(U_i\) becomes

$$\begin{aligned} P_{out,i}(x)= & {} \int _0^{+\infty }P_{Y_i}\left( \underset{i\le l\le K}{\max }\left( \frac{(N_0+y)x}{P_l-x\sum _{p=1}^{l-1}P_p}\right) \right) \nonumber \\&\times p_{I_i}(y)dy. \end{aligned}$$
(27)

The PEP and throughput are evaluated using Eqs. (1923).

4.4 CDF of \(Y_i\)

Let \(N_i=|I_i|\) be the number of reflectors dedicated to \(U_i\). For \(N_i\ge 8\), \(A_i\) follows a Gaussian distribution with variance \(\sigma _{A_i}^2=N_i(1-\frac{\pi ^2}{16})\) and mean \(m_{A_i}=E(A_i)=\frac{N_i\pi }{4}\).

We have

$$\begin{aligned} X_i=\mu \mu _iA_i^2, \end{aligned}$$
(28)

The cumulative distribution function (CDF) of \(X_i\) is equal to

$$\begin{aligned} P_{X_i}(x)= & {} P(X_i\le x)=P\left( -\sqrt{\frac{x}{\mu \mu _i}}\le A_i\le \sqrt{\frac{x}{\mu \mu _i}}\right) \nonumber \\\simeq & {} 0.5erfc\left( \frac{-\sqrt{\frac{x}{\mu \mu _i}}-m_{A_i}}{\sqrt{2}\sigma _{A_i}}\right) \nonumber \\&-\,0.5erfc\left( \frac{\sqrt{\frac{N_0x}{\mu \mu _i}}-m_{A_i}}{\sqrt{2}\sigma _{A_i}}\right) \end{aligned}$$
(29)

where

$$\begin{aligned} erfc(z)=\frac{2}{\sqrt{\pi }}\int _z^{+\infty }e^{-u^2}du. \end{aligned}$$
(30)

By a derivative, the probability density function (PDF) of \(X_i\) is given by

$$\begin{aligned} p_{X_i}(x)\simeq & {} \sqrt{\frac{1}{8\pi \mu \mu _i\sigma _{A_i}^2x}}e^{-\frac{\left[ \sqrt{\frac{x}{\mu \mu _i}}+m_{A_i}\right] ^2}{2\sigma _{A_i}^2}}\nonumber \\&+\sqrt{\frac{1}{8\pi \mu \mu _i\sigma _{A_i}^2x}}e^{-\frac{\left[ \sqrt{\frac{x}{\mu \mu _i}}-m_{A_i}\right] ^2}{2\sigma _{A_i}^2}}, x>0. \end{aligned}$$
(31)

The CDF of \(Y_i=E_sX_i\) is evaluated as

$$\begin{aligned} P_{Y_i}(y)=\int _0^{+\infty }P_{E_s}(\frac{y}{x})p_{X_i}(x)dx, \end{aligned}$$
(32)

where \(P_{E_s}(x)\) is given in (6) and \(p_{X_i}(x)\) is provided in (31).

5 Numerical results

Figures 2 and 3 show the PEP at strong and weak users for \(P_A=1\), \(\mu _0=1\), \(\varepsilon =0.5\), \(K=2\), \(D=1.5\), \(D_1=1\), \(D_2=1.5\), \(P_1=0.3\), \(P_2=0.7\), \(ple=3\), \(pl=300\) and harvesting duration \(\alpha =0.5\). The interference threshold is \(T=1\), the distance between \(S_S\) and \(P_D\) is 1.5 and the distance between primary source and users \(U_1\) and \(U_2\) are 2 and 2.5. These results correspond to 16 QAM modulation. The number of reflectors per user is \(N_1=N_2=8,16,32\). We observe that the PEP decreases as the number of reflectors per user \(N_1\) and \(N_2\) increases.

Fig. 2
figure 2

PEP of strong user

Fig. 3
figure 3

PEP of weak user

Figures 4 and 5 depict the throughput at strong and weak users for the same parameters as Figs. 2 and 3. We notice that the throughput increases as the number of reflectors increases \(N_1=N_2=8,16,32\). Besides, the simulation results are close to theoretical derivations (22). Figure 6 depicts the total throughput as the sum of throughput of strong and weak users. Harvesting duration optimization allows significant throughput enhancement.

Fig. 4
figure 4

Throughput at strong user

Fig. 5
figure 5

Throughput at weak user

Fig. 6
figure 6

Total throughput in the presence of 2 NOMA users for 16QAM modulation

Figure 7 depicts the total throughput in the presence of \(K=3\) NOMA users for \(D_1=1\), \(D_2=1.5\), \(D_3=1.8\). The allocated powers are \(P_1=0.2\), \(P_2=0.3\) and \(P_3=0.5\). The distances between \(P_S\) and users \(U_1\), \(U_2\) and \(U_3\) are 2, 2.5 and 3. The other parameters are the same as Figs. 2 and 3. When the number of reflector per user is \(N_i=32\) we obtained 6,12 dB gain with respect to \(N_i=16,8\). When powers allocated to NOMA users are optimized we obtained up to 5 dB gain with respect to \(P_1=0.2\), \(P_2=0.3\) and \(P_3=0.5\). When harvesting duration \(\alpha \) is optimized as well as the allocated NOMA powers, we obtained the largest throughput.

Fig. 7
figure 7

Total throughput in the presence of 3 NOMA users for QPSK modulation

Figure 8 depicts the throughput of NOMA and orthogonal multiple access (OMA) when IRS are used and without IRS [20, 21]. The parameters are the same as Figs. 2 and 3. When \(N_i=8,32\) reflectors per user are employed, we obtained 24 and 41 dB gain with respect to NOMA with adaptive transmit power, energy harvesting and without IRS [20, 21]. OMA without IRS offers a better throughput than NOMA without IRS at low average SNR per bit. At high average SNR per bit, NOMA without IRS offers a better throughput than OMA without IRS.

Fig. 8
figure 8

Total throughput of OMA and NOMA with and without IRS in the presence of 2 NOMA users for 16QAM modulation

Figure 9 shows the effects of interference \(T=1,5\) threshold on secondary throughput for the same parameters as Figs. 2 and 3. The number of reflectors per user is \(N_i=8\). When T increases, \(S_S\) can increase its power since there is less interference constraints and the throughput increases.

Fig. 9
figure 9

Effects of interference threshold on total throughput for QPSK modulation and two users: \(\alpha =0.5\)

6 Conclusion and perspectives

In this paper, we computed the throughput of cognitive radio networks using NOMA and intelligent reflecting surfaces where the secondary source harvests energy from the received RF signal from node A. Besides, the secondary source adapts its power to reduce the generated interference at primary destination. The secondary source transmits a linear combination of K symbols dedicated to K secondary users. The transmitted signal is reflected by a set \(I_i\) of reflectors dedicated to user \(U_i\) so that all reflections are in phase at \(U_i\). When \(N_i=8,32\) reflectors per user are employed, we obtained 24 and 41 dB gain with respect to NOMA with adaptive transmit power, energy harvesting and without IRS [20, 21]. We also optimized NOMA powers and the harvesting duration. As a perspective, we can consider other source of energy such as wind and solar.