The VPF Harmonic Analysis Algorithm Based on Quasi-Synchronous

RESEARCH ARTICLE The VPF Harmonic Analysis Algorithm Based on Quasi-Synchronous DFT Zhongjun Fu, Jianyu Wang, Yun Ou, Genyuan Zhou, Feng'e Bai and Xiaorong Zhao School of Automation, Nanjing University of Science and Technology, Nanjing, 210094 China Changzhou Foreign Languages School, Changzhou 213017, China School of Computer Engineering, Jiangsu University of Technology, Changzhou 213001, China


INTRODUCTION
Harmonic analysis technology splits complex signals into simple periodic signals to study the nature of things, for that reason, it is widely used in many fields like power quality monitoring, electronic products testing, electrical equipment monitoring, etc.The essence of the above technology is to have an accurate and efficient harmonic analysis algorithm.
At present, the commonly used method for harmonic analysis is Fourier transform (DFT and FFT).In engineering applications, finite points sampling strategy is widely applied to harmonic analysis, and also strictly synchronous sampling is very difficult to achieve that caused by sampling clock error and frequency drift of signals (Synchronous sampling means the sampling frequency always maintains a fixed proportional relationship with the signal frequency.Therefore, when applying DFT and FFT, two source of leakage -long-range leakage caused by truncation effect (finite points sampling) and short-range leakage caused by fence effect (asynchronous sampling) -lead to the inaccuracy and untrustworthy of the analysis [1 -3].For this reason, many solutions have been presented, such as the windowed interpolation algorithm [4 -7], Non Harmonic Fourier Analysis [8 -11], and the Quasi-synchronous DFT (QSDFT) [12 -18].
QSDFT has the advantage of easy implementation, short sampling length, small system overhead, etc.However, in practical applications, limitation and defects in algorithms occur.To be more specific, the precision of analysis, particularly that of initial-phase is low when signal frequency drifts [19].In this paper, based on the Discrete Spectrum Stretching Theorem, the concept of Variable Picket Fence (VPF) is proposed.After that we put forward an improved algorithm of QSDFT, namely VPF.Simulation and application results show that this algorithm is valid.

The QSDFT
Where: k is the harmonic order; A k and k are amplitude and initial-phase of the k-th harmonic; f 1 is the frequency of f (t).
According to the sampling frequency f S and the number of sampling points within a cycle N, in the range of [t 0 , t 0 + W × T S ] uniformly-spaced sampling W+1 times to obtain the sampled sequence f(i), i = 0 to W.Where W is determined by the integral method, W = n N when using Trapezoidal integration methods; n is the number of iterations.
Appling Eq. ( 2) and (3) to calculate the real part a k , the imaginary part b k , A k and φ k of the k-th harmonic, this is QSDFT [12]. (2)

(3)
Where: i is the start sampling point, normally i = 0; γ j is the weighting coefficient, determined by the integral method, n and is the sum of all weighting coefficients, and Q = (N+1) n when W = nN.

The Inhibition of Long-Range Spectral Leakage by QSDFT
The signal used for harmonic analysis comes from rectangular window truncation of the infinite length signal which duration is T = NT S , T S = 1/f s and that leads to the spectral leakage of Fourier transform.
As to a sinusoidal signal f (t) = sin (100 πt) and N = 128, its DFT value can be retrieved from frequency domain at fixed sampling frequency , as is shown in Fig. (1).The analog frequency corresponding to 2π/N is f s /N.Fig. (1) illustrates that the discrete amplitude spectrum is no longer a single peak, instead countless peaks of varying sizes distribute in the entire frequency axis.In other words, the energy of frequency spectrum is leaked and no longer concentrated, which is commonly named long-range leakage.In the process of harmonic analysis, the leaked energy from each harmonic will affect each other, and cause analysis error [1].
For QSDFT, the main lobe of the discrete spectral is widened and the side lobe will be suppressed under the convergence of quasi-synchronous sampling.Fig. (1).shows the discrete amplitude spectrum of QSDFT, where the number of iterations n = 8, the main lobe is converged and the mutual influence of leaked energy from each harmonic is trivial.From this perspective, the quasi-synchronous sampling can be treated as a good window function and it can inhibit long-range leakage significantly, so sometimes it is also referred to as quasi-synchronous window [19].

The Influence of Signal Frequency Deviation on QSDFT
In practical measurement, considering the influence of multi-factors -precision of sampling clock, integer multiple error of sampling clock, frequency drift of signals -it is difficult to implement exact whole-cycle synchronous sampling.The above factors lead to the short-range leakage of discrete spectrum, of which the causes can mainly be attributed to the frequency drift of signals.In theory, based on the convergence characteristics of multiple iterations, QSDFT can suppress the short-range leakage caused by frequency drift.However, in practical applications, the inhibitory effect on the short-range leakage is not significant.Fig. (2) shows the QSDFT harmonic analysis error (number of iterations n=5) of the waveforms generated from Eq. ( 4).
As is in Fig. (2), high analytical precision of the amplitude of QSDFT occurs only in the range of 50Hz ± 1%, and the maximum relative error of the amplitude nearly reach 100% when in the range from 45 to 55Hz.It suggests that initial-phase from QSDFT is untrustworthy except when it is close to original frequency.For that reason, QSDFT can be applied only to such occasions with small signal frequency drift and low amplitude precision requirements, and it is not suitable for initial-phase analysis.

Discrete Spectrum Stretching Theorem
Definition: The rate of signal frequency deviation , is the degree of the signal frequency drift, which is defined as follows: (5) If the signal frequency does not drift, µ = 1; and if the signal frequency drifts, μ ≠ 1.
Assume that sampling frequency f S and N is fixed, the sampled sequence f i acquired from Eq. ( 1) is as follows: The frequency spectrum function of x-th harmonic is: If the signal frequency has deviated µ,the sampled sequence f * (i) is: Thus, the corresponding frequency spectrum function of x-th harmonic is: Compare Eq. ( 7) and Eq. ( 9) can be obtained: Eq. ( 10) means, if signal frequency has deviated µtimes, then the discrete spectrum of QSDFT is stretched μ times along the frequency axis, and the discrete spectrum peak of the k-th harmonic will appear in the position of kµf 1 from kf 1 (Fig. 3).

The Concept of Variable Picket Fence
Eq. (10) shows that the signal frequency drift will let the spectral peak deviated from the ideal position.When the signal frequency drift occurs, there will be great error if the sampling position in frequency domain still is 2π/N (the corresponding analog frequency f s /N).For example, when = 1.1.However, in accordance with frequency domain sampling position 2π/N, the fundamental information obtained from Nf 1 /f s = 1 is inaccurate.If μ can be accurately estimated, and we can adjust frequency domain sampling position to µ2π/N (the corresponding analog frequency µf S /N), the amplitude and initial-phase information of the fundamental and the k-th harmonic will be obtained accurately (Fig. 4).
So, the improved equation is: Variable Picket Fence (VFP) is a modified algorithm in which the frequency domain sampling position is not fixed, instead the position changes with the signal frequency drift.So VPF can accurately estimate the peak position of each harmonic, thereby obtain high precision results of the amplitude and initial-phase.

Suppose
, and n is a large number, and the following equations can be deduced from [20]: Where: M is the maximum harmonic order, The fundamental initial-phase φ 1 (i) analyzed by QSDFT from the i-th sampling point, is: As to two adjacent sampling points, the fundamental initial-phase difference: Eq. ( 16) means, although the fundamental initial-phase acquired by QSDFT is totally incorrect when the signal frequency drifts, the fundamental phase difference between adjacent sampling points is fixed, and it is only interrelated with the signal frequency f 1 and the sampling frequency f S .
For engineering applications, the fundamental initial-phase φ 1 (0) and φ 1 (1) of the two adjacent sampling points can be calculated from two starting points i = 0 and i = 1 with Eq. ( 2), so µ is (17)

The Analysis Process of VFP
According to the Eq. ( 11) and ( 17), the analysis process of VFP consists of five steps: Sampling W + 2 data.Standard QSDFT algorithm requires sampling W + 1 points, but due to the needs of two 1.
starting points i = 0 and i = 1, adding one more sampling point for VFP is necessary.
Calculating the amplitude and the initial-phase of each harmonic by Eq. ( 11). 5.
If it is necessary, we can calculate the frequency of each harmonic according to μ and the sampling frequency f S .

SIMULATION
We generated some waveform signals from Eq. ( 3) to verify the effectiveness of VPF.The signal frequency drifts from 45 to 55Hz, and we measured the signal with f S = 6400Hz, N = 128, and the number of iterations n = 5 to 8.

The Simulation Results of μ
The analysis accuracy of VPF is directly dependent on the precision of μ.The μ relative error from VPF is given in Table (1).The simulation results show the high accuracy of μ is available.

The Simulation Results of Amplitude
Due to pages limitation, only the simulation error figures of the amplitude and initial-phase from VPF are given.Fig. (5) shows the relative error of the amplitude.If n = 5, the maximum amplitude error equals to 0.0059632%; if n = 8, the maximum amplitude error equals to -0.0000015%.

The Simulation Results of Initial-Phase
Fig. (6) illustrates the simulation absolute error of the initial-phase from VPF.If n = 5, maximum initial-phase error equals to -0.3083002°; if n = 8, the maximum initial-phase error equals to 0.0002375°.

Analysis of Simulation Results
The following conclusions can be drawn from the simulation results: The amplitude and initial-phase obtained from VPF have a high precision.1.
The number of iterations n has great impact on the analysis accuracy.With the increase of n, the analysis 2.
precision increases for almost one order of magnitude.The higher n selected by the system, the more accurate analysis results will be achieved.
With the drift of the signal frequency, the analysis errors of μ, amplitude and initial-phase increases, and VPF 3.
has higher analysis accuracy within 47 to 53Hz.The analysis accuracy of the high-order harmonic is lower than the low-order harmonics, but it is not evident in 4.
the range from 47 to 53Hz.
The main source of the VPF analysis error is the tiny leak of the discrete spectrum caused by non-integer-period sampling, but this shortcoming can be compensated by increasing the number of iterations.Frequency(Hz) Absolute Error(°) Harmonic Order

APPLICATION
For evaluating the performance of the VPF in practice, we embedded VFP to a measuring device JCQ-5 (Fig. 7a), which is designed to monitor the capacitive equipment online.The capacitive equipment is an important equipment in the power grid, usually requires online monitoring of its current i, and dissipation angle δ or dissipation factor tanδ to evaluate its current status (Fig. 7a).II demonstrates the measurement values from these algorithms.It can be noticed that the measurement accuracy of the raw FFT is the comparatively inferior in these methods, and the VPF has an advanced performance.

CONCLUSION
Compared to QSDFT, VPF inhibited the short-range spectral leakage efficiently, loosed the requirements for 1.
synchronous sampling, and increased the analytical accuracy of amplitude, initial-phase and frequency of each harmonic significantly.
Only increasing one sampling point and two calculation of fundamental initial-phase on the basis of QSDFT, the 2.
higher analytical precision will be obtained by VPF.The scale of calculation is increased correspondingly in the process of VPF, and on the other hand real-time 3.
computation is difficult to implement.For a harmonic analysis device working in non-real-time mode, VPF has many advantages, such as less 4.
sampling points, high precision, easy implementation, and it can be transplanted to the existing hardware system directly.Thus it is a high practical algorithm.

Fig. ( 8 )
Fig.(8) gives an intuitive illustration of the comparison, and TableIIdemonstrates the measurement values from these algorithms.It can be noticed that the measurement accuracy of the raw FFT is the comparatively inferior in these methods, and the VPF has an advanced performance.