# Sample Data Synchronization and Harmonic Analysis Algorithm Based on Radial Basis Function Interpolation

Authors: Huaiqing Zhang; Yu Chen; Zhihong Fu; Ran Liu
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

The spectral leakage has a harmful effect on the accuracy of harmonic analysis for asynchronous sampling. This paper proposed a time quasi-synchronous sampling algorithm which is based on radial basis function (RBF) interpolation. Firstly, a fundamental period is evaluated by a zero-crossing technique with fourth-order Newton’s interpolation, and then, the sampling sequence is reproduced by the RBF interpolation. Finally, the harmonic parameters can be calculated by FFT on the synchronization of sampling data. Simulation results showed that the proposed algorithm has high accuracy in measuring distorted and noisy signals. Compared to the local approximation schemes as linear, quadric, and fourth-order Newton interpolations, the RBF is a global approximation method which can acquire more accurate results while the time-consuming is about the same as Newton’s.


---

## Body

## 1. Introduction

With the widespread use of conventional and modern nonlinear loads, harmonic and interharmonic currents are being injected into the power network and cause power quality (PQ) problems [1]. Meanwhile, the embedded generation and renewable sources of energy have also created new PQ problems, such as voltage variations, flickers, and waveform distortions [2]. So the monitoring of harmonic and interharmonic distortions is an important issue that has been addressed in recent years.The discrete Fourier transform (DFT) with its highly efficient algorithm, that is, the fast Fourier transform (FFT), is the recommended method in IEC 61000-4-7 [3] which entails using a rectangular window with time length of 200 ms. The FFT algorithm has high precision for harmonic analysis in the case of synchronous sampling. However, the fundamental frequency of power system signals may vary because of the generation and load mismatch even leads to fluctuations. So the synchronous sampling is unattainable, and consequently, the spectral leakage, caused by the FFT applied in asynchronously sampling, reduces measurement accuracy. In paper [4], the authors have shown that even a small error in synchronization causes significant errors in amplitude and phase estimations. Although, the grouping/subgrouping method introduced in IEC standard can mitigate the spectral leakages, the low-frequency resolution remains a problem.Therefore, numerous investigations for reducing spectral leakage errors in the case of asynchronous sampling have been carried out extensively recently. Among them, the windowed interpolated FFT algorithm (WIFFTA) is the most popular because of its low computational burden and feasibility for real-time monitoring. In the WIFFTA, the window functions and interpolation algorithms are adopted to reduce leakage effect and the picket fence effect. The drawback of this frequency-domain approach is that the calculation accuracy is not particularly high and is deficient in detecting fluctuations in signals. The reason why the accuracy cannot be improved is because a flattop window with an extremely small side lobe which can reduce both the short- and long-range leakage errors does not exist [5].On the contrary, the time quasi-synchronous sampling algorithm (TQSA) [6] can modify the sampling rate and reproduce a synchronous sampling signal. It includes the following three steps as obtaining the fundamental period of signal firstly, then adjusting the sampling rate so as to satisfy the integer-period sampling condition, and finally reproducing the approximate synchronous sampling points via interpolation. Hence, the harmonic parameters can be determined accurately from the DFT/FFT results due to the significant decrease in spectral leakage. The performance of such techniques is highly dependent on the accuracies of fundamental period and interpolation samplings. Generally, the fundamental period can be determined by the zero-crossing technique and the approximate synchronous sampling can be interpolated by the linear, quadratic, cubic spline [7], or Newton’s interpolations. However, the above methods are local interpolation which means the interpolated point is only determined by nearby sampling data and the interpolation accuracy is limited.Thus, a global interpolation scheme which is based on radial basis function (RBF) for data synchronization method was proposed in this paper. The RBF [8], specifically the multiquadric (MQ) function adopted here, is defined on distance. The MQ function was initially proposed for scattered data approximation, and it has been proved by Franke that the MQ method has the superior comprehensive performance in 29 kinds of scattered data interpolation methods [9].The organization of this paper is as follows. In Section2, the Newton’s forward-difference interpolation for fundamental period is addressed with comparison to linear and quadratic techniques. Then, in Section 3, the RBF interpolation method for sampling sequence synchronization was proposed. Test results are given to show the usefulness of the proposed method by comparing with others.


## 2. Newton’s Interpolation for the Fundamental Period

The time interval between adjacent zero-crossing points can be considered as the fundamental period of the signal for a periodic signal. So determining the zero-crossing points is of great importance which is not only the basis for fundamental frequency, but also has directly affection in absolute phase calculation. The linear and quadratic interpolations are the commonly used methods to acquire the zero-crossing time.


### 2.1. Linear and Quadratic Interpolations Schemes

For linear type, one can firstly find two adjacent sampling points which satisfyx
(
t
1
)
<
0 and x
(
t
2
)
>
0. Then, the t
zero can be determined with linear approximation as
(1)
t
zero
=
t
1
+
-
x
t
1
x
t
2
-
x
t
1
t
2
-
t
1
.
Finally, the next zero-crossing point can be found by the similar way. Therefore, the fundamental period can be calculated.For quadratic situation, one can find three adjacent sampling points which satisfyx
(
t
0
)
<
0, x
(
t
1
)
>
0, and x
(
t
2
)
>
0 just like Figure 1(a). Use the quadratic polynomial approximation as
(2)
x
t
=
x
t
0
+
x
t
0
,
t
1
t
-
t
0
+
x
t
0
,
t
1
,
t
2
t
-
t
0
t
-
t
1
,
where x
[
t
0
,
t
1
] is the first-order divided difference defined as x
[
t
0
,
t
1
]
=
(
x
t
1
-
x
(
t
0
)
)
/
(
t
1
-
t
0
) and x
[
t
0
,
t
1
,
t
2
] is the second-order divided difference in terms of t
0, t
1, and t
2 and defined as x
[
t
0
,
t
1
,
t
2
]
=
(
x
t
1
,
t
2
-
x
[
t
0
,
t
1
]
)
/
(
t
2
-
t
0
). Find the zero-crossing point t
zero by iteration method which satisfies x
(
t
zero
)
=
0; then denote the t
zero as t
zero
_
1. And correspondingly, another three adjacent sampling points are chosen which satisfy x
(
t
0
)
<
0, x
(
t
1
)
<
0, and x
(
t
2
)
>
0 like Figure 1(b) and t
zero
_
2 can then be worked out. Because the two zero-crossing points were calculated with different sampling points, we took their average t
zero
=
(
t
zero
_
1
+
t
zero
_
2
)
/
2 as a more accurate approximation for zero-crossing point. In the same way, the next zero-crossing point can be determined and the fundamental period is obtained.Quadric interpolation for zero-crossing points.
(a)
(b)


