A MATLAB-based PMU Simulator
A MATLAB-based PMU Simulator
Abstract—The use of Phasor Measurement Unit (PMU) data goal the PMU network and the measurement process need
in power system operation is of practical importance. These data to be clear and easily understandable, in order for the power
are currently used for real-time operation monitoring and off- system engineers to feel confident about using this data for
line analysis. Understanding of the mechanisms involved in the
phasor estimation process is necessary for correct phasor data advanced applications.
interpretation and analysis, as well as for design of advanced The aim of this article is to present a M ATLAB software
control and protection schemes. In this paper the main phenom- that can be used as a teaching tool and research framework
ena involved in the phasor measurement process are illustrated to explore the algorithms involved in the phasor measurement
using a M ATLAB based PMU simulator. process. This software can process simulated and real mea-
Index Terms—PMU, phasor data processing, power system sured signals. The main idea is to provide a software tool
analysis, phasor estimation algorithms. to better understand the phenomena involved in the phasor
measurement process, such as off-nominal frequency and
I. I NTRODUCTION unbalanced frequency operation, the influence of the complex
gains Pn and Qn in the process, and the methods used to
filtering
x(t) X
x(t)
N +n N + n −1 2 − j 2π n X true
= n
X =X + ( xN +n − xn )e N n
Pn
N
Analog Analog Post-Processing
est filtering true
Filter Filter xn (t ) X n 2
X n X n
DFT Filtering* X
X(k)
overview of the power system frequency concept is found in
X(k)
[8].
Several frequency measurement methodologies can be
Fig. 1. Basic Phasor estimation architectures [8] found in the literature. An evaluation of the frequency esti-
mation methodologies can be found in [16, 17, 18, 19, 20, 21,
22, 23]. The main available methods are: Zero Crossing [17],
or nonrecursive) discrete Fourier Transform (DFT), frequency Least Error Squares [24], Kalman filters [25], Demodulation
estimation, and post-processing (using calibration factors and [18], [22], Phasor-Based [17],[20],[21].
filtering), as shown in Figure 2. Under off-nominal frequency The methods used in the PMU Simulator are Demodula-
operation, the post-processing layer is necessary to correct the tion and Phasor-Based. These methods are chosen because
effects caused by leakage phenomena. Leakage phenomena they presented satisfactory performance under large frequency
results from the truncation of sampled data outside the data variation and noisy environment, and are built into commercial
window. Consequently, the estimated phasor is attenuated by PMUs (phasor-based).
two complex gains, Pn and Qn 1 . Fortunately, the effects of the
complex gain Pn (shown in Figure 2) can be readily computed III. M ATLAB - BASED PMU S IMULATOR
from the sampling window size (N ), the frequency deviation
(∆ω) and the sampling period (△t) [4]. The magnitude of The software is suitable to explore the phasor measurements
estimation process described in Figure 2. The M ATLAB PMU
Pn is the attenuation factor, and the phase angle of Pn is a
simulator considers single-phase and three-phase measurement
constant offset in the measured phase angles. As the window
signals, the last one allowing positive sequence phasor es-
size (N ) and sampling period (△t) are fixed, Pn can be readily
timation. Step and ramp (frequency modulation) frequency
estimated for a frequency range and stored in a table (Block 1
disturbances can be introduced. Simulations can be realized
in Figure 2). In real-time, the frequency deviation estimation
considering off-nominal frequency operation to observe the
is necessary to take the correct Pn value.
influence of the complex gains (Pn and Qn ) and filtering
The complex gain
( ) in the phasor estimation process. The processing of real
sin N (ω+ω
2
0 )∆t
(ω+ω0 )∆t digital measurement data can also be realized. The main
Q= (ω+ω0 )∆t
e−j(N −1) 2 (1) software blocks and algorithms involved in the M ATLAB PMU
N sin 2
simulator are shown in Figure 3.
introduces a magnitude and phase angle variation at frequency The main features of the PMU Simulator are:
2ω0 + ∆ω ≃ 2ω0 (approximately) in the estimated single- • Recursive and Non-Recursive DFT;
phase phasor. The second harmonic (2ω0 ) oscillation is shown • Off-nominal frequency simulation, frequency step and
in Figure 7 (blue curve). In contrast to a static offset, this ramp;
oscillation is not easily removed. A conventional way to • Influence of the complex gains in the phasor measure-
minimize its influence is to use a three-point-average filter ment;
(Block 2 in Figure 2) [4], which can reduce the harmonic • Influence of the post-processing level in the phasor mea-
components by more than 50%. surement;
1) Frequency Estimation: During normal operating condi- • Real digital data processing.
tions, the power system the frequency is always changing. This
deviation can be small, when related to generation load mis-
IV. S IMULATION R ESULTS
match, or large, when considering large disturbances. Under
these conditions, the frequency estimation methodology bears The main goal of this section is to describe the performance
a key role in the phasor computation process. An interesting of three-phase and single-phase phasor estimation under off-
nominal frequency operation, using simulated data. To illus-
1 X est = P X true + Q(X true )∗ [4]. trate the phasor performance a frequency step disturbance
3
Positive Sequence
Digital Signal Architectures 200
Without Correction
(Real or With Correction
150
Simulated) 1. Uniform Sampling
2. Non-uniform Sampling 100
Angle (degress)
50
Algorithms 0
DFT: −50
Frequency 1. Recursive
DFT 2. Non-recursive −100
Estimation
−150
Freq. Estimation:
1. Demodulation −200
0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6
2. Phasor Angle Based Time(s)
3. Zero crossing
Fig. 6. Three-Phase Positive Sequence Performance
Pos-Processing Ploting
Single-Phase Phasor
1.01
DFT
Three−Point Filter
1.006
Phase A - Signal Input
2
1.004
0 1.002
−1
1
−2
0.9 0.92 0.94 0.96 0.98 1 1.02 1.04 1.06 1.08 1.1
0.998
Signal Frequency
60.5
Estimated
Frequency (Hz)
0.996
60 Real
59.5 0.994
59
0.992
58.5
0.9 0.92 0.94 0.96 0.98 1 1.02 1.04 1.06 1.08 1.1
Time(s) 0.99
0.98 1 1.02 1.04 1.06 1.08 1.1 1.12 1.14 1.16
Time(s)
Fig. 4. Input Signal - Sine Wave
Fig. 7. Single-Phase Phasor Estimation Performance
−20
1.0003
1.0002 −30
Magnitude (pu)
1.0001
−40
1
0.9999 −50
0.9998
0.9997 −60
0.9996
−70
0.9995 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2
0.9 0.95 1 1.05 1.1 1.15
Time(s)
Fig. 5. Three-Phase Positive Sequence Performance Fig. 8. Single-Phase Phasor Estimation Performance
4
0.84
1
0.82
0.5
Magnitude (pu)
Voltage (pu)
0.8
0
0.78
−0.5 0.76
0.74
−1
0.72
0.3 0.32 0.34 0.36 0.38 0.4 0.42 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75
Time(s) Time(s)
67
100
66
Angle (degress)
Frequency (Hz)
50
65
0
64
63 −50
62 −100
61
−150
60
−200
59 0 0.2 0.4 0.6 0.8 1 1.2
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 Time(s)
Time(s)
Fig. 12. Single-Phase Real Data
Fig. 10. Single-Phase Real Data
measurements system in the brazilian power system,” in no. 2, pp. 480–486, 1993.
IEEE Power Eng. Society General Meeting, 2006. [18] M. Akke, “Frequency estimation by demodulation of two
[3] X. Xie, Y. Xin, J. Xiao, J. Wu, and Y. Han, “WAMS complex signals,” IEEE Trans. Power Del., vol. 12, no. 1,
applications in Chinese power systems,” IEEE Power pp. 157–163, 1997.
Energy Mag., vol. 4, no. 1, pp. 54–63, 2006. [19] I. Kamwa, M. Leclerc, and D. McNabb, “Performance of
[4] A. G. Phadke and J. S. Thorp, Synchronized phasor mea- demodulation-based frequency measurement algorithms
surements and their applications. New York: Springer, used in typical pmus,” IEEE Trans. Power Del., vol. 19,
2008. no. 2, pp. 505–514, 2004.
[5] M. Akke and J. S. Thorp, “Sample value adjustment [20] D. Fan and V. Centeno, “Phasor-based synchronized
improves phasor estimation at off-nominal frequencies,” frequency measurement in power systems,” IEEE Trans.
IEEE Trans. on Power Delivery, vol. 25, no. 4, pp. 2255– Power Del., vol. 22, no. 4, pp. 2010–2016, 2007.
2263, 2010. [21] ——, “Least-squares estimation in phasor-based syn-
[6] I. C. Decker et al., “Monitoring of a large scale event chronized frequency measurements,” in Proc. IEEE
in the Brazilian power system by WAMS,” in Proc. VIII Power and Energy Society General Meeting - Conversion
iREP, 2010, pp. 1–8. and Delivery of Electrical Energy in the 21st Century,
[7] C. Ruiz, N. Orrego, and J. Gutierrez, “The Colombian 2008, pp. 1–6.
2007 black out,” in Trans. and Distr. Conf. and Exposi- [22] T. S. J. Warichet and J. C. Maun, “Considerations about
tion: Latin America, 2008 IEEE/PES, 2008. synchrophasors measurement in dymanic system condi-
[8] A. G. Phadke and B. Kasztenny, “Synchronized phasor tions,” Electrical Power and Energy Systems, vol. 31,
and frequency measurement under transient conditions,” no. 9, pp. 452–464, October 2009.
IEEE Trans. Power Del., vol. 24, no. 1, pp. 89–95, 2009. [23] S. N. et al., “Fundamental frequency estimation in power
[9] M. Paolone, A. Borghetti, and C. A. Nucci, “A syn- systems using complex prony analysis,” Journal of Elec-
chrophasor estimation algorithm for the monitoring of trical Engineering & Technology, vol. 6, no. 2, pp. 154–
active distribution newtorks in steady state and transient 160, 2011.
conditions,” in Proc. 17th Power systems Computation [24] M. M. Giray and M. S. Sachdev, “Off-nominal frequency
Conference, 2011, pp. 1–8. measurements in electric power systems,” IEEE Trans.
[10] T. Nguyen and X. Li, “A fast and accurate method Power Del., vol. 4, no. 3, pp. 1573–1578, 1989.
for estimating power systems phasors using dft with [25] A. A. Girgis and T. L. D. Hwang, “Optimal estimation
interpolation,” in PES General Meeting, 2006. IEEE, 0-0 of voltage phasors and frequency deviation using linear
2006, p. 8 pp. and nonlinear kalman filtering: Theory and limitations,”
[11] W. Premerlani, B. Kasztenny, and M. Adamiak, “Devel- IEEE Power Eng. Rev., no. 10, pp. 46–47, 1984.
opment and implementation of a synchrophasor estimator
capable of measurements under dynamic conditions,”
Power Delivery, IEEE Transactions on, vol. 23, no. 1, Daniel Dotta received his MSc. Degree in Electrical Engineering in 2003,
and the PhD Degree in Power System Engineering in 2009, both from the
pp. 109 –123, jan. 2008. Federal University of Santa Catarina, Florianpolis, Brazil. He has been on the
[12] J. de la O Serna, “Dynamic phasor estimates for power faculty at the Federal Institute of Santa Catarina since 2006. Currently he is
system oscillations and transient detection,” in Power doing his sabbatical at Renssenlaer Polytechnic Institute (RPI), Troy, NY.
Engineering Society General Meeting, 2006. IEEE, 0-0
2006, p. 7 pp.
Joe H. Chow received his MS and PhD degrees from the University of
[13] G. Benmouyal, “Design of a combined digital global Illinois, Urbana-Champaign. After working in the General Electric power
differential and volt/hertz relay for step-up transformers,” system business in Schenectady, he joined Rensselaer Polytechnic Institute in
IEEE Trans. Power Del., vol. 6, no. 3, pp. 1000–1007, 1987, and is a professor of Electrical, Computer, and Systems Engineering. His
research interests include multivariable control, power system dynamics and
1991. control, voltage-source converter-based FACTS controllers, and synchronized
[14] L. S. A. G. C. Zweigle and A. Guzman-Casillas, “Tappa- phasor data.
ratus and algorithm for estimating synchronized phasors
at pre-determined times referenced to an absolute time
standard in an electrical system,” US Patent 7 480 580, Luigi Vanfretti (Student Member ’03, M’10) became an Assistant Professor at
the Electric Power Systems Department, KTH Royal Institute of Technology,
20, 2009. Stockholm, Sweden, in 2010 and was conferred the Swedish academic title
[15] G. C. Z. L. R. S. Anderson, A. Guzman-Casillas and of Docent in 2012. He received his MSc in 2007 and PhD in 2009, both
G. Ben, “Protective relay with synchronized phasor at in Electric Power Engineering, from Rensselaer Polytechnic Institute (RPI),
Troy, NY, USA. His research interests are in the general area of modeling,
pre-determined time referencedto an absolute time stan- dynamics, stability and control of power systems; while his main focus is on
dard in an electrical sys,” US Patent 6 845 333, 2005. the development of applications of PMU data.
[16] D. W. P. Thomas and M. S. Woolfson, “Evaluation of
frequency tracking methods,” IEEE Trans. on Power
Delivery, vol. 16, no. 3, pp. 367–371, 2001. M. Shoaib Almas obtained the MSc in Electric Power Engineering from
KTH Royal Institute of Technology, Stockholm Sweden in 2011 where he
[17] M. M. Begovic, P. M. Djuric, S. Dunlap, and A. G. is now a PhD Student. He obtained the BSc in Electrical Engineering from
Phadke, “Frequency tracking in power networks in the NUST, Pakistan. He has professional experience in substation automation and
presence of harmonics,” IEEE Trans. Power Del., vol. 8, protection.