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.

LAUNCHXL-F280049C: Motor Parameter Identification Failure at Higher Frequency

Part Number: LAUNCHXL-F280049C

Hi,

I am working with BOOSTXL-8323RS and a custom PMSM with inductance 100-320 uH (based on temp and freq). During identification lab 05, at 30 kHz switching frequency motor identification fails during the ramp up state of the FAST estimator. However, identification process works well up to 25 kHz switching frequency.

As of now, I am using default tick rates/decimation values specified in the code. I have measured the InstaSPIN-FOC + FAST execution time by toggling GPIOs when the motor is running at rated speed at 24 V.  Total Time = 25 us = InstaSPIN-FOC (11 us) + FAST est (14 us). Based on this I was able to use switching frequency of 35 kHz during normal operation. However, it fails in the identification process above 25 kHz.

1. Is it because of the ISR interrupt overrun due to the higher switching frequency?

2. Does it mean that FAST takes more than 25 us during motor identification process? If I want to increase switching frequency in identification process, will I have to adjust tick/decimation rate?

Best,

Amit

  • You must consider the maximum ISR execution time that including the ISR enter/exit time, it's greater than 25us. You have to adjust the USER_NUM_PWM_TICKS_PER_ISR_TICK to ensure ISR execution time does not overflow.

  • Hi Yanming,

    The first task that is executed in ISR is HAL_setGPIOHigh() and the last task that is executed is HAL_setGPIOLow(). This gave me total execution time for InstaSPIN-FOC + FAST est. 

    Another GPIO was toggled high right before EST_run() and toggled low right after EST_updateId_ref_A().

    What will be impact on the system performance if I set USER_NUM_PWM_TICKS_PER_ISR_TICK such that ISR execution time does not overflow based desired switching frequency? I mean only one ISR execution (hence FOC calculation) for few PWM cycles.

    __interrupt void mainISR(void)
    {
        //
        // check ISR executing time by toggling the GPIO
        //
        HAL_setGPIOHigh(halHandle, HAL_GPIO_ISR);
    
        motorVars.pwmISRCount++;
    
        //
        // toggle status LED
        //
        counterLED++;
    
    .
    .
    .
    .
    .
    .
    #ifdef _DATALOG_EN_
        //
        // call datalog
        //
        DATALOG_updateWithDMA(datalogHandle);
    
        //
        // Force trig DMA channel to save the data
        //
        HAL_trigDlogWithDMA(halHandle, 0);
        HAL_trigDlogWithDMA(halHandle, 1);
        HAL_trigDlogWithDMA(halHandle, 2);
        HAL_trigDlogWithDMA(halHandle, 3);
    #endif  //  _DATALOG_EN_
    
        //
        // check ISR executing time
        //
        HAL_setGPIOLow(halHandle, HAL_GPIO_ISR);
    
        motorVars.estISRCount++;
    
        return;
    } // end of mainISR() function
    

  • As replied to you above, the time you measured doesn't include the ISR entering and exiting time ( about 64 CPU cycles), and the code execution time in ISR of motor identification is not a fixed time. So that's why to recommend the ISR frequency should be less than 25kHz.