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... | |
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 ( ). 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:
where
is the projection of the original vector in the direction
is the projection of the original vector in the direction
is the projection of the original vector in the direction
is the projection of the original vector in the direction
is the projection of the original vector in the direction
Please see the CLARKE_init(), and CLARKE_run() functions define in clarke.h for more details.
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 struct _CLARKE_Obj_ CLARKE_Obj |
Defines the CLARKE object.
typedef struct _CLARKE_Obj_* CLARKE_Handle |
Defines the CLARKE handle.
|
inlinestatic |
Gets the number of sensors.
[in] | handle | The Clarke transform handle |
References _CLARKE_Obj_::numSensors.
CLARKE_Handle CLARKE_init | ( | void * | pMemory, |
const size_t | numBytes | ||
) |
Initializes the Clarke transform module.
[in] | pMemory | A pointer to the memory for the Clarke object |
[in] | numBytes | The number of bytes allocated for the Clarke object |
CLARKE_Handle cla_CLARKE_init | ( | void * | pMemory, |
const size_t | numBytes | ||
) |
|
inlinestatic |
Runs the Clarke transform module for three inputs.
[in] | handle | The Clarke transform handle |
[in] | pInVec | The pointer to the input vector |
[in] | pOutVec | The pointer to the output vector |
References _CLARKE_Obj_::alpha_sf, _CLARKE_Obj_::beta_sf, _CLARKE_Obj_::numSensors, _MATH_Vec2_::value, and _MATH_Vec3_::value.
|
inlinestatic |
Runs the Clarke transform module for two inputs.
[in] | handle | The Clarke transform handle |
[in] | pInVec | The pointer to the input vector |
[in] | pOutVec | The pointer to the output vector |
References _CLARKE_Obj_::beta_sf, and _MATH_Vec2_::value.
|
inlinestatic |
Sets the number of sensors.
[in] | handle | The Clarke transform handle |
[in] | numSensors | The number of sensors |
References _CLARKE_Obj_::numSensors.
|
inlinestatic |
Sets the scale factors.
[in] | handle | The Clarke transform handle |
[in] | alpha_sf | The scale factor for the alpha voltage |
[in] | beta_sf | The scale factor for the beta voltage |
References _CLARKE_Obj_::alpha_sf, and _CLARKE_Obj_::beta_sf.