1 Introduction

Spectrum sharing cognitive radio (CR) has recently been studied widely as it provides ways to improve the spectrum efficiency by allowing the secondary user (SU) to concurrently access the spectrum band licensed to the primary user (PU) while causing limited interference to the latter [1]. Effective ways to protect the PU from the interference caused by the SU widely used include the average interference power (AIP) constraint and the peak interference power (PIP) constraint [2].

Capacity investigation is very important in understanding the fundamental performance limits of the spectrum sharing CR systems. In this context, a number of interesting results have recently emerged, see for example, [36]. Gastpar [3] derived the capacity of different non-fading additive white Gaussian noise (AWGN) channels under the AIP constraint. Ghasemi and Sousa [4] showed that significant capacity gains can be achieved for Rayleigh and Nakagami fading channels compared with the non-fading AWGN channels. Musavian and Aissa derived the ergodic, outage and minimum-rate capacities under joint AIP and PIP constraints in Rayleigh fading environments in [5], and further derived the effective capacity under the AIP constraint in Nakagami fading channels in [6]. In those studies, the SU is assumed to perfectly know the channel state information (CSI) between the secondary transmitter (STx) and the primary receiver (PRx).

However, in practical communication systems, the obtained CSI is frequently imperfect [7]. As for spectrum sharing CR systems, it is even more difficult for the SU to perfectly acquire the CSI on the STx–PRx link [814]. In practice, the CSI may be obtained via a band manager that mediates between the SU and the PU [15] or through proper signaling between them [16]. If the SU allocates transmit power solely based on the imperfect CSI, the PU suffers extra interference power from the SU and thus does not allow the SU to share the spectrum. Hence, it is of paramount importance to investigate the behaviors of the SU with the imperfect CSI on the STx–PRx link.

Capacity of the SU with the imperfect CSI was studied in [814]. The imperfect CSI can be due to channel estimation errors or feedback delay. Musavian and Aissa investigated the capacity of the SU with channel estimation errors for the CSI on the STx–PRx link under the AIP and the PIP constraints in [8]. Duan et al. studied the capacity of the SU using maximal ratio combining (MRC) with channel estimation errors for the CSI on the STx–PRx link under the AIP constraint in [9]. Sboui et al. derived the ergodic capacity for fading channels under the AIP and the instantaneous interference outage constraints with channel estimation errors for the CSI on the STx–PRx link and secondary link in [10]. Note that [810] assume the imperfect CSI on the STx–PRx link is caused by the channel estimation errors. Suraweera et al. studied the impact of the outdated CSI due to feedback delay on the ergodic capacity of the SU under the PIP constraint in [11]. However, they did not give the expression for the transmit power of the SU to satisfy the interference power outage probability at the PU. In Kim et al. [12], derived the ergodic capacity of the SU with the outdated CSI under the AIP and the PIP constraints, and the power allocation of the SU is designed to avoid extra interference power caused to the PU. In [13], we investigated the effective capacity of the SU under the AIP constraint with outdated channel information and obtained closed-form expressions for the upper and lower bounds on the effective capacity. In [14], Chen et al. derived the exact closed-form expression for interference probability of the PU with the outdated CSI on the STx–PRx link. It is shown that the PU’s interference probability is always equal to 75 %. It is noted that [1114] assume the CSI on the STx–PRx link is outdated due to feedback delay. In practice, channel estimation errors and feedback delay exist simultaneously, and neglecting either one of them will lead to violation of the interference power constraint at the PU. However, to our best knowledge, taking both channel estimation errors and feedback delay into consideration when studying the capacity of the SU has not been considered in the literature.

Therefore, this paper investigates the ergodic capacity of the SU with the imperfect CSI under the AIP constraint and the PIP constraint. Both channel estimation errors and feedback delay are considered. The power allocation schemes to cope with the violation of the interference power constraints due to the imperfect CSI are proposed under the AIP constraint and the PIP constraint. Based on these proposed power allocation schemes, closed-form expressions for the ergodic capacities of the SU are then derived. The main goal of the work is to throw some light on the performance of the spectrum sharing CR systems with the imperfect CSI in more practical fading environments. It is shown in [810] that the channel estimation errors can have great impacts on the ergodic capacity of the SU, while it is shown in [1214] that the feedback delay can have negligible impacts on the ergodic capacity of the SU under high feedback delay. In this paper, we find that the channel estimation errors can also have trivial impacts on the ergodic capacity of the SU under high feedback delay. Therefore, our work in this paper provide a unified view on the impacts of the channel estimation errors and feedback delay on the ergodic capacity of the SU compared with existing studies. In addition, different from [814], we show that the impact of the imperfect CSI on the ergodic capacity of the SU can be mitigated by decreasing the distance between STx and secondary receiver (SRx) or increasing the distance between STx and PRx.

