matlab_23550/Inu/Src2/N12_VectorControl/alphabeta_to_dq.c

25 lines
485 B
C
Raw Normal View History

2024-12-27 10:50:32 +03:00
#include "IQmathLib.h" // Include header for IQmath library
#include "alphabeta_to_dq.h"
/////////////////////////////////////////////////
#pragma CODE_SECTION(alphabeta_to_dq_calc,".fast_run");
void alphabeta_to_dq_calc(ALPHABETA_TO_DQ *v)
{
v->Ud = _IQmpy(v->Ualpha, _IQcos(v->Tetta)) + _IQmpy(v->Ubeta, _IQsin(v->Tetta));
v->Uq = -_IQmpy(v->Ualpha, _IQsin(v->Tetta)) + _IQmpy(v->Ubeta, _IQcos(v->Tetta));
}
/////////////////////////////////////////////////