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.

Measuring power consumption with MotorWare 15 proj_lab5b

Other Parts Discussed in Thread: MOTORWARE

I am using the MotorWare project proj_lab5b, and I want to measure the power consumption of the motor. To measure the voltage, I read the gMotorVars.VdcBus_kV variable. But I can't find it's counterpart for the current. Is there such one?

  • Hello Dmitri,

    We don't calculate bus current since we don't need it to control the motor.

    Since we use the amplitude invariant form of the Clarke transform, I recommend using the following formulae:

    Motor Input Power = (Vd*Id + Vq*Iq) * 1.5

    Specifically, the variables to use are:

    Vdq_out_pu.value[ ]

    Idq_pu.value[ ]

    Then the answer must be scaled to get actual power since the above variables are represented in  PU format.

     

    Regards,

    Dave

     

  • I tried this and a bunch of other formulas for this calculation that I found online, and none of them seemed to give a proper result. My final solution was essentially something like this (not actual code):

    temp = sqrt(Iq*Iq + Id*Id)
    
    temp_f = _IQtoF(temp)
    
    I = a + b*(temp_f * 1000) //I in mA.

    The result of this calculation is very unstable, so I calculated an average over the last 512 points, to make the result acceptably stable.

    The a and b were then determined experimentally (and because of the limitations of how I could measure the current, included the power consumption of the board). In case anyone is wondering, my particular values are:

    a = -147.88839

    b = 0.90482

    This was my data set for determining a and b (all but the last 2 points were set by increasing rpm, the last 2 by restricting motor movement). "Real current" is the one measured by an external device and "measured current" is the one calculated with the board before applying the linear correction:

    I hope this helps someone. Cheers.