In the following, the system and channel models are described in Sect. 2. The ergodic capacity of the SU under the AIP constraint is derived in Sect. 3. Section 4 derives the ergodic capacity of the SU under the PIP constraint. Section 5 presents numerical results to verify the studies. Finally, Sect. 6 concludes the paper.

2 System and Channel Models

We consider a spectrum sharing CR network with one primary link and one secondary link. The primary link consists of one primary transmitter (PTx) and one PRx, and the secondary link consists of one STx and one secondary receiver (SRx). The primary and secondary links share the same narrow-band for transmission with bandwidth \(B\) and noise power spectral density \(N_{0}\). The STx-SRx link and the STx–PRx link are assumed to be discrete-time AWGN fading channels. The instantaneous complex channel impulse responses of the STx-SRx link and the STx–PRx link are \(h_{ss}[n]\) and \(h_{sp}[n]\), respectively as shown in Fig. 1, where \(n\) denotes the time index. We assume that \(h_{ss}[n]\) and \(h_{sp}[n]\) are independent and are zero mean circularly symmetric complex Gaussian (ZMCSCG) random variables with variances \(\lambda _{ss}\) and \(\lambda _{sp}\), respectively, that is, \(h_{ss}[n]\sim \mathcal CN (0,\lambda _{ss})\) and \(h_{sp}[n]\sim \mathcal CN (0,\lambda _{sp})\).

Fig. 1
figure 1

Spectrum sharing system model

The perfect knowledge of \(h_{ss}[n]\) is assumed to be available at the STx as in [8, 9, 11, 13]. However, \(h_{sp}[n]\) is not perfectly known at the STx. On one hand, we use the channel correlation coefficient to model the outdated property of the channel due to feedback delay as [11, 13]

$$\begin{aligned} h_{sp}[n]=\rho \hat{h}_{sp}[n]+\sqrt{1-\rho ^{2}}\epsilon _{1}, \end{aligned}$$
(1)

where \(\rho \, (0\le \rho \le 1\)) is the channel correlation coefficient, \(\hat{h}_{sp}[n]\) (\(\hat{h}_{sp}[n]\sim \mathcal CN (0,\lambda _{sp})\)) is the outdated channel impulse response with no channel estimation errors, \(\epsilon _{1}\) is \(\mathcal CN (0,\lambda _{sp})\) and \(\epsilon _{1}\) is uncorrelated with \(\hat{h}_{sp}[n]\). Due to the time varying property of the channel, \(\rho \) reflects the correlation of the channels and is related to the Doppler shift and the feedback delay. The expression of \(\rho \) depends on the propagation environment. For example, under the assumption of uniform scattering environment, Jakes modeled \(\rho \) as \(\rho =J_{0}(2\pi f_{d}\tau )\), where \(J_{0}(.)\) is the zeroth-order Bessel function of the first kind, \(f_{d}\) is the Doppler shift, and \(\tau \) is the feedback delay [17]. Usually, higher \(\tau \) corresponds to lower \(\rho \).Footnote 1 Therefore, the impact of \(\tau \) on the ergodic capacity of the SU can be studied by investigating the impact of \(\rho \). It is noted that lower channel correlation coefficient corresponds to higher feedback delay. On the other hand, the SU is assumed to perform minimum mean square errors (MMSE) estimation of \(\hat{h}_{sp}[n]\), and \(\hat{h}_{sp}[n]=\breve{h}_{sp}[n]+\epsilon _{2}\) [8], where \(\breve{h}_{sp}[n]\) (\(\breve{h}_{sp}[n]\sim \mathcal CN (0,(1-\sigma ^{2})\lambda _{sp})\)) is the outdated channel impulse response with channel estimation errors that is available at the STx, \(\epsilon _{2}\) (\(\epsilon _{2}\sim \mathcal CN (0,\sigma ^{2}\lambda _{sp})\)) is the channel estimation errors that is uncorrelated with \(\breve{h}_{sp}[n]\), and \(\sigma ^{2}\, (0\le \sigma ^{2}\le 1\)) is a measure of the accuracy of the channel estimation. In the rest of the paper, the time index \(n\) is omitted for simplicity. We denote the channel gains as \(g_{ss},\, g_{sp}\) and \(\breve{g}_{sp}\), where \(g=\left| h\right| ^{2}\). We assume that the STx knows the outdated channel impulse response with channel estimation errors \(\breve{h}_{sp}\) rather than \(h_{sp}\). Furthermore, we assume that the STx knows not only \(\breve{h}_{sp}\) but also \(\rho \) and \(\sigma ^{2}\).

