Jump to main content

##

# 3.3.10 mcFoc_InverseParkTransformation

## C

    /* Floating point Inverse Park Transformation */
    void mcFoc_InverseParkTransformation( const tmcTypes_DQ_s * const pDQ, const float32_t sine, const float32_t cosine,
                                                                                 tmcTypes_AlphaBeta_s * const pAlphaBeta )

    /* Fixed point Inverse Park Transformation */
    void mcFoc_InverseParkTransformation(const tmcTypes_DQ_s * const pDQ, const int16_t sine, const int16_t cosine,
                                                                                  tmcTypes_AlphaBeta_s * const pAlphaBeta)

## Summary

Inverse Park Transformation.

## Description

This function performs the inverse Park transformation to convert rotating reference frame (D-Q) currents into stationary reference frame (alpha-beta) currents . When the d-axis is aligned with the rotor flux, the following mathematical equations illustrate the current vector and the relationship between the two reference frames.

X α=X d cos⁡θ e−X q sin⁡θ e
X β=X d sin⁡θ e+X q c o s⁡θ e

where X α and X β are the stationary reference frame components, X d and X q are rotating reference frame components and cos⁡θ e and sin⁡θ e are the cosine and sine values of theta (rotor flux position angle)

## Precondition

None..

## Parameters

Param | Description
--- | ---
pAlphaBeta | A pointer to the structure holding alpha-beta currents.
sine | Sine value of the electrical angle. Refer the generated header for the exact data type.
cosine | Cosine value of the electrical angle. Refer the generated header for the exact data type.
pDQ | A pointer to the structure holding DQ currents.

## Returns

None. The results of the transformation are stored in the structure pointed to by alphaBetaCurrents.

## Example

    // Define the parameters for floating point Inverse Park Transformation
    tmcTypes_DQ_s dqCurrents = { .d = 1.0f, .q = 0.5f };
    float32_t sineValue = sin(electricalAngle);
    float32_t cosineValue = cos(electricalAngle);
    tmcTypes_AlphaBeta_s alphaBetaCurrents;

    // Define the parameters for floating point Inverse Park Transformation

    tmcTypes_DQ_s dqCurrents = { .d = 1, .q = 2 };
    int16_t sineValue = sin(electricalAngle);
    int16_t cosineValue = cos(electricalAngle);
    tmcTypes_AlphaBeta_s alphaBetaCurrents;

    mcFoc_InverseParkTransformation( &dqCurrents, sine, cosine, &alphaBetaCurrents );

## Remarks

Refer the generated header file for the exact function signature.