Rapid Control Prototyping of IPM Drives by Real Time Simulation