MotorWare f2806x Module API Documentation
Modules | Typedefs | Enumerations | Functions
IPD_HFI

Modules

 IPD_HFI_OVERVIEW
 

Typedefs

typedef struct IPD_HFI_Obj * IPD_HFI_Handle
 Defines the IPD_HFI handle. More...
 

Enumerations

enum  IPD_HFI_State_e {
  IPD_HFI_State_Error = 0, IPD_HFI_State_Idle = 1, IPD_HFI_State_Coarse = 2, IPD_HFI_State_Fine = 3,
  IPD_HFI_State_OnLine = 4, IPD_HFI_State_NumStates = 5
}
 Defines the initial position detection, high frequency injection (IPD_HFI) states. More...
 
enum  IPD_HFI_TRAJ_State_e { IPD_HFI_TRAJ_State_Idle = 0, IPD_HFI_TRAJ_State_Coarse = 1, IPD_HFI_TRAJ_State_Fine = 2, IPD_HFI_TRAJ_State_NumStates = 3 }
 Defines the trajectory states. More...
 

Functions

static void IPD_HFI_computePhasor (const _iq angle_pu, MATH_vec2 *pPhasor)
 Computes a phasor for a given angle. More...
 
void IPD_HFI_disable (IPD_HFI_Handle handle)
 Disables the initial position detection, high frequency injection (IPD_HFI) module. More...
 
void IPD_HFI_enable (IPD_HFI_Handle handle)
 Enables the initial position detection, high frequency injection (IPD_HFI) module. More...
 
_iq IPD_HFI_getAngle_pu (IPD_HFI_Handle handle)
 Gets the angle value from the estimator. More...
 
_iq IPD_HFI_getKspd_pu (IPD_HFI_Handle handle)
 Gets the speed gain value. More...
 
_iq IPD_HFI_getSpeed_pu (IPD_HFI_Handle handle)
 Gets the speed value from the estimator. More...
 
_iq IPD_HFI_getSpeed_lp_pu (IPD_HFI_Handle handle)
 Gets the low pass filtered speed value from the estimator. More...
 
IPD_HFI_State_e IPD_HFI_getState (IPD_HFI_Handle handle)
 Gets the estimator state. More...
 
_iq IPD_HFI_getVdValue (IPD_HFI_Handle handle)
 Gets the current trajectory magnitude value. More...
 
IPD_HFI_Handle IPD_HFI_init (void)
 Initializes the initial position detection, high frequency injection (IPD_HFI) module. More...
 
bool IPD_HFI_isEnabled (IPD_HFI_Handle handle)
 Returns a boolean value denoting if the module is enabled (true) or not (false) More...
 
bool IPD_HFI_isOnLine (IPD_HFI_Handle handle)
 Denotes whether the module is online (true) or not (false) More...
 
void IPD_HFI_run (IPD_HFI_Handle handle, const MATH_vec2 *pIab_pu)
 Runs the initial position detection, high frequency injection (IPD_HFI) algorithm. More...
 
void IPD_HFI_setAngle_pu (IPD_HFI_Handle handle, const _iq angle_pu)
 Sets the angle value in the module. More...
 
void IPD_HFI_setFlag_motorSpinning (IPD_HFI_Handle handle, const bool value)
 Sets the value of the motor spinning flag. More...
 
void IPD_HFI_setHpf_Idq_Params (IPD_HFI_Handle handle, const _iq b0, const _iq b1, const _iq a1, const _iq x1, const _iq y1)
 Sets the Idq high pass filter parameters. More...
 
void IPD_HFI_setId_sum (IPD_HFI_Handle handle, const _iq Id_sum_pu)
 Sets the integral value for the direct current in the estimator. More...
 
void IPD_HFI_setKspd_pu (IPD_HFI_Handle handle, const _iq Kspd_pu)
 Sets the speed gain value. More...
 
void IPD_HFI_setLpf_spd_Params (IPD_HFI_Handle handle, const _iq b0, const _iq b1, const _iq a1, const _iq x1, const _iq y1)
 Sets the speed low pass filter parameters. More...
 
void IPD_HFI_setParams (IPD_HFI_Handle handle, float_t estFreq_Hz, float_t excFreq_Hz, float_t lpFilterCutOffFreq_Hz, float_t hpFilterCutOffFreq_Hz, float_t iqFullScaleFreq_Hz, float_t Kspd, float_t excMag_coarse_pu, float_t excMag_fine_pu, float_t waitTime_coarse_sec, float_t waitTime_fine_sec)
 Sets the initial position detection, high frequency injection (IPD_HFI) parameters. More...
 
void IPD_HFI_setSpeed_pu (IPD_HFI_Handle handle, const _iq speed_pu)
 Sets the speed value in the estimator. More...
 
void IPD_HFI_setSpeed_lp_pu (IPD_HFI_Handle handle, const _iq speed_lp_pu)
 Sets the low pass filtered speed value in the estimator. More...
 
