Data Structures | Typedefs | Functions
CLARKE

Data Structures

struct  _CLARKE_Obj_
 Defines the CLARKE object. More...
 

Typedefs

typedef struct _CLARKE_Obj_ CLARKE_Obj
 Defines the CLARKE object. More...
 
typedef struct _CLARKE_Obj_CLARKE_Handle
 Defines the CLARKE handle. More...
 

Functions

static uint_least8_t CLARKE_getNumSensors (CLARKE_Handle handle)
 Gets the number of sensors. More...
 
CLARKE_Handle CLARKE_init (void *pMemory, const size_t numBytes)
 Initializes the Clarke transform module. More...
 
CLARKE_Handle cla_CLARKE_init (void *pMemory, const size_t numBytes)
 
static void CLARKE_run (CLARKE_Handle handle, const MATH_Vec3 *pInVec, MATH_Vec2 *pOutVec)
 Runs the Clarke transform module for three inputs. More...
 
static void CLARKE_run_twoInput (CLARKE_Handle handle, const MATH_Vec2 *pInVec, MATH_Vec2 *pOutVec)
 Runs the Clarke transform module for two inputs. More...
 
static void CLARKE_setNumSensors (CLARKE_Handle handle, const uint_least8_t numSensors)
 Sets the number of sensors. More...
 
static void CLARKE_setScaleFactors (CLARKE_Handle handle, const float32_t alpha_sf, const float32_t beta_sf)
 Sets the scale factors. More...
 

Detailed Description

Clarke (CLARKE) Transform Module

Description

This module performs the Clarke transformation, which translates a vector represented in a three phase coordinate system (a,b,c) into a vector represented in a two phase orthogonal reference frame ( $ \alpha,\beta $). The following figure shows the coordinate transformation of a general vector x, which can be expressed in either coordinate system.

The Clarke transform can be described mathematically as follows:

\[ x_{\alpha} = \frac{2}{3}x_{a} - \frac{1}{3}(x_{b}+x_{c}) \]

\[ x_{\beta} = \frac{1}{\sqrt{3}}(x_{b} - x_{c}) \]


where

$ x_{\alpha} $ is the projection of the original vector in the $ X_{\alpha} $ direction
$ x_{\beta} $ is the projection of the original vector in the $ X_{\beta} $ direction
$ x_{a} $ is the projection of the original vector in the $ X_{a} $ direction
$ x_{b} $ is the projection of the original vector in the $ X_{b} $ direction
$ x_{c} $ is the projection of the original vector in the $ X_{c} $ direction

Please see the CLARKE_init(), and CLARKE_run() functions define in clarke.h for more details.

Integration Information

There is only one module in this package, the APIs can be referenced at CLARKE. The API headers can be located at clarke.h.

Typedef Documentation

◆ CLARKE_Obj

typedef struct _CLARKE_Obj_ CLARKE_Obj

Defines the CLARKE object.

◆ CLARKE_Handle

typedef struct _CLARKE_Obj_* CLARKE_Handle

Defines the CLARKE handle.

Function Documentation

◆ CLARKE_getNumSensors()

static uint_least8_t CLARKE_getNumSensors ( CLARKE_Handle  handle)
inlinestatic

Gets the number of sensors.

Parameters
[in]handleThe Clarke transform handle
Returns
The number of sensors

References _CLARKE_Obj_::numSensors.

◆ CLARKE_init()

CLARKE_Handle CLARKE_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the Clarke transform module.

Parameters
[in]pMemoryA pointer to the memory for the Clarke object
[in]numBytesThe number of bytes allocated for the Clarke object
Returns
The Clarke (CLARKE) object handle

◆ cla_CLARKE_init()

CLARKE_Handle cla_CLARKE_init ( void *  pMemory,
const size_t  numBytes 
)

◆ CLARKE_run()

static void CLARKE_run ( CLARKE_Handle  handle,
const MATH_Vec3 pInVec,
MATH_Vec2 pOutVec 
)
inlinestatic

Runs the Clarke transform module for three inputs.

Parameters
[in]handleThe Clarke transform handle
[in]pInVecThe pointer to the input vector
[in]pOutVecThe pointer to the output vector
Returns
None

References _CLARKE_Obj_::alpha_sf, _CLARKE_Obj_::beta_sf, _CLARKE_Obj_::numSensors, _MATH_Vec2_::value, and _MATH_Vec3_::value.

◆ CLARKE_run_twoInput()

static void CLARKE_run_twoInput ( CLARKE_Handle  handle,
const MATH_Vec2 pInVec,
MATH_Vec2 pOutVec 
)
inlinestatic

Runs the Clarke transform module for two inputs.

Parameters
[in]handleThe Clarke transform handle
[in]pInVecThe pointer to the input vector
[in]pOutVecThe pointer to the output vector
Returns
None

References _CLARKE_Obj_::beta_sf, and _MATH_Vec2_::value.

◆ CLARKE_setNumSensors()

static void CLARKE_setNumSensors ( CLARKE_Handle  handle,
const uint_least8_t  numSensors 
)
inlinestatic

Sets the number of sensors.

Parameters
[in]handleThe Clarke transform handle
[in]numSensorsThe number of sensors
Returns
None

References _CLARKE_Obj_::numSensors.

◆ CLARKE_setScaleFactors()

static void CLARKE_setScaleFactors ( CLARKE_Handle  handle,
const float32_t  alpha_sf,
const float32_t  beta_sf 
)
inlinestatic

Sets the scale factors.

Parameters
[in]handleThe Clarke transform handle
[in]alpha_sfThe scale factor for the alpha voltage
[in]beta_sfThe scale factor for the beta voltage
Returns
None

References _CLARKE_Obj_::alpha_sf, and _CLARKE_Obj_::beta_sf.


Copyright 2023, Texas Instruments Incorporated