MotorWare f2806x Module API Documentation
Modules | Typedefs | Functions
AFSEL

Modules

 AFSEL_OVERVIEW
 

Typedefs

typedef struct _AFSEL_Obj_ * AFSEL_Handle
 Defines the AFSEL Torque handle. More...
 

Functions

void AFSEL_disable (AFSEL_Handle handle)
 Disable the afsel module. More...
 
void AFSEL_enable (AFSEL_Handle handle)
 Enable the afsel module. More...
 
_iq AFSEL_getAngle_pu (AFSEL_Handle handle)
 Gets the angle that will currently be used for FOC. More...
 
_iq AFSEL_getFreq_pu (AFSEL_Handle handle)
 Gets the speed that will currently be used. More...
 
_iq AFSEL_getIqMax (AFSEL_Handle handle)
 Gets the Iq maximum value currently used. More...
 
_iq AFSEL_getIqSlope (AFSEL_Handle handle)
 Gets the current Iq trajectory slope. More...
 
AFSEL_Handle AFSEL_init (void)
 Initializes the afsel module. More...
 
bool AFSEL_isDisabled (AFSEL_Handle handle)
 Is the afsel module disabled? More...
 
bool AFSEL_isEnabled (AFSEL_Handle handle)
 Is the afsel module enabled? More...
 
void AFSEL_run (AFSEL_Handle handle)
 Run the afsel. More...
 
static void AFSEL_setCountHysThreshold (AFSEL_Handle handle, const uint16_t value)
 Sets the threshold counter. More...
 
void AFSEL_setFreqHigh_pu (AFSEL_Handle handle, const _iq freq)
 Sets the frequency at which the HF estimator takes over angle and freq. More...
 
void AFSEL_setFreqLow_pu (AFSEL_Handle handle, const _iq freq)
 Sets the frequency at which the LF estimator takes over angle and freq. More...
 
void AFSEL_setParams (AFSEL_Handle handle, const _iq IqMaxLfEst, const _iq IqMaxHfEst, const _iq IqSlopeLfEst, const _iq IqSlopeHfEst, const _iq freqLow_pu, const _iq freqHigh_pu, IPD_HFI_Handle hfiHandle, EST_Handle estHandle)
 Sets the parameters. More...
 
void AFSEL_setup (AFSEL_Handle handle, const _iq angleLf_pu, const _iq freqLf_pu, const _iq angleHf_pu, const _iq freqHf_pu)
 Sets the parameters in the ISR before AFSEL_run() is called. More...
 
void AFSEL_updateState (AFSEL_Handle handle)
 Updates the state, called outside of the ISR. More...
 

Detailed Description

Typedef Documentation

typedef struct _AFSEL_Obj_* AFSEL_Handle

Defines the AFSEL Torque handle.

Definition at line 77 of file afsel.h.

Function Documentation

void AFSEL_disable ( AFSEL_Handle  handle)

Disable the afsel module.

Parameters
[in]pMemoryA pointer to the memory for the afsel object
void AFSEL_enable ( AFSEL_Handle  handle)

Enable the afsel module.

Parameters
[in]pMemoryA pointer to the memory for the afsel object
_iq AFSEL_getAngle_pu ( AFSEL_Handle  handle)

Gets the angle that will currently be used for FOC.

Parameters
[in]handleThe angle and frequency selector (AFSEL) handle
Returns
The electrical angle
_iq AFSEL_getFreq_pu ( AFSEL_Handle  handle)

Gets the speed that will currently be used.

Parameters
[in]handleThe angle and frequency selector (AFSEL) handle
Returns
The electrical frequency
_iq AFSEL_getIqMax ( AFSEL_Handle  handle)

Gets the Iq maximum value currently used.

Parameters
[in]handleThe angle and frequency selector (AFSEL) handle
Returns
The maximum Iq current allowed
_iq AFSEL_getIqSlope ( AFSEL_Handle  handle)

Gets the current Iq trajectory slope.

Parameters
[in]handleThe angle and frequency selector (AFSEL) handle
Returns
The current Iq slope
AFSEL_Handle AFSEL_init ( void  )

Initializes the afsel module.

Parameters
[in]pMemoryA pointer to the memory for the afsel torque object
[in]numBytesThe number of bytes allocated for the afsel torque object, bytes
Returns
The afsel torque (AFSEL) object handle
bool AFSEL_isDisabled ( AFSEL_Handle  handle)

Is the afsel module disabled?

Parameters
[in]pMemoryA pointer to the memory for the afsel torque object
Returns
The afsel disabled flag
bool AFSEL_isEnabled ( AFSEL_Handle  handle)

Is the afsel module enabled?

Parameters
[in]pMemoryA pointer to the memory for the afsel torque object
Returns
The afsel enabled flag
void AFSEL_run ( AFSEL_Handle  handle)

Run the afsel.

Parameters
[in]handleThe angle and frequency selector (AFSEL) handle
static void AFSEL_setCountHysThreshold ( AFSEL_Handle  handle,
const uint16_t  value 
)
inlinestatic

Sets the threshold counter.

Parameters
[in]handleThe angle and frequency selector (AFSEL) handle
[in]valueThe threshold value
void AFSEL_setFreqHigh_pu ( AFSEL_Handle  handle,
const _iq  freq 
)

Sets the frequency at which the HF estimator takes over angle and freq.

Parameters
[in]handleThe angle and frequency selector (AFSEL) handle
[in]freqThe frequency when the HF estimator takes control of angle and freq
void AFSEL_setFreqLow_pu ( AFSEL_Handle  handle,
const _iq  freq 
)

Sets the frequency at which the LF estimator takes over angle and freq.

Parameters
[in]handleThe angle and frequency selector (AFSEL) handle
[in]freqThe frequency when the LF estimator takes control of angle and freq
void AFSEL_setParams ( AFSEL_Handle  handle,
const _iq  IqMaxLfEst,
const _iq  IqMaxHfEst,
const _iq  IqSlopeLfEst,
const _iq  IqSlopeHfEst,
const _iq  freqLow_pu,
const _iq  freqHigh_pu,
IPD_HFI_Handle  hfiHandle,
EST_Handle  estHandle 
)

Sets the parameters.

Parameters
[in]handleThe angle and frequency selector (AFSEL) handle
[in]IqMaxLfEstThe maximum Iq current when the LF estimator is active
[in]IqMaxHfEstThe maximum Iq current when the HF estimator is active
[in]IqSlopeLfEstThe trajectory slope of the Iq current reference when the LF estimator is active
[in]IqSlopeHfEstThe trajectory slope of the Iq current reference when the HF estimator is active
[in]freqLow_puThe frequency below which the LF estimator is active
[in]freqHigh_puThe frequency above which the HF estimator is active
[in]hfiHandleThe handle to the HF estimator
[in]estHandleThe handle to the LF estimator
void AFSEL_setup ( AFSEL_Handle  handle,
const _iq  angleLf_pu,
const _iq  freqLf_pu,
const _iq  angleHf_pu,
const _iq  freqHf_pu 
)

Sets the parameters in the ISR before AFSEL_run() is called.

Parameters
[in]handleThe angle and frequency selector (AFSEL) handle
[in]angleLf_puThe angle from the LF estimator
[in]freqLf_puThe frequency from the LF estimator
[in]angleHf_puThe angle from the HF estimator
[in]freqHf_puThe frequency from the HF estimator
void AFSEL_updateState ( AFSEL_Handle  handle)

Updates the state, called outside of the ISR.

Parameters
[in]handleThe angle and frequency selector (AFSEL) handle