请问,我照着HVACIsensorless例程做,根据三相逆变器直流母线电压Vdc和三个开关值Ta,Tb,Tc估测输入电机的三相电压,波形如图所示,为什么不是正弦波?求解答
volt1.DcBusVolt= _IQ22(340);
volt1.MfuncV1 = svgendtc1.Ta;
volt1.MfuncV2 = svgendtc1.Tb;
volt1.MfuncV3 = svgendtc1.Tc;
PHASEVOLT_MACRO(volt1)
#define PHASEVOLT_MACRO(v) \
\
\
/* Scale the incomming Modulation functions with the DC bus voltage value*/ \
/* and calculate the 3 Phase voltages */ \
v.tem = _IQmpy(v.DcBusVolt,ONE_THIRD); \
v.VphaseA = _IQmpy(v.tem,(_IQmpy2(v.MfuncV1)-v.MfuncV2-v.MfuncV3)); \
v.VphaseB = _IQmpy(v.tem,(_IQmpy2(v.MfuncV2)-v.MfuncV1-v.MfuncV3)); \
\
if (v.OutOfPhase==0) \
{ v.VphaseA=-v.VphaseA; \
v.VphaseB=-v.VphaseB; \
} \
/* Voltage transformation (a,b,c) -> (Alpha,Beta) */ \
v.Valpha = v.VphaseA; \
v.Vbeta = _IQmpy((v.VphaseA + _IQmpy2(v.VphaseB)),INV_SQRT3);
#endif // __VOLT_CAL_H__
ipark1.Ds = VdTesting;//VdTesting 为常值
ipark1.Qs = VqTesting;//VqTesting为常值
ipark1.Sine =_IQsinPU(rg1.Out);
ipark1.Cosine=_IQcosPU(rg1.Out);
IPARK_MACRO(ipark1)
svgen1.Ualpha = ipark1.Alpha;
svgen1.Ubeta = ipark1.Beta;
SVGENDQ_MACRO(svgen1)
#define SVGENDQ_MACRO(v) \
v.tm1= v.Ubeta; \
v.tm2= _IQdiv2(v.Ubeta) + (_IQmpy(_IQ(0.866),v.Ualpha)); \
v.tm3= v.tm2 – v.tm1; \
\
v.VecSector=3; \
v.VecSector=(v.tm2> 0)?( v.VecSector-1):v.VecSector; \
v.VecSector=(v.tm3> 0)?( v.VecSector-1):v.VecSector; \
v.VecSector=(v.tm1< 0)?(7-v.VecSector) :v.VecSector; \
Ta,Tb,Tc为对应扇区的开关值0或1