Text this: Construction of the control algorithm to improve energy efficiency of a switched reluctance electric motor