3 Ergodic Capacity Under the AIP Constraint

In this section, the ergodic capacity of the SU with the imperfect CSI under the AIP constraint is studied. First, the optimal power allocation scheme to achieve the ergodic capacity of the SU with the imperfect CSI while also guarantees the AIP is obtained. Then, based on the optimal power allocation scheme, we derive the ergodic capacity of the SU.

To prevent the SU from violating the AIP constraint, the AIP constraint is written as [8]

$$\begin{aligned} \mathbb{E }\left\{ g_{sp}P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\right\} \le Q_{av}, \end{aligned}$$
(2)

where \(\mathbb{E }\{.\}\) denotes the statistical expectation, \(Q_{av}\) is the AIP limit at the PRx, and \(P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\) is the transmit power of the STx. Then, according to Sect. 2, \(g_{sp}=\left| h_{sp}\right| ^{2}=\left| \rho \breve{h}_{sp}+\rho \epsilon _{2}+\sqrt{1-\rho ^{2}}\epsilon _{1}\right| \), and \(\epsilon _{2}\) and \(\epsilon _{1}\) are uncorrelated with each other and is also uncorrelated with \(\breve{h}_{sp}\). Let \(\epsilon =\rho \epsilon _{2}+\sqrt{1-\rho ^{2}}\epsilon _{1}\) and \(\alpha =1-(1-\sigma ^{2})\rho ^{2}\). It can be verified that \(\epsilon \) is \(\mathcal CN (0,\alpha \lambda _{sp})\) and is also uncorrelated with \(\breve{h}_{sp}\). Then, we can rewrite (2) as

$$\begin{aligned} Q_{av}&\ge \mathbb{E }\left\{ \left| \rho \breve{h}_{sp}+\epsilon \right| ^{2}P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\right\} \nonumber \\&= \rho ^{2}\mathbb{E }\left\{ \breve{g}_{sp}P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\right\} +\alpha \lambda _{sp}\mathbb{E }\left\{ P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\right\} \nonumber \\&+ \ \mathbb{E }\left\{ \rho (\breve{h}_{sp}\epsilon ^{*}+\breve{h}_{sp}^{*}\epsilon )P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\right\} \nonumber \\&= \rho ^{2}\mathbb{E }\left\{ \breve{g}_{sp}P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\right\} +\alpha \lambda _{sp}\mathbb{E }\left\{ P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\right\} , \end{aligned}$$
(3)

where \((.)^{*}\) denotes the complex conjugate. Similar to [8, 9, 13], the interference from the PTx to the SRx is assumed to be ignored or considered in the AWGN at the SRx. Therefore, the ergodic capacity of the SU is the solution to the following optimization problem [8]:

$$\begin{aligned} \frac{C_{er}}{B}=\max _{P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})}&\;\mathbb{E }\left\{ \log _{2}\left( 1+\frac{g_{ss}P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})}{N_{0}B}\right) \right\} \end{aligned}$$
(4)
$$\begin{aligned} \mathrm s.t.&\;\mathbb{E }\left\{ g_{sp}P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\right\} \le Q_{av},\end{aligned}$$
(5)
$$\begin{aligned}&\; P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\ge 0. \end{aligned}$$
(6)

The solution of the optimization problem in (4) can be found by the Lagrangian optimization method as [19]

