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.

TMS320F280049C: Assistance Needed for Motor Speed Instability on Custom Board Using TMS320F280049C & DRV8320RS

Part Number: TMS320F280049C
Other Parts Discussed in Thread: LAUNCHXL-F280049C, BOOSTXL-DRV8320RS, , C2000WARE, MOTORWARE

Tool/software:

Dear TI Support Team,

I am currently working with a custom board that utilizes the TMS320F280049C and DRV8320RS chips. Initially, I tested the BOOSTXL-DRV8320RS BoosterPack mounted on the LAUNCHXL-F280049C LaunchPad development kit. Using this setup:

  1. I ran Lab05 to determine the motor parameters.
  2. I ran Lab09 to test the maximum motor speed, which reached 920 Hz. At this speed, while there was some fluctuation, the motor remained stable without any alarming issues.

Recently, I transitioned to a self-designed custom board where I made the following modifications:

  1. Adjusted some resistors affecting USER_ADC_FULL_SCALE_VOLTAGE_V and recalculated as follows:
    #define USER_ADC_FULL_SCALE_VOLTAGE_V ((float32_t)(31.32)) // 3.3 * (42.2 + 4.97) / 4.97 = 31.32
  2. Changed the shunt resistor (R_shunt) and updated related calculations:
    #define USER_ADC_FULL_SCALE_CURRENT_A ((float32_t)(300)) // 3.3 / 0.001 / 11 = 300
  3. Adjusted the voltage filter pole:
    #define USER_VOLTAGE_FILTER_POLE_Hz ((float32_t)(357.946)) // 1 / (2pi * ((42.2k * 4.97k) / (42.2k + 4.97k) * 0.1uF))

I ran Lab02 on the custom board to obtain new offset values and verified them by running Lab05 to retrieve the motor parameters, which were similar to the original setup.

However, when I ran Lab09 to test the motor’s maximum speed:

  • The motor became unstable at 850 Hz.
  • The power supply exhibited abnormal behavior with high current draw and significant voltage drops.
  • The motor produced strange noises during operation.

In contrast, with your board, the motor could reach its maximum speed without these issues. While oscillations occurred at the maximum speed, the power supply remained stable.

Could you please help me identify potential causes for the instability on my custom board? Any advice or guidance would be greatly appreciated.

Thank you for your time and support.

