MotorWare f2806x Module API Documentation
Data Structures | Typedefs | Enumerations | Functions
SpinTAC Velocity ID

Data Structures

struct  ST_VelIdCfg_t
 Defines the ST_VelIdCfg_t data. More...
 
struct  ST_VelId_t
 Defines the ST_VelId_t data. More...
 

Typedefs

typedef struct _ST_VELID_Handle_ * ST_VELID_Handle
 

Enumerations

enum  ST_VelIdStatus_e { ST_VEL_ID_IDLE =0, ST_VEL_ID_INIT, ST_VEL_ID_BUSY }
 Enumeration for the Velocity Identify Status states. More...
 

Functions

static void STVELID_setSampleTime_sec (ST_VELID_Handle handle, _iq24 sampleTime)
 Sets the Sample Time (cfg.T_sec) for SpinTAC Velocity Identify. More...
 
static void STVELID_setOutputMaximum (ST_VELID_Handle handle, _iq24 outMax)
 Sets the Maximum Output (cfg.OutMax) for SpinTAC Velocity Identify. More...
 
static void STVELID_setGoalSpeed (ST_VELID_Handle handle, _iq24 goalSpeed)
 Sets the Goal Speed of inertia identification (cfg.GoalSpeed) for SpinTAC Velocity Identify. More...
 
static _iq24 STVELID_getGoalSpeed (ST_VELID_Handle handle)
 Gets the Goal Speed of inertia identification (cfg.GoalSpeed) for SpinTAC Velocity Identify. More...
 
static void STVELID_setLowPassFilterTime_tick (ST_VELID_Handle handle, int16_t lpfTime)
 Sets the Low Pass Filter Time Constant (cfg.LpfTime_tick) for SpinTAC Velocity Identify. More...
 
static void STVELID_setTimeOut_sec (ST_VELID_Handle handle, _iq24 timeOut)
 Sets the Time Out Time (cfg.TimeOut_sec) for SpinTAC Velocity Identify. More...
 
static void STVELID_setTorqueRampTime_sec (ST_VELID_Handle handle, _iq24 rampTime)
 Sets the Torque Ramp Time (cfg.RampTime_sec) for SpinTAC Velocity Identify. More...
 
static _iq24 STVELID_getTorqueRampTime_sec (ST_VELID_Handle handle)
 Gets the Torque Ramp Time (cfg.RampTime_sec) for SpinTAC Velocity Identify. More...
 
static void STVELID_setSensorlessFeedback (ST_VELID_Handle handle, bool sensorless)
 Sets the feedback type (cfg.Sensorless) for SpinTAC Velocity Identify. More...
 
static void STVELID_setVelocityFeedback (ST_VELID_Handle handle, _iq24 velFdb)
 Sets the Velocity Feedback (VelFdb) for SpinTAC Velocity Identify. More...
 
static _iq24 STVELID_getTorqueReference (ST_VELID_Handle handle)
 Gets the Torque (Iq) Reference value (Out) from SpinTAC Velocity Identify. More...
 
static void STVELID_setTorqueReference (ST_VELID_Handle handle, _iq24 out)
 Sets the Torque (Iq) Reference (Out) for SpinTAC Velocity Identify. More...
 
static _iq24 STVELID_getInertiaEstimate (ST_VELID_Handle handle)
 Gets the System Inertia (InertiaEst) from SpinTAC Velocity Identify. More...
 
static _iq24 STVELID_getFrictionEstimate (ST_VELID_Handle handle)
 Gets the System Friction (FrictionEst) from SpinTAC Velocity Identify. More...
 
static void STVELID_setEnable (ST_VELID_Handle handle, bool enb)
 Sets the Enable signal (ENB) for SpinTAC Velocity Identify. More...
 
static bool STVELID_getEnable (ST_VELID_Handle handle)
 Gets the Enable signal (ENB) for SpinTAC Velocity Identify. More...
 
