cur_mod.c
来自「F2812感应电机矢量控制程序」· C语言 代码 · 共 38 行
C
38 行
/*=====================================================================================
File name: CUR_MOD.C (IQ version)
Originator: Digital Control Systems Group
Texas Instruments
Description: Current Model for Indirect Field Oriented Control of Induction Motor
=====================================================================================
History:
-------------------------------------------------------------------------------------
04-15-2005 Version 3.20
-------------------------------------------------------------------------------------*/
#include "IQmathLib.h" // Include header for IQmath library
// Don't forget to set a proper GLOBAL_Q in "IQmathLib.h" file
#include "dmctype.h"
#include "cur_mod.h"
void cur_mod_calc(CURMOD *v)
{
_iq Wslip, We;
v->IMDs += _IQmpy(v->Kr,(v->IDs - v->IMDs));
Wslip = _IQdiv(_IQmpy(v->Kt,v->IQs),v->IMDs);
We = v->Wr + Wslip;
v->Theta += _IQmpy(v->K,We);
if (v->Theta > _IQ(1))
v->Theta -= _IQ(1);
else if (v->Theta < _IQ(0))
v->Theta += _IQ(1);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?