$$\begin{aligned} P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})=\left( \frac{K}{\nu (\rho ^{2}\breve{g}_{sp}+\alpha \lambda _{sp})}-\frac{N_{0}B}{g_{ss}}\right) ^{+}, \end{aligned}$$
(7)

where \((.)^{+}\) denotes \(\max (.,0),\, K\) denotes the constant \(\log _{2}e,\, e\) is the base of natural logarithm, and \(\nu \) is the Lagrangian multiplier and is determined such that the AIP constraint is satisfied with equality. The power allocation scheme in (7) implies that the transmission of the SU is suspended when the channel gain of STx-SRx is weaker than \(\frac{N_{0}B\nu (\rho ^{2}\breve{g}_{sp}+\alpha \lambda _{sp})}{K}\). Using \(P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\ge 0\) and \(\breve{g}_{sp}\ge 0\), power allocation scheme can be rewritten as in

$$\begin{aligned} P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})= \left\{ \begin{array}{ll} \frac{K}{\nu (\rho ^{2}\breve{g}_{sp}+\alpha \lambda _{sp})}-\frac{N_{0}B}{g_{ss}}, &{} \breve{g}_{sp}\le \frac{1}{\rho ^{2}}\left( \frac{Kg_{ss}}{N_{0}B\nu }-\alpha \lambda _{sp}\right) \,\\ &{} \mathrm and \, g_{ss}\ge \frac{\alpha \lambda _{sp}N_{0}B\nu }{K},\\ 0, &{} \mathrm otherwise . \end{array}\right. \end{aligned}$$
(8)

Then, the AIP constraint is simplified by inserting (3) and (8) into (5) at equality, i.e.,

$$\begin{aligned} Q_{av}&= \int \limits _{\frac{\alpha \lambda _{sp}N_{0}B\nu }{K}}^{\infty } \int \limits _{0}^{\frac{1}{\rho ^{2}}\left( \frac{Kg_{ss}}{N_{0}B\nu }-\alpha \lambda _{sp}\right) }\biggl (\frac{K}{\nu }-(\rho ^{2}\breve{g}_{sp}+\alpha \lambda _{sp})\frac{N_{0}B}{g_{ss}}\biggr )\nonumber \\&\quad \times \ f_{g_{ss}}(g_{ss})f_{\breve{g}_{sp}}(\breve{g}_{sp})dg_{ss} d\breve{g}_{sp}, \end{aligned}$$
(9)

where \(f_{x}(.)\) denotes the probability density function (PDF) of \(x\). By inserting \(f_{g_{ss}}(g_{ss})=\frac{1}{\lambda _{ss}}e^{-\frac{g_{ss}}{\lambda _{ss}}}\) and \(f_{\breve{g}_{sp}}(\breve{g}_{sp})=\frac{1}{(1-\sigma ^{2})\lambda _{sp}}e^{-\frac{\breve{g}_{sp}}{(1-\sigma ^{2})\lambda _{sp}}}\) into (9), we have

$$\begin{aligned} \frac{Q_{av}}{N_{0}B}= \frac{1}{\gamma }e^{-\alpha \beta \gamma }+\beta \mathrm Ei (-\alpha \beta \gamma )-(1-\alpha )\beta e^{\frac{\alpha }{1-\alpha }}\mathrm Ei \left( -\alpha \beta \gamma -\frac{\alpha }{1-\alpha }\right) , \end{aligned}$$
(10)

where \(\beta =\frac{\lambda _{sp}}{\lambda _{ss}},\, \gamma =\frac{N_{0}B\nu }{K}\) and \(\mathrm Ei (x)\) denotes the exponential integral function \(\mathrm Ei (x)=-\int _{-x}^{\infty }\frac{1}{t}e^{-t}dt\) [20]. The parameter \(\beta \) represents the ratio of the STx–PRx to the STx-SRx link mean channel gain, which is less than one in the scenario of long STx–PRx link distance and short STx-SRx link distance. The solution for \(\nu =\frac{K\gamma }{N_{0}B}\) can be numerically calculated from (10). Then, the ergodic capacity of the SU is obtained by substituting (8) into the objective function in (4) as

$$\begin{aligned} \frac{C_{er}}{B}&= \int \limits _{\gamma \alpha \lambda _{sp}}^{\infty }\int \limits _{0}^{\frac{1}{\rho ^{2}}\left( \frac{g_{ss}}{\gamma }-\alpha \lambda _{sp}\right) }\log _{2}\biggl (\frac{g_{ss}}{\gamma (\rho ^{2}\breve{g}_{sp}+\alpha \lambda _{sp})}\biggr )\nonumber \\&\quad \times \ f_{g_{ss}}(g_{ss})f_{\breve{g}_{sp}}(\breve{g}_{sp})dg_{ss}d\breve{g}_{sp},\nonumber \\&= Ke^{\frac{\alpha }{1-\alpha }}\mathrm Ei \left( -\alpha \beta \gamma -\frac{\alpha }{1-\alpha }\right) -K\mathrm Ei (-\alpha \beta \gamma ). \end{aligned}$$
(11)

Recall that \(\alpha =1-(1-\sigma ^{2})\rho ^{2}\) and \(\beta =\frac{\lambda _{sp}}{\lambda _{ss}}\), thus it can be seen that the ergodic capacity of the SU depends on the channel correlation coefficient \(\rho \), channel estimation errors variance \(\sigma ^{2}\), and mean channel gain ratio \(\beta \). It can be verified that the ergodic capacity of the SU decreases as \(\rho \) decreases or \(\sigma ^{2}\) increases. Thus, it is important to have accurate CSI for the SU to achieve high ergodic capacity. In addition, it can be verified that the ergodic capacity of the SU decreases as \(\beta \) increases. It is expected since higher channel gain on STx–PRx link compared to STx-SRx link will cause relatively higher interference to the PU and thus reduce ergodic capacity of the SU. It is noted that if we set \(\lambda _{sp}=\lambda _{ss}=1\) and \(\rho =1\), that is, only the channel estimation errors is considered and mean channel gains are assumed to be unitary, the results in (10) and (11) reduce to the expressions (11) and (13) in [8], respectively. In addition, if we set \(\lambda _{sp}=\lambda _{ss}=1\) and \(\sigma ^{2}=0\), that is, only the feedback delay is considered and mean channel gains are assumed to be unitary, the results in (10) and (11) reduce to the expressions (13) and (15) in [12], respectively. Therefore, our result provides a unified view on the impacts of the channel estimation errors and feedback delay on the ergodic capacity of the SU.

4 Ergodic Capacity Under the PIP Constraint

We now study the ergodic capacity of the SU with the imperfect CSI under the PIP constraint. Under the PIP constraint, the STx has to guarantee that the PIP at the PRx is below a predefined limit, as,

$$\begin{aligned} g_{sp}P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\le Q_{pk}, \end{aligned}$$
(12)

where \(Q_{pk}\) is the PIP limit. However, it is impossible for the STx to satisfy the constraint (12), since the STx only knows an imperfect estimation of the channel on STx–PRx link, \(\breve{g}_{sp}\). Therefore, under this strict PIP constraint, the STx has to cease transmission at all times and hence results in zero ergodic capacity. Thus, a suitable solution is to restrict the PIP in a statistic way. Based on this, we assume that the PU informs the SU to use a reduced value of \(Q_{pk}\), i.e., \(\breve{Q}_{pk}\), so that a certain percentage of outage, \(P_{0}\), is allowed, which is given as follows

$$\begin{aligned} \Pr (g_{sp}P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})>Q_{pk})\le P_{0}. \end{aligned}$$
(13)

