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.

TMS320F280041C: MotorControl SDK v5_03 Lab03 no power

Part Number: TMS320F280041C


Tool/software:

Greetings! I have a working version of a frequency inverter base on your MotorControl SDK v5_03. I built a bigger inverter, but I have problems with the power of the motor. In lab01 and lab02 the adc readings are correct and the current sensors are pointing at the midldle of the range (they are bidirectional 1.75V mid point) and the voltage sensors on the output lines are pointing at 50% of the DC line voltage. The problem is I have no power in the motor. A simple small three phase induction motor (0.250W) is turning, but as it has low voltage on it. If I try 0.55W motor with internal break it can`t even pull the break. My DC line voltage is 3x380=550V, so USER_NOMINAL_DC_BUS_VOLTAGE_V == 550V, USER_ADC_FULL_SCALE_VOLTAGE_V= 850V. As I said the voltage readings are correct when I check adcData.dcBus_V. I tried different values for USER_MOTOR_VOLT_MAX_V. In my working smaller version this value is 380. When I decreased the USER_ADC_FULL_SCALE_VOLTAGE_V I menaged to achieve more power in the engine. This pointed me to the idea that I should increase the output voltage effective value. But if I changed these parameters the readings become  incorrect and I will have problems when I try to use vector control and enter the motor parametes. is there a value which I can change in order to increase the effective value of the output voltage curve and respectively the motor power? 

Because now the power module is bigger than the working vertion I checked the delay between the generated pulse by the controller and the voltage on the IGBTs after the driver and the delay is insegnificant(because now the IGBTs has bigger input capacitance and this could cause big delay between setting a signal and the real execution and lower voltage on the motor). This is not an issue. The deadtimes for the PWM channels is set to 200(both HAL_PWM_DBFED_CNT and HAL_PWM_DBRED_CNT), My clock is 100MHz so this should be 2us deadtime and my carry frequency is 4kHz.

Is there a way to boost the pwm curve in LAB03 without changing the USER_NOMINAL_DC_BUS_VOLTAGE_V  and USER_ADC_FULL_SCALE_VOLTAGE_V? Or should I play with them until I menage to generate proper output curves?

Thanks!

  • My DC line voltage is 3x380=550V, so USER_NOMINAL_DC_BUS_VOLTAGE_V == 550V, USER_ADC_FULL_SCALE_VOLTAGE_V= 850V.

    Hi Pavin,

    Typically set nominal DC bus voltage near DC supply voltage, not a multiple of phase voltages. If you in fact raised the new PCB working voltage, the filter pole and ADC inputs resistor dividers have to be adjusted to leave 30% overhead on samples. Hence the reason to not change scale factors if the working voltage has not changed between both custom boards, check current sensors ADC input polarity is set correctly.

    The filter pole is very important to update if the PCB working voltage has increased and change of resistor dividers too. Note, 1.65v is the typical ADC CMPSS DACVAL-H/L counts for ePWM xBAR fault trip zones. You can add below updated code snip and set over current trip point (user.h), much like Universal MCSDK is better for motor ID process.

    For the code snip have to add few new struct values but it is worth the added CMPSS current protection. Seemingly MCSDK v5.04 did not provide very accurate OVC fault trips into LAB_is02,03,04,05,07,09 etc... The labs.h/c struct CMPSS comparator count values did very little to protect HV inverter with any accuracy. TI engineers ready did nice job on Universal MCSDK current monitoring via ADC samples via PPB. Though inverted DACVAL-L counts 2048-0 being upside down sinewave peak current nears zero counts. So, the low side inverted count value will be a smaller number when subtracted from 4096 and both counts will render equal current trip points. Otherwise, the CMPSS trip status for ePWM DCB values will set fault status after POR.  You can tweak the counts to get closer for high current trip points, maybe add ±1024 to each count. Leave the original DACVALL/H counts labs.h/c, deprecated below code snip.  Add to user.h AC motor profile:

    #define USER_MOTOR_OVER_CURRENT_A   (n.nf), // Your value (n.n) motor OVC fault trip zone point.

    Same update can be added to stored userParams profile.

    /* Current amplifiers maximum shunt current */
    userParams.User_ADC_FullScale_Current_A = USER_ADC_FULL_SCALE_CURRENT_A;

    //! \brief Defines the current scale invert factor for the system
    userParams.currentInv_sf = USER_M1_CURRENT_INV_SF; //New CMPSSS DACVAL-H/L 03-24-25

      

    // Add to user.h
    //! \brief Defines the current scale invert factor for the system
    //!
    #define USER_M1_CURRENT_INV_SF      (4096.0f / USER_ADC_FULL_SCALE_CURRENT_A)
    
    //
    // set CMPSS_DACH/L values for on-chip comparator current protection
    // Modified 4-23-25 adding OVC fault value to existing motor profiles
    {
        uint16_t  cmpssCnt;
        float32_t overCurrent_A;
    
        for(cmpssCnt = 0; cmpssCnt < HAL_NUM_CMPSS_CURRENT; cmpssCnt++)
        {
            overCurrent_A = (userParams.overCurrent_A > userParams.maxCurrent_A) ?
                             userParams.maxCurrent_A : userParams.overCurrent_A;
    
            int16_t cmpValueH = (int16_t)(overCurrent_A * userParams.currentInv_sf);
    
              motorVars.dacCMPValH = 2048 + 256 - cmpValueH; //2048-4096 peak counts
    
            HAL_setCMPSSDACValueHigh(halHandle,
                                     cmpssCnt, motorVars.dacCMPValH); //motorVars.dacCMPValH
        }
        //
        for(cmpssCnt = 0; cmpssCnt < HAL_NUM_CMPSS_CURRENT; cmpssCnt++)
        {
            overCurrent_A = (userParams.overCurrent_A > userParams.maxCurrent_A) ?
                             userParams.maxCurrent_A : userParams.overCurrent_A;
    
            int16_t cmpValueL = (int16_t)(overCurrent_A * userParams.currentInv_sf);
    
              motorVars.dacCMPValL = 2048 - 256 - cmpValueL; // 2048-0 peak counts
    
            HAL_setCMPSSDACValueLow(halHandle,
                                    cmpssCnt, motorVars.dacCMPValL);
        }
    }

  • I don`t think I have a problem with the sensors. This 550V are measured on the DC line before I set this value. It is not just calculation which gives the same value... 

    Lab03 doesn`t use current and voltage sensors in order to calculate the output curve. It is open loop control. And even so I don`t have enough power. This change of the USER_ADC_FULL_SCALE_VOLTAGE_V just causes compensation on the DC line voltage calculation and practicaly increases the amplitude of the generated curves. But this is not a correct way of doing this because now all voltage sensors values are incorrect caclulated and I have no chance of turning the motor in vector control..

  • It is open loop control.

    Right open loop. Yet can still destroy IGBT's if the motor current shoots upward and you don't have excellent CMPSS current monitors to set ePWM A/B outputs high impedance. The MCSDK was mostly developed for DRV83xx SPI drivers, that set GPIO nFault trip zone and CMPSS was seemingly an afterthought and a bit kludgy.

    Still update the filter pole value if you changed ADC current and voltage dividers. Also run LAB_is04 to verify correct ADC sensor values and inputs are working. Use CCS debug and browse to load the debug java script for LAB_is04 Expressions monitoring.

    Check CMPSS registers have not set any latches, H/L bits are OneShot. Very often PWM B low side latch gets set for no good reason. Can manually clear latches in register view, set CLR bit to 1. Plausible HAL_CMPSS-H/L are still active in LAB_is02/03, maybe not in the while loop yet still functional hal.c.

  • I am not affraid of that! I have a desat protection on every IGBT. So overcurrent or short circuit can`t demage my VTs. Only overheating which is not a problem when I am using it for short periods of time. 

    It seems that lab03 and lab04 can`t turn motors with internal break. Only regular three phase asynchronous motors. And the USER_MOTOR_MAX_CURRENT_A cuts the output amplitude. That is why I didn`t have power. 

    And this made the cofusion. I checked again lab07 and everything is fine for now. It seems the problem is in my software which doesn`t properly start lab07. My final project is based on lab07 and there is something in my code which differse from the smaller pcb. I will find it soon.

    Thanks!

  • USER_MOTOR_MAX_CURRENT_A

    That is supposed to be set for peak to peak (not peak) current, for low side shunts and current sensors (V/A) in any project prior to debug.  Anyone might figure peak for bidirectional current sensor rather than P2P as the acronym MAX seems to infer peak, not P2P.  

    I have a desat protection on every IGBT.

    The concern was CMPSS tripping a fault and you may have set Tz action qualifier PWM-A/B trips low state. That would indeed disable the PWM output/s that caused Tz OneShot action and Desat would have nothing to do with MAX current setting being wrong.

    We added refined OVC fault check code above into while loop LAB_is07. Also seemed odd to put DAC-A/B programming in the while loop as the output drives reference input to 3 low side current sensors.    

    Best of luck and encourage to test Universal MCSDK for motor ID with custom PCB.