C2000Ware Digital Power SDK  5.03.00.00
DQ0_ABC

Introduction

Data Structures

struct  DQ0_ABC
 Defines the DQ0_ABC transform structure. More...
 

Functions

static void DQ0_ABC_reset (DQ0_ABC *v)
 Resets internal data to zero. More...
 
static void DQ0_ABC_run (DQ0_ABC *v, float32_t d, float32_t q, float32_t z, float32_t sine_val, float32_t cosine_val)
 Run DQ0_ABC module. More...
 

Typedefs

typedef float float32_t
 
typedef long double float64_t
 

Macros

#define C2000_IEEE754_TYPES
 

DQ0 to ABC Transform for positive and negative sequence (DQ0_ABC) Module

Introduction

The DQ0 to ABC Transform for positive and negative sequence (DQ0_ABC) API provides a set of functions that implements the transform from DQ0 to ABC for positive and negative rotating vectors.

DQ0 to ABC Transform Model


The block converts the stationary frame quantities into three phase quantities

\[ V_{abc} = T_{dq0+->abc}v_{dq0+} \]

Also

\[ V_{abc} = T_{dq0-->abc}v_{dq0-} \]

DQ0_ABC Usage

The following is a sequence of steps that can be followed to use the DQ0_ABC 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 "dqo_abc.h"

  2. Create and add module structure to project source file, this is typically in the solution.c file for Digital Power SDK examples
    DQ0_ABC dq0_abc1;
    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 DQ0_ABC dq0_abc1;

  3. Initialize module
    DQ0_ABC_reset(&dq0_abc1);

  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.
    DQ0_ABC_run(&dq0_abc1,
    dq0_abc1_D, dq0_abc1_Q, dq0_abc1_Z,
    dq0_abc1_sine, dq0_abc1_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 is only one modules in this package, the APIs can be referenced at DQ0_ABC. The module headers are located at dq0_abc.h

Macro Definition Documentation

◆ C2000_IEEE754_TYPES

#define C2000_IEEE754_TYPES

Definition at line 47 of file dq0_abc.h.

Typedef Documentation

◆ float32_t

typedef float float32_t

Definition at line 52 of file dq0_abc.h.

◆ float64_t

typedef long double float64_t

Definition at line 53 of file dq0_abc.h.

Function Documentation

◆ DQ0_ABC_reset()

static void DQ0_ABC_reset ( DQ0_ABC v)
inlinestatic

Resets internal data to zero.

Parameters
*vThe DQ0_ABC structure pointer
Returns
None

Definition at line 78 of file dq0_abc.h.

◆ DQ0_ABC_run()

static void DQ0_ABC_run ( DQ0_ABC v,
float32_t  d,
float32_t  q,
float32_t  z,
float32_t  sine_val,
float32_t  cosine_val 
)
inlinestatic

Run DQ0_ABC module.

Parameters
*vThe DQ0_ABC structure pointer
dd ref value
qq ref value
zz ref value
sine_valsine value of the grid angle
cosine_valcosine value of the grid angle
Returns
None

Definition at line 96 of file dq0_abc.h.

DQ0_ABC_reset
static void DQ0_ABC_reset(DQ0_ABC *v)
Resets internal data to zero.
Definition: dq0_abc.h:78
DQ0_ABC_run
static void DQ0_ABC_run(DQ0_ABC *v, float32_t d, float32_t q, float32_t z, float32_t sine_val, float32_t cosine_val)
Run DQ0_ABC module.
Definition: dq0_abc.h:96
DQ0_ABC
Defines the DQ0_ABC transform structure.
Definition: dq0_abc.h:66