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: where trajectory setup be executed

Part Number: TMS320F28069M


hello,

i just find the function like,


// set the default the speed trajectory module parameters
TRAJ_setIntValue(obj->trajHandle_spd,_IQ(0.0));
TRAJ_setTargetValue(obj->trajHandle_spd,_IQ(0.0));
TRAJ_setMinValue(obj->trajHandle_spd,_IQ(0.0));
TRAJ_setMaxValue(obj->trajHandle_spd,_IQ(0.0));
TRAJ_setMaxDelta(obj->trajHandle_spd,_IQ(0.0));

been called in CTRL_setParams().

but when system start up, the trajHandle were update.

could I find the location of the actual assignment to the parameter and the formula based on it?

  • The trajHandle_spd was updated in CTRL_setup() which call CTRL_runTraj(), the target value is the speed reference, and the maxdelta is the acceleration. Actually, the traj like a ramp control to increase/decrease the control speed to the target speed.
  • hello,

    Thank you for your attention.

    but i need to know how maxdelta  are calculated  / An accurate formula.

    because of my current sensor was 200A, it not allow by IQ24.

    so i change USER_IQ_FULL_SCALE_CURRENT_A = 100A

    and i also recal the USER_MOTOR_RES_EST_CURRENT \ 

    USER_MOTOR_MAX_CURRENT \

    USER_SYSTEM_INERTIA\

    USER_SYSTEM_FRICTION

    for example,  USER_MOTOR_MAX_CURRENT  = 160A --->theoretical value

         USER_MOTOR_MAX_CURRENT  = 80A   --->actual use in user.h 

    So I need to figure out how the parameters of the trajectory system are calculated, especially the calculation of maxdelta.

  • hello,

    is there any new progress on my question?

  • Please refer to traj.c and traj.h which have the define about trajectory object. The max delta is set in InstaSPIN library depends on USER_MAX_ACCEL_Hzps for the acceleration of speed, and USER_MOTOR_RES_EST_CURRENT_A for Id which is only used for motor parameters identification.