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.

TMS320F28069F: [TMS320F28069F] How to bypass the traj_spd module?

Part Number: TMS320F28069F
Other Parts Discussed in Thread: CONTROLSUITE

Hello! I'm trying to debug my own speed controller, and  I would like to understand a couple of things.

1, The spd_ref was updated in CTRL_setup() which call CTRL_runTraj(), the target value is the speed reference?Am i right?

2, How can i bypass the traj ramp module which generate the actual speed reference of speed pi controller?

3,

// when appropriate, run the PID speed controller
if(CTRL_doSpeedCtrl(handle))
{
_iq refValue = TRAJ_getIntValue(obj->trajHandle_spd); //////////////////////////////////

//! \return    The mechanical frequency, pu
_iq fbackValue = EST_getFm_pu(obj->estHandle);

My question is :  What's the relationship between krmp and the mechanical frequency pu?

4,

//! \brief Sets the output speed reference value in the controller
//! \param[in] handle The controller (CTRL) handle
//! \param[in] speed_ref_pu The output speed reference value, pu
static inline void CTRL_setSpeed_ref_pu(CTRL_Handle handle,const _iq speed_ref_pu)
{
CTRL_Obj *obj = (CTRL_Obj *)handle;

obj->speed_ref_pu = speed_ref_pu;

return;
} // end of CTRL_setSpeed_ref_pu() function

Does speed _ref_pu mean the mechanical frequency pu?

Thanks a lot !

  • Hi, just want to let you know I'm in receipt of your question and will be working to provide an answer soon

    Sean
  • 1) Correct, CTRL_runTraj() updates the speed trajectory

    2) If you investigate lab11a, the controller module has been mostly taken out of the mainISR. The EST_run() call expects the speed trajectory value as the 5th parameter. If you don't want to use the speed trajectory module, you can instead insert another value in place of this function parameter. The API only expects and _iq format value for the speed_ref_pu

    3) The mechanical frequency is given in kHz. The speed in kRPM can be obtained by multiplying the mechanical frequency in kHz with the kHz-to-kRPM scale factor. The scale factor is given by 60/# pole pairs. The mechanical frequency in kHz is calculated as EST_getFm_pu()*(USER_IQ_FULL_SCALE_FREQ_Hz/1000). Please see the brief for the EST_getFm_pu() API in est.h for more information

    4) Yes that is correct

    Sean
  • Thanks for your answer, I'll  try it.

    Another question:I want to save the data being read by the ADC for a few seconds at the same frequency of the data acquisition to my PC, what's the 

    recommended practice?

    Thanks a lot !

  • I'm not sure I understand your question, are you trying to decimate the ADC rate to match the rate that your PC is also acquiring data? Are you trying to store in a buffer and do a mass data dump?

    Sean
  • Yes, I'm trying to store the idq or speed data in a buffer and do a mass data dump (in .txt or .csv format). What should I do? 

    Thanks!

  • You could use SCI to send the data to the PC through the FTDI USB UART like is shown in the ControlSUITE SCI echoback and USB examples

    Sean