### 2.2. Newton’s Interpolation Scheme

In above linear or quadratic interpolations, only lower-order polynomials were considered. Therefore, Newton’s interpolation algorithm [6] is chosen for its low computational complexity and convenience for programming in this paper. Since the error of fourth-order polynomial is small enough in estimating the fundamental period, only five adjacent sampling points were taken as the interpolation nodes as x
(
t
-
2
), x
(
t
-
1
), x
(
t
0
), x
(
t
1
), and x
(
t
2
), just like Figure 2.Figure 2
Newton’s interpolation for zero-crossing points.The fourth-order Newton’s divided-difference formula can be represented as(3)
f
z
=
f
z
0
+
f
z
0
,
z
1
z
-
z
0
W
+
⋯
+
f
z
0
,
z
1
,
z
2
,
z
3
,
z
4
∏
j
=
0
3
z
-
z
j
.For the five pairs of numbers(
x
(
t
i
)
,
t
i
), where i
=
-
2
,
…
,
2, the actual zero-crossing time t
zero is calculated by Newton’s interpolation polynomial as follows:
(4)
t
zero
=
t
-
2
+
f
x
t
-
2
,
x
t
-
1
0
-
t
-
2
W
+
⋯
+
f
x
t
-
2
,
x
t
-
1
,
x
t
0
,
x
t
1
,
x
t
2
W
×
∏
j
=
-
2
1
0
-
t
j
,
where f
[
x
(
t
-
2
)
,
x
(
t
-
1
)
]
=
(
t
-
1
-
t
-
2
)
/
(
x
(
t
-
1
)
-
x
(
t
-
2
)
). The same process is implemented to calculate next zero-crossing time. If setting the first zero-crossing time as t
start and the latter as t
end, we can estimate the fundamental period and frequency by
(5)
T
*
=
t
end
-
t
start
,
f
0
=
1
T
*
=
1
t
end
-
t
start
.In practice, the power signal contains higher harmonics or noise; the zero-crossing point may be not unique or it is sensitive to the noise influence. So a filtering process is necessary which can remove the harmonics and diminish the interference by averaging the noise. Specifically, the finite-impulse response (FIR) filter is chosen for the determination of the fundamental period due to its linear phase properties.


## 2.1. Linear and Quadratic Interpolations Schemes

For linear type, one can firstly find two adjacent sampling points which satisfyx
(
t
1
)
<
0 and x
(
t
2
)
>
0. Then, the t
zero can be determined with linear approximation as
(1)
t
zero
=
t
1
+
-
x
t
1
x
t
2
-
x
t
1
t
2
-
t
1
.
Finally, the next zero-crossing point can be found by the similar way. Therefore, the fundamental period can be calculated.For quadratic situation, one can find three adjacent sampling points which satisfyx
(
t
0
)
<
0, x
(
t
1
)
>
0, and x
(
t
2
)
>
0 just like Figure 1(a). Use the quadratic polynomial approximation as
(2)
x
t
=
x
t
0
+
x
t
0
,
t
1
t
-
t
0
+
x
t
0
,
t
1
,
t
2
t
-
t
0
t
-
t
1
,
where x
[
t
0
,
t
1
] is the first-order divided difference defined as x
[
t
0
,
t
1
]
=
(
x
t
1
-
x
(
t
0
)
)
/
(
t
1
-
t
0
) and x
[
t
0
,
t
1
,
t
2
] is the second-order divided difference in terms of t
0, t
1, and t
2 and defined as x
[
t
0
,
t
1
,
t
2
]
=
(
x
t
1
,
t
2
-
x
[
t
0
,
t
1
]
)
/
(
t
2
-
t
0
). Find the zero-crossing point t
zero by iteration method which satisfies x
(
t
zero
)
=
0; then denote the t
zero as t
zero
_
1. And correspondingly, another three adjacent sampling points are chosen which satisfy x
(
t
0
)
<
0, x
(
t
1
)
<
0, and x
(
t
2
)
>
0 like Figure 1(b) and t
zero
_
2 can then be worked out. Because the two zero-crossing points were calculated with different sampling points, we took their average t
zero
=
(
t
zero
_
1
+
t
zero
_
2
)
/
2 as a more accurate approximation for zero-crossing point. In the same way, the next zero-crossing point can be determined and the fundamental period is obtained.Quadric interpolation for zero-crossing points.
(a)
(b)


## 2.2. Newton’s Interpolation Scheme

In above linear or quadratic interpolations, only lower-order polynomials were considered. Therefore, Newton’s interpolation algorithm [6] is chosen for its low computational complexity and convenience for programming in this paper. Since the error of fourth-order polynomial is small enough in estimating the fundamental period, only five adjacent sampling points were taken as the interpolation nodes as x
(
t
-
2
), x
(
t
-
1
), x
(
t
0
), x
(
t
1
), and x
(
t
2
), just like Figure 2.Figure 2
Newton’s interpolation for zero-crossing points.The fourth-order Newton’s divided-difference formula can be represented as(3)
f
z
=
f
z
0
+
f
z
0
,
z
1
z
-
z
0
W
+
⋯
+
f
z
0
,
z
1
,
z
2
,
z
3
,
z
4
∏
j
=
0
3
z
-
z
j
.For the five pairs of numbers(
x
(
t
i
)
,
t
i
), where i
=
-
2
,
…
,
2, the actual zero-crossing time t
zero is calculated by Newton’s interpolation polynomial as follows:
(4)
t
zero
=
t
-
2
+
f
x
t
-
2
,
x
t
-
1
0
-
t
-
2
W
+
⋯
+
f
x
t
-
2
,
x
t
-
1
,
x
t
0
,
x
t
1
,
x
t
2
W
×
∏
j
=
-
2
1
0
-
t
j
,
where f
[
x
(
t
-
2
)
,
x
(
t
-
1
)
]
=
(
t
-
1
-
t
-
2
)
/
(
x
(
t
-
1
)
-
x
(
t
-
2
)
). The same process is implemented to calculate next zero-crossing time. If setting the first zero-crossing time as t
start and the latter as t
end, we can estimate the fundamental period and frequency by
(5)
T
*
=
t
end
-
t
start
,
f
0
=
1
T
*
=
1
t
end
-
t
start
.In practice, the power signal contains higher harmonics or noise; the zero-crossing point may be not unique or it is sensitive to the noise influence. So a filtering process is necessary which can remove the harmonics and diminish the interference by averaging the noise. Specifically, the finite-impulse response (FIR) filter is chosen for the determination of the fundamental period due to its linear phase properties.


