A Fixed Length Adaptive Moving Average Filter-Based Synchrophasor Measurement Algorithm for P Class PMUs

: Accurate and fast synchrophasor measurement is the key to the wide applications of PMUs in the system-wide monitoring and reliable operation of smart grid. To address this issue, a ﬁxed length moving average ﬁlter-based synchrophasor measurement algorithm for P class phasor measurement units (PMUs) (FA-PSMA) is proposed in this paper. Firstly, a novel ﬁxed length adaptive moving average ﬁlter (FAMAF) is proposed. The FAMAF has an adaptive ﬁlter capability with a ﬁxed data window length. Then, the FAMAF is applied after a phase-locked loop (PLL) for enhanced disturbance rejection capability under frequency drifts. Finally, a detailed performance assessment is presented to validate the performance of the proposed FA-PSMA. Theoretical analysis and simulation results validate that the proposed FA-PSMA can track the grid frequency and phasor accurately under distorted grid conditions. The response time and measurement accuracy satisfy the requirements speciﬁed in IEC / IEEE 60255-118-1.


Introduction
Phasor measurement units (PMUs) are widely deployed for power systems network monitoring in real time. Synchrophasor measurement algorithm (SMA) is the core of PMU applications in wide-area measurement systems (WAMS). Fast and robust SMA is expected to become a fundamental task for the monitoring and management of the smart grids [1][2][3][4][5][6].
IEC/IEEE 60255-118-1 [7] has defined two classes PMUs due to their different applications in the power applications, namely M class PMUs and P class PMUs. Accordingly, the SMAs can also be classified into P class (PSMA) and M class (MSMA). PSMA is mainly for the protection applications and MSMA is mainly for the monitoring applications. Compared with the MSMA, the PSMA needs a much faster response, which means a limitation of filters' data window length in the PSMA structure. Thus, the PSMA should be designed carefully to obtain both a fast dynamic response and a satisfying disturbance rejection capability.
Nowadays, the discrete Fourier Transform (DFT) based PSMAs are commonly used in commercial PMUs. However, the conventional DFT-based algorithms have been proven to be accurate in a variety of power system applications as long as the power grid frequency is close to its nominal value. However, signal significant errors will arise due to the spectral leakage issue of DFT in the presence of frequency deviation [8][9][10]. The efforts that have been proposed to improve the accuracy of DFT-based estimation algorithm under off-nominal frequency conditions [11][12][13][14][15][16][17]. However, the efforts increase the implementation complexity and may slow down the dynamic response.
Many non-DFT-based PSMAs, such as level crossing [18], Kalman filtering [19,20], Newton algorithm [21], adaptive neural network [22], least squares [23][24][25], wavelet [26,27], Taylor algorithm [28,29], and subspace algorithm [30], have been proposed in the literature. However, these methods usually have some disadvantages that limit their applications in synchrophasor measurement situations. For example, the presented methods usually have limited disturbance rejection capability and their measurement accuracy may be unsatisfactory under some conditions, for example, under harmonic condition wherein the power grid frequency deviates from the nominal frequency. Moreover, the presented methods usually have a tradeoff between the dynamic response and steady state accuracy. The improvement of the measurement accuracy is generally at the expense of worse dynamic performance.
To solve these issues, a fixed length adaptive moving average filter-based PSMA (FA-PSMA) is proposed in this paper. The proposed FA-PSMA is based on a fixed length adaptive moving average filter (FAMAF). The FAMAF has a fixed data window length, which is preferred for synchrophasor measurement. The frequency response of the FAMAF can be easily adjusted according to the grid frequency variations. The FAMAF is applied after a phase-locked loop (PLL) to filter the ripples in the outputs of the PLL under frequency drifts. The performance assessment is presented to validate the merit of the proposed FA-PSMA.
The organization of this paper is as follows: The proposed FA-PSMA is introduced in Section 2. The performance assessment is presented in Section 3, and a conclusion is given in Section 4.

