  In this paper, we consider a multi-pair two-way amplify-and-forward relaying
system where multiple sources exchange information via a relay node equipped
with large-scale antenna arrays. Given that channel estimation is non-ideal,
and that the relay employs either maximum-ratio combining/maximum-ratio
transmission (MRC/MRT) or zero-forcing reception/zero-forcing transmission
(ZFR/ZFT) beamforming, we derive two corresponding closed-form lower bound
expressions for the ergodic achievable rate of each pair sources. The
closed-form expressions enable us to design an optimal power allocation (OPA)
scheme that maximizes the sum spectral efficiency under certain practical
constraints. As the antenna array size tends to infinity and the signal to
noise ratios become very large, asymptotically optimal power allocation schemes
in simple closed-form are derived. The capacity lower bounds are verified to be
accurate predictors of the system performance by simulations, and the proposed
OPA outperforms equal power allocation (EPA). It is also found that in the
asymptotic regime, when MRC/MRT is used at the relay and the link end-to-end
large-scale fading factors among all pairs are equal, the optimal power
allocated to a user is inverse to the large-scale fading factor of the channel
from the user to the relay, while OPA approaches EPA when ZFR/ZFT is adopted.
