- 积分
- 17
- 回帖
- 0
- 西莫币
-
- 贡献
-
- 威望
-
- 存款
-
- 阅读权限
- 5
- 最后登录
- 1970-1-1
该用户从未签到
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
请问各位,我用开环SVPWM产生输出的电压频率怎么有跳动...
为什么载波频率和运行频率整除时就不跳动了..
void svgenmf_calc(SVGENMF *v)
{
_iq EntryOld,dx,dy;
_iq T = _IQ(1.0);
// Normalise the freq input to appropriate step angle
// Here, 1 pu. = 60 degree
StepAngle = _IQmpy(v->Freq,v->FreqMax);
// Calculate new angle alpha
EntryOld = v->NewEntry;
v->Alpha = v->Alpha + pygd;//计算偏移角度
if (v->Alpha >= _IQ(1.0))
{
v->Alpha = v->Alpha-_IQ(1.0);
}
v->NewEntry = v->Alpha;
v->t2 = _IQmpy( _IQsin(_IQmpy(v->NewEntry,PI_THIRD)),hubbuf); // t2 = sin(NewEntry)计算矢量作用时间
v->t1 = _IQmpy(_IQsin(PI_THIRD-_IQmpy(v->NewEntry,PI_THIRD)),hubbuf); // t1= sin(60-NewEntry)
if((v->t1 + v->t2) > _IQ(0.9999))//0.9999防止过饱和
{
v->t1 = _IQdiv(v->t1,(v->t1 + v->t2));
v->t2 = _IQdiv(v->t2,(v->t1 + v->t2));
}
dx=v->t1;
dy=v->t2;
// Determine which sector
if (v->NewEntry-EntryOld<0)//计算扇区
{
if (v->SectorPointer==5)
v->SectorPointer = 0;
else
v->SectorPointer = v->SectorPointer + 1;
} |
|