A frequency-domain-based master stability function for synchronization in nonlinear periodic oscillators