In a field oriented control of a motor we need 3 PI regulators in a control system, one is for mechanical system and two are for electrical system
for a good dynamic response and low torque ripple we should tune PI regulators with machine and inverter parameter( switching frequency)