- Sine Amplitudes - Specifies the amplitudes of the injected sine waves. In this
example, choose 0.25 for the current controllers and 0.01 for the speed controller to
ensure the plant is properly excited within the saturation limit. If the excitation
amplitude is either too large or too small, it will produce inaccurate frequency
response estimation results.
Tuning Cascaded Feedback Loops
Because the Closed-Loop PID Autotuner block only tunes one PI controller at a time, the
three controllers must be tuned separately in the FOC PMSM model. Tune the inner-loop
controllers first, and then tune the outer-loop controller.
- The d-axis current controller is tuned between 1.3 and 1.35 sec.
- The q-axis current controller is tuned between 1.4 and 1.45 sec.
- The speed controller is tuned between 1.5 and 3.5 sec.
After tuning each PI controller, the controller gains are updated through the Data Store
Memory block.
Simulating Autotuner Block in Normal Mode
In this example, the FOC PMSM model is built in Simulink. All three controllers are tuned
in one simulation. In addition, responses are compared between speed responses before
and after tuning the controllers.
Simulation of the FOC PMSM model usually takes a few minutes on your computer due to
the small sample time of the power electronics controller of the motor.
sim(mdl)
logsout_autotuned = logsout;
save('AutotunedSpeed','logsout_autotuned')
The following figure shows the overall simulation result.
Tune Field-Oriented Controllers Using Closed-Loop PID Autotuner Block