MotorWare f2806x Module API Documentation

- Main Page
- Modules
- Data Structures
- Files

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

enum ST_VelIdStatus_e

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 | ) |
| inline static

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

Parameters

  [in] | handle | The 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 | ) |
| inline static

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

Parameters

  [in] | handle | The 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 | ) |
| inline static

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

Parameters

  [in] | handle | The 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 | ) |
| inline static

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

Parameters

  [in] | handle | The 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 | ) |
| inline static

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

Parameters

  [in] | handle | The 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 | ) |
| inline static

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

Parameters

  [in] | handle | The 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 | ) |
| inline static

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

Parameters

  [in] | handle | The 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 | ) |
| inline static

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

Parameters

  [in] | handle | The 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] | *pMemory | Pointer to the memory for ST_VelId_t
  [in] | numBytes | The 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] | handle | The handle for the SpinTAC Velocity Identify Object

static void STVELID_setEnable | ( | ST_VELID_Handle | handle,
|  | bool | enb
| ) |  |
| inline static

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

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Identify Object
  [in] | enb | Enable 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
| ) |  |
| inline static

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

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Identify Object
  [in] | goalSpeed | Inertia 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
| ) |  |
| inline static

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

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Identify Object
  [in] | lpfTime | Low 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
| ) |  |
| inline static

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

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Identify Object
  [in] | outMax | Control 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
| ) |  |
| inline static

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

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Identify Object
  [in] | sampleTime | Sample 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
| ) |  |
| inline static

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

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Identify Object
  [in] | sensorless | Indicates 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
| ) |  |
| inline static

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

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Identify Object
  [in] | timeOut | Maximum 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
| ) |  |
| inline static

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

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Identify Object
  [in] | rampTime | Torque 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
| ) |  |
| inline static

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

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Identify Object
  [in] | out | Torque (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
| ) |  |
| inline static

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

Parameters

  [in] | handle | The handle for the SpinTAC Velocity Identify Object
  [in] | velFdb | Velocity 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.