Phase estimation of recurring patterns in nonstationary signals