  This paper considers pilot design to mitigate pilot contamination and provide
good service for everyone in multi-cell Massive multiple input multiple output
(MIMO) systems. Instead of modeling the pilot design as a combinatorial
assignment problem, as in prior works, we express the pilot signals using a
pilot basis and treat the associated power coefficients as continuous
optimization variables. We compute a lower bound on the uplink capacity for
Rayleigh fading channels with maximum ratio detection that applies with
arbitrary pilot signals. We further formulate the max-min fairness problem
under power budget constraints, with the pilot signals and data powers as
optimization variables. Because this optimization problem is non-deterministic
polynomial-time hard due to signomial constraints, we then propose an algorithm
to obtain a local optimum with polynomial complexity. Our framework serves as a
benchmark for pilot design in scenarios with either ideal or non-ideal
hardware. Numerical results manifest that the proposed optimization algorithms
are close to the optimal solution obtained by exhaustive search for different
pilot assignments and the new pilot structure and optimization bring large
gains over the state-of-the-art suboptimal pilot design.