## 3. RBF Interpolation Method for Sampling Synchronization

The synchronization is essentially a mapping from an asynchronous sampling set to a synchronous one. The synchronous sampling points are defined on calculated synchronous time which is based on the fundamental period and zero-crossing point calculation. Usually, the mapping is implemented by lower-order polynomial interpolations which are local approximations even for fourth-order Newton’s scheme. Therefore, we proposed an RBF-based global interpolation method in this paper. The basic idea of RBF method is briefly narrated as follows. Firstly, we construct an approximation signalx
a
(
t
) to approach the original signal x
(
t
) through RBF interpolation. Then, we reproduce the approximate synchronous sampling for synchronization time.


### 3.1. Principle of Radial Basis Function Interpolation

Radial basis functionФ
:
R
+
→
R (domain: R
d) is defined as the function of distance r
=
x
-
x
j. The commonly used RBF contains the thin plate splines function (
Ф
(
r
)
=
r
2
ln
⁡
r
), the Gaussian function (
Ф
(
r
)
=
exp
⁡
(
-
β
r
2
)
), Hardy’s multiquadric (MQ) functions, and so forth. The widely used MQ function has the following expression [8]:
(6)
ϕ
x
=
x
-
c
2
+
α
2
.
In above, c means the center of basis function; α is the shape parameter which generally associated with the distance between adjacent centers. Taking α
=
β
c
i
-
c
j, β is also called shape parameter. The principle of RBF interpolation is regarding the unknown functions as linear combination of radial functions. So the approximation function can be obtained after calculating the undetermined coefficients. For example, a series of known data points (
t
n
,
x
(
t
n
)
), n
=
1,2
,
…
,
N, and the approximation function can be constructed as
(7)
x
t
≈
x
a
t
=
λ
1
ϕ
1
t
+
λ
2
ϕ
2
t
+
⋯
+
λ
N
ϕ
N
t
=
∑
λ
j
ϕ
j
t
.
Then, substituting the interpolation data points into above equation, we can obtain the following:
(8)
x
n
=
∑
λ
j
ϕ
t
n
-
t
c
m
⟹
Φ
d
λ
=
x
d
,
where [
x
d
]
=
x
t
1
,
x
t
2
,
…
,
x
t
N
T are the sampling points, [
λ
]
=
λ
1
,
λ
2
,
…
,
λ
N
T are the coefficients, and [
Φ
d
] denotes the interpolation matrix whose element is Ф
n
m
=
t
n
-
t
c
m
2
+
α
2
1
/
2. Solve (8) as
(9)
λ
=
Φ
d
-
1
x
d
.
Therefore, the approximation signal x
a
(
t
) is
(10)
x
a
t
=
Φ
t
λ
=
Φ
t
Φ
d
-
1
x
d
.It is obvious that the approximated value at any time is related to the entire interpolation sampling. So the interpolation curve is much smoother and the approximation accuracy is higher.


### 3.2. Sampling Data Synchronization with RBF

In the aforementioned section, two adjacent zero-crossing points denoted byt
start and t
end were determined by the fourth-order Newton’s interpolation. Therefore, according to the fundamental period T
* calculated by (5), the original sampling period T
s can be adjusted to T
s
* which satisfies T
*
=
N
T
s
*. In other words, we choose N equidistant sampling time as [
t
start
,
t
start
+
T
s
*
,
t
start
+
2
T
s
*
,
…
,
t
start
+
N
-
1
T
s
*
,
t
end
] and then the integer-period sampling is achieved. In practice, number N can be arbitrarily selected according to the harmonic analysis requirements. So the approximate synchronous sampling can be obtained with RBF interpolation as
(11)
x
a
n
=
x
a
t
t
=
n
T
s
*
=
Φ
n
T
s
*
λ
=
Φ
n
T
s
*
Φ
d
-
1
x
d
.With synchronization processing of asynchronous samplingx
(
n
), spectral leakage is efficiently decreased, and then, the harmonic parameters (i.e., frequency, amplitude, and phase) can be accurately determined from the DFT/FFT results. In addition, the phase compensation should be implemented as φ
′
(
ω
k
)
=
φ
(
ω
k
)
-
ω
k
t
start because of shifting time t
start.


## 3.1. Principle of Radial Basis Function Interpolation

