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.

TMS570LS3137: Hercules Motorware Clarke Transformation

Part Number: TMS570LS3137
Other Parts Discussed in Thread: MOTORWARE,

Hello I'm trying to understand clarke.h library of Hercules Motorware. For understanding technical background of Clarke, i follow "Digital Motor Control Software Library: Target Independent Math Blocks v1.3.pdf" (for C2000). Here is the transformation formula in this pdf: 

But in Hercules motorware clarke.h line 139, Ibeta transformation does not multiply by sqrt(3).  What is the reason of this difference ?

By the way, in following forum post  and  mentions about this issue.

  • Hello,

    Yes, as Haixiao had confirmed, there needs to be a multiplication by 1/sqrt(3).

    Regards,
    Sunil
  • So is this a bug ?

    TMS570LS3137_sensored_speed_smo also uses hercules motorware clarke library and both scale factors (alpha_sf and beta_sf) are setted 1.0 in ctrl.c

     

    In clarke.h:

    
    
    inline void CLARKE_run_twoInput(CLARKE_Handle clarkeHandle,const MATH_vec2 *pInVec,MATH_vec2 *pOutVec)
    {
      CLARKE_Obj *clarke = (CLARKE_Obj *)clarkeHandle;
    
      float beta_sf = clarke->beta_sf;
    
    
      pOutVec->value[0] = pInVec->value[0];
    
      pOutVec->value[1] = ( pInVec->value[0] + (pInVec->value[1] * 2) ) * beta_sf;
    
      return;
    } // end of CLARKE_run_twoInput() function

    In ctrl.c:

     

    CLARKE_setNumSensors(ctrl->clarkeHandle, 2 );
    CLARKE_setScaleFactors(ctrl->clarkeHandle, (1.0), (1.0) );

     

  • Yes, it is a bug in the formula used to calculate Ibeta.

    Regards,
    Sunil