MotorWare f2806x Module API Documentation
Modules | Data Structures | Macros | Typedefs | Functions
SVGEN

Modules

 Module overview
 

Data Structures

struct  _SVGEN_Obj_
 Defines the Space Vector Generator object. More...
 

Macros

#define SVGEN_MAX_VAB_VOLTAGES   _IQ(1.1547005384)
 Defines the maximum reference alpha and beta voltages in PU. More...
 
#define SVGEN_100_PERCENT_MODULATION   _IQ(1.0 - 1.0/32768)
 Defines 100% modulation for Q15. More...
 
#define SVGEN_SQRT3_OVER_2   _IQ(0.8660254038)
 Defines sqrt(3)/2. More...
 
#define SVGEN_4_OVER_3   _IQ(4.0/3.0)
 Defines 4/3. More...
 
#define SVGEN_SQRT3_OVER_2   ((float_t)(0.8660254038))
 Defines sqrt(3)/2. More...
 

Typedefs

typedef struct _SVGEN_Obj_ SVGEN_Obj
 Defines the Space Vector Generator object. More...
 
typedef struct _SVGEN_Obj_SVGEN_Handle
 Defines the SVGEN handle. More...
 
typedef struct _SVGEN_Obj_ SVGEN_Obj
 Defines the Space Vector Generator (SVGEN) object. More...
 
typedef struct _SVGEN_Obj_SVGEN_Handle
 Defines the SVGEN handle. More...
 

Functions

static _iq SVGEN_getMaxModulation (SVGEN_Handle handle)
 Gets the maximum modulation used in the space vector generator module. More...
 
SVGEN_Handle SVGEN_init (void *pMemory, const size_t numBytes)
 Initializes the space vector generator module. More...
 
static void SVGEN_run (SVGEN_Handle handle, const MATH_vec2 *pVab, MATH_vec3 *pT)
 Implements a SVM that saturates at the level of MaxModulation. More...
 
static void SVGEN_setMaxModulation (SVGEN_Handle handle, const _iq maxModulation)
 Sets the maximum modulation in the space vector generator module. More...
 
static float_t SVGEN_getOneOverDcBus_invV (SVGEN_Handle handle)
 Gets the one over DC bus voltage value. More...
 
static void SVGEN_setOneOverDcBus_invV (SVGEN_Handle handle, const float_t oneOverDcBus_invV)
 Sets the one over DC bus voltage value. More...
 
static void SVGEN_setup (SVGEN_Handle handle, const float_t oneOverDcBus_invV)
 Sets up the space vector generator (SVGEN) module. More...
 

Detailed Description


Data Structure Documentation

struct _SVGEN_Obj_

Defines the Space Vector Generator object.

Defines the Space Vector Generator (SVGEN) object.

Definition at line 88 of file 32b/svgen.h.

Data Fields
_iq maxModulation The maximum modulation magnitude used in the SVM.
float_t oneOverDcBus_invV The inverse DC bus voltage value, 1/V.

Macro Definition Documentation

#define SVGEN_100_PERCENT_MODULATION   _IQ(1.0 - 1.0/32768)

Defines 100% modulation for Q15.

1 - 2^(-15)

Definition at line 73 of file 32b/svgen.h.

#define SVGEN_4_OVER_3   _IQ(4.0/3.0)

Defines 4/3.

Definition at line 81 of file 32b/svgen.h.

Referenced by SVGEN_setMaxModulation().

#define SVGEN_MAX_VAB_VOLTAGES   _IQ(1.1547005384)

Defines the maximum reference alpha and beta voltages in PU.

2/sqrt(3)

Definition at line 69 of file 32b/svgen.h.

#define SVGEN_SQRT3_OVER_2   ((float_t)(0.8660254038))

Defines sqrt(3)/2.

Definition at line 67 of file float/svgen.h.

Referenced by SVGEN_run().

#define SVGEN_SQRT3_OVER_2   _IQ(0.8660254038)

