  In this paper, we consider an intelligent reflecting surface (IRS)-aided
single-user system where an IRS with discrete phase shifts is deployed to
assist the uplink communication. A practical transmission protocol is proposed
to execute channel estimation and passive beamforming successively. To minimize
the mean square error (MSE) of channel estimation, we first formulate an
optimization problem for designing the IRS reflection pattern in the training
phase under the constraints of unit-modulus, discrete phase, and full rank.
This problem, however, is NP-hard and thus difficult to solve in general. As
such, we propose a low-complexity yet efficient method to solve it
sub-optimally, by constructing a near-orthogonal reflection pattern based on
either discrete Fourier transform (DFT)-matrix quantization or Hadamard-matrix
truncation. Based on the estimated channel, we then formulate an optimization
problem to maximize the achievable rate by designing the discrete-phase passive
beamforming at the IRS with the training overhead and channel estimation error
taken into account. To reduce the computational complexity of exhaustive
search, we further propose a low-complexity successive refinement algorithm
with a properly-designed initialization to obtain a high-quality suboptimal
solution. Numerical results are presented to show the significant rate
improvement of our proposed IRS training reflection pattern and passive
beamforming designs as compared to other benchmark schemes.
