TI中文支持网
TI专业的中文技术问题搜集分享网站

TMS320F28034: 变频器 如何在算法上实现电机反转?

Part Number:TMS320F28034Other Parts Discussed in Thread:CONTROLSUITE

例程  E:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.1\HVACI_Scalar          

#define VHZ_PROF_MACRO(v) \
/* Take absolute frequency to allow the operation of both rotational directions */ \
v.AbsFreq = labs(v.Freq); \
\
if (v.AbsFreq <= v.LowFreq) \
/* Compute output voltage in profile #1 */ \
v.VoltOut = v.VoltMin; \
else if ((v.AbsFreq > v.LowFreq)&&(v.AbsFreq <= v.HighFreq)) \
{ \
/* Compute slope of V/f profile */ \
v.VfSlope = _IQdiv((v.VoltMax – v.VoltMin),(v.HighFreq – v.LowFreq)); \
/* Compute output voltage in profile #2 */ \
v.VoltOut = ( v.VoltMin + _IQmpy(v.VfSlope,(v.AbsFreq-v.LowFreq))); \
} \
else if ((v.AbsFreq > v.HighFreq)&&(v.AbsFreq < v.FreqMax)) \
/* Compute output voltage in profile #3 */ \
v.VoltOut = v.VoltMax;

#endif // __VHZ_PROF_H__

#define PI_THIRD _IQ(1.04719755119660) /* This is 60 degree */

#define SVGENMF_MACRO(v) \
/* Normalise the freq input to appropriate step angle */ \
/* Here, 1 pu. = 60 degree */ \
v.StepAngle = _IQmpy(v.Freq,v.FreqMax); \
/* Calculate new angle alpha */ \
v.EntryOld = v.NewEntry; \
v.Alpha = v.Alpha + v.StepAngle; \
if (v.Alpha >= _IQ(1.0)) \
v.Alpha = v.Alpha-_IQ(1.0); \
v.NewEntry = v.Alpha; \
v.dy = _IQsin(_IQmpy(v.NewEntry,PI_THIRD)); /* v.dy = sin(NewEntry) */ \
v.dx = _IQsin(PI_THIRD-_IQmpy(v.NewEntry,PI_THIRD)); /* v.dx = sin(60-NewEntry) */ \
/* Determine which sector */ \
if (v.NewEntry-v.EntryOld<0) \
{ \
if (v.SectorPointer==5) \
v.SectorPointer = 0; \
else \
v.SectorPointer = v.SectorPointer + 1; \
} \
if (v.SectorPointer==0) /* Sector 1 calculations – a,b,c -. a,b,c*/ \
{ \
v.Ta = (_IQ(1.0)-v.dx-v.dy)>>1; \
v.Tb = v.Ta + v.dx; \
v.Tc = _IQ(1.0) – v.Ta; \
} \
else if (v.SectorPointer==1) /* Sector 2 calculations – a,b,c -. b,a,c & v.dx <-. v.dy*/ \
{ \
v.Tb = (_IQ(1.0)-v.dx-v.dy)>>1; \
v.Ta = v.Tb + v.dy; \
v.Tc = _IQ(1.0) – v.Tb; \
} \
else if (v.SectorPointer==2) /* Sector 3 calculations – a,b,c -. b,c,a */ \
{ \
v.Tb = (_IQ(1.0)-v.dx-v.dy)>>1; \
v.Tc = v.Tb + v.dx; \
v.Ta = _IQ(1.0) – v.Tb; \
} \
else if (v.SectorPointer==3) /* Sector 4 calculations – a,b,c -. c,b,a & v.dx <-. v.dy*/ \
{ \
v.Tc = (_IQ(1.0)-v.dx-v.dy)>>1; \
v.Tb = v.Tc + v.dy; \
v.Ta = _IQ(1.0) – v.Tc; \
} \
else if (v.SectorPointer==4) /* Sector 5 calculations – a,b,c -. c,a,b */ \
{ \
v.Tc = (_IQ(1.0)-v.dx-v.dy)>>1; \
v.Ta = v.Tc + v.dx; \
v.Tb = _IQ(1.0) – v.Tc; \
} \
else if (v.SectorPointer==5) /* Sector 6 calculations – a,b,c -. a,c,b & v.dx <-. v.dy*/ \
{ \
v.Ta = (_IQ(1.0)-v.dx-v.dy)>>1; \
v.Tc = v.Ta + v.dy; \
v.Tb = _IQ(1.0) – v.Ta; \
} \
/* Convert the unsigned GLOBAL_Q format (ranged (0,1)) . signed GLOBAL_Q format (ranged (-1,1)) */ \
/* Then, multiply with a gain and add an offset. */ \
v.Ta = (v.Ta-_IQ(0.5))<<1; \
v.Ta = _IQmpy(v.Gain,v.Ta) + v.Offset; \
\
v.Tb = (v.Tb-_IQ(0.5))<<1; \
v.Tb = _IQmpy(v.Gain,v.Tb) + v.Offset; \
\
v.Tc = (v.Tc-_IQ(0.5))<<1; \
v.Tc = _IQmpy(v.Gain,v.Tc) + v.Offset; \

#endif // __SVGEN_MF_H__

有2个宏定义   ,  怎样用算法让电机 反转,  不用调相线

Green Deng:

你好,如果是调试的时候想测试反转的话只需要给速度参考SpeedRef一个负值,就可以实现反转了

赞(0)
未经允许不得转载:TI中文支持网 » TMS320F28034: 变频器 如何在算法上实现电机反转?
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1