Therefore, the new PIP constraint is written as \(P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})\le \frac{\breve{Q}_{pk}}{\breve{g}_{sp}}\), and the value of \(\breve{Q}_{pk}\) needs to be determined so that the constraint (13) is satisfied. In order to obtain \(\breve{Q}_{pk}\), we substitute \(P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})=\frac{\breve{Q}_{pk}}{\breve{g}_{sp}}\) into the constraint (13) at equality as follows

$$\begin{aligned} P_{0}&= \Pr \left( \frac{g_{sp}}{\breve{g}_{sp}}>\frac{Q_{pk}}{\breve{Q}_{pk}}\right) \nonumber \\&= 1-F_{\frac{g_{sp}}{\breve{g}_{sp}}}\left( \frac{Q_{pk}}{\breve{Q}_{pk}}\right) , \end{aligned}$$
(14)

where \(F_{x}(.)\) denotes the cumulative density function (CDF) of \(x\). The joint PDF of \(g_{sp}\) and \(\breve{g}_{sp}\) is given as [18]

$$\begin{aligned} f_{g_{sp},\breve{g}_{sp}}(g_{sp},\breve{g}_{sp})= \frac{1}{(1-\sigma ^{2})\alpha \lambda _{sp}^{2}}e^{-\frac{(1-\sigma ^{2})g_{sp}+\breve{g}_{sp}}{(1-\sigma ^{2})\alpha \lambda _{sp}}}I_{0}\left( \frac{2\rho \sqrt{g_{sp}\breve{g}_{sp}}}{\alpha \lambda _{sp}}\right) , \end{aligned}$$
(15)

