Journal of Power and Energy Engineering, 2014, 2, 673-679
Published Online April 2014 in SciRes. http://www.scirp.org/journal/jpee
http://dx.doi.org/10.4236/jpee.2014.24090
How to cite this paper: Guo, H.C. (2014) Frequency Measurement of Transient Oscillatory on LABVIEW. Journal of Power
and Energy Engineering, 2, 673-679. http://dx.doi.org/10.4236/jpee.2014.24090
Frequency Measurement of Transient
Oscillatory on LABVIEW
Haichao Guo
Department of Electrical Engineering, North China Electric Power University, NCEPU, Baoding, China
Email: guohaichao42130@126.com
Received February 2014
Abstract
Due to the sensitivity of the frequency measurement of power system transient oscillatory signal
with respect to noise signal, a new measurement method based on Wavelet Transform and Win-
dowed Fourier Transform is proposed. An analysis using LabVIEW on oscillatory signal containing
various noise components is carried on and it is shown that the proposed method can detect the
oscillat or y frequency more accurately and quickl y.
Keywords
Transient Oscillatory; Frequency Measurement; Wavelet Transform; Windowed Fourier
Transform
1. Introduction
Transient oscillation refers to the abrupt bipolar change of current and voltage in the steady state condition,
which is of high frequency and short duration, it often causes the damage of the electronic equipment and oper-
ating equipment insulation, brings immeasurable loss to power quality sensitive users. Power system transient
oscillation is a typical problem of transient voltage disturbance, which occurs second only to voltage sag, so the
study of transient oscillation is taken more and more seriously.
A detection method of power quality disturbance based on Hilbert Huang transform (HHT) of the ensemble
empirical mode decomposition (EEMD) is proposed in [1], which can detect transient oscillation frequency. A
short time Fourier transform based on the special frequency component is proposed, which can obtain the main
frequency and amplitude of harmonic frequency component accurately in [2]. A Prony detection method based
on the specific frequency band is proposed in [3], which can detect the amplitude and frequency of transient os-
cillation signal. But the above methods are complex and sensitive to noise, so they do not apply to the signal
containing noise. A method based on Morlet wavelet-based-spectral kurtosis (SK) is proposed, but as a result of
spectral kurtosis is sensitive to noise, the detection error increases with the decreasing of the noise [4].
The Windowed Fourier transform (WFT) and Continuous wavelet transform (CWT) are two tools in the
time-frequency analysis. They have a significant difference. That is, the window length is fixed for WFT and
proportional to the scale for CWT, which makes the frequency resolution of WFT is inferior to CWT at low
frequencies and better than CWT at high frequencies [5].
H. C. Guo
674
In order to measure frequency, the main characteristic of the transient oscillation, this paper combines the
CWT and WFT, which selects CWT in Long time scale and WFT in short time scale. That is, denoising to the
original signal in the first, then the Binary frequency characteristic of CWT is used to calculate the percentage of
each frequency band signal, so the oscillation frequency range is reduced and the optimal window is obtained,
the oscillation frequency is measured using WFT finally. LabVIEW is a kind of graphical programming tools,
widely used in research laboratory. The above method is proved effective using LabVIEW in this paper.
2. The Algorithm Princip le
2.1. Windowed Fourier Transform
Windowed Fourier transform is defined as:
(, )()()
jt
Fftg tedt
ω
ωτ τ
−∞
= −
(1)
Here,
()ft
is the signal to be analyzed,
()gt
is the window function, and
τ
is a translation vector.
The frequency range and accuracy of WFT are determined by the window function, and it is once established,
whose shape is no longer changed. Due to the uncertainty in advance of main frequency components, scope,
time and duration of transient signal, the process of adding window function exists blindness. In order to find the
right point to add window, moving the window in the entire signal and making several attempts to get the right
window length are needed, which bring a large amount of calculation. If the frequency scope, time and duration
of the transient signal are predetermined, a very good analysis result is obtained only by adding window once.
2.2. Wavelet Transform
On the basis of inheriting and developing the idea of WFT time-frequency localization, while overcoming the
disadvantage of the WFT fixed window size and no discrete orthogonal, Wavelet transform is suitable for tran-
sient signal analysis.
Assuming
()
t
Ψ
is square integrable function, i.e.
2
()( )t LR
Ψ∈
. If its Fourier transform
satisfies
the conditions:
( )
2
R
Cd
ωω
ω
Ψ
Ψ
= <∞
(2)
()tΨ
is called a basic wavelet or mother wavelet. After the expansion and translation of the mother wavelet
()tΨ
, a wavelet sequence is obtained.
Wavelet analysis technique handles Frequency domain information in band when dealing with transient sig-
nals, so you can extract characteristic signal of transient signal using its multi-resolution analysis, simply by se-
lecting the appropriate decomposition level. This makes the main frequency transient signal include in a sub-
band, but the frequency and amplitude corresponding to the individual harmonics cannot be obtained.
2.3. Wavelet Thresholding Denoising
Based on the sparseness and decorrelation of CWT, most of the wavelet coefficients are close to zero and the
useful signals focus on a few frequency bands. But the noise energy is distributed uniformly, so the coefficients
of the useful signal is usually greater than noise. Therefore, decomposing first, then the threshold value is set to
get the useful wavelet coefficients for signal reconstruction. Generally, wavelet thresholding denoising includes
the following three steps [6]-[9].
1) Wavelet decomposition. To signals containing Noisy, select the appropriate wavelet function and deter-
mine the number of layers to decompose M, then Wavelet decomposition is carried on to the signal f and
wavelet coefficients are obtained.
2) Thresholding. To wavelet coefficients, select threshold based on the distribution of noise to remove redun-
dant coefficients, so the new wavelet coefficients are obtained.
3) Wavelet reconstruction. Do wavelet reconstruction using the retained wavelet coefficient after thresholding,
so the original signal estimated is recovered.
H. C. Guo
675
2.4. Specific Frequency Band Fixing
The original signal is decomposed into multiple sub-bands using wavelet multi-resolution analysis, and the fre-
quency range of each band is obtained. The energy of each sub-band can be calculated by the following formula:
22
1
()( )
n
ii i
k
Eftdtx k
==
(3)
where,
i
f
is the signal in the sub band i;
i
x
is discrete value.
Comparing the energy of each sub-band, the sub-band carrying the most energy is get to do signal reconstruc-
tion, thereby a specific band is obtained which contains the main high-frequency components of the original.
2.5. Determination of the Signal Center and Window Width
Following the definition of center of gravity in mechanics, the signal center is as follows:
2
2
()
()
R
R
t f tdt
f tdt
τ
=
(4)
where,
i
f
is the signal in the sub band i;
i
x
is discrete value.
Then Following the definition of torques, the 1/2 width of window function is:
2
2
2
() ()
()
R
R
tf tdt
tf tdt
τ
∆=
(5)
By Equations (4) and (5) the window width can be obtained:
2t
ω
∆=∆
(6)
After the time center and window width are calculated, select the appropriate window function for WFT.
3. The Simulation Test
3.1. Oscillation Waveform Generation
Using transient disturbance model in Labview environment the transient oscillation waveform is produced,
whose model is:
1
() 12
( )sin[()()]sin
ct t
utteut tuttt
ω αβω
−−
=+−− −
where,
0.1 0.8
α
≤≤
,
21
3Tt tT≤−≤
, Figure 1 is the waveform.
Figure 1 constructs four cycles of 0.08s.
10.03ts=
and
2
0.033ts=
, i. e. , The oscillation starts from 0.03 s
and continues 0.003 s.
0100
ωπ
=
,
60
β
=
,
0.7
α
=
, i.e., The oscillation whose frequency is 3000 Hz and
amplitude is 0.7 is produced. The sampling frequency is 10000 Hz.
Using LabVIEW, this signal is broken down to 5 layers using multi-resolution analysis, and the type (3) is
used to calculate the percentage of each frequency band signal of the total energy, as shown in Table 1.
Figure 1. Transient oscillation waveform.
amplitude
sampling point
H. C. Guo
676
Table 1. The percentage of each frequency band signal.
Decomposition layers The proportion of energy Frequency range (Hz)
The first layer 0.782808 2500 - 5000
The second layer 0.0518 098 1250 - 2500
The third layer 0.0283727 625 - 1250
The fourth layer 0.0670952 312.5 - 625
The fifth layer 0.0699148 1 56.25 - 312.5
Table 1 shows that the first layer has the maximum energy, which shows that the first subspace contains the
main high frequency components of the original signal. By analyzing the signal of the first layer, the high pri-
mary frequency components in original signal can be obtained.
Meanwhile, Equations (4)-(6) are used to calculate the window center
0.0315573s
τ
=
, 298 in points and
window width
0.0036s
ω
∆=
, 298 in points.
This paper selects the Gauss window in WFT, which does not change the size of the signal, and compared
with other window function, Gaussian window has the narrowest main lobe, so its frequency resolution is better
than other windows.
The Frequency analysis results acquired by applying WFT are shown in Figure 2. The frequency interval
/
s
f fN∆=
where
s
f
is the sampling frequency, N is quantity of samples, can be distinguished as positive frequency and
negative frequency after applying WFT. 1 - 17 are positive frequency, because the acquired window width will
be 36 points after conversion. So While totally 36 samples are taken, frequency interval is calculated as 10,000/
36 = 277.78 Hz. Combining with the frequency range of 2500 Hz - 5000 Hz of the first layer, the measured main
oscillatory frequency should be in the frequency interval between 2500/277.78 Hz and 5000/277.78 Hz, i.e. 9
and 17. In this range, the dominant oscillatory frequency can be obtained from the above Figure 2, which is 11
× 277.78 = 3055.56 Hz.
The results above show that the window width is 6 points more than the preset value, while the measured fre-
quency is 55.56 Hz more than the preset value. The frequency deviation is 55.56/3000 = 0.01852, i.e. 1.85%.
Obviously the error is small.
3.2. Analysis of 3000 Hz Oscillation with 20% White Noise
With 20% of white noise added to the oscillation waveform, the oscillation frequency is still 3000 Hz and other
parameters are the same as shown in Figure 3.
In order to eliminate the interference of noise on the signal identification, the noise is to be removed firstly,
which based on the Rigrsure threshold method and sym 7 wavelet basis.
Calculating the energy percentage of each frequency band, the results are shown in Table 2. The data show
the dominant frequency is still in the first layer.
The window center and window width obtained are:
0.03198s
τ
=
,
0.00237s
ω
∆=
. Converted to points, the
windowed position is 294 points and width is 48 points.
Figure 4 is the frequency measured with WFT. As 48 samples are taken, frequency interval
f
is 10,000/48
= 208.33 Hz. And the frequency range of the first layer is 2500 Hz - 5000 Hz. Thus the measured main fre-
quency of the oscillation is 2500/208.33 Hz - 5000/208.33 Hz, i.e. 12 and 24. In this range, the main oscillatory
frequency can be obtained from the above Figure 4, which is
208.33 14=2916.62Hz×
and the error is 2.78%.
3.3. Analysis of 3000 Hz Oscillation with 30% White Noise
When 30% noise added and the other parameters fixed, a percentage of the total energy of each band signal is
obtained using the same process as above. The results are shown in Table 3. Table 3 shows the main frequency
is still on the first layer.
The window center and window width obtained are:
0.0314544s
τ
=
,
0.00303s
ω
∆=
. Converted to points,
the windowed position is 285 points and width is 60 points.
H. C. Guo
677
Figure 2 . Transient oscillation at 3000 Hz.
Figure 3 . Transient oscillation waveform with noise.
Figure 4 . Transient oscillation at 3000 Hz after denoising.
Table 2. The percentage of each frequency band signal after denoising (3000 Hz, 20% noise).
Decomposition layers The proportion of energy Frequency range (Hz)
The first layer 0.79552 2500 - 5000
The second layer 0.05441 1250 - 2500
The third layer 0.0260326 625 - 1250
The fourth layer 0.044546 312.5 - 625
The fifth layer 0.0286896 156.25 - 312.5
Figure 5 is the frequency measured with WFT. The frequency interval
f
is 10,000/60 =166.67 Hz. And
the frequency range of the first layer is 2500 Hz - 5000 Hz. Thus the measured main frequency of the oscillation
is 2500/166.67 Hz - 5000/166.67 Hz, i.e. 15 and 30. In this range, the main oscillatory frequency can be ob-
tained from the above Figure 5, which is
17 166.672833.39Hz×=
.
It can be seen from the above results that window width appeared larger derivation and the main frequency
measured is less than preset value 166.61 Hz, i.e. the frequency error is
166.61/ 30000.0555=
, which increas-
es.
Sampling points
Amplitude
Frequency
Amplitude
H. C. Guo
678
3.4. Analysis of 2000 Hz Oscillation with 20% White Noise
When the oscillation frequency is 2000 Hz with 20% noise, the following results are got using the same method
(Table 4).
The window center and window width obtained are:
0.0317484s
τ
=
,
0.00336s
ω
∆=
. Converted to points,
the windowed position is 283 points and width is 68 points.
Figure 6 is the frequency measured with WFT. The frequency interval
f
is 10,000/68 = 147.06 Hz. And
the frequency range of the first layer is 1250 Hz - 2500 Hz. Thus the measured main frequency of the oscillation
is 1250/147.06Hz - 2500/147.06Hz, i.e. 9 and 17. In this range, the main oscillatory frequency can be obtained
from the above Figure 6, which is
13 147.061911.78Hz×=
. The frequency error is
88.22 /20000.04411
=
, i.e.
4.41%, which is larger than that of 3000Hz with 20% noise.
4. Conclusion
A frequency measurement of transient oscillation signals containing noise method is combined Wavelet Trans-
form and Windowed Fourier Transform based on LabVIEW is proposed in this paper, using which the window
Figure 5 . Transient oscillation at 3000 Hz after denoising.
Figure 6 . Transient oscillation at 2000 Hz after denoising.
Table 3. The percentage of each frequency band signal after denoising (3000 Hz, 30% noise).
Decomposition layers The proportion of energy Frequency range (Hz)
The first layer 0.585836 2500 - 5000
The second layer 0.0601262 1250 - 2500
The third layer 0.0456442 625 - 1250
The fourth layer 0.130186 312.5 - 625
The fifth layer 0.178208 156.25 - 312.5
H. C. Guo
679
Table 4. The percentage of each frequency band signal after denoising (2000 Hz, 20% noise).
Decomposition layers The proportion of energy Frequency range (Hz)
The first layer 0.117354 2 500 - 5000
The second layer 0.679704 1250 - 2500
The third layer 0.0577967 625 - 1250
The fourth layer 0.0533815 312.5 - 625
The fifth layer 0.091764 156.25 - 312.5
length and the window position are determined quickly, and the amount of calculation is reduced effectively.
Experimental results show that, while the window width and window location varies with the change of the os-
cillation frequency of the signal and noise levels, but always covers the whole oscillation area, so the oscillation
frequency is measured within a certain error range eventually.
References
[1] Zhang, Y. and Liu, Z.G. (20 11) Application of EEMD in Power Quality Disturbance Detection. Electric Power Auto-
mation Equipment, 31, 86-91. http://dx.doi.org/10.1080/028418501127346846
[2] Zh ao, C.Y. and He, M.F. (2004) Short Time Fourier Analysis Based on the Special Frequency Componen t. Automation
of Electric Power Systems, 28, 41-44.
[3] Chen , X.F. and Zhao, C.Y. (2011) The Prony Detection Method of Transient Oscillation Based on the Specific Fre-
quency Band. Electrical Measurement & Instrumentation, 48, 1-5. http://dx.doi.org/10.1109/9.402235
[4] Zhang, Q.G., Liu, Z.G. and Chen, G. (2013) Frequency Detection of Transient Oscillation Signal Using Morlet Wave-
let Based on Spectral Kurtosis Method. Proceedings of the CSU-EPSA, 25, 1-6.
[5] Liu , L.T. and Hsu, H. (2011) Inversion and Normalization of Time-Frequency Transform. 2011 International Confe-
rence of the IEEE Conference Publications, Multimedia Technology, 26-28 July 2011, 216 4 -2168 .
[6] Lv, R.L., Wu, T.J. and Yu, L. (2004) Performance Analysis of Threshold Denoising via Different Kinds of Mother
Wavelets. Spectroscopy and Spectral Analysis, 24, 826-829 .
[7] Zen g, S.Z. and Zhu, J.H. (2008) An Improved Method of De-noising in Wavelet Threshold. Ocean Technology, 27,
37-39.
[8] Fu, W. and Xu, S.C. (20 06) Improved Algorithm for Threshold De-Noising in Wavelet Transform Domain. Chinese
Journal of Sensors and Actuators, 19, 534 -536.
[9] Wan g, B., Li, J.W. and Wang, Z.F. (2011) Threshold De-Noising Method Based on Wavelet Analysis. Computer En-
gineer ing and Designs, 32, 1099-1102.