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.

TMS320F28069M: Different between SPINTAC St-Curve and trapezoidal movement accuracy

Part Number: TMS320F28069M


Hello,

I setup lab13C for running the system for moving between 2 points about 4mm. it seem a different position movement between st-curve and Trapezoidal, I checked the encoder and seem during Trapezoidal movement encoder count less than st-curve. 
How it possible to make both method start stop as the same position? 
I just change below side 


// Establish the Velocity, Acceleration, Deceleration, and Jerk Maximums
velMax = _IQ24(USER_MOTOR_MAX_SPEED_KRPM * ST_SPEED_PU_PER_KRPM);
accMax = _IQ24(10.0);
jrkMax = _IQ20(62.5);

// Configure SpinTAC Position Plan: Sample Time, LoopENB
STPOSPLAN_setCfg(stObj->posPlanHandle, _IQ(ST_SAMPLE_TIME), false);
// Configure halt state: PosStep[MRev], PosStepFrac[MRev], VelEnd, AccMax, JrkMax, Timer
STPOSPLAN_setCfgHaltState(stObj->posPlanHandle, 0, 0, velMax, accMax, jrkMax, 1000L);

//Example: STPOSPLAN_addCfgState(handle, PosStep[MRev], PosStepFrac[MRev], StateTimer[ticks]);
STPOSPLAN_addCfgState(stObj->posPlanHandle, 0, 0, 0L); // StateIdx0: A
STPOSPLAN_addCfgState(stObj->posPlanHandle, 0, _IQ24(0.2), 20L); // StateIdx1: B 12mm _IQ24(0.584)
STPOSPLAN_addCfgState(stObj->posPlanHandle, 0, _IQ24(-0.2), 20L); // StateIdx2: C

//Example: STPOSPLAN_addCfgTran(handle, FromState, ToState, CondOption, CondIdx1, CondiIdx2, VelLim[pups], AccLim[pups2], DecLim[pups2], JrkLim[pups3]);
// NOTE: The deceleration limit must be set between the following bounds [acceleration limit, 10*acceleration limit]
STPOSPLAN_addCfgTran(stObj->posPlanHandle, STATE_A, STATE_B, ST_COND_NC, 0, 0, _IQ(0.3 * ST_SPEED_PU_PER_KRPM), _IQ24(11), _IQ24(11), _IQ24(5)); // From StateA to StateB
STPOSPLAN_addCfgTran(stObj->posPlanHandle, STATE_B, STATE_C, ST_COND_NC, 0, 0, _IQ(0.6 * ST_SPEED_PU_PER_KRPM), _IQ24(7), _IQ24(7), _IQ24(5)); // From StateB to StateC
STPOSPLAN_addCfgTran(stObj->posPlanHandle, STATE_C, STATE_B, ST_COND_NC, 0, 0, _IQ(0.6 * ST_SPEED_PU_PER_KRPM), _IQ24(7), _IQ24(7), _IQ24(5)); // From StateC to StateB
}

is the trapezoidal less accurate than st-curve? is not both movement method count same amount of encoder counter to move?

I can command the motor for 4mm movement and do correctly, but seem there is little different between ST-Curve and Trapezoidal move curve type ( Trapezoidal move less than 4mm)

Best

Reza

 

  • is the trapezoidal less accurate than st-curve? is not both movement method count same amount of encoder counter to move?

    Different trajectory plan. You may take a look at the Chapter 12 InstaSPIN-MOTIONTm Controllers and Chapter 13 Trajectory Planning in InstaSPIN-FOC and InstaSPIN-MOTION User's Guide (https://www.ti.com/lit/spruhj1) that are all the information we can share with you.

  • Thank you, Any chance that I can see the encoder counter value at my debug window?

    I used Positionerror_mrev as reference error and get 0.012 q24 rotation error on 0.2 rotaion for 4mm movement, that mean 0.24mm error on movement?

    I setup the spinTac gain parameter to 100 to make the error small as possible, any other way can help to boosting the accuracy? Increasing the encoder ppr can help spinTac trapeziodal movement to become more accurate? Motor rpm is aboug 1200.

    single command movement with spinTac show almost 0 on positionerror_mrv.should I move from spinTac and make my own motion profile?


    Thank you.

  • hank you, Any chance that I can see the encoder counter value at my debug window

    You can read the count value in EQEP register.

    I setup the spinTac gain parameter to 100 to make the error small as possible, any other way can help to boosting the accuracy? Increasing the encoder ppr can help spinTac trapeziodal movement to become more accurate? Motor rpm is aboug 1200.

    That depends on the requirement of your system. Please take a look at the InstaSPIN User's Guide that has the relayed guidance to your questions.