static ST_VelIdStatus_e STVELID_getStatus (ST_VELID_Handle handle)
 Gets the Status value (STATUS) for SpinTAC Velocity Identify. More...
 
static uint16_t STVELID_getErrorID (ST_VELID_Handle handle)
 Gets the Error value (ERR_ID) for SpinTAC Velocity Identify. More...
 
ST_VELID_Handle STVELID_init (void *pMemory, const size_t numBytes)
 Initializes the SpinTAC Velocity Identify object. More...
 
void STVELID_run (ST_VELID_Handle handle)
 Runs the SpinTAC Identify function. More...
 

Detailed Description


Data Structure Documentation

struct ST_VelIdCfg_t

Defines the ST_VelIdCfg_t data.

The ST_VelIdCfg_t object contains all configuration parameters of the Velocity ID object.

Definition at line 61 of file spintac_vel_id.h.

Data Fields
_iq24 GoalSpeed Speed to reach in inertia estimation { unit: [pu/s], value range: (0, 1.0] }.
int16_t LpfTime_tick Low pass filter ISR ticks { unit: [ticks], value range: [1, 100] }.
_iq24 OutMax Control signal limit { unit: [PU], value range: (0, 1.0] }.
_iq24 RampTime_sec Torque acceleration ramp time { unit [s], value range: [T_sec, 25.0] }.
bool Sensorless Indicates if the FOC is using a sensorless estimator.
_iq24 T_sec Sample time { unit: [s], value range: (0.0, 0.01] }.
_iq24 TimeOut_sec Maximum time allowed for inertia estimation process { unit: [s], value range: [1.0, 10.0] }.
struct ST_VelId_t

Defines the ST_VelId_t data.

The ST_VelId_t object contains all parameters needed to perform Velocity ID

Definition at line 78 of file spintac_vel_id.h.

Data Fields
ST_VelIdCfg_t cfg Configuration substructure.
bool ENB Enable bit { false: enable; true: disable }.
uint16_t ERR_ID Error ID { 0: no error; others: see error code }.
_iq24 FrictionEst Friction Coefficient { unit: [PU/(pu/s)], value range: positive _IQ24 value }.
_iq24 InertiaEst Estimated Inertia { unit: [PU/(pu/s^2)], value range: positive _IQ24 value }.
_iq24 Out control output { unit: [PU], value range: [-cfg.OutMax, cfg.OutMax] }
uint32_t s0[9]
ST_VelIdStatus_e STATUS Status { ST_VEL_ID_IDLE, ST_VEL_ID_INIT, ST_VEL_ID_BUSY }.
_iq24 VelFdb Velocity feedback { unit: [pu/s], value range: [-1.0, 1.0] }.

Typedef Documentation

typedef struct _ST_VELID_Handle_* ST_VELID_Handle

Definition at line 97 of file spintac_vel_id.h.

Enumeration Type Documentation

Enumeration for the Velocity Identify Status states.

Enumerator
ST_VEL_ID_IDLE 

Velocity Identify is in idle state, zero output.

ST_VEL_ID_INIT 

Velocity Identify is in init state, validating configured parameters.

ST_VEL_ID_BUSY 

Velocity Identify is in busy state, identifying system inertia.

Definition at line 51 of file spintac_vel_id.h.

Function Documentation

static bool STVELID_getEnable ( ST_VELID_Handle  handle)
inlinestatic

Gets the Enable signal (ENB) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
Returns
bool ENB Enable bit { false: disable; true: enable }

Definition at line 269 of file spintac_vel_id.h.

References ST_VelId_t::ENB.

static uint16_t STVELID_getErrorID ( ST_VELID_Handle  handle)
inlinestatic

Gets the Error value (ERR_ID) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
Returns
uint16_t ERR_ID Error ID { 0: no error; others: see error code }

Definition at line 287 of file spintac_vel_id.h.

References ST_VelId_t::ERR_ID.