A Fixed Length Adaptive Moving Average Filter
The moving average filter (MAF) is one of the most popular filters due to its effectiveness and simple implementation [31,32]. A MAF process is defined as where N w = T w /T s , T w is the data window length of the MAF, T s = 1/ f s , f s is the sample frequency. h MAF (m) = [1, 1, . . . , 1], m = 0, 1, . . . , N w − 1. Equation (1) is equivalent to a finite impulse response (FIR) filtering process with the impulse response as h MAF (m). The frequency response of the MAF can be described as where f w = 1/T w . It can be validated that H MAF (k f w ) = 0. It means that the MAF can filter the disturbance at integer multiples of f w . If the data window length T w (or f w , N w ) in (1-2) is not adapted according to the input signal, the MAF is a non-adaptive MAF (NMAF). The NMAF has fixed filtering capability, and its filtering capability decreases under grid frequency variations.
If the data window length T w (or f w , N w ) in (1-2) is adapted according to the input signal, the MAF is an adaptive MAF (AMAF). The AMAFs have variable frequency response, which can filter disturbances under frequency drifts. The AMAFs and their digital implementations have been studied in [33]. However, the data window length of the AMAFs mentioned in [33] is variable, which makes it difficult to set time stamps for the estimated parameters in synchronized phasor measurement. To address this issue, a fixed length AMAF (FAMAF) is proposed in the following. The FAMAF has adjustable filtering capability with a fixed data window length.
The FAMAF is defined as where N w = T w /T s , T w is the data window length of the FAMAF. The FAMAF shown in (3) is equivalent to an FIR filtering process with the impulse response as h FAMAF (m) = [1 − r, 1, . . . , 1 − r], and m = 0, 1, . . . , N w − 1. The transfer function and frequency response of h FAMAF (m) can be expressed as It can be validated that if the value of r in (5) is set as Then, Equation (7) means that the FAMAF can filter disturbance components at integer multiples of f w + ∆ f w with a fixed data window length T w = 1/ f w . The frequency response of the FAMAF can be adjusted by adjusting the value of r. An example is given in the following to verify the effectiveness of the proposed FAMAF.

Example:
The model of test signal is x(t) = 1 + sin(2π65t), the frequency of the oscillating component is 65 Hz, and the sampling frequency is set as 1.44 kHz. To filter the oscillating component, three filters have been applied. The filters include the NMAF, the FAMAF shown in (3) and the linear interpolation-based AMAF (LIP-AMAF) mentioned in [33]. The data window length of NMAF and FAMAF is fixed at one nominal cycle, or 16.7 ms. The data window length of the LIP-AMAF is adjusted according to the grid frequency as 16.0 ms. The value of r for the FAMAF is 0.9223 referring to (6). The value of ∆ for the LIP-AMAF is 0.1538 referring to [33], where ∆ is a coefficient that makes the LIP-AMAF frequency adaptive.
The frequency responses of the three filters are shown in Figure 1a, and a zoomed-in view of Figure 1a is shown in Figure 1b. The filtering results are shown in Figure 2a, and a detailed comparison between the LIP-AMAF and the FAMAF is shown in Figure 2b. Figure 1a shows that the three filters have similar magnitude response. Figure 1b shows that the proposed FAMAF has the largest magnitude decay for the oscillating component at 65 Hz. It means that the FAMAF has the best filtering capability for the oscillating component. This has been validated by the filtering results shown in Figure 2. In Figure 2a, the waveforms of LIP-AMAF and FAMAF are almost overlapped. It means that the both of them have excellent filtering capability for the disturbance. A detailed comparison between the two filters is presented in Figure 2b. Figure 2b shows that the FAMAF has higher filtering capability than the LIP-AMAF. What is more, compared with the LIP-AMAF, the FAMAF has a fixed data window length, so it has a fixed response delay, which makes it efficient to set time stamps for the estimated parameters in synchrophasor measurement applications.

The Proposed FA-PSMA
The structure of the FA-PSMA is shown in Figure 3. There is a PLL in the FA-PSMA structure shown in Figure 3. The detailed structure of the PLL is shown in Figure 4.

The Proposed FA-PSMA
The structure of the FA-PSMA is shown in Figure 3. There is a PLL in the FA-PSMA structure shown in Figure 3. The detailed structure of the PLL is shown in Figure 4.

