AM243x Motor Control SDK  09.02.00
APIs for Enhanced SMO Estimator (ESMO)

Introduction

Here is the list of ESMO function APIs

Files

file  esmo.h
 Contains Enhanced SMO Estimator (ESMO) functions implementation.
 

Data Structures

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

Functions

ESMO_Handle ESMO_init (void *pMemory, const size_t numBytes)
 Initializes 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 any actions that user desires on top of ESMO controller. More...
 
static void ESMO_run (ESMO_Handle handle, const float32_t Vdcbus, MATH_vec3 *pVabc_pu, MATH_vec2 *pIabVec)
 Runs the ESMO controller. More...
 
static 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...
 
static 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...
 
static 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 bemfThreshold 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...
 
static 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...
 
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_sf)
 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...
 

Macros

#define ESMO_inline_run   ESMO_run
 

Macro Definition Documentation

◆ ESMO_inline_run

#define ESMO_inline_run   ESMO_run

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_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 any actions that user desires on top of ESMO controller.

Note
A user defined function, not implemented by default
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_run()

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

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_resetParams()

static void ESMO_resetParams ( ESMO_Handle  handle)
inlinestatic

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()

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

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()

static void ESMO_setPLLKi ( ESMO_Handle  handle,
const float32_t  pll_Ki 
)
inlinestatic

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 bemfThreshold for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]bemfThresholdThe bemfThreshold value

◆ 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_KpSFThe Kp calculation coefficient value

◆ ESMO_setKslideParams()

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

Set PLL parameters for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle
[in]KslideMaxThe maximum sliding control gain
[in]KslideMinThe minimum sliding control gain

◆ 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

◆ ESMO_resetPLL()

static void ESMO_resetPLL ( ESMO_Handle  handle)
inlinestatic

Resets PLL integration for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle

◆ 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

◆ ESMO_setBEMFKslfFreq()

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

Sets speed filter cut off frequency for the ESMO controller.

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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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]speedRef_HzThe reference speed value

◆ 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)

◆ 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)

◆ 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

◆ 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

◆ ESMO_updateKslide()

static void ESMO_updateKslide ( ESMO_Handle  handle)
inlinestatic

Update Kslide for the ESMO controller.

Parameters
[in]handleThe ESMO controller handle