Orthogonal coherent phase detection of phase modulated gratings