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.

CCS/LAUNCHXL-F28069M: Reverse rotation of the PMSM motor using Lab12b

Part Number: LAUNCHXL-F28069M

Tool/software: Code Composer Studio

Hello,

We are using Lab12b for a Bike application in current control mode with a quadrature incremental encoder (AMT-103v) and the input is given with a throttle which provides direct input (Iq current) to the current controller. The basic operation of the motor is verified for this lab.

The main reason to switch from Lab11a was while starting the motor was, sometimes rotating in reverse direction. So we added encoder and started using Lab12b. 

But the issue is not resolved by using the encoder. On light load i.e. when the wheel is rotating in the air. The motor runs correctly by tuning PI parameters. (Correctly means without making noise, Which it was making before tuning the parameters. The noise was observed only after giving throttle input.) 

But when I load the system by using mechanical brakes the motor sometimes rotate in reverse direction with full speed.

This occurs normally when the throttle input is ramped at a fast rate. If the throttle is ramped slowly then the motor runs fine in the correct direction.

Please help.

  • Did you do the zero offset calibration for the encoder? And then record the rotor position always, even the motor stop. The incremental encoder can't get the absolute rotor position, so the motor is difficult to run with heavy load if it doesn't have a correct initial position.
  • In the main ISR, this function is been called which set Zero Offset for encoder..!!

    // if we are forcing alignment, using the Rs Recalculation, align the eQEP angle with the rotor angle
    if((EST_getState(obj->estHandle) == EST_State_Rs) && (USER_MOTOR_TYPE == MOTOR_Type_Pm))
    {
    ENC_setZeroOffset(encHandle, (uint32_t)(HAL_getQepPosnMaximum(halHandle) - HAL_getQepPosnCounts(halHandle)));
    }

    And initially the Rs calibration is turned on and the motor is aligned to the zero position.

    Is this fine to give the correct initial position of the motor? or there are some other things to do?
  • The project is a example code which will run the alignment step every time, so it maybe have a reverse rotation during the alignment step, and will lost the zero offset value when power off or reset the controller. You need to add some yourself special process based on the example code.
  • Yes, It aligns at start of the programs while Rs estimation and as you know the starting alignment issue is also posted and we are waiting for our UVW encoder to be delivered to solve that issue.

    But know the issue is different, even after motor is aligned(i.e. rotated in clockwise or anticlockwise) while Rs estimation and power is not turned off or the system is not reset(I.e. the controller knows the zero offset angle). Then also after giving high ramp from throttle the motor rotates in reverse direction.