The FW and MTPA functions have been added and called in motor drive ISR to calculate current angle, and then compute the reference currents of d-axis and q-axis.
- Adding the pre-define symbols MOTOR1_FWC
and MOTOR1_MTPA in build configuration of the project as described in
Section 3.2.2 for enabling the FW and MTPA respectively.
- In user_mtr1.h file, make sure the motor
parameters are known and correctly set. In mtpa.h, make sure the tables are set
properly for and calculations according to the specification of a motor.
- Adding the variables VsRef_pu, Kp_fwc, and Ki_fwc
to Expressions window in CCS Debug Perspective, and tuning these parameters to
achieve the expectation performance for the field weakening control according to
the motor and its system.
- After tuned and fixed these variables value,
record the watch window values with the newly defined parameters in user_mtr1.h
file.
USER_M1_FWC_VREF =
VsRef_pu's value. The factor of the reference voltage for Field Weakening
Control.
USER_M1_FWC_KP
= Kp_fwc's value. The Kp gain of PI regulator for Field Weakening
Control
USER_M1_FWC_KI
= Ki_fwc's value. The Ki gain of PI regulator for Field Weakening
Control
- MTPA control parameters are calculated according
to the motor parameters,
,
and
, so there is no any additional parameters need to be tuned
online.