C2000Ware Digital Power SDK  5.03.00.00
ABC_DQ0_POSNEG

Introduction

Data Structures

struct  ABC_DQ0_NEG
 Defines the ABC_DQ0_NEG transform structure. More...
 
struct  ABC_DQ0_POS
 Defines the ABC_DQ0_POS transform structure. More...
 

Functions

static void ABC_DQ0_NEG_reset (ABC_DQ0_NEG *v)
 Resets internal data to zero. More...
 
static void ABC_DQ0_NEG_run (ABC_DQ0_NEG *v, float32_t a, float32_t b, float32_t c, float32_t sine_val, float32_t cosine_val)
 Runs ABC_DQ0_NEG routine. More...
 
static void ABC_DQ0_POS_reset (ABC_DQ0_POS *v)
 Resets internal data to zero. More...
 
static void ABC_DQ0_POS_run (ABC_DQ0_POS *v, float32_t a, float32_t b, float32_t c, float32_t sine_val, float32_t cosine_val)
 Run ABC_DQ0_POS routine. More...
 

Typedefs

typedef float float32_t
 
typedef long double float64_t
 
typedef float float32_t
 
typedef long double float64_t
 

Macros

#define C2000_IEEE754_TYPES
 
#define C2000_IEEE754_TYPES
 

ABC to DQ0 Positive & Negative Sequence Transform (ABC_DQ0_POSNEG) Module

Introduction

The Positive & Negative Sequence Transform frame (ABC_DQ0_POSN and ABC_DQ0_NEG) API provides a set of functions that implements the transform from ABC to DQ0 axis.

Positive & Negative Sequence Transform Model


The block converts the three phase quantities into DC quantities in rotating reference frame for positive and negative sequence.

\[ v_{dq+} = T_{abc->dq0+}V_{abc} = T_{abc->\alpha\beta} * T_{\alpha\beta->dq} * V_{abc} \]

Where:

and

and

ABC_DQ0_POSNEG API Usage

The following is a sequence of steps that can be followed to use the ABC_DQ0_POS and ABC_DQ0_NEG API library functions in an existing C program. For a set of code examples that illustrates the use of this library, see the examples in the Digial Power SDK.

Before you can use the library you must add the libraries directory path as a searchable directory in the project include options. This can be done by right-clicking on the project in the Project Explorer window, selecting "Properties". In the window that opens, navigate to "Build, C2000 Compiler, Include Options". In the include path window, click on the green add directory path button on the right and enter the path to the Digital Power SDK libraries directory.

This allows CCS to search the entire directory for library files.

Once that is done you should follow these steps to incorporate the library into a project:

  1. Specify the include file(s)
    #include "abc_dqo_pos.h"
    #include "abc_dqo_neg.h"

  2. Create and add module structure to project source file, this is typically in the solution.c file for Digital Power SDK examples
    ABC_DQ0_NEG abc_dq0_pos1;
    ABC_DQ0_POS abc_dq0_neg1;
    Note: In the Digital Power SDK the modules are also externed in the solution.h header file as the module is used by static inline functions defined in the solution.h file.
    extern ABC_DQ0_NEG abc_dq0_pos1;
    extern ABC_DQ0_POS abc_dq0_neg1;

  3. Initialize module
    ABC_DQ0_POS_IQ_reset(&abc_dq0_pos1);
    ABC_DQ0_NEG_IQ_reset(&abc_dq0_neg1);

  4. Using the module
    Note: The run time module is called in the interrupt service routine running at ISR_FREQUENCY by passing the pu value of the measured voltages or currents in pu. The sine and cosine values are also passed to the module, which are typically computed from the PLL angle.
    ABC_DQ0_POS_run(&abc_dq0_pos1,
    abc_dq0_pos1_A, abc_dq0_pos1_B, abc_dq0_pos1_C,
    abc_dqo_pos1_sine, abc_dq0_pos1_cosine);
    ABC_DQ0_NEG_run(&abc_dqo_neg1,
    abc_dqo_neg1_A, abc_dqo_neg1_B, abc_dqo_neg1_C,
    abc_dqo_pos1_sine, abc_dqo_neg1_cosine);


    Note: The functions are typically called in an interrupt source routine (ISR) which is called at the defined rate, ISR_FREQUENCY.