Defines sqrt(3)/2.

Definition at line 77 of file 32b/svgen.h.

Referenced by SVGEN_run().

Typedef Documentation

typedef struct _SVGEN_Obj_* SVGEN_Handle

Defines the SVGEN handle.

Definition at line 85 of file float/svgen.h.

typedef struct _SVGEN_Obj_* SVGEN_Handle

Defines the SVGEN handle.

Definition at line 96 of file 32b/svgen.h.

typedef struct _SVGEN_Obj_ SVGEN_Obj

Defines the Space Vector Generator (SVGEN) object.

typedef struct _SVGEN_Obj_ SVGEN_Obj

Defines the Space Vector Generator object.

Function Documentation

static _iq SVGEN_getMaxModulation ( SVGEN_Handle  handle)
inlinestatic

Gets the maximum modulation used in the space vector generator module.

Parameters
[in]handleThe space vector generator (SVGEN) handle
Returns
The maximum modulation

Definition at line 105 of file 32b/svgen.h.

References _SVGEN_Obj_::maxModulation.

static float_t SVGEN_getOneOverDcBus_invV ( SVGEN_Handle  handle)
inlinestatic

Gets the one over DC bus voltage value.

Parameters
[in]handleThe space vector generator (SVGEN) handle
Returns
The inverse DC bus voltage value, 1/V

Definition at line 94 of file float/svgen.h.

References _SVGEN_Obj_::oneOverDcBus_invV.

Referenced by SVGEN_run().

SVGEN_Handle SVGEN_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the space vector generator module.

Parameters
[in]pMemoryA pointer to the space vector generator object memory
[in]numBytesThe number of bytes allocated for the space vector generator object, bytes
Returns
The state vector generator (SVGEN) object handle

Definition at line 55 of file 32b/svgen.c.

static void SVGEN_run ( SVGEN_Handle  handle,
const MATH_vec2 pVab,
MATH_vec3 pT 
)
inlinestatic

Implements a SVM that saturates at the level of MaxModulation.

Parameters
[in]handleThe space vector generator (SVGEN) handle
[in]pVabThe pointer to the a/b voltages
[in]pTThe pointer to the pwm duty cycle time durations

Definition at line 124 of file 32b/svgen.h.

References _IQ, _IQmpy, SVGEN_SQRT3_OVER_2, _MATH_vec2_::value, and _MATH_vec3_::value.

Referenced by CTRL_runOnLine(), and CTRL_runOnLine_User().

static void SVGEN_setMaxModulation ( SVGEN_Handle  handle,
const _iq  maxModulation 
)
inlinestatic

Sets the maximum modulation in the space vector generator module.

Parameters
[in]handleThe space vector generator (SVGEN) handle
[in]maxModulationThe maximum modulation

Definition at line 174 of file 32b/svgen.h.

References _IQ, _SVGEN_Obj_::maxModulation, and SVGEN_4_OVER_3.

Referenced by CTRL_setParams().

static void SVGEN_setOneOverDcBus_invV ( SVGEN_Handle  handle,
const float_t  oneOverDcBus_invV 
)
inlinestatic

Sets the one over DC bus voltage value.

Parameters
[in]handleThe space vector generator (SVGEN) handle
[in]oneOverVbus_invVThe inverse DC bus voltage value, 1/V

Definition at line 172 of file float/svgen.h.

References _SVGEN_Obj_::oneOverDcBus_invV.

Referenced by SVGEN_setup().

static void SVGEN_setup ( SVGEN_Handle  handle,
const float_t  oneOverDcBus_invV 
)
inlinestatic

Sets up the space vector generator (SVGEN) module.

Parameters
[in]handleThe space vector generator (SVGEN) handle
[in]oneOverDcBus_invVThe inverse DC bus voltage value, 1/V

Definition at line 185 of file float/svgen.h.

References SVGEN_setOneOverDcBus_invV().