  We consider the decoherence of a pseudo-spin ensemble under collective random
rotations, and study, both theoretically and experimentally, how a
nondestructive measurement combined with real-time feedback correction can
protect the state against such a decoherence process. We theoretically
characterize the feedback efficiency with different parameters --- coherence,
entropy, fidelity --- and show that a maximum efficiency is reached in the weak
measurement regime, when the projection of the state induced by the measurement
is negligible. This article presents in detail the experimental results
published in [Phys. Rev. Lett. \textbf{110}, 210503 (2013)], where the feedback
scheme stabilizes coherent spin states of trapped ultra-cold atoms, and
nondestructively probed with a dispersive optical detection. In addition, we
study the influence of several parameters, such as atom number and rotation
angle, on the performance of the method. We analyze the various decoherence
sources limiting the feedback efficiency and propose how to mitigate their
effect. The results demonstrate the potential of the method for the real-time
coherent control of atom interferometers.