where \(I_{0}(.)\) is the zeroth-order modified Bessel function of the first kind [20]. Then, the PDF of \(\frac{Q_{pk}}{\breve{Q}_{pk}}\) is calculated as

$$\begin{aligned} f_{\frac{g_{sp}}{\breve{g}_{sp}}}(x)&= \int \limits _{0}^{\infty }yf_{g_{sp},\breve{g}_{sp}}(xy,y)dy\nonumber \\&= \int \limits _{0}^{\infty }\frac{y}{(1-\sigma ^{2})\alpha \lambda _{sp}^{2}}e^{-\frac{(1-\sigma ^{2})xy+y}{(1-\sigma ^{2})\alpha \lambda _{sp}}}J_{0}\left( \frac{2\rho \sqrt{x}yi}{\alpha \lambda _{sp}}\right) . \end{aligned}$$
(16)

The second equality in (16) is derived according to eq. (8.406.3) in [20]. With the help of eq. (8.623.2) in [20], we simplify (16) as follows

$$\begin{aligned} f_{\frac{g_{sp}}{\breve{g}_{sp}}}(x)= \frac{\alpha ((1-\sigma ^{2})x+1)}{(1-\sigma ^{2})^{2}\left( x^{2}+\left( \frac{2}{1-\sigma ^{2}}-4\rho ^{2}\right) x+\frac{1}{(1-\sigma ^{2})^{2}}\right) ^{\frac{3}{2}}}. \end{aligned}$$
(17)

Then, the CDF of \(\frac{Q_{pk}}{\breve{Q}_{pk}}\) is given as

$$\begin{aligned} F_{\frac{g_{sp}}{\breve{g}_{sp}}}(x)&= \int \limits _{0}^{x}f_{\frac{g_{sp}}{\breve{g}_{sp}}}(y)dy\nonumber \\&= \frac{1}{2}-\frac{1-(1-\sigma ^{2})x}{2(1-\sigma ^{2})\sqrt{\left( x+\frac{1}{1-\sigma ^{2}}\right) ^{2}-4\rho ^{2}x}}. \end{aligned}$$
(18)

Substituting (18) into (14), yields

$$\begin{aligned} P_{0}= \frac{1}{2}+\frac{1-(1-\sigma ^{2})\frac{Q_{pk}}{\breve{Q}_{pk}}}{2(1-\sigma ^{2})\sqrt{\left( \frac{Q_{pk}}{\breve{Q}_{pk}}+\frac{1}{1-\sigma ^{2}}\right) ^{2}-4\rho ^{2}\frac{Q_{pk}}{\breve{Q}_{pk}}}}. \end{aligned}$$
(19)

From (19), for a given \(P_{0}\), the value of \(\breve{Q}_{pk}\) is derived as

$$\begin{aligned} \breve{Q}_{pk}&= \biggl (\frac{\alpha -(1-2P_{0})\sqrt{\alpha (1-(1-\sigma ^{2})(1-2P_{0})^{2}\rho ^{2})}}{2P_{0}(1-P_{0})}+1-2\alpha \biggr )\nonumber \\&\times \ (1-\sigma ^{2})Q_{pk}. \end{aligned}$$
(20)