The Proposed FA-PSMA
The structure of the FA-PSMA is shown in Figure 3. There is a PLL in the FA-PSMA structure shown in Figure 3. The detailed structure of the PLL is shown in Figure 4.  Figure 3. The basic structure of proposed fixed length adaptive moving average filter-based p class synchrophasor measurement algorithm (FA-PSMA).
In Figure 4, the major part is a type-1 PLL. The type-1 PLL has only one integrator in its control loop and, therefore, has a high stability margin and fast dynamics [34][35][36]. of the second Park's transformation will be approximated to Δf ( Δθ while with a constant phase error) due to the effect of the PLL's control loop. In Figure 4, the cascade connection of NMAFs is applied as the pre-loop filters to block the disturbances before the PLL's control loop. In this paper, the data window length of the NMAFs is set as 0 / 2 T , where 0 T is the nominal grid cycle.
The application of NMAFs in the PLL shown in Figure 4 gives forth to amplitude decay in the PLL's outputs under frequency drifts. Notice that the NMAFs are applied after the first Park's transformation, the FFPS has been transformed into a quasi-dc term with the frequency as 1 0 Δf f f = − , thus the amplitude decay caused by one NMAF can be obtained from (2) as where 0 N is the number of sample points in one nominal grid cycle. A cascade connection of two NMAFs is applied in the prefiltering stage. Thus, the amplitude decay is (1/ ) The NMAFs shown in Figure 4 can block the even-order harmonics after the first Park's transformation. Notice that the first Park's transformation is equivalent to inversely rotating the voltage signal with the frequency of 0 f , thus the even-order harmonics after the first Park's transformation corresponds to the fundamental frequency negative sequence (FFNS) component and odd-order harmonics in the electrical signal. However, the filtering capabilities of the NMAFs Energies 2019, 12, x 5 of 13 Figure 3. The basic structure of proposed fixed length adaptive moving average filter-based p class synchrophasor measurement algorithm (FA-PSMA).
In Figure 4, the major part is a type-1 PLL. The type-1 PLL has only one integrator in its control loop and, therefore, has a high stability margin and fast dynamics [34][35][36]. In Figure 4, the cascade connection of NMAFs is applied as the pre-loop filters to block the disturbances before the PLL's control loop. In this paper, the data window length of the NMAFs is set as 0 / 2 T , where 0 T is the nominal grid cycle.
The application of NMAFs in the PLL shown in Figure 4 gives forth to amplitude decay in the PLL's outputs under frequency drifts. Notice that the NMAFs are applied after the first Park's transformation, the FFPS has been transformed into a quasi-dc term with the frequency as 1 0 Δf f f = − , thus the amplitude decay caused by one NMAF can be obtained from (2) as (1/ ) The NMAFs shown in Figure 4 can block the even-order harmonics after the first Park's transformation. Notice that the first Park's transformation is equivalent to inversely rotating the voltage signal with the frequency of 0 f , thus the even-order harmonics after the first Park's transformation corresponds to the fundamental frequency negative sequence (FFNS) component and odd-order harmonics in the electrical signal. However, the filtering capabilities of the NMAFs In Figure 4, the major part is a type-1 PLL. The type-1 PLL has only one integrator in its control loop and, therefore, has a high stability margin and fast dynamics [34][35][36].
In Figure 4, before the PLL's control loop, there is a cascade connection of two Park's transformations with different rotating frequencies (phase angles). The rotating frequency (phase angle) of the first Park's transformation is f 0 (θ r f = 2π f 0 dt, f 0 is the nominal grid frequency). The first Park's transformation is equivalent to inversely rotating the input voltage vector with the frequency (phase angle) of f 0 (θ r f ). Thus, the fundamental frequency positive sequence (FFPS) component has been transformed into a quasi-dc term with the frequency (phase angle) as ∆ f = f 1 − f 0 (∆θ = θ 1 − θ r f ) after the first Park's transformation. The rotating frequency (phase angle) of the second Park's transformation will be approximated to ∆ f (∆θ while with a constant phase error) due to the effect of the PLL's control loop.
In Figure 4, the cascade connection of NMAFs is applied as the pre-loop filters to block the disturbances before the PLL's control loop. In this paper, the data window length of the NMAFs is set as T 0 /2, where T 0 is the nominal grid cycle.
The application of NMAFs in the PLL shown in Figure 4 gives forth to amplitude decay in the PLL's outputs under frequency drifts. Notice that the NMAFs are applied after the first Park's transformation, the FFPS has been transformed into a quasi-dc term with the frequency as ∆ f = f 1 − f 0 , thus the amplitude decay caused by one NMAF can be obtained from (2) as where N 0 is the number of sample points in one nominal grid cycle. A cascade connection of two NMAFs is applied in the prefiltering stage. Thus, the amplitude decay is (K NMAF ) 2 , which has been compensated in Figure 4 using K 1 , and The NMAFs shown in Figure 4 can block the even-order harmonics after the first Park's transformation. Notice that the first Park's transformation is equivalent to inversely rotating the voltage signal with the frequency of f 0 , thus the even-order harmonics after the first Park's transformation corresponds to the fundamental frequency negative sequence (FFNS) component and odd-order harmonics in the electrical signal. However, the filtering capabilities of the NMAFs may decrease in the presence of frequency drifts. Moreover, the even-order harmonics in the electrical signal cannot To further block the ripples in the PLL's outputs, the FAMAF-based post filtering strategy is suggested in Figure 3. In this paper, the data window length of the FAMAF is set as T w = (N 0 + 1)/ f s , where N 0 is the number of sample points in one nominal cycle. With a fixed data window length, the FAMAFs can effectively filter disturbance in the PLL's outputs under frequency drifts.
The value of r in the FAMAFs is calculated as follows. The PLL's output frequency passes through an FAMAF, and a rough frequency estimationf 1 is obtained. The value off 1 is used to adapt the FAMAFs as shown in Figure 3. The values of r in the FAMAF is calculated using (6) The estimation off 1 has a fast response time. However, it has a decreased accuracy under dynamics. To solve this issue, a more accurate frequency estimation f 1 is presented in Figure 3. f 1 is calculated using the least square fitting method (LSFM) [16] as follows.
where ∆θ (k) is the phase angles shown in Figure 3 that used to calculate the input frequency. ϕ f step is the step between two angles, L f is the number of angles used in the LSFM. The values of F m are constant coefficients that can be calculated using the same method adopted in [16]. For example, assume F s = 1.44 kHz, ϕ f step = N 0 /4 and L f = 9, then F 1 = −16, The rate of change of frequency (ROCOF) can be calculated using the LSFM as where f 1 (k) is the estimated frequency in (9). ϕ r f step is the step between two frequencies, L r f is the number of frequencies used in the LSFM. The values of RF m are constant coefficients that can be calculated using the similar method to calculate F m [16].
The larger values of ϕ f step , ϕ r f step , L f , and L r f means a longer data window length for the estimation of frequency and ROCOF, corresponding to a higher measurement accuracy and slower dynamic response, and vice versa.
In the FA-PSMA structure shown in Figure 3, the FAMAFs are applied after the PLL's control loop, and the frequency feedback branch for the FAMAF will not affect the stability margin of the PLL's control loop. Thus a wide bandwidth can be set for the PLL's control loop for a fast dynamic response. In this paper, k p is set as 0.5 f s .
The FA-PSMA is designed for a three-phase system. It has high disturbance rejection capability for the FFNS component due to the NMAFs-based pre-loop filters. Considering the fact that a single-phase system is an imbalanced three-phase system with large FFNS component, the proposed FA-PSMA can be applied for single-phase applications with v a (t) = 2v(t), v b (t) = v c (t) = 0.
The FA-PSMA is a recursive method. The NMAF and FAMAF can be implemented using the recursive method. Thus, the computation burden of FA-PSMA is quite low. Table 1 shows the real multiplication and real addition of each part of the FA-PSMA. The computation burden of the FA-PSMA method mainly comes from Clark's Transformation, Park's Transformation, FAMAF, the calculation of r in FAMAF, PLL and LSFM. Because the iterative method is adopted, the computation burden of the proposed method is greatly reduced. However, for the DFT method, a DFT operation requires a total of N complex multiplications and (N − 1) complex additions, a total of 4N real multiplications and 2(2N − 1) real additions. When N is large, the computation burden is very large.

