matlab_23550/Inu/Src2/VectorControl/alphabeta_to_dq.c
2024-12-27 10:50:32 +03:00

23 lines
484 B
C

#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));
}
/////////////////////////////////////////////////