It is seen that the value of \(\breve{Q}_{pk}\) is \(Q_{pk}\) multiplied by a constant factor that is related to \(\rho ,\, \sigma ^{2}\) and \(P_{0}\). Then, based on (20), the STx transmits power according to \(P(g_{ss},\breve{g}_{sp},\rho ,\sigma ^{2})=\frac{\breve{Q}_{pk}}{\breve{g}_{sp}}\) which satisfies the constraint (13). Then, the ergodic capacity of the SU can be derived as

$$\begin{aligned} \frac{C_{er}}{B}&= \int \limits _{0}^{\infty }\int \limits _{0}^{\infty }\log _{2}\biggl (\frac{\breve{Q}_{pk}g_{ss}}{N_{0}B\breve{g}_{sp}}\biggr )f_{g_{ss}}(g_{ss})f_{\breve{g}_{sp}}(\breve{g}_{sp})dg_{ss}d\breve{g}_{sp}\nonumber \\&= \int \limits _{0}^{\infty }\log _{2}\biggl (\frac{\breve{Q}_{pk}}{N_{0}B}x\biggr )f_{\frac{g_{ss}}{\breve{g}_{sp}}}(x)dx. \end{aligned}$$
(21)

The PDF of \(\frac{g_{ss}}{\breve{g}_{sp}}\) can be calculated as

$$\begin{aligned} f_{\frac{g_{ss}}{\breve{g}_{sp}}}(x)&= \int \limits _{0}^{\infty }yf_{g_{ss}}(xy)f_{\breve{g}_{sp}}(y)dy\nonumber \\&= \frac{1}{(1-\sigma ^{2})\beta \left( x+\frac{1}{(1-\sigma ^{2})\beta }\right) ^{2}}. \end{aligned}$$
(22)

Therefore, inserting (22) into (21), the ergodic capacity of the SU is expressed as

$$\begin{aligned} \frac{C_{er}}{B}= \frac{\eta }{\eta -1}\log _{2}\eta , \end{aligned}$$
(23)

where \(\eta =\frac{\breve{Q}_{pk}}{(1-\sigma ^{2})\beta N_{0}B}\). Recall that \(\beta =\frac{\lambda _{sp}}{\lambda _{ss}}\), thus it can be seen that, similar to the case of the AIP constraint, the ergodic capacity of the SU under the PIP constraint depends on the channel correlation coefficient \(\rho \), channel estimation errors variance \(\sigma ^{2}\), and mean channel gain ratio \(\beta \). Note that if only feedback delay is considered and mean channel gains are assumed to be unitary, that is, setting \(\sigma ^{2}=0\) and \(\lambda _{sp}=\lambda _{ss}=1\), the result in (23) yields the result in (36) in [12] where the power margin factor defined in [12] can be calculated by \(\frac{\breve{Q}_{pk}}{Q_{pk}}\) using (20).

5 Numerical Results

This section provides illustrative examples to confirm the analytical results derived in Sects. 3 and 4 and show the effects of the channel estimation errors and feedback delay on the ergodic capacity of the SU. In the following results, we assume \(N_{0}B=1\).

Figure 2 plots the ergodic capacity of the SU under the AIP constraint against the channel estimation errors variance \(\sigma ^{2}\) for different values of \(\rho \) and \(\beta \). It is seen that the ergodic capacity increases as \(\rho \) increases. This is expected and has been verified by our analytical results from (11). Furthermore, it is observed that, as \(\sigma ^{2}\) increases, the ergodic capacity decreases especially when \(\rho \) is high such as \(0.9\). However, when \(\rho \) is low such as \(0.5\), the ergodic capacity is shown to be almost unchanged as \(\sigma ^{2}\) increases. Recall that higher feedback delay corresponds to lower \(\rho \). This indicates that the ergodic capacity under the AIP constraint is insensitive to the channel estimation errors when the feedback delay is high. This observation confirms our analytical results from (11) where \(\alpha =1-(1-\sigma ^{2})\rho ^{2}\) is insensitive to \(\sigma ^{2}\) when \(\rho \) is low. In addition, it is seen that the ergodic capacity increases dramatically as the mean channel gain ratio \(\beta \) decreases. Note that \(\beta =\frac{\lambda _{sp}}{\lambda _{ss}},\, \lambda _{ss}\) is related to the distance between STx and SRx, and \(\lambda _{sp}\) is related to the distance between STx and PRx, as modeled by the propagation pathloss model \(\lambda =-A-B\log _{10}(d)\) in dB [21], where \(A\) and \(B\) are constants depending on propagation environments, and \(d\) is the distance. Thus, decreasing the distance between STx and SRx or increasing the distance between STx and PRx can significantly increase the ergodic capacity of the SU under the AIP constraint. In other words, the impacts of the channel estimation errors and feedback delay on the ergodic capacity of the SU can be mitigated by decreasing the distance between STx and SRx or increasing the distance between STx and PRx.