Radial basis functionФ
:
R
+
→
R (domain: R
d) is defined as the function of distance r
=
x
-
x
j. The commonly used RBF contains the thin plate splines function (
Ф
(
r
)
=
r
2
ln
⁡
r
), the Gaussian function (
Ф
(
r
)
=
exp
⁡
(
-
β
r
2
)
), Hardy’s multiquadric (MQ) functions, and so forth. The widely used MQ function has the following expression [8]:
(6)
ϕ
x
=
x
-
c
2
+
α
2
.
In above, c means the center of basis function; α is the shape parameter which generally associated with the distance between adjacent centers. Taking α
=
β
c
i
-
c
j, β is also called shape parameter. The principle of RBF interpolation is regarding the unknown functions as linear combination of radial functions. So the approximation function can be obtained after calculating the undetermined coefficients. For example, a series of known data points (
t
n
,
x
(
t
n
)
), n
=
1,2
,
…
,
N, and the approximation function can be constructed as
(7)
x
t
≈
x
a
t
=
λ
1
ϕ
1
t
+
λ
2
ϕ
2
t
+
⋯
+
λ
N
ϕ
N
t
=
∑
λ
j
ϕ
j
t
.
Then, substituting the interpolation data points into above equation, we can obtain the following:
(8)
x
n
=
∑
λ
j
ϕ
t
n
-
t
c
m
⟹
Φ
d
λ
=
x
d
,
where [
x
d
]
=
x
t
1
,
x
t
2
,
…
,
x
t
N
T are the sampling points, [
λ
]
=
λ
1
,
λ
2
,
…
,
λ
N
T are the coefficients, and [
Φ
d
] denotes the interpolation matrix whose element is Ф
n
m
=
t
n
-
t
c
m
2
+
α
2
1
/
2. Solve (8) as
(9)
λ
=
Φ
d
-
1
x
d
.
Therefore, the approximation signal x
a
(
t
) is
(10)
x
a
t
=
Φ
t
λ
=
Φ
t
Φ
d
-
1
x
d
.It is obvious that the approximated value at any time is related to the entire interpolation sampling. So the interpolation curve is much smoother and the approximation accuracy is higher.


## 3.2. Sampling Data Synchronization with RBF

In the aforementioned section, two adjacent zero-crossing points denoted byt
start and t
end were determined by the fourth-order Newton’s interpolation. Therefore, according to the fundamental period T
* calculated by (5), the original sampling period T
s can be adjusted to T
s
* which satisfies T
*
=
N
T
s
*. In other words, we choose N equidistant sampling time as [
t
start
,
t
start
+
T
s
*
,
t
start
+
2
T
s
*
,
…
,
t
start
+
N
-
1
T
s
*
,
t
end
] and then the integer-period sampling is achieved. In practice, number N can be arbitrarily selected according to the harmonic analysis requirements. So the approximate synchronous sampling can be obtained with RBF interpolation as
(11)
x
a
n
=
x
a
t
t
=
n
T
s
*
=
Φ
n
T
s
*
λ
=
Φ
n
T
s
*
Φ
d
-
1
x
d
.With synchronization processing of asynchronous samplingx
(
n
), spectral leakage is efficiently decreased, and then, the harmonic parameters (i.e., frequency, amplitude, and phase) can be accurately determined from the DFT/FFT results. In addition, the phase compensation should be implemented as φ
′
(
ω
k
)
=
φ
(
ω
k
)
-
ω
k
t
start because of shifting time t
start.


## 4. Harmonic Analysis Based on Newton’s and RBF Interpolation for Asynchronous Sampling

So far, we combined the fourth-order Newton’s interpolation and RBF interpolation methods. The former is utilized to determine the signal’s zero-crossing points and its fundamental frequency. And then, an approximate functionx
a
(
t
) which is defined on the time range [
t
start
,
t
end
] can be obtained by the RBF interpolation. The synchronization data x
a
(
n
) for given synchronization time can be acquired. Finally, the amplitude parameters can be calculated by FFT, while the phase parameters can be obtained after compensation processing due to the beginning time t
start. The detailed flow chart is shown in Figure 3.Figure 3
Harmonic analysis procedure based on Newton and RBF interpolation.


## 5. Simulation Result

In this section, two simulation tests to verify the estimation accuracies of frequency, amplitude, and phase with the above methods are performed. For RBF method, the centers are chosen at the asynchronous sampling time, and the shape parameter isβ
=
5.0
.


### 5.1. Simulation for Power Harmonic Measurement

In this example, the input signal, which is the same as that used in [10], is employed:
(12)
x
n
=
∑
m
=
1
3
A
m
sin
⁡
2
π
f
m
n
f
s
+
φ
m
.The fundamental frequencyf
1 equals 49.85 Hz. The amplitudes of all the harmonics are normalized and are, respectively, A
1
=
1, A
2
=
0.07, and A
3
=
0.2. The initial phases are, respectively, φ
1
=
0.9 rad, φ
2
=
1.2 rad, and φ
3
=
0.75 rad. According to the recommendation of IEC Std. 61000-4-7, the window width is set as 200 ms. Therefore, the sampling frequency f
s and the length of the sampling sequence N are set to be 2560 Hz and 512 points, respectively.


#### 5.1.1. Comparison of Fundamental Frequency Calculation

Firstly, the precision comparison of zero-crossing detection among linear, quadratic, and fourth-order Newton’s interpolations was carried out. All the 512 sampling points are applied for 50th-order FIR filtering. However, only the filtered sampling points which are located behind the first 51 points will be analyzed for zero-crossing detection. The cutoff frequencies of bandpass FIR filter are 35 and 65 Hz, respectively. The fundamental frequency varies from 49.5 Hz to 50.5 Hz and the specific results were shown in Table1.Table 1
Relative error comparison for fundamental frequency.
Frequency (Hz)
Linear
Quadric
Newton’s method
49.50
8.2209
e
-
004
1.6279e − 004
1.4848e − 007
49.60
9.0416e − 004
1.0133e − 004
4.1249e − 007
49.70
3.2312e − 004
3.7585e − 004
2.3696e − 007
49.80
8.7208e − 004
3.7908e − 004
3.6028e − 008
49.85
9.2362e − 004
3.1479e − 004
4.7762e − 008
49.90
8.6749e − 004
2.2591e − 004
1.1480e − 007
49.95
7.3448e − 004
1.2716e − 004
1.6125e − 007
50.00
5.5541e − 004
3.3378e − 005
1.8374e − 007
50.05
3.6123e − 004
4.0445e − 005
1.7949e − 007
50.10
1.8301e − 004
7.9253e − 005
1.4653e − 007
50.15
5.1957e − 005
6.7919e − 005
8.3851e − 008
50.20
5.4970e − 007
8.7226e − 006
8.2554e − 009
50.30
6.3150e − 004
1.1163e − 004
1.3240e − 007
50.40
5.7513e − 004
5.7684e − 006
2.2788e − 007
50.50
1.0963e − 004
1.9676e − 004
2.5694e − 007In Table1, the relative error of fundamental frequency was defineds as Er
r
_
f
=
Δ
f
/
f
0. It can be seen that the quadratic interpolation is overall better than linear type, and the fourth-order Newton’s interpolation acquires much better accuracy which is about 2 or 3 orders of magnitude less than the former two schemes. However, the average time-consuming of linear, quadric, and Newton’s interpolations is about 1.1 ms, 4.4 ms, and 6.2 ms, respectively.


