FPGA-based design and implementation of a real time simulator of switched reluctance motor drives