The reduction of undamped oscillations with relay controls