# Enhanced Quasi Type-1 PLL-Based Multi-Functional Control of Single-Phase Dynamic Voltage Restorer
## 2 DVR Modeling and Problem Formulation  
In this study, we consider a single-phase DVR. A connection diagram of the DVR is given in Figure 1. In this configuration, the DVR, which is a full-bridge voltage source inverter, is connected in series through a transformer to the protected load. Isolation between the load the DVR is provided by the transformer. Grid voltage sensor is used to continuously monitor the deviation from the reference voltage, and the appropriate compensation voltage is injected by the DVR to maintain the ideal voltage at the protected load terminal. Filter current and compensation voltage dynamics of the DVR are given by the following:  
\[\frac{di_{f}}{dt} = \frac{1}{L_{f}}(v_{i}-v_{c}), \tag{1}\] \[\frac{dv_{c}}{dt} = \frac{1}{C_{f}}\Big{(}i_{f}-i_{g}\Big{)}, \tag{2}\]  
where \(v_{i}\), \(v_{g}\), \(v_{c}\), \(i_{f}\), \(i_{g}\), \(L_{f}\), and \(C_{f}\) denote the input voltage by the DVR, grid voltage, compensation voltage, filter current, filter inductance, and filter capacitance, respectively. The DVR voltage can be expressed as \(v_{i}=uV_{dc}\) where the DC-link voltage is denoted by \(V_{dc}\), and the control signal is given by \(u\). Moreover, in the ideal case, one can also write the following.  
\[v_{c}=v_{g}-v_{L}. \tag{3}\]In normal operating condition, the compensation voltage given by (3) will be zero. However, in practice, the grid voltage is never ideal. Various grid anomalies such as voltage sag/swell, harmonics, noise, etc., are present. In this case, (3) can no longer be used for the compensation voltage calculation. In order to ensure that the sensitive load voltage remains as close as possible to the desired voltage, reference voltage needs to be calculated and this voltage should be in-phase with the grid voltage fundamental for the efficient operation by the DVR. Let us consider that the reference voltage is denoted by \(v_{c}^{\text{ref}}\). Then, the tracking error and its derivative are given by the following.  
\[\xi_{1} = v_{c}^{\text{ref}}-v_{c}, \tag{4}\] \[\xi_{2} = \dot{\xi}_{1}=v_{c}^{\text{ref}}-\dot{v}_{c}. \tag{5}\]  
Then, by substituting the DVR dynamical Equations (1) and (2) into (4) and (5), the DVR tracking error dynamics can be obtained as follows:  
\[\frac{d\xi_{1}}{dt} = \xi_{2}, \tag{6}\] \[\frac{d\xi_{2}}{dt} = -\delta\xi_{1}+\delta uV_{dc}+w, \tag{7}\]  
where the coefficient \(\delta=1/\left(L_{f}C_{f}\right)\) and the perturbation term \(w(t)\) is given by the following.  
\[w(t)=-\frac{1}{C_{f}}\frac{dig}{dt}-\delta v_{c}^{\text{ref}}-\dot{v}_{c}^{ \text{ref}}.\]  
It is assumed that the perturbation term \(w(t)\) has a bounded derivative and is upper bounded by \(\mid\frac{dw}{dt}\mid\leq W,W>0\). Thus, the control of DVR is essentially divided into two parts. In part 1, the problem is to generate the reference voltage \(v_{c}^{\text{ref}}\) from the measured grid voltage \(v_{g}\). In part 2, the problem is to find the control signal \(u\) that will ensure that the tracking errors converge asymptotically to zero. These two issues are addressed in the following two sections.