Dynamic feedback control for cycle slipping in a phase-controlled system