Torque analysis and comparison of the switched reluctance machine and the doubly-salient permanent magnet machine