Other Parts Discussed in Thread: MOTORWARE
I am having trouble getting the torque estimate (found in gMotorVars.Torque_Nm) to be correct. It is reporting a value about 5x too low (a fifth of what it should be). I have changed the shunt resistors by a factor of 5x, so I'm hoping that this is easy to solve by pointing out what I forgot to change in user.h.
Hardware mods
I am using a DRV8301-69M-KIT with minimal hardware modifications:
- The shunt resistors (R80, R81, R82) were increased from 2mOhm to 10mOhm for higher resolution at lower currents. Notice the 5x factor.
- The phase voltage filter poles capacitors (C67, C68, C69) were reduced from 100nF to 68nF to operate at higher RPM.
USER.H mods
I modified user.h with the suggested values from the motorware_selecting_user_variables.xlsx spreadsheet (Motorware v1.01.00.18).
#define USER_IQ_FULL_SCALE_FREQ_Hz (880.0) #define USER_IQ_FULL_SCALE_VOLTAGE_V (55.0) #define USER_IQ_FULL_SCALE_CURRENT_A (9.0) #define USER_ADC_FULL_SCALE_CURRENT_A (82.5 * 2/10) // Notice scaling changed by hardware modification #define USER_MAX_ACCEL_EST_Hzps (13.0) #define USER_VOLTAGE_FILTER_POLE_Hz (493.600) // Notice filter pole changed by hardware modification #define USER_MOTOR_TYPE MOTOR_Type_Pm #define USER_MOTOR_NUM_POLE_PAIRS (8) #define USER_MOTOR_Rr (NULL) #define USER_MOTOR_Rs (0.347) #define USER_MOTOR_Ls_d (0.000389) #define USER_MOTOR_Ls_q (0.000507) #define USER_MOTOR_RATED_FLUX (0.0368) #define USER_MOTOR_MAGNETIZING_CURRENT (NULL) #define USER_MOTOR_RES_EST_CURRENT (0.6) #define USER_MOTOR_IND_EST_CURRENT (-0.6) #define USER_MOTOR_MAX_CURRENT (2.0) #define USER_MOTOR_FLUX_EST_FREQ_Hz (80.0)
Results
I have a dyno-style jig set up (two motors coupled through a torque sensor).
Applying +120 mNm load at 1200 RPM, gMotorVars.Torque_Nm reads +26 mNm. Applying -120 mNm (opposite sign, gMotorVars.Torque_Nm reads -21 Nm. The discrepancy in absolute value (26 vs 21 mNm) is due to internal drag of the motor that the torque sensor cannot detect and I'm not concerned with that. Lets split the difference and round to 120 mNm real torque ~= 24 mNm measured by InstaSPIN.
Note that the ratio of (Torque_Nm/Iq_A) is relatively close to the USER_RATED_FLUX (Ke of motor). It's reading about 10% low, but that seems OK to me.
What I am having trouble understanding is why applying 120 mNm results in gMotorVars.Torque_Nm reading ~5x too low (the same factor that I scaled my shunt resistor by). Is there another USER constant that I forgot to change?
Dan