SLAU927A March 2024 – June 2024 MSPM0G3507
The FOC Algorithm uses two current PI controllers: one each for Id and Iq to control flux and torque separately. Kp and Ki coefficients are the same for both PI controllers and are configured through currLoopKp and currLoopKi in the Motor Tuning page.
For the basic tuning, configure currLoopKp and currLoopKi parameters as "0" so that these values are auto-computed based on the motor parameters and reflected in the User Outputs section of the Motor Tuning page in the GUI. These values can be further updated for fine tuning the performance and controlling the dynamics of the system.
The FOC Algorithm uses an integrated speed control loop that helps maintain a constant speed over varying operating conditions. The Kp and Ki coefficients are configured through speedLoopKp and speedLoopKi in the "System Configurations" section on the Motor Tuning page. The output of the speed loop is used to generate the current reference for torque control. The output of the speed loop is limited by configuring iLIMIT in the closedLoop1 configuration in the Register Map page of GUI. When output of the speed loop saturates, the integrator is disabled to prevent integral wind-up.
To tune the Kp and Ki values for speed loop:
The following table shows general guidelines to change controller gains.
Parameter | Rise Time | Overshoot | Settling Time | Stead State Error | Stability |
---|---|---|---|---|---|
Kp | Decreases | Increases | Small Change | Decreases | Degrades |
Ki | Decreases | Increases | Increases | Eliminates | Degrades |