Fig. 2
figure 2

Ergodic capacity of the SU against the channel estimation errors variance \(\sigma ^{2}\) under the AIP constraint (\(Q_{av}=0\) dB)

Figure 3 plots the ergodic capacity of the SU under the AIP constraint against the channel correlation coefficient \(\rho \) for different values of \(\sigma ^{2}\) and \(\beta \). It is seen that the curves for different values of \(\sigma ^{2}\) almost overlap when \(\rho \) is low. It is also seen that the ergodic capacity is almost fixed as \(\rho \) increases in the low \(\rho \) regime such as \(\rho \le 0.5\), which confirms our assumption in Sect. 2. This indicates that the ergodic capacity under the AIP constraint is also insensitive to the feedback delay when the feedback delay is high. This is expected since \(\alpha =1\,-\,(1\,-\,\sigma ^{2})\rho ^{2}\) is dominated by \(1\) when \(\rho \) is small.

Fig. 3
figure 3

Ergodic capacity of the SU against the channel correlation coefficient \(\rho \) under the AIP constraint (\(Q_{av}=0\) dB)

Figure 4 plots the ergodic capacity of the SU under the PIP constraint against the channel estimation errors variance \(\sigma ^{2}\) for different values of \(\rho ,\, \beta \) and \(P_{0}\). It is shown that the ergodic capacity decreases as \(\sigma ^{2}\) increases, especially when \(\rho \) is high. Similar to the ergodic capacity under the AIP constraint, the ergodic capacity under the PIP constraint is also shown to be insensitive to the channel estimation errors under high feedback delay. In addition, it is clearly seen that the ergodic capacity under the PIP constraint is smaller than that under the AIP constraint. This is expected since the PIP constraint is stricter than the AIP constraint. It is also seen that the ergodic capacity increases significantly as the mean channel gain ratio \(\beta \) decreases, which means that decreasing the distance between STx and SRx or increasing the distance between STx and PRx can be used to mitigate the impacts of the channel estimation errors and feedback delay on the ergodic capacity of the SU.

Fig. 4
figure 4

Ergodic capacity of the SU against the channel estimation errors variance \(\sigma ^{2}\) under the PIP constraint (\(Q_{pk}=0\) dB)

Figure 5 plots the ergodic capacity of the SU under the PIP constraint against the channel correlation coefficient \(\rho \) for different values of \(\sigma ^{2},\, \beta \) and \(P_{0}\). It is shown that, when \(\rho \) is low, the curves for different values of \(\sigma ^{2}\) under a certain \(P_{0}\) almost overlap. It is also shown that, in the small \(\rho \) regime such as \(\rho \le 0.4\), the ergodic capacity is almost fixed as \(\rho \) increases. This indicates that, similar to the ergodic capacity under the AIP constraint, the ergodic capacity under the PIP constraint is also insensitive to the feedback delay when the feedback delay is high.

Fig. 5
figure 5

Ergodic capacity of the SU against the channel correlation coefficient \(\rho \) under the PIP constraint (\(Q_{pk}=0\) dB)

6 Conclusions

In this paper, we investigate the ergodic capacity of the SU in a spectrum sharing CR network. In contrast to existing work, we assume that the CSI on the STx–PRx link is not only outdated due to feedback delay but also having channel estimation errors. We derive closed-form expressions for the ergodic capacities of the SU with this imperfect CSI under the AIP and the PIP constraints. It is shown by numerical results that the ergodic capacity of the SU is insensitive to the channel estimation errors and feedback delay under high feedback delay. It is also shown that decreasing the distance between STx and SRx or increasing the distance between STx and PRx can mitigate the impacts of the channel estimation errors and feedback delay and significantly increase the ergodic capacity of the SU.