Time Stamping of the Estimated Parameters
The proposed FA-PSMA method is a recursive method. To accurately set time stamps for the estimated parameters, the measurement latency of the estimated parameters should be known. The measurement latency of the estimated parameters is mainly caused by the implementation of NMAFs, FAMAFs, PLL's control loop and LSFM. The measurement latency for the estimations of phase angle, amplitude, frequency and ROCOF is analyzed in the following.
The measurement latency of phase angle measurement is mainly caused by the NMAFs, the FAMAF and the PLL's control loop. The delay caused by one NMAF (or FAMAF) is (N w − 1)/2. Two NMAFs and one FAMAF are applied in the phase angle measurement. The delay caused by the NMAFs and FAMAF is (N 0 − 1)T s . The control loop is a first order system with the time constant as 1/k p . The settling time is related to the value of 1/k p . If the value of k p is set as 0.5 f s , the measurement latency caused by the control loop is 2T s . Thus, the total measurement latency of phase measurement is (N 0 + 1)T s , and the time tag of t − (N 0 + 1)T s is used to set the time stamp for the estimated phase angle at time instant t.
The measurement latency of amplitude measurement is mainly caused by the NMAFs and the FAMAF. Two NMAFs and one FAMAF are applied in the amplitude measurement. Thus, the total latency of amplitude measurement is (N 0 − 1)T s , and the time tag of t − (N 0 − 1)T s is used to set the time stamp for the estimated amplitude at time instant t.
The measurement latency of frequency measurement is mainly caused by the NMAFs, FAMAF, PLL's control loop and LSFM process shown in (9). Two NMAFs and one FAMAF are applied in frequency measurement. The latency caused by NMAFs, FAMAF and PLL's control loop is (N 0 + 1)T s . The latency caused by the LSFM process is ]T s . For example, if ϕ f step is set as ϕ f step = N 0 /4, L f = 9, the measurement latency of frequency measurement is (2N 0 + 1)T s . Therefore, the time tag of t − (2N 0 + 1)T s is used to set the time stamp for the estimated frequency at time instant t.
The measurement latency of ROCOF measurement is mainly caused by the frequency measurement and the LSFM. Totally, the measurement latency of ROCOF measurement is ]T s , and the time tag of t − [N 0 ]T s is used to set the time stamp for the estimated frequency at time instant t. For example, if the parameters are set as ϕ f step = N 0 /4, ϕ r f step = N 0 /4, L f = 9, and L r f = 9, the measurement latency of ROCOF measurement is (3N 0 + 1)T s

