Hardware-in-the-loop (HIL) technology is increasingly becoming the preferred, reliable, and costeffective alternative in a virtual scenario for tedious, time-consuming, and expensive tests on real devices. This paper presents a digital hardware emulation of commonly used electrical machines for HIL simulation on the fieldprogrammable gate arrays (FPGAs) in a general framework. This paper provides a useful and comprehensive comparison between floating-and fixed-point arithmetic for hardware implementation, and addresses the differences of deeply pipelined and highly paralleled realization schemes, and the contribution of schematic and textual programming language methods for design configuration of electrical machine models. The hardware implementation by these approaches is evaluated in terms of real-time step size, accuracy, and hardware resource consumption. Finally, an experimentally measured electrical machine behavior is employed to demonstrate the effectiveness of the emulated electrical machine.
Index Terms-Electricalmachines, field-programmable gate arrays (FPGAs), hardware-in-the-loop (HIL) simulation, real-time systems. NOMENCLATURE s, r, f, k Stator, rotor, field, and damper indexes. d, q Reference frame index. l, m Leakage and magnetizing indexes. V, I, λ Voltage, current, and flux linkages. T e , T mech Electromagnetic torque and mechanical torque. T damp Damping torque. r, L Resistance and inductance. ω, θ Angular speed and rotor position. J, P Rotor inertia and the number of pole pairs. a, b, c Phase-domain indexes. A h×h , B h×p State matrix and input matrix. C q×h , D q×p Output matrix and feedforward matrix. His research interests include field-programmable-gate-array-based real-time emulation, hardware-in-the-loop simulation, design and modeling of electrical machines and drive systems, and finite-element analysis of electromagnetic devices. Venkata Dinavahi (SM'08) received the Ph.D. degree from the University of Toronto, Toronto, ON, Canada, in 2000.He is currently a Professor of electrical and computer engineering with the University of Alberta, Edmonton, AB, Canada. His research interests include real-time simulation of electrical machines, power electronics and power systems, large-scale system simulation, and parallel and distributed computing.