static _iq24 STVELID_getFrictionEstimate ( ST_VELID_Handle  handle)
inlinestatic

Gets the System Friction (FrictionEst) from SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
Returns
_iq24 FrictionEst Friction Coefficient { unit: [PU/(pu/s)], value range: positive _IQ24 value }

Definition at line 249 of file spintac_vel_id.h.

References ST_VelId_t::FrictionEst.

static _iq24 STVELID_getGoalSpeed ( ST_VELID_Handle  handle)
inlinestatic

Gets the Goal Speed of inertia identification (cfg.GoalSpeed) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
Returns
_iq24 GoalSpeed Inertia identification goal speed { unit: [pu/s], Value range: (0.0, 1.0] }

Definition at line 139 of file spintac_vel_id.h.

References ST_VelId_t::cfg, and ST_VelIdCfg_t::GoalSpeed.

static _iq24 STVELID_getInertiaEstimate ( ST_VELID_Handle  handle)
inlinestatic

Gets the System Inertia (InertiaEst) from SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
Returns
_iq24 InertiaEst Estimated Inertia { unit: [PU/(pu/s^2)], value range: positive _IQ24 value }

Definition at line 240 of file spintac_vel_id.h.

References ST_VelId_t::InertiaEst.

static ST_VelIdStatus_e STVELID_getStatus ( ST_VELID_Handle  handle)
inlinestatic

Gets the Status value (STATUS) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
Returns
ST_VelIdStatus_e STATUS Status { ST_VEL_ID_IDLE, ST_VEL_ID_INIT, ST_VEL_ID_BUSY }

Definition at line 278 of file spintac_vel_id.h.

References ST_VelId_t::STATUS.

static _iq24 STVELID_getTorqueRampTime_sec ( ST_VELID_Handle  handle)
inlinestatic

Gets the Torque Ramp Time (cfg.RampTime_sec) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
Returns
_iq24 RampTime_sec Torque acceleration ramp time { unit [s], Value range: [cfg.T_sec, 25.0] }

Definition at line 187 of file spintac_vel_id.h.

References ST_VelId_t::cfg, and ST_VelIdCfg_t::RampTime_sec.

static _iq24 STVELID_getTorqueReference ( ST_VELID_Handle  handle)
inlinestatic

Gets the Torque (Iq) Reference value (Out) from SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
Returns
_iq24 Out Torque (Iq) Reference { unit [PU], value range: [-cfg.OutMax, cfg.OutMax] }

Definition at line 220 of file spintac_vel_id.h.

References ST_VelId_t::Out.

ST_VELID_Handle STVELID_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the SpinTAC Velocity Identify object.

Parameters
[in]*pMemoryPointer to the memory for ST_VelId_t
[in]numBytesThe number of bytes in the ST_VelId_t
Returns
ST_VELID_Handle handle The handle for the SpinTAC Velocity Identify Object
void STVELID_run ( ST_VELID_Handle  handle)

Runs the SpinTAC Identify function.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
static void STVELID_setEnable ( ST_VELID_Handle  handle,
bool  enb 
)
inlinestatic

Sets the Enable signal (ENB) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
[in]enbEnable bit { false: disable; true: enable }

Definition at line 258 of file spintac_vel_id.h.

References ST_VelId_t::ENB.

static void STVELID_setGoalSpeed ( ST_VELID_Handle  handle,
_iq24  goalSpeed 
)
inlinestatic

Sets the Goal Speed of inertia identification (cfg.GoalSpeed) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
[in]goalSpeedInertia identification goal speed { unit: [pu/s], Value range: (0.0, 1.0] }

Definition at line 128 of file spintac_vel_id.h.

References ST_VelId_t::cfg, and ST_VelIdCfg_t::GoalSpeed.

static void STVELID_setLowPassFilterTime_tick ( ST_VELID_Handle  handle,
int16_t  lpfTime 
)
inlinestatic

