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.

INSTASPIN-BLDC: SPINTAC POSMOVE Actual Acceleration/Velocity Limits from Profile Generation

Part Number: INSTASPIN-BLDC

Hi,

I’m doing some motor testing based off InstaSpin lab13e with a sensored BLDC motor and DRV8301-HC eval board.

I’ve successfully completed the inertia identification, tuning and the position control is stable.  However, when I try to increase the acceleration limits for my position move I seem to be running into limits that I don’t understand where they are being set. Regardless of how I set the curve type, jerk and acceleration limits my profile is limited to 2 krpm/sec.

For example:

-          I have set the gMotorVars. PosStepInt_MRev to 500 revs to allow enough time to accelerate, reach the max velocity limit and then decelerate back to zero speed. I have set the CurveType to Trapezoidal to avoid any jerk limitations.

-          I then execute the following code to kick off the move:

STPOSMOVE_setCurveType(stObj->posMoveHandle, gMotorVars.SpinTAC.PosMoveCurveType);

STPOSMOVE_setProfileType(stObj->posMoveHandle, ST_POS_MOVE_POS_TYPE);

STPOSMOVE_setPositionStep_mrev(stObj->posMoveHandle, gMotorVars.PosStepInt_MRev, gMotorVars.PosStepFrac_MRev);

STPOSMOVE_setVelocityLimit(stObj->posMoveHandle, _IQmpy(gMotorVars.MaxVel_krpm, _IQ(ST_SPEED_PU_PER_KRPM)));

STPOSMOVE_setAccelerationLimit(stObj->posMoveHandle, _IQmpy(gMotorVars.MaxAccel_krpmps, _IQ(ST_SPEED_PU_PER_KRPM)));

STPOSMOVE_setDecelerationLimit(stObj->posMoveHandle, _IQmpy(gMotorVars.MaxDecel_krpmps, _IQ(ST_SPEED_PU_PER_KRPM)));

STPOSMOVE_setJerkLimit(stObj->posMoveHandle, _IQ20mpy(gMotorVars.MaxJrk_krpmps2, _IQ20(ST_SPEED_PU_PER_KRPM)));

// Enable the SpinTAC Position Profile Generator

STPOSMOVE_setEnable(stObj->posMoveHandle, true);

-   If I add a breakpoint before the movement starts I can confirm that the correct values get loaded to the STPOSMOVE config

CurveType = ST_MOVE_CUR_TRAP

AccLim = 50 krpmps => 5.55 [pu]

VelLim = 3.0 krpm => 0.333 [pu]

DecLim = 0.2 krpmps => 0.0222 [pu]

JerkLim = 5.0 krpmps2 => 0.55 [pu]

However, if I then look at the actual limits (ie - STPOSMOVE_getActualAcceleration() I get the following

ActualVelLimits = .111 [pu] => 1 krpm

ActualAccLimit = .221 [pu] => 1.99 krpmps

ActualDecLim = 0.022 [pu] => 0.2 krpmps

ActualJrkLim = 0 [pu] = 0 krpmps2

What causes ‘AcualVelLimits’ and ‘ActualAccLimit’ to be limited to these values? When the move executes I get the acceleration and time the profile generator expects and I’m not seeing any limits due to max current, max speed, etc.

I’ve repeated the same type of test with ProfileType set to velocity and I run into the acceleration limit regardless of what I set it to.

Is there other parameters that influence what actual limits are used when creating the profile or am I missing something?

Thanks

Adam

  • You might have a look at below 3 functions, and then change the setting parameters in user. h and spintacposition.h.

    // setup the SpinTAC Components
    ST_setupPosConv(stHandle);
    ST_setupPosCtl(stHandle);
    ST_setupPosMove(stHandle);

    You might change the USER_IQ_FULL_SCALE_FREQ_Hz in user.h or the limitation in ST_setupPosMove().

    STPOSMOVE_setAccelerationLimit(obj->posMoveHandle, _IQ24(0.4));
    STPOSMOVE_setDecelerationLimit(obj->posMoveHandle, _IQ24(0.4));
    STPOSMOVE_setJerkLimit(obj->posMoveHandle, _IQ20(1.0));
  • Just wanted to check in and see if there is any update from your side, I haven’t heard from you for a week, so I’m assuming you were able to resolve your issue. Please let me know if you have any questions. We would like to close this thread if no any further questions. Thanks.
  • Hi Yanming,

    I checked out what you suggested:

    I set the following in ST_setupPosMove():

    STPOSMOVE_setAccelerationLimit(obj->posMoveHandle, _IQ24(100.0));
    STPOSMOVE_setDecelerationLimit(obj->posMoveHandle, _IQ24(0.4));
    STPOSMOVE_setJerkLimit(obj->posMoveHandle, _IQ20(1.0));

    and my actual acceleration is still being limited to .221 [pu]

    ActualAccLimit = .221 [pu] => 1.99 krpmps

    I then tried also increasing USER_IQ_FULL_SCALE_FREQ_Hz from 300 to 800.  I still ran into the same limit once I calculated the PU back to acceleration (1.99 krpmps).

    Any other ideas?

    Thanks

    Adam