API Integration Information

There are two modules in this package, the APIs can be referenced at ABC_DQ0_NEG and ABC_DQ0_POS. The module headers are located at abc_dq0_pos.h and abc_dq0_pos.h .

Macro Definition Documentation

◆ C2000_IEEE754_TYPES [1/2]

#define C2000_IEEE754_TYPES

Definition at line 47 of file abc_dq0_neg.h.

◆ C2000_IEEE754_TYPES [2/2]

#define C2000_IEEE754_TYPES

Definition at line 47 of file abc_dq0_pos.h.

Typedef Documentation

◆ float32_t [1/2]

typedef float float32_t

Definition at line 52 of file abc_dq0_neg.h.

◆ float64_t [1/2]

typedef long double float64_t

Definition at line 53 of file abc_dq0_neg.h.

◆ float32_t [2/2]

typedef float float32_t

Definition at line 52 of file abc_dq0_pos.h.

◆ float64_t [2/2]

typedef long double float64_t

Definition at line 53 of file abc_dq0_pos.h.

Function Documentation

◆ ABC_DQ0_NEG_reset()

static void ABC_DQ0_NEG_reset ( ABC_DQ0_NEG v)
inlinestatic

Resets internal data to zero.

Parameters
*vThe ABC_DQ0_NEG structure pointer
Returns
None

Definition at line 79 of file abc_dq0_neg.h.

◆ ABC_DQ0_NEG_run()

static void ABC_DQ0_NEG_run ( ABC_DQ0_NEG v,
float32_t  a,
float32_t  b,
float32_t  c,
float32_t  sine_val,
float32_t  cosine_val 
)
inlinestatic

Runs ABC_DQ0_NEG routine.

Parameters
*vThe ABC_DQ0_NEG structure pointer
aPhase a value
bPhase b value
cPhase c value
sine_valsine value of the grid angle
cosine_valcosine value of the grid angle
Returns
None

Definition at line 97 of file abc_dq0_neg.h.

◆ ABC_DQ0_POS_reset()

static void ABC_DQ0_POS_reset ( ABC_DQ0_POS v)
inlinestatic

Resets internal data to zero.

Parameters
*vThe ABC_DQ0_POS structure pointer
Returns
None

Definition at line 78 of file abc_dq0_pos.h.

◆ ABC_DQ0_POS_run()

static void ABC_DQ0_POS_run ( ABC_DQ0_POS v,
float32_t  a,
float32_t  b,
float32_t  c,
float32_t  sine_val,
float32_t  cosine_val 
)
inlinestatic

Run ABC_DQ0_POS routine.

Parameters
*vThe ABC_DQ0_POS structure pointer
aPhase a value
bPhase b value
cPhase c value
sine_valsine value of the grid angle
cosine_valcosine value of the grid angle
Returns
None

Definition at line 96 of file abc_dq0_pos.h.

ABC_DQ0_POS_run
static void ABC_DQ0_POS_run(ABC_DQ0_POS *v, float32_t a, float32_t b, float32_t c, float32_t sine_val, float32_t cosine_val)
Run ABC_DQ0_POS routine.
Definition: abc_dq0_pos.h:96
ABC_DQ0_POS
Defines the ABC_DQ0_POS transform structure.
Definition: abc_dq0_pos.h:66
ABC_DQ0_NEG
Defines the ABC_DQ0_NEG transform structure.
Definition: abc_dq0_neg.h:67
ABC_DQ0_NEG_run
static void ABC_DQ0_NEG_run(ABC_DQ0_NEG *v, float32_t a, float32_t b, float32_t c, float32_t sine_val, float32_t cosine_val)
Runs ABC_DQ0_NEG routine.
Definition: abc_dq0_neg.h:97