1. A method of determining a tuning parameter set for use in tuning a controller used in a process control loop of a control system for a plant having a motor and associated load, the method comprising: (a) providing a predefined region on a gain vs. phase plot that encompasses undesirable margins of stability; (b) providing a cost function associated with the predefined region, wherein the cost function represents a cost for stability based on a relative position with respect to the predefined region; (c) obtaining a plant measurement by receiving frequency response data of the control system in response to an excitation test signal containing components that span over a predefined range of frequencies applied to the control system; (d) simulating responses with respect to the plant measurement for each of a plurality of tuning parameter sets to obtain simulated response data; (e) applying the cost function to the simulated response data for each of the plurality of tuning parameter sets to obtain a calculated cost for each of the tuning parameter sets; (f) selecting a desired tuning parameter set from the plurality of tuning parameter sets, wherein the desired tuning parameter set comprises a selected one of the plurality of tuning parameter sets having a desired calculated cost; and (g) outputting the selected one of the plurality of tuning parameter sets for use in the control loop of the control system.