PMSM control with power factor correction: Rapid prototyping scenario