*3.2. The Hybrid Filtering Stage*

According to the analysis of components in distorted grid voltages, a hybrid filter is well designed to eliminate the undesired components listed in Table 1. The hybrid filtering stage consists of an MDSC operator and two MAFs, which are arranged after Park transformation at the inner loop of the proposed PLL. MDSC is responsible for rejecting the FFNS component. Other dominant components are eliminated by two MAFs.

To achieve this goal, *m* and *n*, which are the parameters in MDSC, are chosen to be *m* = 4 and *n* = 8, respectively. The window length of MAF is set to be 1/300 s. The gain and phase of MDSC*<sup>m</sup>*=4,*<sup>n</sup>*=<sup>8</sup> can be calculated by following equations.

$$\begin{array}{c|c} \text{MDSC}(j\omega) & m=4\\ \text{n}=4\\ \text{n}=8 \end{array} \left| \begin{aligned} &= \left| \frac{1}{2} + j\frac{1}{2} \Big( \cos\frac{0.02}{8}\omega - j\sin\frac{0.02}{8}\omega \Big) \right| \\ &= \frac{1}{2} \end{array} \right| \tag{7}$$

$$\begin{aligned} \text{\textquotedblleft MDSC}(j\omega) \underset{m=4}{=} \tan^{-1} \left( \frac{\cos 0.0025\omega}{1 + \sin 0.0025\omega} \right) \\\ n = 8 \end{aligned} \tag{8}$$

The bode diagram of MAF and MDSC*<sup>m</sup>*=4,*<sup>n</sup>*=<sup>8</sup> are depicted in Figure 8. The frequency characteristic reveals that MDSC*<sup>m</sup>*=4,*<sup>n</sup>*=<sup>8</sup> (solid lines) can eliminate the FFNS component. Furthermore, MAF in Figure 8 can remove ±300 Hz, ±600 Hz, ... sequence components. One thing should be noticed. Since the MDSC is implemented in a *dq*-frame, the FFPS component turns to be a DC component (0 Hz). According to Equations (7) and (8), the gain of MDSC*<sup>m</sup>*=4,*<sup>n</sup>*=<sup>8</sup> at 0 Hz is 0.707. the phase of FFPS at 0 hz is +45◦. The impact on amplitude and phase of input vector will be discussed and compensated below. The bode plot of the entire hybrid filtering stage is depicted in Figure 9. The components list in Table 1 is totally removed. A +45◦ phase deviation exists at 0 Hz owing to MDSC*<sup>m</sup>*=4,*<sup>n</sup>*=8.

**Figure 8.** Bode diagram of MDSC*<sup>m</sup>*=4,*<sup>n</sup>*=<sup>8</sup> and moving average filter (MAF).

**Figure 9.** Bode diagram of MDSC*<sup>m</sup>*=4,*<sup>n</sup>*=<sup>8</sup> and MAF.
