Text this: Online detection of phase resistance of switched reluctance motor by sinusoidal signal injection