A closed-loop permanent magnet motor control method and system optimally partitions
torque and flux-weakening currents to produce a desired torque without exceeding
the capability of the DC source. A maximum limit for allowable torque current and
a minimum threshold for the maximum torque current are determined, and the flux
current is varied based at least in part on whether the maximum torque current
limit is above or below the minimum threshold while operating in a flux-weakening
region to compensate for the variability of the DC source voltage.