DQ-type PLL
Table of Contents
The DQ-type PLL is a basic Phase-Locked Loop (PLL) used to extract the phase information of three-phase voltages. It operates by minimizing the voltage projected on the quadrature axis in a rotating frame reference. Further details on the implementation of DQ-type PLL can be found on the page: Synchronous reference frame (SRF) PLL.
A typical use case is shown below, where the PLL block and an abc-to-dq0 transformation are used to extract the angle of three-phase voltages:
Simulink block
Signal specification
- The input signal
VDQ0
is the dq0 representation (obtained using the Park transform [abc->dq]) of a set of three-phase voltages. - The output signal
θ
is the phase angle of the set of three-phase voltages, in radians. - The output
ω
is the angular frequency in of the set of three-phase voltages, in rad/s.
Parameters
Nominal frequency (Hz)
is the three-phase voltages’ nominal frequency.PI controller proportional gain (Kp)
is the proportional gain of the PI controller inside the PLL.PI controller integral gain (Ki)
is the integral gain of the PI controller inside the PLL.Show frequency output
checkbox adds an additional output signal to the DQ-type PLL block, containing the angular frequency of the three-phase voltages.
PLECS block
The DQ-type PLL block is not available in PLECS. The PLECS block Three-Phase PLL can be used instead.
C++ functions
The user template located in the installation folder of CPP SDK contains an API folder with implementations of the PLLs functions. The DQ-type PLL functions are the following:
The structures used in the above functions are detailed below:
/**
* Parameters for the DQ-based Phase-Locked Loop. Parameter omega0 refers to
* the nominal angular frequency of the sinusoidal signal
*/
typedef struct{
float theta; // Phase angle of the grid voltage
float omega; // Debug only: is not a state variable
float omega0; // Default grid frequency (feedforward quantity)
float ts; // Sampling interval
PIDController PI_reg; // Corresponding PID controller pseudo-object
} DQPLLParameters;
Code language: C++ (cpp)
// Three-phase quantity in complex form (ABG or DQ0 reference frames)
typedef struct{
float real;
float imaginary;
float offset;
} SpaceVector;
Code language: C++ (cpp)