SPICE assisted simulation of controlled electric drives: An application to switched reluctance drives