Tool/software: Code Composer Studio
Hi,
In order to calculate the electrical torque (Te = 1.5 * PP * flux * Iq), I use the following function included in the SDK:
_iq USER_computeTorque_Flux_Iq_pu_to_Nm_sf(void)
{
float_t FullScaleFlux = (USER_IQ_FULL_SCALE_VOLTAGE_V/(float_t)USER_EST_FREQ_Hz);
float_t FullScaleCurrent = (USER_IQ_FULL_SCALE_CURRENT_A);
float_t maxFlux = (USER_MOTOR_RATED_FLUX*((USER_MOTOR_TYPE==MOTOR_Type_Induction)?0.05:0.7));
float_t lShift = -ceil(log(FullScaleFlux/maxFlux)/log(2.0));
return(_IQ(FullScaleFlux/(2.0*MATH_PI)*FullScaleCurrent*USER_MOTOR_NUM_POLE_PAIRS*1.5*pow(2.0,lShift)));
}
However, I don't understand what the function of the lShift variable is and the reason of the power at the end of the last line.
Also, is there a function similar to the above that calculates Iq for a known electrical torque? If not, what should be taken into account to correctly perform the operations?
Thanks in advance.