phase-lock detector