  Direction-of-arrival (DOA) estimation is one of the most demanding tasks for
the millimeter wave (mmWave) communication of massive multiple-input
multiple-output (MIMO) systems with the hybrid beamforming (HBF) architecture.
In this paper, we focus on the optimization of the HBF matrix for receiving
pilots to enhance the DOA estimation performance. Motivated by the fact that
many existing DOA estimation algorithms can achieve the Cram\'{e}r-Rao bound
(CRB), we formulate the HBF optimization problem aiming at minimizing the CRB
with the prior knowledge of the rough DOA range. Then, to tackle the problem
with intractable non-convex constraint introduced by the analog beamformers, we
propose an efficient manifold optimization (MO) based algorithm. Simulation
results demonstrate the significant improvement of the proposed CRB-MO
algorithm over the conventional random HBF algorithm, and provide insights for
the HBF design in the beam training stage for practical applications.
