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.

BEMF in DRV8301 kit

Expert 1800 points
Other Parts Discussed in Thread: DRV8301

Hi,

How to know the BEMF generated in the PMSM motor with DRV8301 kit?. 

The board is powered with 48 volts DC and Volt1.DcBusVolt displays 0.663 (IQ24 format) while the volt1.MfunV1 displays 0.09 (in the watch window).  What are these values?.

Pl suggest,

thx

  • The BEMF signals go to ADC ports on the controlCARD.  ADC-B7, ADC-B4, and ADC-A7.  

    There is a resistor divider on the hardware (5k and 95.3k), so you will need to scale the ADC reading by 20x to get an actual voltage.  

  • Hi Ryan,

    Please confirm my understanding.

    Watch window info

    1)  Volt1.DcBusVolt measures 0.663 (IQ24 format) i.e., the voltage is 0.663x66.32 = 43.97V

    --------------------------------

    #define BASE_VOLTAGE    38.29            // Base peak phase voltage (volt), maximum measurable DC Bus(66.32V)/sqrt(3)

    --------------------------------

    Thus DC bus voltage is 43.97V but the input voltage is 48V. 

    2) BEMF

    volt1.MfunV1 measures 0.09 (in the watch window) i.e., 0.09*20 (gain) = 1.8V and not 0.09*38.29 (base voltage) = 3.4461V

    So the BEMF generated is 1.8V based on the clarification provided by you.

    Please comment on the above.

    thx

  • http://processors.wiki.ti.com/index.php/TMS320C2000_Motor_Control_Primer#PU_System_Model_and_Base_Values

    1. the way we like to do this is take your ADC reading (IQ12) and multiply by the IQ version of 66.32V.  The way we tend to do this is to put everything in global IQ, and in the case of voltage scale everything (scale factor) to a 1000V range

    for example

    Vbus_kV_sf = _IQ(66.32/1000.0);

    Vbus_kV = _IQmpy(_IQ12toIQ(AdcData.dcBus),Vbus_kV_sf);

    2. No. 0.09 is not a direct decimal voltage value. It is some IQ representation (IQ24?) of an IQ12 based conversion from the ADC, which is scaled off 0-3.3V which is scaled to represent a maximum voltage value.

  • Dear Chris,

     

    Thanks for the inputs on measuring Bemf .  I had introduced the following code to the sensorless PMSM

     

    Global definition

     

     

    _iq Vbus_kV_sf=_IQ(0.0);

    _iq Vbus_kV=_IQ(0.0);

    _iq Vbus_kV12=_IQ(0.0);

    _iq Vbus_kV15=_IQ(0.0);

     

        #ifdef DSP2803x_DEVICE_H

        volt1.DcBusVolt = _IQ15toIQ((AdcResult.ADCRESULT3<<3));         // DC Bus voltage meas.

        Vbus_kV_sf = _IQ(66.32/1000.0);

        Vbus_kV= _IQmpy((volt1.DcBusVolt),Vbus_kV_sf);

        Vbus_kV15= _IQmpy(_IQ15toIQ(volt1.DcBusVolt),Vbus_kV_sf);

     

    With the above code the watch window Vbus_kV15 values display 2011 and is no where near 48V. 

     

    Could you please review and suggest how to resolve this.

     

    Further I also tried the following

     

    _iq Totalcurrent=_IQ15(0.0);

    _iq BemfA=_IQ15(0.0);

    _iq BemfB=_IQ15(0.0);

    _iq BemfC=_IQ15(0.0);

    _iq DCBus=_IQ15(0.0);

     

        DCBus=AdcResult.ADCRESULT3>>4;

        BemfA=AdcResult.ADCRESULT4>>4;

        Totalcurrent=AdcResult.ADCRESULT7>>4;

     

    With the above addition the values displayed in the watch window is

    Totalcurrent = 87

    BemfA=157

    DCBus=128

     

    Pl suggest.

     

    Thx & rgds

     

     

     

  • the ADC register value is in Q12 (12 bits)

    you shifted this to Q15 with <<3 (I'm not sure why you did >>4 in your current example....that's completely incorrect)

    you can just convert directly into your global Q

    but this

    volt1.DcBusVolt = _IQ15toIQ((AdcResult.ADCRESULT3<<3))

    Q12 to Q15 then convert to global Q should be fine as well

    What is your global Q value?

        Vbus_kV= _IQmpy((volt1.DcBusVolt),Vbus_kV_sf);

    this should be a value in global Q that represents the % of your scale factor (66.32/1000)

    meaning an ADC reading of 3.3V (12 bits of F) should give you a Vbus_kV = 0.06632 (assuming global Q24)

        Vbus_kV15= _IQmpy(_IQ15toIQ(volt1.DcBusVolt),Vbus_kV_sf);

    not sure what you are trying to do here....your variables are in global Q already, why are you trying to convert volt1 from Q15 again?


  • BTW - take the ADC out of the equation. Just initialize with know values (like 3.3V = 4096h) and do the calculations and look at scaling until it makes sense

  • Thanks Chris.  It works fine with your suggestion.  I could integrate the pot that ships with DRV8301 and the value in the watch window reaches 4096h i.e, 3.3V. and in IQ12 format it reaches 1 (at 3.3V).

    1)  The following code gave Vbus voltage of 48V

    volt1.DcBusVolt = _IQ15toIQ((AdcResult.ADCRESULT3<<3));         // DC Bus voltage meas.

        Vbus= _IQmpy((volt1.DcBusVolt),Vbus_sf);

    2)  Tried  Totalcurrent=AdcResult.ADCRESULT7; but it displays 0.5 ( IQ12 format, in the watch window).  With a gain of 20 the total current flowing is 10 Amps.  This is not correct as the motor in running under no load condition.

    3)  Tried BemfA=_IQmpy((AdcResult.ADCRESULT4),Vbus_sf);  but the watch window value is absurd.

    Pl suggest.

    thx