According to one embodiment of the invention, a method includes generating,
by a computer, a phase current profile, generating a phase current according to
the phase current profile, and applying the phase current to the switched reluctance
motor drive. Generating the phase current profile includes initializing one or
more first profile parameters which define at least a first portion of the phase
current profile. Generating the phase current profile also includes determining
whether a first performance criterion is satisfied based on operation of the switched
reluctance motor drive using the first profile parameters. Generating the phase
current profile also includes updating at least one the first profile parameters
if the first performance criterion is not satisfied.