Data Structures | Macros | Typedefs | Functions
ESMO

Data Structures

struct  _ESMO_Obj_
 Defines the ESMO controller object. More...
 

Macros

#define ESMO_inline_run   ESMO_run
 Runs the ESMO controller. More...
 

Typedefs

typedef struct _ESMO_Obj_ ESMO_Obj
 Defines the ESMO controller object. More...
 
typedef struct _ESMO_Obj_ESMO_Handle
 Defines the ESMO handle. More...
 

Functions

ESMO_Handle ESMO_init (void *pMemory, const size_t numBytes)
 Initializes the ESMO controller. More...
 
void ESMO_resetParams (ESMO_Handle handle)
 Reset the ESMO controller. More...
 
void ESMO_setParams (ESMO_Handle handle, const USER_Params *pUserParams)
 Set the ESMO controller. More...
 
void ESMO_setPLLParams (ESMO_Handle handle, const float32_t pll_KpMax, const float32_t pll_KpMin, const float32_t pll_KpSF)
 Set PLL parameters for the ESMO controller. More...
 
void ESMO_setPLLKi (ESMO_Handle handle, const float32_t pll_Ki)
 Set PLL parameters for the ESMO controller. More...
 
static void ESMO_setBEMFThreshold (ESMO_Handle handle, const float32_t bemfThreshold)
 Set kp of the pll for the ESMO controller. More...
 
static void ESMO_setPLLKpSF (ESMO_Handle handle, const float32_t pll_KpSF)
 Set kp of the pll for the ESMO controller. More...
 
void ESMO_setKslideParams (ESMO_Handle handle, const float32_t KslideMax, const float32_t KslideMin)
 Set PLL parameters for the ESMO controller. More...
 
static void ESMO_setKslide (ESMO_Handle handle, const float32_t Kslide)
 Sets Kslide for the ESMO controller. More...
 
void ESMO_updateFilterParams (ESMO_Handle handle)
 Reset the ESMO controller. More...
 
void ESMO_updatePLLParams (ESMO_Handle handle)
 Reset the ESMO controller. More...
 
void ESMO_full_run (ESMO_Handle handle, float32_t Vdcbus, MATH_vec3 *pVabc_pu, MATH_vec2 *pIabVec)
 Runs the ESMO controller. More...
 
static void ESMO_resetPLL (ESMO_Handle handle)
 Resets PLL integration for the ESMO controller. More...
 
static void ESMO_setOffsetCoef (ESMO_Handle handle, const float32_t offsetSF)
 Sets angle offset coefficient for the ESMO controller. More...
 
static void ESMO_setBEMFKslfFreq (ESMO_Handle handle, const float32_t filterFc_Hz)
 Sets speed filter cut off frequency for the ESMO controller. More...
 
static void ESMO_setSpeedFilterFreq (ESMO_Handle handle, const float32_t lpfFc_Hz)
 Sets speed filter cut off frequency for the ESMO controller. More...
 
static void ESMO_setPLLKp (ESMO_Handle handle, const float32_t pll_Kp)
 Runs the ESMO controller. More...
 
static void ESMO_setAnglePu (ESMO_Handle handle, const float32_t theta_rad)
 Set Angle to the ESMO controller. More...
 
static void ESMO_setPLLSpeedPu (ESMO_Handle handle, const float32_t speed_Hz)
 Set Angle to the ESMO controller. More...
 
static void ESMO_setSpeedRef (ESMO_Handle handle, const float32_t speedRef_Hz)
 Set reference speed to the ESMO controller. More...
 
static float32_t ESMO_getSpeed_Hz (ESMO_Handle handle)
 Gets the speed from the ESMO controller. More...
 
static float32_t ESMO_getSpeedPLL_Hz (ESMO_Handle handle)
 Gets the PLL speed from the ESMO controller. More...
 
static float32_t ESMO_getAnglePLL (ESMO_Handle handle)
 Gets the PLL angle from the ESMO controller. More...
 
static float32_t ESMO_getAngleElec (ESMO_Handle handle)
 Gets the angle from the ESMO controller. More...
 
static void ESMO_updateKslide (ESMO_Handle handle)
 Update Kslide for the ESMO controller. More...
 
