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.

TMS320F28335: 对比SVGEN_DQ.H与SVGEN.H

Part Number: TMS320F28335
Other Parts Discussed in Thread: CONTROLSUITE

看到论坛里以前有人问过 4.3库里面SVGEN.H原理,这个宏函数是做了优化的SVPWM,我和之前的旧版本SVPWM做了对比

可以看出,SVGEN_DQ.H与SVGEN.H计算出的Ta、Tb、Tc是符号相反的

如果PWM波设置为高有效,AQCTLA_INIT_STATE 配置为 CAD_SET + CAU_CLEAR

比较寄存器赋值方式如下(见:\ti\controlSUITE\libs\app_libs\motor_control\drivers\f2833x_v2.0\f2833xpwm.h):

#define PWM_MACRO(ch1,ch2,ch3,v) \
\
/* Mfuncx range is (-1,1) */ \
/* The code below changes PeriodMax*Mfuncx range .... */ \
/* from (-PeriodMax,PeriodMax) to (0,PeriodMax) where HalfPerMax=PeriodMax/2 */ \
\
(*ePWM[ch1]).CMPA.half.CMPA = _IQmpy(v.HalfPerMax,v.MfuncC1)+ v.HalfPerMax; \
(*ePWM[ch2]).CMPA.half.CMPA = _IQmpy(v.HalfPerMax,v.MfuncC2)+ v.HalfPerMax; \
(*ePWM[ch3]).CMPA.half.CMPA = _IQmpy(v.HalfPerMax,v.MfuncC3)+ v.HalfPerMax; \

当工程中使用SVGEN.H时,可以直接使用SV模块计算出的Ta、Tb、Tc

当工程中使用老版本的SVGEN_DQ.H时,SV模块中计算出的Ta、Tb、Tc需要分别取反后再作为参数赋值给PWM单元