  We introduce a framework for linear precoder design over a massive
multiple-input multiple-output downlink system and in presence of nonlinear
power amplifiers (PAs). By studying the spatial characteristics of the
distortion, we demonstrate that conventional linear precoding techniques steer
nonlinear distortions in the direction of the users. We show that, by taking
into account PA nonlinearity characteristics, one can design linear precoders
that reduce, and in single-user scenarios, even remove completely the
distortion transmitted in the direction of the users. This, however, is
achieved at the price of a considerably reduced array gain. To address this
issue, we present precoder optimization algorithms which simultaneously take
into account the effects of array gain, distortion, multiuser interference, and
receiver noise. Specifically, we derive an expression for the achievable sum
rate and propose an iterative algorithm that attempts to find the precoding
matrix maximizing this expression. Moreover, using a model for PA power
consumption, we propose an algorithm that attempts to find the precoding matrix
minimizing the consumed power for a given minimum achievable sum rate. Our
numerical results demonstrate that the proposed distortion-aware precoding
techniques yield considerable improvements in terms of spectral and energy
efficiency compared to conventional linear precoding techniques.