#### 5.1.2. Interpolation Error Analysis for Asynchronous Data

Then, the interpolation error comparison at frequency 49.85 Hz for asynchronous data in a fundamental period among the above methods was implemented. The absolute error curves were shown in Figure4. It is obvious that the RBF interpolation takes great advantage over other three methods because of its global approximation characteristic. The RBF method can improve significantly the approximation accuracy which is about 2 orders of magnitude than the Newton method. The root mean square error (RMSE) Er
r
_
RMS is defined as
(13)
Er
r
_
RMS
=
1
N
∑
n
=
0
N
-
1
x
n
-
x
a
n
2
.
The results showed that the RMSE of RBF, Newton, linear, and quadric interpolation methods is 1.2555e-007, 7.8289e-006, 2.0026e-003, and 3.2539e-004, respectively. The average time-consuming is correspondingly about 18.7 ms, 20.7 ms, 3.5 ms, and 4.3 ms. And subsequently, the fundamental frequency varies from 49.5 Hz to 50.5 Hz, and the RMSE curves were shown in Figure 5. So the RBF method can acquire much better interpolation accuracy than the Newton’s.Figure 4
Absolute interpolation errors comparison.Figure 5
Root mean square errors comparison.


#### 5.1.3. Harmonic Analysis Comparison

Finally, a harmonic analysis procedure was executed which was based on the synchronization sequence. The TQSA methods as the RBF and Newton’s interpolation, the Hanning windowed interpolated FFT method were compared.It can be clearly seen that the time-domain methods as RBF and Newton’s interpolation can significantly improve the parameters’ accuracy when compared to the Hanning method. Particularly for the phase parameter, the accuracy improves about 4 to 5 orders of magnitude in TQSA. Comparatively speaking, the RBF method possesses higher accuracy for higher harmonic parameters than the Newton method, for instance, the third harmonic case. The average time-consuming of RBF, Newton’s interpolation, and Hanning method is about 22.4 ms, 23.6 ms, and 4.3 ms, respectively. However, the time-consuming of filter process in TQSA is about 122.5 ms (Table2).Table 2
Relative error comparison of harmonic parameters.
Parameters
RBF
Newton
Hanning
f
1
4.7762e − 008
4.7762e − 008
1.0523e − 006
A
1
2.3623e − 008
1.1721e − 008
5.8204e − 006
φ
1
1.8511e − 007
4.0930e − 007
1.3611e − 001
f
2
4.7762e − 008
4.7762e − 008
3.2800e − 005
A
2
1.8819e − 007
2.4299e − 007
1.4765e − 004
φ
2
1.0059e − 006
5.8174e − 006
2.0588e − 001
f
3
4.7762e − 008
4.7762e − 008
2.5943e − 006
A
3
1.2697e − 007
8.3411e − 006
2.5551e − 005
φ
3
8.6146e − 007
6.6761e − 005
4.9044e − 001


#### 5.1.4. Application to Signal with Noise

In addition, zero-mean Gaussian white noise is added to the clean signal. The signal to noise ratio (SNR) is set as 35 dB, and in order to acquire a general conclusion, the mean value of 500 independent simulations is regarded as one measurement result. The results of the Hanning method, RBF, and Newton’s interpolation methods are listed in Table3.Table 3
Relative error comparison of harmonic parameters with noise (SNR = 35 dB).
Parameters
RBF
Newton
Hanning
f
1
1.5990
e
-
006
1.5990e − 006
2.8590e − 006
A
1
1.8227e − 004
1.9787e − 004
1.6213e − 005
φ
1
3.7576e − 004
3.8343e − 004
1.3628e − 001
f
2
1.5990e − 006
1.5990e − 006
5.6802e − 005
A
2
6.5670e − 004
7.2308e − 004
4.3881e − 004
φ
2
2.5664e − 004
2.3503e − 004
2.0678e − 001
f
3
1.5990e − 006
1.5990e − 006
2.7103e − 006
A
3
7.4394e − 004
5.0906e − 004
2.0779e − 004
φ
3
1.2813e − 003
1.2330e − 003
4.9096e − 001From Table3, we can conclude that the TQSA methods have obvious advantage in phase calculation more than the Hanning method. The accuracy is improved about 2 or 3 orders of magnitude. However, the accuracy of frequency and amplitude parameters is almost in the same magnitude. This is mainly because the noise is relatively great and its influence is taken into account in sampling interpolation process. Although the RBF and Newton’s methods maintain high accuracy in interpolation, the interpolated curves based on noisy data have relatively larger error compared to the clean signal.


### 5.2. Analysis of Current Signal Measured from a Forge

In this example, we evaluate the performance of the TQSA in the measurement of distorted signal which was recorded from a forge. The current signal is greatly affected by the working condition, and the amplitude has obvious variation in Figure6. Therefore, the TQSA method and Hanning method are compared for distorted signal located in the segment sampling points of [
425501,426500
]. And the sampling frequency f
s and the length of the sampling sequence N are 5000 Hz and 1000 points, respectively. So the time length of segment is 200 ms which is recommended in IEC 61000-4-7.Figure 6
Recorded current wave in a forge.Firstly, the Hanning method is implemented as per the IEC’s recommendation. Then, we can construct the approximate signal from the harmonic parameters which are calculated as aforementioned. And consequently, the RBF and Newton’s interpolation methods are performed. The fundamental period can be considered a constant in 200 ms time interval. The asynchronous sampling points were interpolated with TQSA. However, the calculations of FFT for synchronization data were carried out for every signal fundamental period because of its amplitude variation. The approximate signals can then be constructed based on the above harmonic parameters. Finally, the comparison can be carried out between measurement signal and the approximate signal in Figures7 and 8 for Hanning method, RBF, and Newton’s method, respectively.Figure 7
Approximate signal based on Hanning method.Figure 8
Approximate signal based on RBF, Newton’s method.From Figures7 and 8, we can conclude that the TQSA can calculate the harmonic parameters accurately even in a fundamental period, so the reconstructed signal by TQSA has much better approximation results as shown in Figure 8. While for Hanning method, the window length is 10 times the fundamental period; it cannot capture the amplitude variation in a time window, and the reconstructed signal has the same amplitude. If the time window is changed to a fundamental period, the ability of following the amplitude variation is sure to be improved. However, the harmonic parameters’ accuracy must be decreased. The contradiction is essentially the problem that a time window which can reduce both the short- and long-range leakage errors does not exist. The results showed that the RMSE for Hanning method, RBF, and Newton’s interpolation methods is 0.3598, 0.1027, and 0.1027, respectively.Therefore, the above two simulation tests demonstrated that the TQSA can avoid the contradiction between time and frequency limitation raised from frequency-domain method as Hanning. The RBF method is a global interpolation and can acquire more accurate results than the Newton’s for clean signal. Even for noisy data case, the RBF can also acquire a similar accuracy to the Newton’s. Moreover, the time-consuming of RBF is about the same as Newton’s.


