Optimization of phase prediction for brain-state dependent stimulation: a grid-search approach