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.

【急】Ta的输出波形为何与斜坡函数的输出rg1.Out波形不一致!



 所有基本是参考TI例程的,可输出的结果不一致?求解答。。谢谢

#define SVGENDQ_MACRO(v)              \
 v.tmp1= v.Ubeta;               \
 v.tmp2= _IQdiv2(v.Ubeta) + (_IQmpy(_IQ(0.866),v.Ualpha));     \
    v.tmp3= v.tmp2 - v.tmp1;             \
                    \
 v.VecSector=3;                \
 v.VecSector=(v.tmp2> 0)?( v.VecSector-1):v.VecSector;      \
 v.VecSector=(v.tmp3> 0)?( v.VecSector-1):v.VecSector;      \
 v.VecSector=(v.tmp1< 0)?(7-v.VecSector) :v.VecSector;      \
                    \
 if     (v.VecSector==1 || v.VecSector==4)                                   \
      {     v.Ta= v.tmp2;               \
        v.Tb= v.tmp1-v.tmp3;             \
        v.Tc=-v.tmp2;              \
      }                      \
                       \
    else if(v.VecSector==2 || v.VecSector==5)                                   \
      {     v.Ta= v.tmp3+v.tmp2;             \
        v.Tb= v.tmp1;               \
        v.Tc=-v.tmp1;              \
      }                      \
                       \
    else                                                                        \
      {     v.Ta= v.tmp3;               \
        v.Tb=-v.tmp3;               \
        v.Tc=-(v.tmp1+v.tmp2);            \
      }

 

  • qingfa li,

    Ta是PMSM FOC控制的PWM模块的比较值输入中的一个,是马鞍形输出,如图没错;

    rg1.out是斜坡函数的输出,是呈斜坡状,图形也应该没错;

    你的测试是level几?你是如何理解它们应该一样的?