## 5.1. Simulation for Power Harmonic Measurement

In this example, the input signal, which is the same as that used in [10], is employed:
(12)
x
n
=
∑
m
=
1
3
A
m
sin
⁡
2
π
f
m
n
f
s
+
φ
m
.The fundamental frequencyf
1 equals 49.85 Hz. The amplitudes of all the harmonics are normalized and are, respectively, A
1
=
1, A
2
=
0.07, and A
3
=
0.2. The initial phases are, respectively, φ
1
=
0.9 rad, φ
2
=
1.2 rad, and φ
3
=
0.75 rad. According to the recommendation of IEC Std. 61000-4-7, the window width is set as 200 ms. Therefore, the sampling frequency f
s and the length of the sampling sequence N are set to be 2560 Hz and 512 points, respectively.


### 5.1.1. Comparison of Fundamental Frequency Calculation

Firstly, the precision comparison of zero-crossing detection among linear, quadratic, and fourth-order Newton’s interpolations was carried out. All the 512 sampling points are applied for 50th-order FIR filtering. However, only the filtered sampling points which are located behind the first 51 points will be analyzed for zero-crossing detection. The cutoff frequencies of bandpass FIR filter are 35 and 65 Hz, respectively. The fundamental frequency varies from 49.5 Hz to 50.5 Hz and the specific results were shown in Table1.Table 1
Relative error comparison for fundamental frequency.
Frequency (Hz)
Linear
Quadric
Newton’s method
49.50
8.2209
e
-
004
1.6279e − 004
1.4848e − 007
49.60
9.0416e − 004
1.0133e − 004
4.1249e − 007
49.70
3.2312e − 004
3.7585e − 004
2.3696e − 007
49.80
8.7208e − 004
3.7908e − 004
3.6028e − 008
49.85
9.2362e − 004
3.1479e − 004
4.7762e − 008
49.90
8.6749e − 004
2.2591e − 004
1.1480e − 007
49.95
7.3448e − 004
1.2716e − 004
1.6125e − 007
50.00
5.5541e − 004
3.3378e − 005
1.8374e − 007
50.05
3.6123e − 004
4.0445e − 005
1.7949e − 007
50.10
1.8301e − 004
7.9253e − 005
1.4653e − 007
50.15
5.1957e − 005
6.7919e − 005
8.3851e − 008
50.20
5.4970e − 007
8.7226e − 006
8.2554e − 009
50.30
6.3150e − 004
1.1163e − 004
1.3240e − 007
50.40
5.7513e − 004
5.7684e − 006
2.2788e − 007
50.50
1.0963e − 004
1.9676e − 004
2.5694e − 007In Table1, the relative error of fundamental frequency was defineds as Er
r
_
f
=
Δ
f
/
f
0. It can be seen that the quadratic interpolation is overall better than linear type, and the fourth-order Newton’s interpolation acquires much better accuracy which is about 2 or 3 orders of magnitude less than the former two schemes. However, the average time-consuming of linear, quadric, and Newton’s interpolations is about 1.1 ms, 4.4 ms, and 6.2 ms, respectively.


### 5.1.2. Interpolation Error Analysis for Asynchronous Data

Then, the interpolation error comparison at frequency 49.85 Hz for asynchronous data in a fundamental period among the above methods was implemented. The absolute error curves were shown in Figure4. It is obvious that the RBF interpolation takes great advantage over other three methods because of its global approximation characteristic. The RBF method can improve significantly the approximation accuracy which is about 2 orders of magnitude than the Newton method. The root mean square error (RMSE) Er
r
_
RMS is defined as
(13)
Er
r
_
RMS
=
1
N
∑
n
=
0
N
-
1
x
n
-
x
a
n
2
.
The results showed that the RMSE of RBF, Newton, linear, and quadric interpolation methods is 1.2555e-007, 7.8289e-006, 2.0026e-003, and 3.2539e-004, respectively. The average time-consuming is correspondingly about 18.7 ms, 20.7 ms, 3.5 ms, and 4.3 ms. And subsequently, the fundamental frequency varies from 49.5 Hz to 50.5 Hz, and the RMSE curves were shown in Figure 5. So the RBF method can acquire much better interpolation accuracy than the Newton’s.Figure 4
Absolute interpolation errors comparison.Figure 5
Root mean square errors comparison.


### 5.1.3. Harmonic Analysis Comparison

