Perform Manual Gain-Tuning of Current Controller

In this step, you perform gain tuning for the d-axis and q-axis current controller manually.

This step is optional, but helps you to tune the control gain parameters for the current controller. Provide step change for Id_ref and analyze the current controller performance from the step response of Id_meas. Repeat the same process for Iq_ref to tune the q-axis current controller. In the plant model, lock the rotor to ensure that the motor does not spin when you provide a step change for Id_ref or Iq_ref. In the Surface Mount PMSM block parameters dialog box, set the Mechanical input configuration parameter to Speed. Provide the Spd input (of the Surface Mount PMSM block) as 0 to ensure that the rotor is locked.

The integrated plant and controller subsystem simulation model allows you to manually tune the gains of the current controller. Provide a step input to Iq_ref in the range (0 to 0.2) PU and observe the measured feedback. Adjust the control parameters of the current controller to meet your control objectives.

Simulate the model and plot the Iq_ref_PU and Iq_meas_PU and analyze the step response. This allows you to tune the control parameters for the q-axis controller to meet the control objectives.

You can follow the same method for tuning the d-axis current controller. In the Surface Mount PMSM block parameters dialog box, set the Mechanical input configuration parameter to Torque.