Practical Considerations for the Digital Signal Processor(DSP) Implementation
For the real-time DSP implementation, the rotating angle of the second Park's transformation (∆θ in Figure 4) is a ramp signal that continuously increases. Its value has to be reset after a particular amount of time to avoid data overflow. For example, if ∆θ(k) > 2Mπ (M is a large integer, which can be preset), then ∆θ(k) is reset as ∆θ(k) = ∆θ(k) − 2Mπ to avoid data overflow. The reset process gives forth to a phase jump in ∆θ(k), and results in erroneous phase estimations in ∆θ (i) (i = k, · · · , k + N 0 ) in Figure 3 due to the FAMAF process. To solve this issue, reset the former N 0 values of ∆θ(i) (i = k − N 0 , · · · , k − 1) as ∆θ(i) = ∆θ(i) − 2Mπ if there is a reset process in ∆θ(k), and the erroneous phase estimations caused by the reset process can be avoided satisfactorily.

Response Time Assessment
The response time of the FA-PSMA is evaluated under step changes. The step changes in amplitude and phase angle can be modeled as where f 1 (t) is a unit step function, k x and k a are the magnitudes of step functions in amplitude and phase angle, respectively [7]. The nominal frequency is 60 Hz.
To evaluate the performance of the FA-PSMA under step changes, k x and k a are set to 0.1 and π/18 individually according to [7]. For the FA-PSMA, the parameters are set as ϕ f step = N 0 /4, ϕ r f step = N 0 /4, L f = 9, and L r f = 9. The estimated total vector error (TVE) defined in (12), the frequency error (FE) and the ROCOF error (RFE) are shown in Figure 5.
where X r (t) and X i (t) are real components and imaginary components of theoretical values of the input signal at time t respectively, andX r (t) andX i (t) are real components and imaginary components of the measured values.
The results are also tabulated in Table 2 as IEC/IEEE 60255-118-1 [7] to represent the response time for TVE, FE and RFE. The required response time in [7] is also shown in Table 2. Figure 5 and Table 2 show that the response time of FA-PSMA satisfies the response requirements specified in [7]. and phase angle, respectively [7]. The nominal frequency is 60 Hz.
To evaluate the performance of the FA-PSMA under step changes, x k and a k are set to 0.1 and / 18 π individually according to [7]. For the FA-PSMA, the parameters are set as

