MotorWare f2806x Module API Documentation
Typedefs | Enumerations | Functions
ipd_hfi.h File Reference
#include "sw/modules/types/src/types.h"
#include "sw/modules/iqmath/src/32b/IQmathLib.h"
#include "sw/modules/filter/src/32b/filter_fo.h"
#include "sw/modules/math/src/32b/math.h"
#include "sw/modules/park/src/32b/park.h"
#include "sw/modules/pid/src/32b/pid.h"

Go to the source code of this file.

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...