资源简介
详细的永磁同步电机滑膜观测器的文献型解释,以及已经实现过的滑膜观测器的详细源代码。
代码片段和文件信息
/*=====================================================================================
File name: SMOPOS.C (IQ version)
Originator: Digital Control Systems Group
Texas Instruments
Description: Rotor Position Estimator of PMSM using Sliding-Mode Theory
=====================================================================================
History:
-------------------------------------------------------------------------------------
03-15-2003 Release Rev 1.0
-------------------------------------------------------------------------------------*/
#include “IQmathLib.h“ /* Include header for IQmath library */
/* Don‘t forget to set a proper GLOBAL_Q in “IQmathLib.h“ file */
#include “smopos.h“
#include
void smopos_calc(SMOPOS *v)
{
_iq E0;
E0 = _IQ(0.5);
/* Sliding mode current observer */
v->isalfae = _IQmpy(v->fsmoposv->isalfae) + _IQmpy(v->gsmopos(v->vsalfa-v->esalfa-v->zalfa));
v->isbetae = _IQmpy(v->fsmoposv->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->isalfaerrE0));
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->isbetaerrE0));
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(-esalfaesbeta) */
v->thetae = _IQatan2PU(-v->esalfav->esbeta);
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2927 2003-03-16 21:10 smopos.h
文件 213799 2013-08-15 12:46 smopos.pdf
文件 843 2003-03-28 23:51 smopos_const.c
文件 2143 2003-02-18 07:46 smopos_const.h
文件 2066 2003-03-30 23:28 smopos.c
- 上一篇:华为跳频通信讲座ppt
- 下一篇:Xwindow程序设计入门
评论
共有 条评论