  In millimeter-wave channels, most of the received energy is carried by a few
paths. Traditional precoders sweep the angle-of-departure (AoD) and
angle-of-arrival (AoA) space with directional precoders to identify directions
with largest power. Such precoders are heuristic and lead to sub-optimal
AoD/AoA estimation. We derive optimal precoders, minimizing the Cram\'{e}r-Rao
bound (CRB) of the AoD/AoA, assuming a fully digital architecture at the
transmitter and spatial filtering of a single path. The precoders are found by
solving a suitable convex optimization problem. We demonstrate that the
accuracy can be improved by at least a factor of two over traditional
precoders, and show that there is an optimal number of distinct precoders
beyond which the CRB does not improve.
