Data Structures | |
struct | SPLL_3PH_DDSRF_LPF_COEFF |
Defines the coefficients for a loop filter. More... | |
struct | SPLL_3PH_DDSRF |
Defines the SPLL_3PH_DDSRF structure. More... | |
Functions | |
static void | SPLL_3PH_DDSRF_init (float32_t grid_freq, float32_t delta_t, float32_t k1, float32_t k2, SPLL_3PH_DDSRF *spll_obj) |
Initialize SPLL_3PH_DDSRF module. More... | |
static void | SPLL_3PH_DDSRF_reset (SPLL_3PH_DDSRF *spll_obj) |
Reset SPLL_3PH_DDSRF module. More... | |
static void | SPLL_3PH_DDSRF_run (SPLL_3PH_DDSRF *spll_obj, float32_t d_p, float32_t d_n, float32_t q_p, float32_t q_n) |
Run spll_3PH_srf module. More... | |
Typedefs | |
typedef float | float32_t |
typedef long double | float64_t |
Macros | |
#define | C2000_IEEE754_TYPES |
The Software Phase Lock Loop based on decoupled double synchronous reference frame (SPLL_3PH_DDSRF) API provides a set of functions that implements a software phase lock loop based on based on decoupled double synchronous reference frame for grid connection to three phase grid.
The grid is subject to varying conditions which result in imbalances in the phase voltages. From the theory of symmetrical components we know that any unbalanced three phase system can be reduced to two symmetrical systems and zero component. The behavior of unbalanced voltages on park and clark transform is analyzed in the section below.
Now an unbalanced three phase system can be written as summation of balanced three phase systems; one rotating with the sequence of the three phase quantities called the positive sequence and one rotating in the opposite sequence called the negative sequence.
Now resolving the components in the orthogonal axis,
And taking the projections on the rotating reference frame we observe that any negative sequence component appears with twice the frequency on the positive sequence rotating frame axis and vice versa.
This can cause errors in the control loop and estimation of the grid angle and needs to taken into account while designing a phase locked loop for three phase grid connected application.
Hence assuming the instance just before the PLL is locked to the positive vector, the grid voltages can be written as :
Taking the clark transform and ignoring the zero component and the zero sequence
Now taking the park transform using the angle locked by the PLL for the positive sequence:
Hence to get the decoupled value:
The PLL structure is then shown as:
Where the low pass filter transfer function is implemented as follows:
A typical LPF transfer function is given by
In the analog domain, now using bilinear transformation,
Where T is the sampling period the digital low pass filter is run at. Using
and from the discussion in [1] it is known that
for stable response of the PLL, hence choosing
we get
The following is a sequence of steps that can be followed to use the SPLL_3PH_DDSRF 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 using 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:
There is only one module in this package, the APIs can be referenced at SPLL_3PH_DDSRF. The module headers are located at spll_3ph_ddsrf.h.
#define C2000_IEEE754_TYPES |
Definition at line 47 of file spll_3ph_ddsrf.h.
typedef float float32_t |
Definition at line 52 of file spll_3ph_ddsrf.h.
typedef long double float64_t |
Definition at line 53 of file spll_3ph_ddsrf.h.
|
inlinestatic |
Initialize SPLL_3PH_DDSRF module.
grid_freq | The grid frequency |
delta_t | 1/Frequency of calling the PLL routine |
k1 | parameter |
k2 | parameter |
*spll_obj | The SPLL_3PH_DDSRF structure |
Definition at line 115 of file spll_3ph_ddsrf.h.
|
inlinestatic |
Reset SPLL_3PH_DDSRF module.
*spll_obj | The SPLL_3PH_DDSRF structure |
Definition at line 166 of file spll_3ph_ddsrf.h.
|
inlinestatic |
Run spll_3PH_srf module.
*spll_obj | The spll_3PH_ddsrf structure |
d_p | D Positive seq component of the grid voltage |
d_n | D Negative seq component of the grid voltage |
q_p | Q Positive seq component of the grid voltage |
q_n | Q Negative seq component of the grid voltage |
Definition at line 213 of file spll_3ph_ddsrf.h.