TIDUF17 November 2022 TMS320F2800152-Q1 , TMS320F2800153-Q1 , TMS320F2800154-Q1 , TMS320F2800155 , TMS320F2800155-Q1 , TMS320F2800156-Q1 , TMS320F2800157 , TMS320F2800157-Q1
The FWC and MTPA functions can optionally be called in the motor drive ISR to calculate the current angle and then compute the reference currents of d-axis and q-axis. Add the predefined symbols MOTOR1_FWC and MOTOR1_MTPA in the compiler settings of the project as described in Section 3.2.2.1 to enable the FWC and MTPA respectively.
In the user_mtr1.h file, make sure the motor parameters are known and correctly set. In mtpa.h, make sure the tables are set properly according to the specification of the motor.
Add the variables motorVars_M1.VsRef_pu, motorSetVars_M1.Kp_fwc, and motorSetVars_M1.Ki_fwc to Expressions window in CCS Debug perspective and tune these parameters to achieve the expected performance for the field weakening control according to the motor and system.
After you've tuned and fixed these variables value, record the Expressions window values with the newly defined parameters in user_mtr1.h file:
MTPA control parameters are calculated according to the motor parameters, Ld, Lq and ψm, so there are no additional parameters that need to be tuned online.