Measurement Accuracy Assessment
The measurement accuracy of the FA-PSMA is evaluated under various dynamics and distortions. The test conditions are referred to [3,4] as follows.
Case 1 (frequency range test): The reference signal is where f = f 0 + ∆ f , f 0 is the nominal grid frequency and −2 ≤ ∆ f ≤ 2. Case 2 (harmonic distortion test): The reference signal is where h is the order of harmonic varying from 2 to 50. Case 3 (frequency ramp test): The reference signal is where the fundamental frequency varies from 58 Hz to 62 Hz with a ramp rate of 1Hz/s in the duration of 4 seconds. Case 4 (phase modulation test): The reference signal is where θ 1 = 2π f 0 t + k a cos(2π f m t), k a = 0.1, the modulation frequency f m varies from 0.1 to 5 Hz. Case 5 (amplitude modulation test): The reference signal is where A 1 = 1 + k x cos(2π f m t), k x = 0.1, the modulation frequency f m varies from 0.1 to 5 Hz. Case 6 (Case 1+Case 2): The reference signal is where harmonic distortion is added into the signal model in (13). h is the order of harmonics varying from 2 to 50. Case 7 (Case 2 + Case 3): The reference signal is where harmonic distortion is added into the signal model in (15). h is the order of harmonics varying from 2 to 50. Case 8 (Case 1 + Case 2 + Case 4): The reference signal is where the phase modulation is added into the signal model in (18). θ 1 = 2π f t + k a cos(2π f m t), k a = 0.1, and the modulation frequency f m vary from 0.1 to 5 Hz. Case 9 (Case 1 + Case 2 + Case 4 + Case 5): The reference signal is where the amplitude modulation is added into the signal model in (20). A 1 = 1 + k x cos(2π f m t), k x = 0.1, and the modulation frequency f m vary from 0.1 to 5 Hz. Totally, nine test cases are performed. Specially, the proposed method has considered not only the influence of single type of disturbance but also the influence of composite types of disturbances, because the dynamics and distortions in the power grid may occur simultaneously. Among the nine test cases, single type of disturbance specified in the benchmark tests in [7] occurs in cases 1-5, and composite types of disturbances occur simultaneously in cases 6-9. The maximum values of TVE, FE, RFE, magnitude error (ME) and phase error (PE) are presented in Table 3. The specified errors in [7] are also shown in Table 3. For the composite disturbances, the maximum errors specified for single type of disturbance in [7] are shown in Table 3. Table 3 shows that the measurement accuracy of the FA-PSMA satisfies the requirements specified in [7]. In Section 3.2, case 4, case 5 and related composite disturbance cases have verified the performance of the proposed method under oscillation to some extent, and the experimental results show that the proposed FA-PSMA can track the grid frequency and phasor accurately under oscillatory conditions.
To further test the performance under oscillatory transients, the proposed FA-PSMA is compared with the DPMA [29], the CT-DFT [16] and the MDSEA [28] under power oscillation conditions. For a fair of comparison, as indicted in [28], the nominal frequency is 50 Hz, and the sampling frequency is 2.4 kHz. Two cases are performed, and experimental results are given in Table 4. The signal is modeled as where f m is the modulation frequency ranging from 0.1 Hz to 5 Hz. k x is the amplitude modulation factor, and k a is the phase angle modulation factor. Case 1 (amplitude oscillation test): k x = 0.1, and k a = 0. Case 2 (phase oscillation test): k x = 0, and k a = 0.1.
Test conditions and the measurement accuracy can be obtained in Table 4. Table 4 shows that the FA-PSMA provides the most accurate measurements for the majority of parameters.
Only in case 1, when the fundamental frequency deviates to 45 Hz and 47.5 Hz, the FA-PSMA does not have the highest accuracy in FE. However, the measurement errors (7e-3 Hz and 4e-3 Hz) are much less than the IEEE Standard. Moreover, the FA-PSMA has the highest accuracy in the measurement of TVE and RFE under these conditions.

Conclusions
In this paper, a novel implementation of AMAF (FAMAF) is proposed for synchrophasor measurement. The FAMAF has an adjustable frequency response and a fixed data window length. So it is efficient to filter the disturbances under frequency drift for synchrophasor measurement applications. The FAMAF is applied to filter the ripples in the outputs of a type-1 PLL for accurate and fast phasor and frequency measurement. The FA-PSMA has not only a simple structure but also a low computation burden. Specially, the FA-PSMA has considered the influence of composite types of disturbances, which is not considered enough in other methods. Because the dynamics and distortions in the power grid may occur simultaneously, it is necessary to conduct performance assessment under composite disturbances conditions. Theoretical analysis and experimental results validate that the proposed FA-PSMA can track the grid frequency and phasor accurately under distorted grid conditions. The response time and measurement accuracy comply with all the P class requirements specified in IEC/IEEE 60255-118-1.