Data Structures | Typedefs | Functions
PARK

Data Structures

struct  _PARK_Obj_
 Defines the PARK object. More...
 

Typedefs

typedef struct _PARK_Obj_ PARK_Obj
 Defines the PARK object. More...
 
typedef struct _PARK_Obj_PARK_Handle
 Defines the PARK handle. More...
 

Functions

static float32_t PARK_getCosTh (PARK_Handle handle)
 Gets the cosine of the angle between the d,q and the alpha, beta coordinate systems. More...
 
static void PARK_getPhasor (PARK_Handle handle, MATH_Vec2 *pPhasor)
 Gets the cosine/sine phasor for the Park transform. More...
 
static float32_t PARK_getSinTh (PARK_Handle handle)
 Gets the sine of the angle between the d,q and the alpha, beta coordinate systems. More...
 
PARK_Handle PARK_init (void *pMemory, const size_t numBytes)
 Initializes the Park transform module. More...
 
PARK_Handle cla_PARK_init (void *pMemory, const size_t numBytes)
 
static void PARK_run (PARK_Handle handle, const MATH_Vec2 *pInVec, MATH_Vec2 *pOutVec)
 Runs the Park transform module. More...
 
static void PARK_setCosTh (PARK_Handle handle, const float32_t cosTh)
 Sets the cosine of the angle between the d,q and the alpha, beta coordinate systems. More...
 
static void PARK_setPhasor (PARK_Handle handle, const MATH_Vec2 *pPhasor)
 Sets the cosine/sine phasor for the inverse Park transform. More...
 
static void PARK_setSinTh (PARK_Handle handle, const float32_t sinTh)
 Sets the sine of the angle between the d,q and the alpha, beta coordinate systems. More...
 
static void PARK_setup (PARK_Handle handle, const float32_t Th)
 Sets up the Park transform module. More...
 

Detailed Description

Park (PARK) Transform Module

Description

This module performs the inverse Park transformation, which translates a vector in a two phase orthogonal reference frame ( $ \alpha,\beta $) into a rotated two phase orthogonal coordinate system (d,q). The following figure shows the coordinate transformation of a general vector x, which can be expressed in either coordinate system.

The Park transform can be described mathematically as follows:

\[ x_{\alpha} = x_{d}cos(\theta) + x_{q}sin(\theta) \]

\[ x_{\beta} = -x_{d}sin(\theta) + x_{q}cos(\theta) \]


where

$ \theta $ is the angle between the two coordinate systems
$ 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_{d} $ is the projection of the original vector in the $ X_{d} $ direction
$ x_{q} $ is the projection of the original vector in the $ X_{q} $ direction
$ sin() $ is a sine function
$ cos() $ is a cosine function

Please see the PARK_init(), PARK_setup() and PARK_run() functions define in park.h for more details.

Integration Information

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

Typedef Documentation

◆ PARK_Obj

typedef struct _PARK_Obj_ PARK_Obj

Defines the PARK object.

◆ PARK_Handle

typedef struct _PARK_Obj_* PARK_Handle

Defines the PARK handle.

Function Documentation

◆ PARK_getCosTh()

static float32_t PARK_getCosTh ( PARK_Handle  handle)
inlinestatic

Gets the cosine of the angle between the d,q and the alpha, beta coordinate systems.

Parameters
[in]handleThe Park transform handle
Returns
The cosine of the angle

References _PARK_Obj_::cosTh.

◆ PARK_getPhasor()

static void PARK_getPhasor ( PARK_Handle  handle,
MATH_Vec2 pPhasor 
)
inlinestatic

Gets the cosine/sine phasor for the Park transform.

Parameters
[in]handleThe Park transform handle
[in]pPhasorThe pointer to the cosine/sine phasor
Returns
None

References _PARK_Obj_::cosTh, _PARK_Obj_::sinTh, and _MATH_Vec2_::value.

◆ PARK_getSinTh()

static float32_t PARK_getSinTh ( PARK_Handle  handle)
inlinestatic

Gets the sine of the angle between the d,q and the alpha, beta coordinate systems.

Parameters
[in]handleThe Park transform handle
Returns
The sine of the angle

References _PARK_Obj_::sinTh.

◆ PARK_init()

PARK_Handle PARK_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the Park transform module.

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

◆ cla_PARK_init()

PARK_Handle cla_PARK_init ( void *  pMemory,
const size_t  numBytes 
)

◆ PARK_run()

static void PARK_run ( PARK_Handle  handle,
const MATH_Vec2 pInVec,
MATH_Vec2 pOutVec 
)
inlinestatic

Runs the Park transform module.

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

References _PARK_Obj_::cosTh, _PARK_Obj_::sinTh, and _MATH_Vec2_::value.

◆ PARK_setCosTh()

static void PARK_setCosTh ( PARK_Handle  handle,
const float32_t  cosTh 
)
inlinestatic

Sets the cosine of the angle between the d,q and the alpha, beta coordinate systems.

Parameters
[in]handleThe Park transform handle
[in]cosThThe cosine of the angle
Returns
None

References _PARK_Obj_::cosTh.

◆ PARK_setPhasor()

static void PARK_setPhasor ( PARK_Handle  handle,
const MATH_Vec2 pPhasor 
)
inlinestatic

Sets the cosine/sine phasor for the inverse Park transform.

Parameters
[in]handleThe Park transform handle
[in]pPhasorThe pointer to the cosine/sine phasor, pu
Returns
None

References _PARK_Obj_::cosTh, _PARK_Obj_::sinTh, and _MATH_Vec2_::value.

◆ PARK_setSinTh()

static void PARK_setSinTh ( PARK_Handle  handle,
const float32_t  sinTh 
)
inlinestatic

Sets the sine of the angle between the d,q and the alpha, beta coordinate systems.

Parameters
[in]handleThe Park transform handle
[in]sinThThe sine of the angle
Returns
None

References _PARK_Obj_::sinTh.

◆ PARK_setup()

static void PARK_setup ( PARK_Handle  handle,
const float32_t  Th 
)
inlinestatic

Sets up the Park transform module.

Parameters
[in]handleThe Park transform handle
[in]ThThe angle between the d,q and the alpha, beta coordinate systems, rad
Returns
None

References _PARK_Obj_::cosTh, and _PARK_Obj_::sinTh.


Copyright 2023, Texas Instruments Incorporated