I am working with the F28069M Evalboard and the BOOSTXL-DRV8305EVM Motordriver which drive the wheel of a pedelec. The motor control works nice and is based on lab4a extended to include CAN for communication. Since the goal is to deliver a desired torque via the motor, it would be nice to have a good estimate of the generated torque. While testing on a roller with resistance, the measured mechanical torque is for example 5 Nm, while the Instaspin "User_computeTorque" - Function shows something in the range of 10^-7 to 10^-8, so it is way off.
The motorparameters are evaluated according to lab 2a as follows, the estimate didnt change in several trial runs:
#define USER_IQ_FULL_SCALE_FREQ_Hz (500.0) #define USER_IQ_FULL_SCALE_VOLTAGE_V (42.0) // 24.0 Set to Vbus #define USER_ADC_FULL_SCALE_VOLTAGE_V (44.30) // BOOSTXL-DRV8305EVM = 44.30 V #define USER_IQ_FULL_SCALE_CURRENT_A (24.0) // BOOSTXL-DRV8305EVM = 24.0 A #define USER_ADC_FULL_SCALE_CURRENT_A (47.14) // BOOSTXL-DRV8305EVM = 47.14 A #elif (USER_MOTOR == elfkw) #define USER_MOTOR_TYPE MOTOR_Type_Pm #define USER_MOTOR_NUM_POLE_PAIRS (23) #define USER_MOTOR_Rr (NULL) #define USER_MOTOR_Rs (0.2127705902) #define USER_MOTOR_Ls_d (0.0005847931606) #define USER_MOTOR_Ls_q (0.0005847931606) #define USER_MOTOR_RATED_FLUX (0.2603323162) #define USER_MOTOR_MAGNETIZING_CURRENT (NULL) #define USER_MOTOR_RES_EST_CURRENT (4.0) #define USER_MOTOR_IND_EST_CURRENT (-4.0) #define USER_MOTOR_MAX_CURRENT (24.0) #define USER_MOTOR_FLUX_EST_FREQ_Hz (10.0)
The function to get the torque estimate gets called like this:
gMotorVars.Torque_Nm = USER_computeTorque_Nm(handle, gTorque_Flux_Iq_pu_to_Nm_sf, gTorque_Ls_Id_Iq_pu_to_Nm_sf);
Is the resulting value maybe scaled in kNm? But even then the values are way too small in my opinion. What could be the reason for this?
Another question regards the setting of the Iq_ref value. Since i want to calculate the iq_ref value from the desired torque (as in desired torque / 1.5 / USER_MOTOR_NUM_POLE_PAIRS / gMotorVars.Flux_Wb) i would guess i just input the result into iq_ref, or should this value be converted to pu first?