Analysis of phase-detection algorithms for back-EMF-based sensorless strategies through real-time simulations