Finally, a harmonic analysis procedure was executed which was based on the synchronization sequence. The TQSA methods as the RBF and Newton’s interpolation, the Hanning windowed interpolated FFT method were compared.It can be clearly seen that the time-domain methods as RBF and Newton’s interpolation can significantly improve the parameters’ accuracy when compared to the Hanning method. Particularly for the phase parameter, the accuracy improves about 4 to 5 orders of magnitude in TQSA. Comparatively speaking, the RBF method possesses higher accuracy for higher harmonic parameters than the Newton method, for instance, the third harmonic case. The average time-consuming of RBF, Newton’s interpolation, and Hanning method is about 22.4 ms, 23.6 ms, and 4.3 ms, respectively. However, the time-consuming of filter process in TQSA is about 122.5 ms (Table2).Table 2
Relative error comparison of harmonic parameters.
Parameters
RBF
Newton
Hanning
f
1
4.7762e − 008
4.7762e − 008
1.0523e − 006
A
1
2.3623e − 008
1.1721e − 008
5.8204e − 006
φ
1
1.8511e − 007
4.0930e − 007
1.3611e − 001
f
2
4.7762e − 008
4.7762e − 008
3.2800e − 005
A
2
1.8819e − 007
2.4299e − 007
1.4765e − 004
φ
2
1.0059e − 006
5.8174e − 006
2.0588e − 001
f
3
4.7762e − 008
4.7762e − 008
2.5943e − 006
A
3
1.2697e − 007
8.3411e − 006
2.5551e − 005
φ
3
8.6146e − 007
6.6761e − 005
4.9044e − 001


### 5.1.4. Application to Signal with Noise

In addition, zero-mean Gaussian white noise is added to the clean signal. The signal to noise ratio (SNR) is set as 35 dB, and in order to acquire a general conclusion, the mean value of 500 independent simulations is regarded as one measurement result. The results of the Hanning method, RBF, and Newton’s interpolation methods are listed in Table3.Table 3
Relative error comparison of harmonic parameters with noise (SNR = 35 dB).
Parameters
RBF
Newton
Hanning
f
1
1.5990
e
-
006
1.5990e − 006
2.8590e − 006
A
1
1.8227e − 004
1.9787e − 004
1.6213e − 005
φ
1
3.7576e − 004
3.8343e − 004
1.3628e − 001
f
2
1.5990e − 006
1.5990e − 006
5.6802e − 005
A
2
6.5670e − 004
7.2308e − 004
4.3881e − 004
φ
2
2.5664e − 004
2.3503e − 004
2.0678e − 001
f
3
1.5990e − 006
1.5990e − 006
2.7103e − 006
A
3
7.4394e − 004
5.0906e − 004
2.0779e − 004
φ
3
1.2813e − 003
1.2330e − 003
4.9096e − 001From Table3, we can conclude that the TQSA methods have obvious advantage in phase calculation more than the Hanning method. The accuracy is improved about 2 or 3 orders of magnitude. However, the accuracy of frequency and amplitude parameters is almost in the same magnitude. This is mainly because the noise is relatively great and its influence is taken into account in sampling interpolation process. Although the RBF and Newton’s methods maintain high accuracy in interpolation, the interpolated curves based on noisy data have relatively larger error compared to the clean signal.


## 5.1.1. Comparison of Fundamental Frequency Calculation

Firstly, the precision comparison of zero-crossing detection among linear, quadratic, and fourth-order Newton’s interpolations was carried out. All the 512 sampling points are applied for 50th-order FIR filtering. However, only the filtered sampling points which are located behind the first 51 points will be analyzed for zero-crossing detection. The cutoff frequencies of bandpass FIR filter are 35 and 65 Hz, respectively. The fundamental frequency varies from 49.5 Hz to 50.5 Hz and the specific results were shown in Table1.Table 1
Relative error comparison for fundamental frequency.
Frequency (Hz)
Linear
Quadric
Newton’s method
49.50
8.2209
e
-
004
1.6279e − 004
1.4848e − 007
49.60
9.0416e − 004
1.0133e − 004
4.1249e − 007
49.70
3.2312e − 004
3.7585e − 004
2.3696e − 007
49.80
8.7208e − 004
3.7908e − 004
3.6028e − 008
49.85
9.2362e − 004
3.1479e − 004
4.7762e − 008
49.90
8.6749e − 004
2.2591e − 004
1.1480e − 007
49.95
7.3448e − 004
1.2716e − 004
1.6125e − 007
50.00
5.5541e − 004
3.3378e − 005
1.8374e − 007
50.05
3.6123e − 004
4.0445e − 005
1.7949e − 007
50.10
1.8301e − 004
7.9253e − 005
1.4653e − 007
50.15
5.1957e − 005
6.7919e − 005
8.3851e − 008
50.20
5.4970e − 007
8.7226e − 006
8.2554e − 009
50.30
6.3150e − 004
1.1163e − 004
1.3240e − 007
50.40
5.7513e − 004
5.7684e − 006
2.2788e − 007
50.50
1.0963e − 004
1.9676e − 004
2.5694e − 007In Table1, the relative error of fundamental frequency was defineds as Er
r
_
f
=
Δ
f
/
f
0. It can be seen that the quadratic interpolation is overall better than linear type, and the fourth-order Newton’s interpolation acquires much better accuracy which is about 2 or 3 orders of magnitude less than the former two schemes. However, the average time-consuming of linear, quadric, and Newton’s interpolations is about 1.1 ms, 4.4 ms, and 6.2 ms, respectively.


## 5.1.2. Interpolation Error Analysis for Asynchronous Data

Then, the interpolation error comparison at frequency 49.85 Hz for asynchronous data in a fundamental period among the above methods was implemented. The absolute error curves were shown in Figure4. It is obvious that the RBF interpolation takes great advantage over other three methods because of its global approximation characteristic. The RBF method can improve significantly the approximation accuracy which is about 2 orders of magnitude than the Newton method. The root mean square error (RMSE) Er
r
_
RMS is defined as
(13)
Er
r
_
RMS
=
1
N
∑
n
=
0
N
-
1
x
n
-
x
a
n
2
.
The results showed that the RMSE of RBF, Newton, linear, and quadric interpolation methods is 1.2555e-007, 7.8289e-006, 2.0026e-003, and 3.2539e-004, respectively. The average time-consuming is correspondingly about 18.7 ms, 20.7 ms, 3.5 ms, and 4.3 ms. And subsequently, the fundamental frequency varies from 49.5 Hz to 50.5 Hz, and the RMSE curves were shown in Figure 5. So the RBF method can acquire much better interpolation accuracy than the Newton’s.Figure 4
Absolute interpolation errors comparison.Figure 5
Root mean square errors comparison.


## 5.1.3. Harmonic Analysis Comparison