static void ESMO_run (ESMO_Handle handle, float32_t Vdcbus, MATH_vec3 *pVabc_pu, MATH_vec2 *pIabVec)
 

Detailed Description

Macro Definition Documentation

◆ ESMO_inline_run

#define ESMO_inline_run   ESMO_run

Runs the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]VdcbusThe dc bus voltage
[in]pVabc_puThe pointer to the phase voltage value (PU)
[in]pIabVecThe pointer to the phase current value

Typedef Documentation

◆ ESMO_Obj

typedef struct _ESMO_Obj_ ESMO_Obj

Defines the ESMO controller object.

◆ ESMO_Handle

typedef struct _ESMO_Obj_* ESMO_Handle

Defines the ESMO handle.

Function Documentation

◆ ESMO_init()

ESMO_Handle ESMO_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the ESMO controller.

Parameters
[in]pMemoryA pointer to the memory for the ESMO controller object
[in]numBytesThe number of bytes allocated for the ESMO controller object, bytes
Returns
The ESMO controller (ESMO) object handle

◆ ESMO_resetParams()

void ESMO_resetParams ( ESMO_Handle  handle)

Reset the ESMO controller.

Parameters
[in]handleThe ESMO controller handle

◆ ESMO_setParams()

void ESMO_setParams ( ESMO_Handle  handle,
const USER_Params pUserParams 
)

Set the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]pUserParamsThe pointer to the user parameters

◆ ESMO_setPLLParams()

void ESMO_setPLLParams ( ESMO_Handle  handle,
const float32_t  pll_KpMax,
const float32_t  pll_KpMin,
const float32_t  pll_KpSF 
)

Set PLL parameters for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]pll_KpMaxThe maximum Kp of PLL
[in]pll_KpMinThe minimum Kp of PLL
[in]pll_KpSFThe Kp calculation coefficient of PLL

◆ ESMO_setPLLKi()

void ESMO_setPLLKi ( ESMO_Handle  handle,
const float32_t  pll_Ki 
)

Set PLL parameters for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]pll_KiThe Ki of PLL

◆ ESMO_setBEMFThreshold()

static void ESMO_setBEMFThreshold ( ESMO_Handle  handle,
const float32_t  bemfThreshold 
)
inlinestatic

Set kp of the pll for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]pll_KpThe Kp value

References _ESMO_Obj_::E0.

◆ ESMO_setPLLKpSF()

static void ESMO_setPLLKpSF ( ESMO_Handle  handle,
const float32_t  pll_KpSF 
)
inlinestatic

Set kp of the pll for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]pll_KpThe Kp calculation coefficient value

References _ESMO_Obj_::pll_KpSF.

◆ ESMO_setKslideParams()

void ESMO_setKslideParams ( ESMO_Handle  handle,
const float32_t  KslideMax,
const float32_t  KslideMin 
)

Set PLL parameters for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]pll_KpMaxThe maximum Kp of PLL
[in]pll_KpMinThe maximum Kp of PLL

◆ ESMO_setKslide()

static void ESMO_setKslide ( ESMO_Handle  handle,
const float32_t  Kslide 
)
inlinestatic

Sets Kslide for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]KslideThe Kslide value

References _ESMO_Obj_::Kslide.

◆ ESMO_updateFilterParams()

void ESMO_updateFilterParams ( ESMO_Handle  handle)

Reset the ESMO controller.

Parameters
[in]handleThe ESMO controller handle

◆ ESMO_updatePLLParams()

void ESMO_updatePLLParams ( ESMO_Handle  handle)

Reset the ESMO controller.

Parameters
[in]handleThe ESMO controller handle

◆ ESMO_full_run()

void ESMO_full_run ( ESMO_Handle  handle,
float32_t  Vdcbus,
MATH_vec3 pVabc_pu,
MATH_vec2 pIabVec 
)

Runs the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]VdcbusThe dc bus voltage
[in]pVabc_puThe pointer to the phase voltage value (PU)
[in]pIabVecThe pointer to the phase current value

◆ ESMO_resetPLL()

static void ESMO_resetPLL ( ESMO_Handle  handle)
inlinestatic

