This paper presents the real time simulation of electric machine control and drive by using hardware-in-the-loop (HIL) simulation technology. In our research implementations, two simulation loops for the control and drive of the same machine are built. One simulation loop is formed using the actual machine. Another simulation loop is formed using a physics-based phase variable model of the same machine. The physics-based phase variable model of the machine is developed from the solutions of nonlinear transient Finite Element (FE) computations covering a complete ac cycle. The developed physics-based base model includes both the time and space harmonics representing the effects of rotor position, slotting, and nonlinear magnetization of the core, etc. The hardware-in-the-loop simulation of the machine drives provides an experimental environment for examining the machine model and studying the control algorithm. A 2-hp 6-pole PM synchronous machine is used to present the physics-based phase variable modeling; a 10-pole PM machine is used to demonstrate the hardware-inthe-loop simulation with the actual machine and its physics-based model.