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.

TMS320F2800157: Uncontrolled maximum speed at Encoder motor

Part Number: TMS320F2800157
Other Parts Discussed in Thread: DRV8353

Tool/software:

Hello Team,

Hello Team,

Customized PCB F2800157 integrated with UMC code(latest SDK_2.0.0) and  tested with 48V(ABI-encoder).

When try to run the motor ,most of the time its successful able to achieve expected speed as per set speed.

Some rare cases motor runs at uncontrollable maximum speed.

Same kind of issues we are facing with Launchpad-F2800157 with DRV8353 (Some rare cases motor runs at uncontrollable maximum speed)

We checked the Customized PCB with #BL2 , BL#3 ,BL#4 all settings(Encoder connection) and configurations are correct.

Its clearly shows issues in encoder offset calibration.

1)How to do encoder offset calibration of a motor .

2)Is there anything need to check at #BL2 & BL#3 ?for Encoder offset calibration .

Thanks in Advance.

Regards

C.Prabhakaran

  • Please take a look at the lab user's guide, and make sure that the encoder is connected to the board correctly.

    Universal Project and Lab User’s Guide: https://www.ti.com/lit/spruj26

    You can run the motor with FAST and enabling the encoder to use the angle and speed from FAST to validate if the encoder is connected and configured correctly.

  • ,

    Thanks for your reply.


    Yes, I verified the same with the DRV8353 + Launchpad F2800157 and our custom board. We are facing issues on both boards.


    These issues do not appear every time; they occur only in rare cases.


    We have the same-spec motor with Hall feedback, and we have never faced such issues with it; the problems only arise with the encoder motor.


    We are confident that there are no issues with the connections, as these problems appear infrequently.


    We suspect that the issue is related to encoder offset calibration.


    Is there any way to find the encoder motor offsets?

    #define USER_MOTOR1_ENC_POS_OFFSET         (50)
    This offset value does not seem correct to me.
    Could you please guide us on how to find the encoder offset?

    Regards

    C.Prabhakaran

  • As replied to you. You can use the FAST to verify the encoder, you may try to run the motor with FAST to see if the speed can be up to the target speed you want. In the lab, the encoder offset will be calibrated automatically when run the motor first time every power on and set the offset value in the encoder configuration functions. So you may have to check if the encoder lines number is set correctly and the connection wires are correct.

  • Hello,

    Thanks for your reply.

    "In FAST, we can run the motor and ensure that the encoder feedback values under the enc_M1 variable match the set speed."

    There may be a mistake here: we enabled MOTOR1_ENC, which is fine, but ENC_UVW is not correct.

    As per your comment, the encoder offset will be automatically handled in the code, so there is no need to configure it under ‘USER_MOTOR1_ENC_POS_OFFSET " in user_mtr.h

    Thank you so much for your fast response.

    Regards

    C.Prabhakaran

  • but ENC_UVW is not correct.

    This feature is not available in the example lab, it's reserved for future update.

  • Hi @Yanming Luo,

    Thanks for your valuable feedback.

    The connection and encoder slots look fine, but we are still facing the same issues.

    As explained earlier, we have the same specifications for the Hall feedback-based motor, and we are not encountering such issues there.

    The uncontrolled speed issues are only occurring with the encoder feedback motor.

    If we try multiple times, we only encounter this issue in rare cases (for example, if we run the motor 50 times, we face uncontrolled speed issues once).

    Regards

    C.Prabhakaran

  • The issue could be from the noise on the output signals of the encoder as below by setting the GPIO qualification.

    // GPIO43->EQEP1_INDEX!
    GPIO_setPinConfig(GPIO_43_EQEP1_INDEX);
    GPIO_setDirectionMode(43, GPIO_DIR_MODE_IN);
    GPIO_setPadConfig(43, GPIO_PIN_TYPE_STD);
    GPIO_setQualificationMode(43, GPIO_QUAL_6SAMPLE);
    GPIO_setQualificationPeriod(43, 2);

    // GPIO44->EQEP1_A
    GPIO_setPinConfig(GPIO_44_EQEP1_A);
    GPIO_setDirectionMode(44, GPIO_DIR_MODE_IN);
    GPIO_setPadConfig(44, GPIO_PIN_TYPE_STD);
    GPIO_setQualificationMode(44, GPIO_QUAL_6SAMPLE);
    GPIO_setQualificationPeriod(44, 2);

    // GPIO37->EQEP1_B
    GPIO_setPinConfig(GPIO_37_EQEP1_B);
    GPIO_setDirectionMode(37, GPIO_DIR_MODE_IN);
    GPIO_setPadConfig(37, GPIO_PIN_TYPE_STD);
    GPIO_setQualificationMode(37, GPIO_QUAL_6SAMPLE);
    GPIO_setQualificationPeriod(37, 2);

  • Hi,

    Thanks for your reply, and I apologize again.

    As per your suggestion, we tried both GPIO_QUAL_3SAMPLE as well as GPIO_QUAL_6SAMPLE  facing the same issues.

    Configuration details are attached.

    ##########  hal.h  ##################

    #define MTR1_QEP_BASE EQEP1_BASE

    #define MTR1_HALL_U_GPIO 6
    #define MTR1_HALL_V_GPIO 11
    #define MTR1_HALL_W_GPIO 13

    ########### hal.c  ##################


    // GPIO6->ENC_A
    GPIO_setPinConfig(GPIO_6_EQEP1_A);
    GPIO_setDirectionMode(6, GPIO_DIR_MODE_IN);
    GPIO_setPadConfig(6, GPIO_PIN_TYPE_STD);
    GPIO_setQualificationMode(6, GPIO_QUAL_6SAMPLE);
    GPIO_setQualificationPeriod(6, 2);

    // GPIO11->ENC_B
    GPIO_setPinConfig(GPIO_11_EQEP1_B);
    GPIO_setDirectionMode(11, GPIO_DIR_MODE_IN);
    GPIO_setPadConfig(11, GPIO_PIN_TYPE_STD);
    GPIO_setQualificationMode(11, GPIO_QUAL_6SAMPLE);
    GPIO_setQualificationPeriod(11, 2);

    // GPIO13->ENC_I
    GPIO_setPinConfig(GPIO_13_EQEP1_INDEX);
    GPIO_setDirectionMode(13, GPIO_DIR_MODE_IN);
    GPIO_setPadConfig(13, GPIO_PIN_TYPE_STD);
    GPIO_setQualificationMode(13, GPIO_QUAL_6SAMPLE);
    GPIO_setQualificationPeriod(13, 2);

    This issue happens when the user has high-speed demand or high-throttle demand.

    Additionally, we have ABZ+PWM feedback in this motor, our competitor used PWM as feedback at starting low speed and switched to ABZ at high speed.

    Is there any way to implement the same method in the UMC Lab?

    Regards

    C.Prabhakaran

  • Is there any way to implement the same method in the UMC Lab?

    There is no example codes in UMC lab that only uses ABZ for both low and high speed. You have to design the code to use this method.

    You may have to check if there is any wrong signal from encoder when running the motor at high speed.

    Or you can try ro run the motor with sensorless FAST to see if the motor runs well at this speed. And compare the angle from the encoder and the FAST estimator under this test condition.

  • Hi,

    Thanks for your extended support,

    Could you please specify which angle variable the encoder needs to be compared with the Fast Estimator?

    and Uncontrolled speed does not occur while the motor is running; it happens only at the start.

    If we start the motor, it can initially go to an uncontrolled speed, but this occurs only in rare cases, not every time.

    Note: Uncontrolled speed occurs only at startup when the motor shaft rotates in reverse for a while(just half rotation in reverse) and then moves forward.

    If the motor shaft rotates forward from the beginning, there will be no issues. The reverse rotation followed by forward movement is what causes the uncontrolled speed problem

    Thank you 

    Regards 

    C.Prabhakaran

  • Could you please specify which angle variable the encoder needs to be compared with the Fast Estimator?

    Speed and angle. It's better to use a DAC to monitor these variables in real time. And you can set a trigger to capture the issue with oscilloscope.

    If we start the motor, it can initially go to an uncontrolled speed, but this occurs only in rare cases, not every time.

    You may try to implement the alignment and do the offset calibration every startup if possible.

  • Hello ,

    Thanks for your reply.

    Speed and angle. It's better to use a DAC to monitor these variables in real time. And you can set a trigger to capture the issue with oscilloscope

    Speed and Angle to be measure through DAC? TI DAC board able to connect in our custom board?

    We implemented below part of code to avoid uncontrolled speed issues. but ,it creates initial jerk which is huge .

    You may try to implement the alignment and do the offset calibration every startup if possible.

    Implement alignment at every start? 

    Could you please explain in detail where to add those?

    Offset re-calibration already enabled in the code.

    Thanks

    Regards

    C.Prabhakaran

  • We implemented below part of code to avoid uncontrolled speed issues. but ,it creates initial jerk which is huge .

    I don't fully understand why do you implement the code to avoid the untrolled speed. As mentioned above, you need to check why is there uncontrolled speed? Do you try to run the sensorless-FOC to check if there is the same issue?

    Implement alignment at every start? 

    Could you please explain in detail where to add those?

    You can reset the encoder configuration at every start.

  • Hello,

    Thanks for your response.

    I don't fully understand why do you implement the code to avoid the untrolled speed. As mentioned above, you need to check why is there uncontrolled speed? Do you try to run the sensorless-FOC to check if there is the same issue?

    This code is just to understand whether the issues repeating or not and do further analysis.

    You can reset the encoder configuration at every start.

    Implemented at the start after the 'run identify flag' is enabled. During uncontrolled speed issues, there are speed demands in the forward direction, but the motor shaft slightly rotates in reverse and reaches uncontrolled speed. (See attached video.) only at uncontrolled speed conditions.

    If the motor operates under normal conditions without issues, the speed demand is in the forward direction, and the motor shaft also starts to rotate forward direction(attached video).

    Sometimes, the speed demand is in the forward direction, but the motor starts to bounce in reverse and goes to uncontrolled speed.

    Thank you

    Regards

    C.Prabhakaran

  • Implemented at the start after the 'run identify flag' is enabled. During uncontrolled speed issues, there are speed demands in the forward direction, but the motor shaft slightly rotates in reverse and reaches uncontrolled speed. (See attached video.) only at uncontrolled speed conditions.

    Is there the same issue if you run the motor in the first time when power on the board? Is the unsontrolled speed state only appeared at the offset is not correct or the other conditions? 

    Does the encoder have A/B?Z singals or only A/B signals?

  • Hello ,

    Thanks for your reply.

    Is there the same issue if you run the motor in the first time when power on the board? Is the unsontrolled speed state only appeared at the offset is not correct or the other conditions? 

    Yes, issues only occur at the start of the motor. If we perform a power reset every time and check, we face the issues only during that time. Moreover, these issues occur rarely and not repeatedly. If we run the motor for a while, perform a power cycle, and try again, the uncontrolled speed issues may occur, but only in rare cases.

    These issues happen after setting the runIdentifyFlag to 1 with a default set_speed value.

    Does the encoder have A/B?Z singals or only A/B signals?

    it has ABZ+PWM Signal.

    Thank you.

    Regards

    CP.Prabhakaran

  • You may have to make a few modification on the speed and angle measurement codes for the encoder. The issue could be the initial position detection of the rotor from the encoder. 

    Do you have any other encoders as shown in the example lab?

    If we perform a power reset every time and check, we face the issues only during that time. Moreover, these issues occur rarely and not repeatedly. If we run the motor for a while, perform a power cycle, and try again, the uncontrolled speed issues may occur, but only in rare cases.

    Is there still an issue if you reset the code or power on the board?