Resets PLL integration for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle

References _ESMO_Obj_::pll_Out, and _ESMO_Obj_::pll_ui.

◆ ESMO_setOffsetCoef()

static void ESMO_setOffsetCoef ( ESMO_Handle  handle,
const float32_t  offsetSF 
)
inlinestatic

Sets angle offset coefficient for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]offsetSFThe angle offset coefficient

References _ESMO_Obj_::offsetSF.

◆ ESMO_setBEMFKslfFreq()

static void ESMO_setBEMFKslfFreq ( ESMO_Handle  handle,
const float32_t  filterFc_Hz 
)
inlinestatic

Sets speed filter cut off frequency for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]filterFc_HzThe slide filter frequency

References _ESMO_Obj_::filterFc_Hz.

◆ ESMO_setSpeedFilterFreq()

static void ESMO_setSpeedFilterFreq ( ESMO_Handle  handle,
const float32_t  lpfFc_Hz 
)
inlinestatic

Sets speed filter cut off frequency for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]lpfFc_HzThe cut off frequency of the speed filter

References _ESMO_Obj_::lpfFc_Hz.

◆ ESMO_setPLLKp()

static void ESMO_setPLLKp ( ESMO_Handle  handle,
const float32_t  pll_Kp 
)
inlinestatic

Runs the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]pll_KpThe Kp value

References _ESMO_Obj_::pll_Kp.

◆ ESMO_setAnglePu()

static void ESMO_setAnglePu ( ESMO_Handle  handle,
const float32_t  theta_rad 
)
inlinestatic

Set Angle to the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]theta_radThe estimation angle, rad

References MATH_ONE_OVER_TWO_PI, and _ESMO_Obj_::theta.

◆ ESMO_setPLLSpeedPu()

static void ESMO_setPLLSpeedPu ( ESMO_Handle  handle,
const float32_t  speed_Hz 
)
inlinestatic

Set Angle to the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]speed_HzThe feedback speed value, Hz

References _ESMO_Obj_::pll_Out, _ESMO_Obj_::speed_sf, and _ESMO_Obj_::speedFlt.

◆ ESMO_setSpeedRef()

static void ESMO_setSpeedRef ( ESMO_Handle  handle,
const float32_t  speedRef_Hz 
)
inlinestatic

Set reference speed to the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]refValueThe reference speed value

References _ESMO_Obj_::speed_sf, and _ESMO_Obj_::speedRef.

◆ ESMO_getSpeed_Hz()

static float32_t ESMO_getSpeed_Hz ( ESMO_Handle  handle)
inlinestatic

Gets the speed from the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
Returns
The angle from eSMO estimator (Hz)

References _ESMO_Obj_::scaleFreq_Hz, and _ESMO_Obj_::speedEst.

◆ ESMO_getSpeedPLL_Hz()

static float32_t ESMO_getSpeedPLL_Hz ( ESMO_Handle  handle)
inlinestatic

Gets the PLL speed from the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
Returns
The speed from eSMO PLL (Hz)

References _ESMO_Obj_::scaleFreq_Hz, and _ESMO_Obj_::speedFlt.

◆ ESMO_getAnglePLL()

static float32_t ESMO_getAnglePLL ( ESMO_Handle  handle)
inlinestatic

Gets the PLL angle from the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
Returns
The angle from eSMO PLL

References _ESMO_Obj_::thetaEst.

◆ ESMO_getAngleElec()

static float32_t ESMO_getAngleElec ( ESMO_Handle  handle)
inlinestatic

Gets the angle from the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
Returns
The angle from eSMO estimator

References _ESMO_Obj_::thetaElec_rad.

◆ ESMO_updateKslide()

static void ESMO_updateKslide ( ESMO_Handle  handle)
inlinestatic

Update Kslide for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle

References _ESMO_Obj_::Kslide, and _ESMO_Obj_::KslideMax.

◆ ESMO_run()

static void ESMO_run ( ESMO_Handle  handle,
float32_t  Vdcbus,
MATH_vec3 pVabc_pu,
MATH_vec2 pIabVec 
)
inlinestatic

Copyright 2023, Texas Instruments Incorporated