Best regards,
Hyu

  • Hyu,

    If you've already verified the power supply is stable, then I'd first suggest comparing the signal integrity of the current and voltage signals (particularly the current signals) on the custom board vs the LaunchPad + Booster Pack HW. If the signal integrity is lower and/or there's generally more noise in the system, then control loop may not be able to sustain the same output maximum.

    Additionally, it may not be a bad idea to verify that your 3 changed parameters do not cause any problems with the FAST estimator. If using the current gen motor control SW development kit (the C2000Ware Motor Control SDK), then refer to {MCSDK}/solutions/{Solution folder}/docs, and there should be a 'parameters calculation' document in most solutions. If using the previous gen motor control SW development kit (MotorWare), then refer to the {motorware}/docs/labs/motorware_selecting_user_variables.xlsx.

    Regards,
    Jason Osborn

  • Hi Jason,

    In addition to the changes mentioned regarding my custom board (primarily updates to parameters in the user.h file), I also modified the pin configurations for PWM, ISEN, and VSEN in the hal.c file to align with the hardware design.

    Initially, I faced some challenges due to inconsistencies between the software and hardware, as the hardware was designed by someone else. As a result, I was unable to successfully run Lab05. After making a few adjustments, I was eventually able to run Lab05 and obtain the motor parameters, which were quite similar to those obtained using your development kit.

    However, despite these efforts, I could not achieve the same level of performance as your kit. I am uncertain whether the changes in the hal.c file are contributing to the issues I am experiencing.

    Thank you for your time and support.

    Some changes I made following the code below:
    #if (BOOST_to_LPD == BOOSTX_to_J1_J2)
    // initialize PWM handles for Motor 1
    obj->pwmHandle[0] = EPWM1_BASE; //!< the PWM handle, GPIO8/GPIO9
    obj->pwmHandle[1] = EPWM3_BASE; //!< the PWM handle, GPIO4/GPIO5
    obj->pwmHandle[2] = EPWM5_BASE; //!< the PWM handle, GPIO0/GPIO1

    // initialize PGA handle
    obj->pgaHandle[0] = PGA1_BASE; //!< the PGA handle
    obj->pgaHandle[1] = PGA3_BASE; //!< the PGA handle
    obj->pgaHandle[2] = PGA2_BASE; //!< the PGA handle

    // initialize CMPSS handle
    obj->cmpssHandle[0] = CMPSS1_BASE; //!< the CMPSS handle
    obj->cmpssHandle[1] = CMPSS3_BASE; //!< the CMPSS handle
    obj->cmpssHandle[2] = CMPSS2_BASE; //!< the CMPSS handle
    #endif

    #if (BOOST_to_LPD == BOOSTX_to_J1_J2)
    // configure the interrupt sources
    // configure the ample window to 15 system clock cycle wide by assigning 14
    // to the ACQPS of ADCSOCxCTL Register.
    // RB2/B1
    ADC_setInterruptSource(obj->adcHandle[1], ADC_INT_NUMBER1, ADC_SOC_NUMBER2);

    // configure the SOCs for hvkit_rev1p1
    // ISENA - PGA1->A11->RA0
    ADC_setupSOC(obj->adcHandle[0], ADC_SOC_NUMBER0, ADC_TRIGGER_EPWM1_SOCA,
    ADC_CH_ADCIN11, HAL_ADC_SAMPLE_WINDOW);

    // ISENB - PGA3->C7->RC0
    ADC_setupSOC(obj->adcHandle[2], ADC_SOC_NUMBER0, ADC_TRIGGER_EPWM1_SOCA,
    ADC_CH_ADCIN7, HAL_ADC_SAMPLE_WINDOW);

    // ISENC - PGA2->B9->RB0
    ADC_setupSOC(obj->adcHandle[1], ADC_SOC_NUMBER0, ADC_TRIGGER_EPWM1_SOCA,
    ADC_CH_ADCIN9, HAL_ADC_SAMPLE_WINDOW);

    // VSENA - A2/B6/PGA1_OF (A3)->RA1
    ADC_setupSOC(obj->adcHandle[0], ADC_SOC_NUMBER1, ADC_TRIGGER_EPWM1_SOCA,
    ADC_CH_ADCIN2, HAL_ADC_SAMPLE_WINDOW);

    // VSENB - B4/C8/PGA4_OF (B5)->RB1
    ADC_setupSOC(obj->adcHandle[1], ADC_SOC_NUMBER1, ADC_TRIGGER_EPWM1_SOCA,
    ADC_CH_ADCIN4, HAL_ADC_SAMPLE_WINDOW);

    // VSENC - B2/C6/PGA3_OF (B3)->RC1
    ADC_setupSOC(obj->adcHandle[2], ADC_SOC_NUMBER1, ADC_TRIGGER_EPWM1_SOCA,
    ADC_CH_ADCIN6, HAL_ADC_SAMPLE_WINDOW);

    // VSENVM - B1->RB2. hvkit board has capacitor on Vbus feedback, so
    // the sampling doesn't need to be very long to get an accurate value
    ADC_setupSOC(obj->adcHandle[1], ADC_SOC_NUMBER2, ADC_TRIGGER_EPWM1_SOCA,
    ADC_CH_ADCIN1, HAL_ADC_SAMPLE_WINDOW);

    // Vthrottle - B3->RB3. hvkit board has capacitor on Vbus feedback, so
    // the sampling doesn't need to be very long to get an accurate value
    ADC_setupSOC(obj->adcHandle[1], ADC_SOC_NUMBER3, ADC_TRIGGER_EPWM1_SOCA,
    ADC_CH_ADCIN3, HAL_ADC_SAMPLE_WINDOW);
    #endif

    #if (BOOST_to_LPD == BOOSTX_to_J1_J2)
    ASysCtl_selectCMPHPMux(ASYSCTL_CMPHPMUX_SELECT_3, 4); //
    ASysCtl_selectCMPLPMux(ASYSCTL_CMPLPMUX_SELECT_3, 4);

    ASysCtl_selectCMPHPMux(ASYSCTL_CMPHPMUX_SELECT_2, 4); //
    ASysCtl_selectCMPLPMux(ASYSCTL_CMPLPMUX_SELECT_2, 4);

    ASysCtl_selectCMPHPMux(ASYSCTL_CMPHPMUX_SELECT_1, 4); //
    ASysCtl_selectCMPLPMux(ASYSCTL_CMPLPMUX_SELECT_1, 4);

    // Configure TRIP9 to be CTRIP1H and CTRIP1L using the ePWM X-BAR
    XBAR_setEPWMMuxConfig(XBAR_TRIP9, XBAR_EPWM_MUX00_CMPSS1_CTRIPH_OR_L); // Phase A
    XBAR_enableEPWMMux(XBAR_TRIP9, XBAR_MUX00);

    XBAR_setEPWMMuxConfig(XBAR_TRIP7, XBAR_EPWM_MUX02_CMPSS2_CTRIPH_OR_L); // Phase B
    XBAR_enableEPWMMux(XBAR_TRIP7, XBAR_MUX02);

    XBAR_setEPWMMuxConfig(XBAR_TRIP8, XBAR_EPWM_MUX04_CMPSS3_CTRIPH_OR_L); // Phase C
    XBAR_enableEPWMMux(XBAR_TRIP8, XBAR_MUX04);

    #endif

    BR,
    Hyu

  • Unless the HAL_ADC_SAMPLE_WINDOW value was significantly altered in your code, this excerpt should not impact performance, assuming that all connections are still valid.

    Regards,
    Jason Osborn

  • I'm currently using a value of 14 for HAL_ADC_SAMPLE_WINDOW in my code. What alternative values could I use?

  • To be clear, I was saying that it is not likely that HAL_ADC_SAMPLE_WINDOW is your issue unless you manually altered the value significantly. If the ADC input filters are equivalent on the custom board to the original reference, then the default value should be fine.

    Regards,
    Jason Osborn