#### Phase-locked loop technology and the impact of non-ideal power grids

**Phase-locked loop technology**

Using the principle of feedback control to achieve frequency and phase synchronization is called phase lock. Its goal is to provide a current reference signal with high sine degree to achieve unit power factor operation of the photovoltaic grid-connected power generation system, that is, the grid current is synchronized with the grid voltage. At the same time, the photovoltaic power generation system uses the phase-locked loop to monitor the parameters of the grid voltage (such as the grid voltage amplitude and frequency) in real time, so as to ensure the working performance and status of the grid-connected converter. To some extent, the performance of the phase-locked loop determines the performance of the grid-connected control system.

At present, the common digital phase-locked loop structure in the three-phase system is divided into two types, namely the phase-locked loop based on the synchronous rotating coordinate system (SSREF_PLL) and the phase-locked loop based on the variable sampling period (VSP_PLL).

The phase-locked loop (SSREF_PLL) based on the synchronous rotating coordinate system achieves the purpose of phase locking through the tracking principle of the synchronous rotating coordinate system, and its structure diagram is shown in Figure 1. Sampling the three-phase power grid voltage, perform abc/αβ transformation on it, and obtain the vectors e_{α} and e_{β} in the αβ static coordinate system corresponding to the three-phase power grid voltage. Taking the output signal θ of the phase-locked loop as the phase angle of the d-axis in the dq synchronous rotating coordinate system, the αβ/dq transformation is performed on e_{α} and e_{β} to obtain the voltage e_{q} representing the phase difference between the grid voltage and the output signal. Finally, the error voltage e_{q} is controlled by the regulator so that e_{q}=0 to achieve the lock of the grid voltage phase.

The structure diagram of the phase-locked loop (VSP_PLL) based on the variable sampling period is shown in Figure 2. The phase-locked loop system uses a typical digital adjustment method. The system samples the grid voltage phase signal θ_{u} and the reference phase signal θ_{ref}, compares the phase difference e_{θ}, and then outputs the sampling period T_{s} through the regulator. The phase-locked loop adjusts T_{s} so that the phase of the grid voltage is equal to the reference phase, and finally achieves phase-lock.

The phase tracking of the single-phase system needs to use the quadrature decomposition method, and the main difference of various phase-locked loop structures lies in the realization of the different quadrature signal modules. Among them, the simpler method is to use a traditional delay module to generate a signal with a phase difference of 90° and a frequency and amplitude consistent with the grid voltage, which forms a pair of orthogonal components with the grid voltage fundamental wave. There are other slightly more complicated methods for generating orthogonal signals: Hilbert transform, inverse Park transform, etc. However, these methods have some drawbacks, such as being independent of the grid frequency, complex implementation, nonlinear characteristics, and poor filtering. The phase-locked loop of single-phase system needs to find a better way to realize the quadrature component.

**Impact of non-ideal grid**

The actual grid is not an ideal voltage source. First of all, the grid voltage contains a lot of low-frequency voltage harmonics; secondly, due to the large number of new energy distributed power generation, the access of low-frequency transformers and the influence of long transmission lines, from the Point of Common Coupling (PCC) of the grid-connected inverter, the actual power grid presents an ideal voltage source in series with an impedance. Since the grid impedance is generally inductive, it can be equivalent to the resistance component r_{g} and the inductive component L_{g} in series, as shown in Figure 3. The background harmonics of the grid voltage will cause distortion of the grid current waveform, which will seriously affect the quality of the grid current; the existence of grid impedance may not only affect the response characteristics of the system, reduce the quality of the current into the grid, and even affect the stability of the system. Robust control and adaptive control strategies are two effective ways to suppress the adverse effects of non-ideal grids on the incoming current.

In addition, there are a large number of single-phase loads and system faults in the actual power system, which will cause the amplitude and phase of the three-phase grid voltage to be different, that is, the three-phase grid voltage is unbalanced. Generally speaking, there are two main reasons for the voltage imbalance of the three-phase power grid: accident and normal. Among them, accidental refers to the single-phase, two-phase disconnection and single-phase grounding caused by system faults. For such faults, the power grid generally has a protection function. When an accident occurs, the power grid will remove the source of the fault to ensure the normal operation of the system. Therefore, the grid voltage imbalance referred to in this article is a normal grid voltage imbalance, which is mainly caused by three-phase load imbalance and transmission line parameter imbalance. For an unbalanced three-phase power grid, there are not only positive sequence components, but also negative sequence and harmonic components in the grid voltage. Among them, the negative sequence and harmonic components will adversely affect the control of the grid-connected inverter.

The traditional grid-connected control under the ideal grid needs to be converted to the dq rotating coordinate system, and the amplitude and phase of the grid-side current are controlled through the PI regulator. Because the PI regulator can only adjust the direct flow without static error, when the three-phase power grid is unbalanced, taking the negative sequence voltage as an example, the power grid voltage and grid side current have double frequency pulsation in the forward synchronous rotating coordinate system. At this time, PI regulation cannot filter the pulsating signal, and the tracking ability and steady-state performance of phase-locked loop and grid connected current loop are greatly affected. There will inevitably be a large number of negative sequence components and low-frequency harmonic components in the grid side current, which will burn out the whole equipment and even affect other loads connected to the grid.