Finally, a harmonic analysis procedure was executed which was based on the synchronization sequence. The TQSA methods as the RBF and Newton’s interpolation, the Hanning windowed interpolated FFT method were compared.It can be clearly seen that the time-domain methods as RBF and Newton’s interpolation can significantly improve the parameters’ accuracy when compared to the Hanning method. Particularly for the phase parameter, the accuracy improves about 4 to 5 orders of magnitude in TQSA. Comparatively speaking, the RBF method possesses higher accuracy for higher harmonic parameters than the Newton method, for instance, the third harmonic case. The average time-consuming of RBF, Newton’s interpolation, and Hanning method is about 22.4 ms, 23.6 ms, and 4.3 ms, respectively. However, the time-consuming of filter process in TQSA is about 122.5 ms (Table2).Table 2
Relative error comparison of harmonic parameters.
Parameters
RBF
Newton
Hanning
f
1
4.7762e − 008
4.7762e − 008
1.0523e − 006
A
1
2.3623e − 008
1.1721e − 008
5.8204e − 006
φ
1
1.8511e − 007
4.0930e − 007
1.3611e − 001
f
2
4.7762e − 008
4.7762e − 008
3.2800e − 005
A
2
1.8819e − 007
2.4299e − 007
1.4765e − 004
φ
2
1.0059e − 006
5.8174e − 006
2.0588e − 001
f
3
4.7762e − 008
4.7762e − 008
2.5943e − 006
A
3
1.2697e − 007
8.3411e − 006
2.5551e − 005
φ
3
8.6146e − 007
6.6761e − 005
4.9044e − 001


## 5.1.4. Application to Signal with Noise

In addition, zero-mean Gaussian white noise is added to the clean signal. The signal to noise ratio (SNR) is set as 35 dB, and in order to acquire a general conclusion, the mean value of 500 independent simulations is regarded as one measurement result. The results of the Hanning method, RBF, and Newton’s interpolation methods are listed in Table3.Table 3
Relative error comparison of harmonic parameters with noise (SNR = 35 dB).
Parameters
RBF
Newton
Hanning
f
1
1.5990
e
-
006
1.5990e − 006
2.8590e − 006
A
1
1.8227e − 004
1.9787e − 004
1.6213e − 005
φ
1
3.7576e − 004
3.8343e − 004
1.3628e − 001
f
2
1.5990e − 006
1.5990e − 006
5.6802e − 005
A
2
6.5670e − 004
7.2308e − 004
4.3881e − 004
φ
2
2.5664e − 004
2.3503e − 004
2.0678e − 001
f
3
1.5990e − 006
1.5990e − 006
2.7103e − 006
A
3
7.4394e − 004
5.0906e − 004
2.0779e − 004
φ
3
1.2813e − 003
1.2330e − 003
4.9096e − 001From Table3, we can conclude that the TQSA methods have obvious advantage in phase calculation more than the Hanning method. The accuracy is improved about 2 or 3 orders of magnitude. However, the accuracy of frequency and amplitude parameters is almost in the same magnitude. This is mainly because the noise is relatively great and its influence is taken into account in sampling interpolation process. Although the RBF and Newton’s methods maintain high accuracy in interpolation, the interpolated curves based on noisy data have relatively larger error compared to the clean signal.


## 5.2. Analysis of Current Signal Measured from a Forge

In this example, we evaluate the performance of the TQSA in the measurement of distorted signal which was recorded from a forge. The current signal is greatly affected by the working condition, and the amplitude has obvious variation in Figure6. Therefore, the TQSA method and Hanning method are compared for distorted signal located in the segment sampling points of [
425501,426500
]. And the sampling frequency f
s and the length of the sampling sequence N are 5000 Hz and 1000 points, respectively. So the time length of segment is 200 ms which is recommended in IEC 61000-4-7.Figure 6
Recorded current wave in a forge.Firstly, the Hanning method is implemented as per the IEC’s recommendation. Then, we can construct the approximate signal from the harmonic parameters which are calculated as aforementioned. And consequently, the RBF and Newton’s interpolation methods are performed. The fundamental period can be considered a constant in 200 ms time interval. The asynchronous sampling points were interpolated with TQSA. However, the calculations of FFT for synchronization data were carried out for every signal fundamental period because of its amplitude variation. The approximate signals can then be constructed based on the above harmonic parameters. Finally, the comparison can be carried out between measurement signal and the approximate signal in Figures7 and 8 for Hanning method, RBF, and Newton’s method, respectively.Figure 7
Approximate signal based on Hanning method.Figure 8
Approximate signal based on RBF, Newton’s method.From Figures7 and 8, we can conclude that the TQSA can calculate the harmonic parameters accurately even in a fundamental period, so the reconstructed signal by TQSA has much better approximation results as shown in Figure 8. While for Hanning method, the window length is 10 times the fundamental period; it cannot capture the amplitude variation in a time window, and the reconstructed signal has the same amplitude. If the time window is changed to a fundamental period, the ability of following the amplitude variation is sure to be improved. However, the harmonic parameters’ accuracy must be decreased. The contradiction is essentially the problem that a time window which can reduce both the short- and long-range leakage errors does not exist. The results showed that the RMSE for Hanning method, RBF, and Newton’s interpolation methods is 0.3598, 0.1027, and 0.1027, respectively.Therefore, the above two simulation tests demonstrated that the TQSA can avoid the contradiction between time and frequency limitation raised from frequency-domain method as Hanning. The RBF method is a global interpolation and can acquire more accurate results than the Newton’s for clean signal. Even for noisy data case, the RBF can also acquire a similar accuracy to the Newton’s. Moreover, the time-consuming of RBF is about the same as Newton’s.


## 6. Conclusions

The spectral leakage problems due to the asynchronous sampling affect significantly the harmonic measurement accuracy. So a quasisynchronous sampling algorithm based on RBF interpolation has been proposed in this paper. The principle of RBF interpolation and its application in harmonic analysis was discussed in detail. Compared to the local approximation schemes as linear, quadric, and fourth-order Newton interpolations, the RBF is a global scheme which can acquire more accurate results while the time-consuming is about the same as Newton’s. The simulations results also showed that the RBF method is suitable for the application where frequency or amplitude variation detection is strictly required.



---

*Source: 874945-2014-09-25.xml*