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.

Power Estimation in Piccolo F28027 HVKit

hi,

i designed a HVKit with F28027 Piccolo based on TI HVKit and using CCS6.1.

i want to estimate the power consumption through the Software. i know that i must read the Voltage and Current of motor and convert them from per unit to Volts and Amps. but i have a problem in Whole Process.

i wrote a code for converting volts and amps from per unit values  (gAdcData.I.value and  gAdcData.V.value)   to real amps and volts value but the values don't make a sense.

i also tested my code in F28027-Launchpad and again is not working well.

Could anybody help me? How can i start to do it?



  • hi Chris,

    i read the above  link, it really helped, thank you.

    but the question is,

    after computing the Motor Power Consumption by the below Formula:

    P_motor = (Vd * Id + Vq * Iq) * 1.5

    the P_motor parameter is in per unit, how can i convert it to Watt?

    is it sufficient to use the below formula or must add some other parameters?

    P_motor_watt = _IQtoF(P_motor);


    what about this formula in here:

    // Equations for motor power
    float_t motor_power_W = _IQtoF(gMotorVars.Torque_Nm) * _IQtoF(gMotorVars.Speed_krpm) * (float_t)(MATH_TWO_PI * 1000.0 / 60.0);

    which formula is correct?

  • "the P_motor parameter is in per unit, how can i convert it to Watt?"
    I would first convert the currents and voltages from per unit to Amps and Volts like we show you in the rest of the code.

    ex:
    gMotorVars.VdcBus_kV = _IQmpy(gAdcData.dcBus,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/1000.0));

    then do the calculation
  • you mean that i must write this codes?

    _IQmpy(gMotorVars.Id,_IQ(USER_IQ_FULL_SCALE_CURRENT_A));

    _IQmpy(gMotorVars.Iq,_IQ(USER_IQ_FULL_SCALE_CURRENT_A));


    
    
    _IQmpy(gMotorVars.Vd,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V / 1000.0));
    _IQmpy(gMotorVars.Vq,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V / 1000.0));

    what about this formula in here:

    // Equations for motor power
    float_t motor_power_W = _IQtoF(gMotorVars.Torque_Nm) * _IQtoF(gMotorVars.Speed_krpm) * (float_t)(MATH_TWO_PI * 1000.0 / 60.0);

    is it correct?

  • Generally, Motor Output Power(Kw)=Torque(N.m)*Speed(rpm)/9.5493, the 9.5493=60/(2*PI), so your equation is correct.

    Below 2 lines can't get real Vd and Vq, both two are related to Vdcbus, you need to multiply the dc bus voltage to get real Vd and Vq with volt unit.
    _IQmpy(gMotorVars.Vd,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V / 1000.0));
    _IQmpy(gMotorVars.Vq,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V / 1000.0));
  • you mean that i must multiply the dc bus voltage to Vd and Vq and then convert them from per unit to Volts?

    like this?
    _IQmpy( _IQmpy(gMotorVars.Vd, gAdcData.dcBus) ,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V / 1000.0));
    _IQmpy( _IQmpy(gMotorVars.Vq, gAdcData.dcBus) ,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V / 1000.0));
  • Need to multiply SQRT(2)/2 for bipolar modulation, means _IQmpy( _IQmpy(gMotorVars.Vd, gAdcData.dcBus) ,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V *0.7071/ 1000.0));
  • thank you but i am confused.
    where did the "SQRT(2)/2" come from?

    what about Id and Iq?
    is there any special parameter to convert Id, Iq to Amps or just use the below formula?

    _IQmpy(gMotorVars.Id,_IQ(USER_IQ_FULL_SCALE_CURRENT_A));
    _IQmpy(gMotorVars.Iq,_IQ(USER_IQ_FULL_SCALE_CURRENT_A));
  • The caculate of Id and Iq is right.
    The Vd&Vq is the output of PID regulator which is the percent of Vdc. Gereral, 0% is the Vdc/2, and Vd^2+Vq^2=1, so need to multiply SQRT(2)/2.
  • thank you Yanming for quick reply.

    but i am very confused.

    i write and test the codes, you mentioned.

    look like the pic below:

    but the answers don't make a sense.

    if the above formula is right why my answers is not right?


    i must say that i use the F28027-Launchpad supplying from 24v power supply. the output current of power supply is around 80 mA so the consumption is around 1.920W(24V x 80mA = 1920 mW).

    but the Adc_Value.Power_Consumed in the above formula is around the 0.0005 and i don't know what is the unit(watt or per unit?).

    what can i do?

    am i right or something is wrong?

  • The unit is kilo watt.

    You can refer to below equation to caculate the motor output power. Need to multipy _IQ(0.7071) if using SPWM mode, and you need to multiply _IQ(0.866025) if suing SVPWM mode. Generally, use the Te*n/9.5488 to caculate the motor output power.

      // read Vd and Vq vectors per units
      gMotorVars.Vd = CTRL_getVd_out_pu(ctrlHandle);
      gMotorVars.Vq = CTRL_getVq_out_pu(ctrlHandle);

      // calculate vector Vs in per units
      gMotorVars.Vs = _IQsqrt(_IQmpy(gMotorVars.Vd, gMotorVars.Vd) + _IQmpy(gMotorVars.Vq, gMotorVars.Vq));

      // read Id and Iq vectors in amps
      gMotorVars.Id_A = _IQmpy(CTRL_getId_in_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));
      gMotorVars.Iq_A = _IQmpy(CTRL_getIq_in_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));

      // calculate vector Is in amps
      gMotorVars.Is_A = _IQsqrt(_IQmpy(gMotorVars.Id_A, gMotorVars.Id_A) + _IQmpy(gMotorVars.Iq_A, gMotorVars.Iq_A));

      // Get the DC buss voltage
      gMotorVars.VdcBus_kV = _IQmpy(gAdcData.dcBus,_IQ(USER_IQ_FULL_SCALE_VOLTAGE_V/1000.0));


      // read Vd and Vq vectors in kV
      gMotorVars.VsFactor = _IQmpy(gMotorVars.VdcBus_kV, _IQ(0.866025));
      gMotorVars.PsFactor = _IQmpy(gMotorVars.Speed_krpm, _IQ(1.0/9.5488));

      gMotorVars.Vd_kV = _IQmpy(gMotorVars.Vd, gMotorVars.VsFactor );
      gMotorVars.Vq_kV = _IQmpy(gMotorVars.Vq, gMotorVars.VsFactor );
      gMotorVars.Vs_kV = _IQmpy(gMotorVars.Vs, gMotorVars.VsFactor );

      // read motor power in kW
      gMotorVars.Pout_kW = _IQmpy(gMotorVars.Torque_Nm, gMotorVars.PsFactor);
      gMotorVars.Ps_kW = _IQabs(_IQmpy(gMotorVars.Vd_kV, gMotorVars.Id_A)) + _IQabs(_IQmpy(gMotorVars.Vq_kV, gMotorVars.Iq_A));

  • thank you again Yanming for quick reply.

    i wrote the above code and the results are better now.

    but i still have a problem with this part:

    "You can refer to below equation to caculate the motor output power. Need to multipy _IQ(0.7071) if using SPWM mode, and you need to multiply _IQ(0.866025) if suing SVPWM mode. Generally, use the Te*n/9.5488 to caculate the motor output power."

    and this part:

    "

      // read Vd and Vq vectors in kV
      gMotorVars.VsFactor = _IQmpy(gMotorVars.VdcBus_kV, _IQ(0.866025));
      gMotorVars.PsFactor = _IQmpy(gMotorVars.Speed_krpm, _IQ(1.0/9.5488));

     "

    i know the gMotorVars.VdcBus_kV is right and about 0.024 kV and multiply the _IQ(0.866025) make it incorrect(about 0.021).

    sorry for elementary questions.  why using the _IQ(0.7071) or _IQ(0.866025) or Te*n/9.5488?

    how can i recognize to choose every one of them?

    and finally this part:

    "gMotorVars.Ps_kW = _IQabs(_IQmpy(gMotorVars.Vd_kV, gMotorVars.Id_A)) + _IQabs(_IQmpy(gMotorVars.Vq_kV, gMotorVars.Iq_A));"

    is there a "  *_IQ(1.5) " part at the end?

    which one is exact? Pout_kW or Ps_kW?

    thank you

  • 1. InstaSPIN-FOC use SVPWM, so you can multiply _IQ(0.866).
    2. Not multiply _IQ(1.5).
  • is there any document that can help me to understand _IQ(0.866)?

    which one is exact? Pout_kW or Ps_kW?

  • Pout is more exact for motor output power. You can find these in motor contro or drive books, search it from web, or bookstore.
  • thank you for complete answer.
    i used the above formula and my problem solved.
    the answers are seems to be write.
    thanks.