This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MOTORWARE: Computation of torque for PMSM

Part Number: MOTORWARE

I'm now experimenting with a PMSM using MotorWare. I know that for PMSM : Torque(Nm) = 1.5 x NumPolePairs x RotorFlux_Weber x Iq. But in function USER_computeTorque_Flux_Iq_pu_to_Nm_sf( ), the computation is as below :

//! \brief     Computes the scale factor needed to convert from torque created by flux and Iq, from per unit to Nm
//!
_iq USER_computeTorque_Flux_Iq_pu_to_Nm_sf(USER_Params *pUserParams)
{
  float_t FullScaleFlux = (pUserParams->iqFullScaleVoltage_V/(float_t)pUserParams->estFreq_Hz);
  float_t FullScaleCurrent = (pUserParams->iqFullScaleCurrent_A);
  float_t maxFlux = (pUserParams->motor_ratedFlux*((pUserParams->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*pUserParams->motor_numPolePairs*1.5*pow(2.0,lShift)));
} // end of USER_computeTorque_Flux_Iq_pu_to_Nm_sf() function

I don't understand the computation in this function. Could anyone please explain it thoroughly ?

Nuntawat