  In this paper, we investigate the performance of multi-user diversity (MUD)
with optimal power allocation (OPA) in spectrum sharing (SS) under average
interference power (AIP) constraint. In particular, OPA through average
transmit power constraint in conjunction with the AIP constraint is assumed to
maximize the ergodic secondary capacity. The solution of this problem requires
the calculation of two Lagrange multipliers instead of one as obtained for the
peak interference power (PIP) constraint and calculated using the well known
water-filling algorithm. To this end, an algorithm based on bisection method is
devised in order to calculate both Lagrange multipliers iteratively. Moreover,
Rayleigh and Nakagami-$m$ fading channels with one and multiple primary users
are considered to derive the required end-to-end SNR analysis. Numerical
results are depicted to corroborate our performance analysis and compare it
with the PIP case highlighting hence, the impact of the AIP constraint compared
to the PIP constraint application.