Sets the Low Pass Filter Time Constant (cfg.LpfTime_tick) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
[in]lpfTimeLow pass filter ISR ticks { unit: [ticks], value range: [1, 100] }

Definition at line 148 of file spintac_vel_id.h.

References ST_VelId_t::cfg, ST_VelIdCfg_t::LpfTime_tick, ST_VEL_ID_IDLE, and ST_VelId_t::STATUS.

static void STVELID_setOutputMaximum ( ST_VELID_Handle  handle,
_iq24  outMax 
)
inlinestatic

Sets the Maximum Output (cfg.OutMax) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
[in]outMaxControl signal high limit { unit: [PU], Value range: (0.0, 1.0] }

Definition at line 115 of file spintac_vel_id.h.

References ST_VelId_t::cfg, ST_VelIdCfg_t::OutMax, ST_VEL_ID_IDLE, and ST_VelId_t::STATUS.

static void STVELID_setSampleTime_sec ( ST_VELID_Handle  handle,
_iq24  sampleTime 
)
inlinestatic

Sets the Sample Time (cfg.T_sec) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
[in]sampleTimeSample Time { unit: [s], value range: (0, 0.01] }

Definition at line 102 of file spintac_vel_id.h.

References ST_VelId_t::cfg, ST_VEL_ID_IDLE, ST_VelId_t::STATUS, and ST_VelIdCfg_t::T_sec.

static void STVELID_setSensorlessFeedback ( ST_VELID_Handle  handle,
bool  sensorless 
)
inlinestatic

Sets the feedback type (cfg.Sensorless) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
[in]sensorlessIndicates if the FOC is using a sensorless estimator { false: sensor; true: sensorless }

Definition at line 196 of file spintac_vel_id.h.

References ST_VelId_t::cfg, ST_VelIdCfg_t::Sensorless, ST_VEL_ID_IDLE, and ST_VelId_t::STATUS.

static void STVELID_setTimeOut_sec ( ST_VELID_Handle  handle,
_iq24  timeOut 
)
inlinestatic

Sets the Time Out Time (cfg.TimeOut_sec) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
[in]timeOutMaximum time allowed for inertia estimation process { unit: [s], Value range: [1.0, 10.0] }

Definition at line 161 of file spintac_vel_id.h.

References ST_VelId_t::cfg, ST_VEL_ID_IDLE, ST_VelId_t::STATUS, and ST_VelIdCfg_t::TimeOut_sec.

static void STVELID_setTorqueRampTime_sec ( ST_VELID_Handle  handle,
_iq24  rampTime 
)
inlinestatic

Sets the Torque Ramp Time (cfg.RampTime_sec) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
[in]rampTimeTorque acceleration ramp time { unit [s], Value range: [cfg.T_sec, 25.0] }

Definition at line 174 of file spintac_vel_id.h.

References ST_VelId_t::cfg, ST_VelIdCfg_t::RampTime_sec, ST_VEL_ID_IDLE, and ST_VelId_t::STATUS.

static void STVELID_setTorqueReference ( ST_VELID_Handle  handle,
_iq24  out 
)
inlinestatic

Sets the Torque (Iq) Reference (Out) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
[in]outTorque (Iq) Reference { unit [PU], value range: [-cfg.OutMax, cfg.OutMax] }

Definition at line 229 of file spintac_vel_id.h.

References ST_VelId_t::Out.

static void STVELID_setVelocityFeedback ( ST_VELID_Handle  handle,
_iq24  velFdb 
)
inlinestatic

Sets the Velocity Feedback (VelFdb) for SpinTAC Velocity Identify.

Parameters
[in]handleThe handle for the SpinTAC Velocity Identify Object
[in]velFdbVelocity feedback { unit [pu/s], value range: [-1.0, 1.0] }

Definition at line 209 of file spintac_vel_id.h.

References ST_VelId_t::VelFdb.