void IPD_HFI_setTrajMags (IPD_HFI_Handle handle, const _iq *pMags)
 Sets the trajectory magnitudes in the estimator. More...
 
void IPD_HFI_setTrajParams (IPD_HFI_Handle handle, const uint_least32_t period, const uint_least32_t targetPeriod, const _iq *pTrajMags, const uint_least32_t *pTrajPeriods)
 Sets the trajectory parameters in the estimator. More...
 
void IPD_HFI_setTrajPeriods (IPD_HFI_Handle handle, const uint_least32_t *pPeriods)
 Sets the periods for each trajectory state. More...
 
void IPD_HFI_setWaitTimes (IPD_HFI_Handle handle, const uint_least32_t *pWaitTimes)
 Sets the wait times for each estimator state. More...
 
void IPD_HFI_updateState (IPD_HFI_Handle handle)
 Updates the state. More...
 

Detailed Description

Typedef Documentation

typedef struct IPD_HFI_Obj* IPD_HFI_Handle

Defines the IPD_HFI handle.

Definition at line 96 of file ipd_hfi.h.

Enumeration Type Documentation

Defines the initial position detection, high frequency injection (IPD_HFI) states.

Enumerator
IPD_HFI_State_Error 

the error state

IPD_HFI_State_Idle 

the idle state

IPD_HFI_State_Coarse 

the coarse angle detection state

IPD_HFI_State_Fine 

the fine angle detection state

IPD_HFI_State_OnLine 

the online state

IPD_HFI_State_NumStates 

the total number of states

Definition at line 72 of file ipd_hfi.h.

Defines the trajectory states.

Enumerator
IPD_HFI_TRAJ_State_Idle 

the idle trajectory state

IPD_HFI_TRAJ_State_Coarse 

the coarse trajectory state

IPD_HFI_TRAJ_State_Fine 

the fine trajectory state

IPD_HFI_TRAJ_State_NumStates 

the total number of states

Definition at line 85 of file ipd_hfi.h.

Function Documentation

static void IPD_HFI_computePhasor ( const _iq  angle_pu,
MATH_vec2 pPhasor 
)
inlinestatic

Computes a phasor for a given angle.

Parameters
[in]angle_puThe angle, pu
[out]pPhasorThe pointer to the phasor vector values

Definition at line 110 of file ipd_hfi.h.

References _IQcosPU, _IQsinPU, and _MATH_vec2_::value.

void IPD_HFI_disable ( IPD_HFI_Handle  handle)

Disables the initial position detection, high frequency injection (IPD_HFI) module.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
void IPD_HFI_enable ( IPD_HFI_Handle  handle)

Enables the initial position detection, high frequency injection (IPD_HFI) module.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
_iq IPD_HFI_getAngle_pu ( IPD_HFI_Handle  handle)

Gets the angle value from the estimator.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
Returns
The angle value, pu
_iq IPD_HFI_getKspd_pu ( IPD_HFI_Handle  handle)

Gets the speed gain value.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
Returns
The speed gain value, pu
_iq IPD_HFI_getSpeed_lp_pu ( IPD_HFI_Handle  handle)

Gets the low pass filtered speed value from the estimator.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
Returns
The low pass filtered speed value, pu
_iq IPD_HFI_getSpeed_pu ( IPD_HFI_Handle  handle)

Gets the speed value from the estimator.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
Returns
The speed value, pu
IPD_HFI_State_e IPD_HFI_getState ( IPD_HFI_Handle  handle)

Gets the estimator state.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
Returns
The estimator state
_iq IPD_HFI_getVdValue ( IPD_HFI_Handle  handle)

Gets the current trajectory magnitude value.

Parameters
[in]handleThe initial position detection, high frequency injection trajectory generation (IPD_HFI_TRAJ) handle
Returns
The current trajectory magnitude value, pu
IPD_HFI_Handle IPD_HFI_init ( void  )

Initializes the initial position detection, high frequency injection (IPD_HFI) module.

Parameters
[in]pMemoryA pointer to the memory for the object
[in]numBytesThe number of bytes allocated for the object, bytes
Returns
The initial position detection, high frequency injection (IPD_HFI) object handle
bool IPD_HFI_isEnabled ( IPD_HFI_Handle  handle)

Returns a boolean value denoting if the module is enabled (true) or not (false)

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
Returns
The boolean value
bool IPD_HFI_isOnLine ( IPD_HFI_Handle  handle)

Denotes whether the module is online (true) or not (false)

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
void IPD_HFI_run ( IPD_HFI_Handle  handle,
const MATH_vec2 pIab_pu 
)

Runs the initial position detection, high frequency injection (IPD_HFI) algorithm.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]pIab_puThe pointer to the alpha/beta current values, pu
void IPD_HFI_setAngle_pu ( IPD_HFI_Handle  handle,
const _iq  angle_pu 
)

Sets the angle value in the module.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]angle_puThe desired angle value, pu
void IPD_HFI_setFlag_motorSpinning ( IPD_HFI_Handle  handle,
const bool  value 
)

