以下是SMO滑模观测器程序
void smopos_calc(SMOPOS *v) {_iq E0;E0 = _IQ(0.5); /* Sliding mode current observer */v->isalfae = _IQmpy(v->fsmopos,v->isalfae) + _IQmpy(v->gsmopos,(v->vsalfa-v->esalfa-v->zalfa));v->isbetae = _IQmpy(v->fsmopos,v->isbetae) + _IQmpy(v->gsmopos,(v->vsbeta-v->esbeta-v->zbeta)); /* Current errors */v->isalfaerr = v->isalfae - v->isalfa;v->isbetaerr = v->isbetae - v->isbeta; /* Sliding control calculator */if (labs(v->isalfaerr) < E0)v->zalfa = _IQmpy(v->kslide,_IQdiv(v->isalfaerr,E0));else if (v->isalfaerr >= E0)v->zalfa = v->kslide;else if (v->isalfaerr <= -E0)v->zalfa = -v->kslide;if (labs(v->isbetaerr) < E0)v->zbeta = _IQmpy(v->kslide,_IQdiv(v->isbetaerr,E0));else if (v->isbetaerr >= E0)v->zbeta = v->kslide;else if (v->isbetaerr <= -E0)v->zbeta = -v->kslide; /* Sliding control filter -> back EMF calculator */v->esalfa = v->esalfa + _IQmpy(v->kslf,(v->zalfa-v->esalfa));v->esbeta = v->esbeta + _IQmpy(v->kslf,(v->zbeta-v->esbeta)); /* Rotor angle calculator -> thetae = atan(-esalfa,esbeta) */v->thetae = _IQatan2PU(-v->esalfa,v->esbeta); }
PMSM3_2例程中,E0、v->kslide用的是标幺值,
如果用实际值,请问单位是什么?是A(安培)、V(伏特)么?
user4680001:
@ Eric Ma
以下是SMO滑模观测器程序
void smopos_calc(SMOPOS *v) {_iq E0;E0 = _IQ(0.5); /* Sliding mode current observer */v->isalfae = _IQmpy(v->fsmopos,v->isalfae) + _IQmpy(v->gsmopos,(v->vsalfa-v->esalfa-v->zalfa));v->isbetae = _IQmpy(v->fsmopos,v->isbetae) + _IQmpy(v->gsmopos,(v->vsbeta-v->esbeta-v->zbeta)); /* Current errors */v->isalfaerr = v->isalfae - v->isalfa;v->isbetaerr = v->isbetae - v->isbeta; /* Sliding control calculator */if (labs(v->isalfaerr) < E0)v->zalfa = _IQmpy(v->kslide,_IQdiv(v->isalfaerr,E0));else if (v->isalfaerr >= E0)v->zalfa = v->kslide;else if (v->isalfaerr <= -E0)v->zalfa = -v->kslide;if (labs(v->isbetaerr) < E0)v->zbeta = _IQmpy(v->kslide,_IQdiv(v->isbetaerr,E0));else if (v->isbetaerr >= E0)v->zbeta = v->kslide;else if (v->isbetaerr <= -E0)v->zbeta = -v->kslide; /* Sliding control filter -> back EMF calculator */v->esalfa = v->esalfa + _IQmpy(v->kslf,(v->zalfa-v->esalfa));v->esbeta = v->esbeta + _IQmpy(v->kslf,(v->zbeta-v->esbeta)); /* Rotor angle calculator -> thetae = atan(-esalfa,esbeta) */v->thetae = _IQatan2PU(-v->esalfa,v->esbeta); }
PMSM3_2例程中,E0、v->kslide用的是标幺值,
如果用实际值,请问单位是什么?是A(安培)、V(伏特)么?
user4680001:
@ Eric Ma ,求解释
以下是SMO滑模观测器程序
void smopos_calc(SMOPOS *v) {_iq E0;E0 = _IQ(0.5); /* Sliding mode current observer */v->isalfae = _IQmpy(v->fsmopos,v->isalfae) + _IQmpy(v->gsmopos,(v->vsalfa-v->esalfa-v->zalfa));v->isbetae = _IQmpy(v->fsmopos,v->isbetae) + _IQmpy(v->gsmopos,(v->vsbeta-v->esbeta-v->zbeta)); /* Current errors */v->isalfaerr = v->isalfae - v->isalfa;v->isbetaerr = v->isbetae - v->isbeta; /* Sliding control calculator */if (labs(v->isalfaerr) < E0)v->zalfa = _IQmpy(v->kslide,_IQdiv(v->isalfaerr,E0));else if (v->isalfaerr >= E0)v->zalfa = v->kslide;else if (v->isalfaerr <= -E0)v->zalfa = -v->kslide;if (labs(v->isbetaerr) < E0)v->zbeta = _IQmpy(v->kslide,_IQdiv(v->isbetaerr,E0));else if (v->isbetaerr >= E0)v->zbeta = v->kslide;else if (v->isbetaerr <= -E0)v->zbeta = -v->kslide; /* Sliding control filter -> back EMF calculator */v->esalfa = v->esalfa + _IQmpy(v->kslf,(v->zalfa-v->esalfa));v->esbeta = v->esbeta + _IQmpy(v->kslf,(v->zbeta-v->esbeta)); /* Rotor angle calculator -> thetae = atan(-esalfa,esbeta) */v->thetae = _IQatan2PU(-v->esalfa,v->esbeta); }
PMSM3_2例程中,E0、v->kslide用的是标幺值,
如果用实际值,请问单位是什么?是A(安培)、V(伏特)么?
user4680001:
请求懂专家帮忙解答。谢谢啦
以下是SMO滑模观测器程序
void smopos_calc(SMOPOS *v) {_iq E0;E0 = _IQ(0.5); /* Sliding mode current observer */v->isalfae = _IQmpy(v->fsmopos,v->isalfae) + _IQmpy(v->gsmopos,(v->vsalfa-v->esalfa-v->zalfa));v->isbetae = _IQmpy(v->fsmopos,v->isbetae) + _IQmpy(v->gsmopos,(v->vsbeta-v->esbeta-v->zbeta)); /* Current errors */v->isalfaerr = v->isalfae - v->isalfa;v->isbetaerr = v->isbetae - v->isbeta; /* Sliding control calculator */if (labs(v->isalfaerr) < E0)v->zalfa = _IQmpy(v->kslide,_IQdiv(v->isalfaerr,E0));else if (v->isalfaerr >= E0)v->zalfa = v->kslide;else if (v->isalfaerr <= -E0)v->zalfa = -v->kslide;if (labs(v->isbetaerr) < E0)v->zbeta = _IQmpy(v->kslide,_IQdiv(v->isbetaerr,E0));else if (v->isbetaerr >= E0)v->zbeta = v->kslide;else if (v->isbetaerr <= -E0)v->zbeta = -v->kslide; /* Sliding control filter -> back EMF calculator */v->esalfa = v->esalfa + _IQmpy(v->kslf,(v->zalfa-v->esalfa));v->esbeta = v->esbeta + _IQmpy(v->kslf,(v->zbeta-v->esbeta)); /* Rotor angle calculator -> thetae = atan(-esalfa,esbeta) */v->thetae = _IQatan2PU(-v->esalfa,v->esbeta); }
PMSM3_2例程中,E0、v->kslide用的是标幺值,
如果用实际值,请问单位是什么?是A(安培)、V(伏特)么?
user4680001:
请求懂专家帮忙解答。谢谢啦
以下是SMO滑模观测器程序
void smopos_calc(SMOPOS *v) {_iq E0;E0 = _IQ(0.5); /* Sliding mode current observer */v->isalfae = _IQmpy(v->fsmopos,v->isalfae) + _IQmpy(v->gsmopos,(v->vsalfa-v->esalfa-v->zalfa));v->isbetae = _IQmpy(v->fsmopos,v->isbetae) + _IQmpy(v->gsmopos,(v->vsbeta-v->esbeta-v->zbeta)); /* Current errors */v->isalfaerr = v->isalfae - v->isalfa;v->isbetaerr = v->isbetae - v->isbeta; /* Sliding control calculator */if (labs(v->isalfaerr) < E0)v->zalfa = _IQmpy(v->kslide,_IQdiv(v->isalfaerr,E0));else if (v->isalfaerr >= E0)v->zalfa = v->kslide;else if (v->isalfaerr <= -E0)v->zalfa = -v->kslide;if (labs(v->isbetaerr) < E0)v->zbeta = _IQmpy(v->kslide,_IQdiv(v->isbetaerr,E0));else if (v->isbetaerr >= E0)v->zbeta = v->kslide;else if (v->isbetaerr <= -E0)v->zbeta = -v->kslide; /* Sliding control filter -> back EMF calculator */v->esalfa = v->esalfa + _IQmpy(v->kslf,(v->zalfa-v->esalfa));v->esbeta = v->esbeta + _IQmpy(v->kslf,(v->zbeta-v->esbeta)); /* Rotor angle calculator -> thetae = atan(-esalfa,esbeta) */v->thetae = _IQatan2PU(-v->esalfa,v->esbeta); }
PMSM3_2例程中,E0、v->kslide用的是标幺值,
如果用实际值,请问单位是什么?是A(安培)、V(伏特)么?
user5007035:
没看过,不过想问下你用滑模观测器是来干什么用的,做无速度传感器控制吗?顺便顶下帖
以下是SMO滑模观测器程序
void smopos_calc(SMOPOS *v) {_iq E0;E0 = _IQ(0.5); /* Sliding mode current observer */v->isalfae = _IQmpy(v->fsmopos,v->isalfae) + _IQmpy(v->gsmopos,(v->vsalfa-v->esalfa-v->zalfa));v->isbetae = _IQmpy(v->fsmopos,v->isbetae) + _IQmpy(v->gsmopos,(v->vsbeta-v->esbeta-v->zbeta)); /* Current errors */v->isalfaerr = v->isalfae - v->isalfa;v->isbetaerr = v->isbetae - v->isbeta; /* Sliding control calculator */if (labs(v->isalfaerr) < E0)v->zalfa = _IQmpy(v->kslide,_IQdiv(v->isalfaerr,E0));else if (v->isalfaerr >= E0)v->zalfa = v->kslide;else if (v->isalfaerr <= -E0)v->zalfa = -v->kslide;if (labs(v->isbetaerr) < E0)v->zbeta = _IQmpy(v->kslide,_IQdiv(v->isbetaerr,E0));else if (v->isbetaerr >= E0)v->zbeta = v->kslide;else if (v->isbetaerr <= -E0)v->zbeta = -v->kslide; /* Sliding control filter -> back EMF calculator */v->esalfa = v->esalfa + _IQmpy(v->kslf,(v->zalfa-v->esalfa));v->esbeta = v->esbeta + _IQmpy(v->kslf,(v->zbeta-v->esbeta)); /* Rotor angle calculator -> thetae = atan(-esalfa,esbeta) */v->thetae = _IQatan2PU(-v->esalfa,v->esbeta); }
PMSM3_2例程中,E0、v->kslide用的是标幺值,
如果用实际值,请问单位是什么?是A(安培)、V(伏特)么?
user4680001:
回复 user5007035:
做无速度传感器控制