Sets the value of the motor spinning flag.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]valueThe desired flag value
void IPD_HFI_setHpf_Idq_Params ( IPD_HFI_Handle  handle,
const _iq  b0,
const _iq  b1,
const _iq  a1,
const _iq  x1,
const _iq  y1 
)

Sets the Idq high pass filter parameters.

y[n] = b0*x[n] + b1*x[n-1] - a1*y[n-1]

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]b0The filter coefficient value for z^0
[in]b1The filter coefficient value for z^(-1)
[in]a1The filter coefficient value for z^(-1)
[in]x1The input value at time sample n=-1
[in]y1The output value at time sample n=-1
void IPD_HFI_setId_sum ( IPD_HFI_Handle  handle,
const _iq  Id_sum_pu 
)

Sets the integral value for the direct current in the estimator.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]Id_sumThe desired integral value, pu
void IPD_HFI_setKspd_pu ( IPD_HFI_Handle  handle,
const _iq  Kspd_pu 
)

Sets the speed gain value.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]Kspd_puThe desired speed gain value, pu
void IPD_HFI_setLpf_spd_Params ( IPD_HFI_Handle  handle,
const _iq  b0,
const _iq  b1,
const _iq  a1,
const _iq  x1,
const _iq  y1 
)

Sets the speed low pass filter parameters.

y[n] = b0*x[n] + b1*x[n-1] - a1*y[n-1]

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]b0The filter coefficient value for z^0
[in]b1The filter coefficient value for z^(-1)
[in]a1The filter coefficient value for z^(-1)
[in]x1The input value at time sample n=-1
[in]y1The output value at time sample n=-1
void IPD_HFI_setParams ( IPD_HFI_Handle  handle,
float_t  estFreq_Hz,
float_t  excFreq_Hz,
float_t  lpFilterCutOffFreq_Hz,
float_t  hpFilterCutOffFreq_Hz,
float_t  iqFullScaleFreq_Hz,
float_t  Kspd,
float_t  excMag_coarse_pu,
float_t  excMag_fine_pu,
float_t  waitTime_coarse_sec,
float_t  waitTime_fine_sec 
)

Sets the initial position detection, high frequency injection (IPD_HFI) parameters.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]estFreq_HzThe estimation frequency of the IPD algorithm, Hz
[in]excFreq_HzThe excitation frequency of the IPD algorithm, Hz
[in]lpFilterCutOffFreq_HzThe lowpass filter cutoff frequency, Hz
[in]hpFilterCutOffFreq_HzThe highpass filter cutoff frequency, Hz
[in]iqFullScaleFreq_HzThe IQ full scale frequency, Hz
[in]KspdThe speed gain value
[in]excMag_coarse_puThe excitation magnitude during coarse position detection, Hz
[in]excMag_fine_puThe excitation magnitude during fine position detection, Hz
[in]waitTime_coarse_secThe wait time for coarse position detection, sec
[in]waitTime_fine_secThe wait time for fine position detection, sec
void IPD_HFI_setSpeed_lp_pu ( IPD_HFI_Handle  handle,
const _iq  speed_lp_pu 
)

Sets the low pass filtered speed value in the estimator.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]speed_lpThe desired low pass filtered speed value, pu
void IPD_HFI_setSpeed_pu ( IPD_HFI_Handle  handle,
const _iq  speed_pu 
)

Sets the speed value in the estimator.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]speed_lpThe desired speed value, pu
void IPD_HFI_setTrajMags ( IPD_HFI_Handle  handle,
const _iq pMags 
)

Sets the trajectory magnitudes in the estimator.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]periodThe trajectory period for the current state, counts
[in]pTrajMagsThe pointer to the trajectory magnitude values for each trajectory state, counts
void IPD_HFI_setTrajParams ( IPD_HFI_Handle  handle,
const uint_least32_t  period,
const uint_least32_t  targetPeriod,
const _iq pTrajMags,
const uint_least32_t *  pTrajPeriods 
)

Sets the trajectory parameters in the estimator.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]periodThe trajectory period for the current state, counts
[in]pTrajMagsThe pointer to the trajectory magnitude values for each trajectory state, counts
[in]pTrajPeriodsThe pointer to the trajectory period values for each trajectory state, counts
void IPD_HFI_setTrajPeriods ( IPD_HFI_Handle  handle,
const uint_least32_t *  pPeriods 
)

Sets the periods for each trajectory state.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]pPeriodsThe pointer to the trajectory period values for each trajectory state, counts
void IPD_HFI_setWaitTimes ( IPD_HFI_Handle  handle,
const uint_least32_t *  pWaitTimes 
)

Sets the wait times for each estimator state.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle
[in]pWaitTimesThe pointer to the wait times, counts
void IPD_HFI_updateState ( IPD_HFI_Handle  handle)

Updates the state.

Parameters
[in]handleThe initial position detection, high frequency injection (IPD_HFI) handle