Вы находитесь на странице: 1из 94

Harmonic Detection and Estimation Using

Kalman Filter
By

Mr. Vidit Anilbhai Desai


(Enrolment No. 130420707003)

Supervisor

Prof. Sandhya Rathore


A Thesis Submitted to
Gujarat Technological University in Partial
Fulfilment of the Requirements for
The Degree of Master of Engineering
In Electrical Engineering

May, 2015

DEPARTMENT OF ELECTRICAL ENGINEERING


SARVAJANIK COLLEGE OF ENGINEERING AND TECHNOLOGY
DR. R. K. DESAI MARG, OPP. MISSION HOSPITAL,
ATHWALINES, SURAT 395001

Harmonic Detection And Estimation Using Kalman Filter

2014-15

CERTIFICATE
This is to certify that research work embodied in this thesis entitled
Harmonic Detection and Estimation Using Kalman Filter carried out by Mr. Vidit
Anilbhai Desai (130420707003) studying at Sarvajanik college of Engineering and
Technology for partial fulfillment of Master of Engineering degree to be awarded by
Gujarat Technological University. This research work has been carried out under my
guidance and supervision and it is up to my satisfaction.

Date:
Place:

Signature and Name of Supervisor

Signature and Name of Principal

(Prof. Sandhya Rathore)

(Dr. Vaishali Mungurwadi)

SCET ME Electrical Engineering

Harmonic Detection And Estimation Using Kalman Filter

2014-15

COMPLIANCE CERTIFICATE
This is to certify that research work embodied in this thesis entitled Harmonic
Detection and Estimation Using Kalman Filter carried out by Mr. Vidit Anilbhai
Desai (130420707003) studying at Sarvajanik College of Engineering & Technology
(042) for partial fulfillment of Master of Engineering degree to be awarded by Gujarat
Technological University. He has complied with the comments given by the Dissertation
phase I as well as Mid Semester Thesis Reviewer to my satisfaction.

Date:
Place:

Signature and Name of Student

Signature and Name of Guide

(Desai Vidit Anilbhai)

(Prof. Sandhya Rathore)

SCET ME Electrical Engineering

ii

Harmonic Detection And Estimation Using Kalman Filter

2014-15

PAPER PUBLICATION CERTIFICATE


This is to certify that research work embodied in this thesis entitled Harmonic
Detection and Estimation Using Kalman Filter carried out by Mr. Vidit Anilbhai
Desai (130420707003) studying at Sarvajanik College of Engineering & Technology
(042) for partial fulfillment of Master of Engineering degree to be awarded by Gujarat
Technological University, has published article entitled Magnitude and Frequency
estimation using Extended Kalman Filter carried out by Mr. Vidit Anilbhai Desai
(130420707003) studying at Sarvajanik College of Engineering & Technology (042) for
partial fulfillment of Master of Engineering degree to be awarded by Gujarat
Technological University, has published article entitled Magnitude and Frequency
estimation using Extended Kalman Filter under reviewed

by the International

Journal of Advance Engineering and Research development.

Date:
Place:

Signature and Name of Student

Signature and Name of Guide

(Desai Vidit Anilbhai)

(Prof. Sandhya Rathore)

Signature and Name of Principal


(Dr. Vaishali Mungurwadi)

SCET ME Electrical Engineering

iii

Harmonic Detection And Estimation Using Kalman Filter

2014-15

THESIS APPROVAL CERTIFICATE


This is to certify that research work embodied in this thesis entitled Harmonic
Detection and Estimation Using Kalman Filter carried out by Mr. Vidit Anilbhai
Desai (130420707003) studying at Sarvajanik College of Engineering & Technology
(042) for partial fulfillment of Master of Engineering with specialization of Electrical
Engineering by Gujarat Technological University.

Date:

Place:

Examiners Sign and Name:

SCET ME Electrical Engineering

iv

Harmonic Detection And Estimation Using Kalman Filter

2014-15

DECLARATION OF ORIGINALITY
We hereby certify that we are the sole authors of this thesis and that neither any part of
this thesis nor the whole of the thesis has been submitted for a degree to any other
University or Institution.
We certify that, to the best of our knowledge, the current thesis does not infringe upon
anyones copyright nor violate any proprietary rights and that any ideas, techniques,
quotations or any other material from the work of other people included in our thesis,
published or otherwise, are fully acknowledged in accordance with the standard
referencing practices. Furthermore, to the extent that we have included copyrighted
material that surpasses the boundary of fair dealing within the meaning of the Indian
Copyright (Amendment) Act 2012, we certify that we have obtained a written permission
from the copyright owner(s) to include such material(s) in the current thesisand have
included copies of such copyright clearances to our appendix.
We declare that this is a true copy of thesis, including any final revisions, as approved by
thesis review committee.
We have checked write up of the present thesis using anti-plagiarism database and it is in
allowable limit. Even though later on in case of any complaint pertaining of plagiarism,
we are sole responsible for the same and we understand that as per UGC norms,
University can even revoke Master of Engineering degree conferred to the student
submitting this thesis.

Date:
Place:

Signature of Student:

Signature of Guide:

Name of Student: Desai Vidit Anilbhai

Name of Guide: Prof. Sandhya Rathore

Enrollment No: 130420707003

Institute Code: 042

SCET ME Electrical Engineering

Harmonic Detection And Estimation Using Kalman Filter

2014-15

ACKNOWLEDGEMENT

I take this opportunity to express my profound gratitude and deep regards to


my guide, Prof. Sandhya Rathore for her exemplary guidance, monitoring and constant
encouragement throughout the course of my work. The blessing, help and guidance given
by her time to time shall carry me a long way in the journey of life on which I am about
to embark.
I would also like to thank Dr. Hiren Patel (HOD of EED), my classmates
without whom I would not be able to stand in a position where I am today. Their constant
motivation, support and help in all kinds are priceless to me.
I also thank my family for giving me suitable guidance, suggestions &
motivation.

VIDIT ANILBHAI DESAI

SCET ME Electrical Engineering

vi

Harmonic Detection And Estimation Using Kalman Filter

2014-15

TABLE OF CONTENT
CERTIFICATE

ACKNOWLEDGEMENT

VI

TABLE OF CONTENT

VII

LIST OF FIGURE

LIST OF TABLE

XII

ABSTRACT

XIII

CHAPTER 1: INTRODUCTION

1.1 OVERVIEW

1.2 WHY CHOOSE KALMAN FILTER METHODOLOGY

1.3 AIM OF PROJECT

1.4 RESEARCH OBJECTIVE

1.5 STUDY METHODOLOGY

CHAPTER 2: LITERATURE REVIEW

CHAPTER 3: POWER SYSTEM HARMONICS

11

3.1 CAUSE OF HARMONICS

11

3.2 PROBLEMS DUE TO VOLTAGE AND CURRENT HARMONICS

13

CHAPTER 4: STATE ESTIMATION THEOREY


4.1 KALMAN FILTER

18
18

4.1.1 INTRODUCTION

18

4.1.2 WHY KALMAN FILTER IS SO POPULAR

20

4.1.3 UNDERLAYING DYNAMIC SYSTEM MODEL

20

4.2 EXTENDED KALMAN FILTER

22

4.2.1 INTRODUCTION

22

4.2.2 LINEARIZE PROCESS

23

4.2.3 ALGORITHM FOR DISCRETE TIME EXTENDED KALMAN 24


FILTER
4.3 UNSCENTED KALMAN FILTER
4.3.1 BASIC IDEA OF UNSCENTED TRANSFORMATION

SCET ME Electrical Engineering

25
25

vii

Harmonic Detection And Estimation Using Kalman Filter

2014-15

4.3.2 PROCESS OF UNSCENTED TRANSFORMATION

26

4.3.3 PROPERTIES OF UNSCENTED TRANSFORMATION

27

4.3.4 UNSCENTED KALMAN FILTERING

28

4.4 APPLICATION OF KALMAN FILTER

31

4.5 APPLICATION OF KALMAN FILTER IN POWER SYSTEM

32

CHAPTER 5: HARMONIC DETECTION THEOREY


5.1 THE DISCRETE FOURIER TRANSFORM (DFT)

33
33

5.1.1 INTRODUCTION

33

5.1.2 DISADVANTAGES OF DFT

34

5.2 ADALINE

35

5.2.1 INTRODUCTION TO A NEURAL NETWORK (ANN)

35

5.2.2 WHY CHOOSE NEURAL NETWORK

36

5.2.3 NEURAL NETWORK STRUCTURE

36

5.2.4 NEURAL NETWORK OPERATION

38

5.2.5 NEURAL NETWORK LEARNING

39

5.2.6 ADALINE

40

5.2.7 HARMONIC DETECTION PROCESS

40

5.3 EXTENDED KALMAN FILTER

42

5.3.1 SYSTEM DYNAMICS

42

5.3.2 APPROXIMATION TIME UPDATE

42

5.3.3 APPROXIMATION MEASUREMENT UPDATE

43

5.3.4 ESTIMATION ERROR COVARIANCE

44

5.3.5 EXTENDED KALMAN FILTER EQUATION

45

5.3.6 HARMONIC DETECTION AND ESTIMATION PROCESS

46

CHAPTER 6: SIMULATION RESULTS FOR STATE ESTIMATION AND 49


HARMONIC DETECTION
6.1 SIMULATION RESULT FOR STATE ESTIMATION

49

6.1.1 SIMULATION RESULTS FOR EXTENDED KALMAN FILTER 49


METHODOLOGY
6.1.2 SIMULATION RESULTS FOR UNSCENTED KALMAN FILTER 50
SCET ME Electrical Engineering

viii

Harmonic Detection And Estimation Using Kalman Filter

2014-15

METHODOLOGY
6.2 SIMULATION RESULTS FOR HARMONIC DETECTION
6.2.1 SIMULATION FOR HARMONIC ANALYSIS

51
51

6.2.2 WAVEFORMS OF LOAD VOLTAGE AND CURRENT FOR 52


SIMULATION
6.2.3 FFT ANALYSIS FOR VOLTAGE AND CURRENT WAVEFORM

52

6.2.4 SIMULATION RESULTS FOR DFT METHODOLOGY

53

6.2.5 SIMULATION RESULTS FOR ADALINE METHODOLOGY

54

6.2.6 SIMULATION RESULTS FOR EKF METHODOLOGY

57

CHAPTER 7: CONCLUSION
7.1 CONCLUSION
LIST OF REFERANCES

66
66
67

REVIEW CARD
DIGITAL RECEPT
TURNITIN ORIGINALITY REPORT
PAPER PUBLICATION CERTIFICATE

SCET ME Electrical Engineering

ix

Harmonic Detection And Estimation Using Kalman Filter

2014-15

LIST OF FIGURE
Figure 1.1

Study Framework

Figure 3.1

6-Pulse rectifier input current waveform

11

Figure 4.1

Basic operation of Kalmanfiter

19

Figure 4.2

Kalman filter operation in a form of loop

19

Figure 4.3

Model Underlying the Kalmanfiter

21

Figure 4.4

Principle of UT

26

Figure 5.1

A Model Neurons

36

Figure 5.2

Back Propogation Network

37

Figure 5.3

Sigmoid Function

38

Figure 5.4

Neuron Weight Adjustments

39

Figure 5.5

Adaline Neural Network

40

Figure 6.1

Plot for original signal and estimated signal using EKF

49

Figure 6.2

Combine plot for original and estimated signal

49

Figure 6.3

Mean square plot for given signal using EKF

50

Figure 6.4

Plot for original signal and estimated signal using UKF

50

Figure 6.5

Combine plot for original and estimated signal

51

Figure 6.6

Mean square plot for given signal using UKF

51

Figure 6.7

Simulation for harmonic analysis

51

Figure 6.8

Voltage and current waveform for harmonic analysis

52

Figure 6.9

FFT analysis of Voltage waveform

52

Figure 6.10

FFT analysis of Current waveform

53

Figure 6.11

Voltage harmonic detection using DFT

53

Figure 6.12

Current harmonic detection using DFT

53

Figure 6.13

Structure of ADALINE

54

Figure 6.14

Original and estimated Voltage waveform

55

Figure 6.15

Original and estimated Current waveform

55

Figure 6.16

Magnitude and frequency of fundamental component of load 57


Voltage

SCET ME Electrical Engineering

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure 6.17

Magnitude and frequency of 3 component of load Voltage

57

Figure 6.18

Magnitude and frequency of 5 component of load Voltage

58

Figure 6.19

Magnitude and frequency of 7 component of load Voltage

58

Figure 6.20

Magnitude and frequency of 9 component of load Voltage

58

Figure 6.21

Magnitude and frequency of 11 component of load Voltage

59

Figure 6.22

Magnitude and frequency of 13 component of load Voltage

59

Figure 6.23

Magnitude and frequency of 15 component of load Voltage

60

Figure 6.24

Magnitude and frequency of 17 component of load Voltage

60

Figure 6.25

Magnitude and frequency of 19 component of load Voltage

60

Figure 6.26

Magnitude and frequency of fundamental component of load 61


Current

Figure 6.27

Magnitude and frequency of 3 component of load Current

61

Figure 6.28

Magnitude and frequency of 5 component of load Current

62

Figure 6.29

Magnitude and frequency of 7 component of load Current

62

Figure 6.30

Magnitude and frequency of 9 component of load Current

62

Figure 6.31

Magnitude and frequency of 11 component of load Current

63

Figure 6.31

Magnitude and frequency of 13 component of load Current

63

Figure 6.33

Magnitude and frequency of 15 component of load Current

64

Figure 6.34

Magnitude and frequency of 17 component of load Current

64

Figure 6.35

Magnitude and frequency of 19 component of load Current

64

SCET ME Electrical Engineering

xi

Harmonic Detection And Estimation Using Kalman Filter

2014-15

LIST OF TABLE
Table 1
Table 2
Table 3

Co-efficient of Voltage and Current harmonics


Comparison of EKF and FFT for load Voltage
Comparison of EKF and FFT for load Current

SCET ME Electrical Engineering

56
65
65

xii

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Harmonic Detection and Estimation Using Kalman Filter


Dissertation Phase-II Report
Submitted By
DESAI VIDIT ANILBHAI [130420707003]
Guided By
Prof. SandhyaRathore

ABSTRACT
Now a day, because of the utilization of highly non-linear loads and power
electronic devices, harmonics are generated in the power system which create stress on
electrical devices which are connected to the power system. So filter is design for
filtering harmonics from power system. But before designing a filter, it is required to
measure magnitude of harmonic components present in the system. So in this project we
design the optimal estimator and harmonic detector with variation in harmonic
parameters. So for that first study the characteristics of Extended and Unscented Kalman
filter and also other harmonic detection techniques. Extended and Unscented Kalman
filter are used for state estimate of power signal with random noise in power system.
Harmonic components present in distorted voltage and current waveforms of three phase
PWM converter are detected by Extended Kalman filter and compare with other
techniques like Discrete Fourier Transform (DFT) and ADALINE. Kalman filter (both
EKF and UKF) algorithms accurately tracks a static signal which is corrupted with noise.
In state estimation, results of both EKF and UKF algorithms are compared and in
harmonic detection, voltage and current harmonics are detect using Extended Kalman
filter and results are compared with DFT and ADALINE techniques.

SCET ME Electrical Engineering

xiii

Harmonic Detection And Estimation Using Kalman Filter

2014-15

CHAPTER 1
INTRODUCTION
1.1 OVERVIEW:
Under normal condition i.e., linear load is connected at load side in power system,
measurement or estimation of amplitude, frequency and phase of power signal. Suppose
assumption is that power signal is not interrupted and noise or harmonics are not present
(because in linear load, only fundamental component is present) in power signal. So
easily measurement of amplitude of power signal by using true RMS meter. RMS value
of a power signal is easily measured and from that easily calculates peak value of signal.
Frequency of ideal power signal is define as an inverse of the time it takes to complete
one period of oscillation. So from definition of frequency, we can measure frequency of a
power signal and we can measure phase by finding a phase difference between voltage
and current signal.
But now a day power electronic devices such as rectifiers and inverters are used in
almost all kind of operation in motor drives which results in increasing injection of
harmonic components in power system. Again due to increase in application of series and
shunt capacitors in the system and static VAR controllers for power factor correction at
strategic locations, there are high chances of increase potential for resonant conditions
which magnify the existing harmonic levels. The power system components continuously
inject time varying harmonics in the system giving rise to non-stationary harmonic
voltages and currents in the distribution system.
In a normal alternating current power system, the current varies sinusoidal at a
specific frequency, usually 50 hertz. When a linear electrical load is connected to the
system, it draws a sinusoidal current at the same frequency as the voltage (though usually
lead or lag the voltage). Non-linear loads cause current harmonics. When non-linear loads
such as a rectifier, inverter or converter are connected to the system, it draws a current
that is not necessarily sinusoidal but current waveform can become quite complex which
depends on the type of load and its interaction with other components of the system.
Current harmonics causes voltage harmonics. Voltage provided by the voltage source will
SCET ME Electrical Engineering

Harmonic Detection And Estimation Using Kalman Filter

2014-15

be distorted by current harmonics due to the source impedance. If source impedance of


the voltage source is small, the current harmonics will cause only small voltage
harmonics. Harmonic voltages and currents in the electric power system are result of nonlinear electric loads. Harmonic frequencies in power grid are a frequent which cause of
power quality problems. Power systems harmonics results in increasing heating in the
equipment and conductors, torque pulsations in motors and misfiring in variable speed
drives. So it is desirable to reduce harmonics in power system.
Al most all real time functions are non-linear and all the systems can be
represented in a form of discrete time system to a great extent of accuracy by using very
small time steps. Now the problem is to estimates the states of this discrete-time
controlled process and detection of harmonic components present in the system. This
process is generally expressed with the help of linear or non-linear differential equations.
Different techniques are used for harmonic detection (i.e., find out amplitudes and
frequencies of different order of harmonic components presents in a power signal due to
the non-linear loads which are connected to the power system) under noisy conditions.
Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) are widely used for
harmonic detection. However both of above techniques suffer from leakage, aliasing and
picket fence effects. Hence both DFT and FFT need error compensation and adaptive
window width. Some other well-known signal processing techniques like artificial neural
networks, supervised Gauss-Newton algorithm, least-error square and its variants, linear
prediction technique adaptive filter, Extended Kalman filters etc., have been used for
time-varying signal parameter estimation. Most of these algorithms from above requires
heavy computational outlay and also suffers from inaccuracies in the presence of the
noise with low signal to noise ratio (SNR).
In our project we have studied Extended Kalman filter (EKF) and Unscented
Kalman filter (UKF) for state estimation and Extended Kalman filter (EKF) and other
techniques like DFT and ADALINE for harmonic detection. The characteristics and
algorithms are of above techniques are thoroughly studied and then simulated and results
are compared for both state estimation and harmonic detection.

SCET ME Electrical Engineering

Harmonic Detection And Estimation Using Kalman Filter

2014-15

1.2 WHY CHOOSE KALMAN FILTER METHODOLOGY?


Among all different techniques discussed above for harmonic analysis, Kalman
filter (KF) is an optimal estimator because it minimize the mean square error of the
estimated parameters if all noise is white Gaussian noise. Kalman filter is recursive i.e.,
last output of the Kalman filter is used as an input for next calculation or step. Kalman
filter is applicable only for a linear system but if the system is non-linear, EKF and UKF
are applicable for state estimation and foe detection of harmonic for the discrete system.

1.3 AIM OF THE PROJECT:


In project first we estimate state of the system in which we first we study the
characteristics and algorithms of EKF and UKF and then using that algorithm, simulate
static power system signal and compare the results. Then after we go for harmonic
detection in which we estimate magnitudes and frequencies of harmonic components
present in a distorted voltage and current waveform of three phase PWM converter using
Extended Kalman filter and compare with DFT and ADALINE.

1.4 RESEARCH OBJECTIVE:


Following are the Study objectives of work.
1. Study algorithm of EKF and then simulate a static power signal (which is
represented in chapter 4) using EKF.
2. Study algorithm of UKF and then simulate a static power signal (which is
represented in chapter 4) using UKF.
3. Compare simulation results of EKF and UKF for static power signal.
4. Harmonic detection is done using EKF, DFT and ADALINE for voltage and
current of PWM converter.
5. Compare simulation results of EKF with DFT and ADALINE for harmonic
detection.

SCET ME Electrical Engineering

Harmonic Detection And Estimation Using Kalman Filter

2014-15

1.5 STUDY METHODOLOGY:


Study methodology represents set of methods or ideas or a procedure of our
project which is shown in figure 1.1.

Figure1.1: Study Framework

SCET ME Electrical Engineering

Harmonic Detection And Estimation Using Kalman Filter

2014-15

CHAPTER 2
LITERATURE REVIEW
International Journal of Scientific & Engineering Research, Volume 3,
Issue 7, July-2012 1 ISSN 2229-5518 IJSER 2012 http://www
.ijser.org
A Comparative Study Of Kalman Filter, Extended Kalman Filter And
Unscented Kalman Filter For Harmonic Analysis Of The NonStationary Signals
A. UmaMageswari, J.Joseph Ignatious, R.Vinodha.
This paper presents an approach for designing an optimal estimator for
measurement of the frequency and harmonic components of the time varying signal
which is embedded in low signal-to noise ratio. This led the study of Kalman filter
Extended Kalman filter and Unscented Kalman filter characteristics and implementation
of all these filters. In this paper, Extended Kalman filter and Unscented Kalman filter
algorithms are employed to estimate the magnitude of voltage in the presence of the
random noise and distortions. A Kalman filter being an optimal estimator for tracking the
signal which is corrupted with noise and harmonic distortion quite accurately. Tracking
of the harmonic components of the dynamic signal in the communication system can be
easily done by using EKF and UKF algorithms and also their results are compared.
The main advantage of an Unscented transformation which is used in the UKF is
that it does not utilize linearization (i.e., linearize process) for computation of the state of
system and error covariance matrices, so that accurately estimation of parameters of a
non-stationary signal is carry out. However accuracy of UKF is significantly reduces for
low signal to noise ratio (SNR) and if the noise covariance and some other parameters are
not chosen correctly which are used in the Unscented transformation. Therefore because
of above drawback of UKF, it is proposed to use an adaptive particle swarm optimization
technique for accurately tracking the signal. It is found that the conventional particle

SCET ME Electrical Engineering

Harmonic Detection And Estimation Using Kalman Filter

2014-15

swarm optimization (PSO) is superior for optimal choice of UKF parameter and error
covariance.

ElSEVIER-2003
Hybrid UKF and PSO Technique for Non stationary signals
P. K. Dash, Shazia Hasan, B. K. Panigrahi
This paper presents process of estimation of the amplitude and the frequency of
non-stationary signal in a presence of significant noise and the harmonics using adaptive
Unscented Kalman filter (AUKF). Initial choice of the model and the measurement error
covariance matrices Q and R and selection of other parameters of UKF are performed by
using the modified Particle Swarm Optimization (PSO) algorithm. Furthermore to
improve a tracking performance of the filter with presence of noise, an error covariance
matrices Q and R are iteratively adapted.

IEEE Transactions on power delivery, Vol. 20, No. 2, April 2005


A New Method for Power Signal Harmonic Analysis
Jun-Zhe Yang, Member, IEEE, Chi-Shan Yu, and Chih-Wen Liu, Senior Member, IEEE
This paper proposed new harmonic analysis method for power signal because of
limitations of fast Fourier transform (FFT) and discrete Fourier transform (DFT) which
are popular as powerful tools for harmonic analysis of the power signal. Both FFT and
DFT are suffers from the leakage, aliasing and picket fence effect. The major components
of FFT and DFT methods are frequency and phase estimating algorithms, a correction
factor and comb filter.
An Implementation of a method which is represented in this paper is easy for and
it is also flexible because user can easily change the window size and window for getting
better performance and this proposed method has not a drawbacks like aliasing, leakage
and picket-fence effects like DFT and FFT.

SCET ME Electrical Engineering

Harmonic Detection And Estimation Using Kalman Filter

2014-15

IEEE Transactions on Signal processing, Vol. 53, No. 7, July 2005


Linear Prediction Approach for Efficient Frequency Estimation of
Multiple Real Sinusoids: Algorithms and Analyses
H. C. So, Member, IEEE, Kit Wing Chan, Y. T. Chan, Senior Member, IEEE, and K. C.
Ho, Senior Member, IEEE
This paper presents two constrained weighted least squares frequency estimators
for the multiple real sinusoids embedded with the presence of white noise. These two
estimators are based on linear prediction property of the sinusoidal signals. The first
algorithm (i.e., estimator) employs generalized unit-norm constraint for accurate
frequency estimation while the second method uses a monic constraint. First algorithm
minimizes the weighted least squares (WLS) cost function which is subject to the unitnorm constraint and second method is a WLS estimator with a monic constraint.
The weighting matrices are the function of frequency parameters which are
obtained in the iterative manners for both methods. Both of estimators provide nearly
identical frequency estimates for a case of single real tone and their performance are
approaches the CramrRao lower bound (CRLB) for white Gaussian noise before
occurrence of threshold effect.

IEEE, VOL. 92, NO. 3, MARCH 2004


Unscented Filtering and Nonlinear Estimation
Simon J. Julier and Jefffrey K. Uhlamann
This paper presents development of an unscented transformation (UT) to
overcome the limitation of EKF, which is applicable for propagation of mean and
covariance information through the nonlinear transformations. An UT method is more
accurate and easier to implement. It also use the same order of calculations as
linearization in EKF. This paper reviews the development, motivation, use and
applications of UT.
An Unscented transformation is based on the two fundamental principles. First is
performing the nonlinear transformation on a single point (rather than an entire pdf) and
SCET ME Electrical Engineering

Harmonic Detection And Estimation Using Kalman Filter

2014-15

second is to find out sets of individual points in the state space whose sample pdfs are
approximates to the true pdfs of the state vector.

IEEE Transactions on Instrumentation and Measurement, Vol. 51, No.


3, July 2002
A Novel Kalman Filter for Frequency Estimation of Distorted Signals
in Power Systems
Aurobinda Routray, Ashok Kumar Pradhan, and K. Prahallad Rao
This paper presents a simple and novel approach in designing of an Extended
Kalman filter (EKF) for the power system frequency measurement and performance of
this proposed EKF filter is compared with some of other methods which are estimate the
frequency of a signal under noisy condition. Stability for the proposed filter is also
discussed for the single sinusoid. From simulation results, it also found that the proposed
algorithm is suitable for the real-time applications especially when the signal is corrupted
with noise and other disturbances due to harmonics and the under condition where
frequency is changing very suddenly and with unexpected manner.
In proposed algorithm, hysteresis method is used for resetting covariance matrix
for tracking of frequency very quickly. The proposed EKF filter offers superior
performances in all cases. Also the filter requires less computation which makes it
attractive for the real-time implementation.

IEEE Transactions on Power Delivery, Vol. 16, No. 3, July 2001


Evaluation of Frequency Tracking Methods
David W. P. Thomas, Member, IEEE and Malcolm S. Woolfson
This paper presents analysis of different methods which are tracking the
fundamental frequency and see whether it perform necessary with the protection and
control equipments.
The result analysis shows that the DFT (Discrete Fourier transform with phase
composition), LEP (Linear estimation of phase) and DSPOC (Decomposition of single
SCET ME Electrical Engineering

Harmonic Detection And Estimation Using Kalman Filter

2014-15

phase into Orthogonal components) perform extremely well but they all are suffers from
the periodic error in the estimated frequency if it departs from the assumed frequency
which can be cancelled out by using the low pass filter otherwise it introduce delays and
oscillations in the fundamental frequency.

IEEE Transactions on automatic conterl, vol. 45, n. 3, March 2000


A New Method for the Nonlinear Transformation of Means and
Covariances in Filters and Estimators
Simon Julier, Jeffrey Uhlmann, and Hugh F. Durrant-Whyte
This paper presents a new approach for generalizing Kalman filter to the nonlinear
systems. A Set of samples (called sigma points) which is used for estimating the mean
and the covariance of probability distribution. This method yields the filter which is more
accurate than the Extended Kalman filter (EKF) and easier to implement because it
doesnt involve any linearization steps because of eliminating the derivation and
calculation of Jacobian matrices.
The proposed algorithm predicts the mean and the covariance accurately up to the
third order. Because of the higher order terms are neglected in the Fourier series, it is
possible to reduce an errors in the higher order terms as well.

IEEE 2000
The Unscented Kalman Filter for Nonlinear Estimation
Eric A. Wan and Rudolph van der Menve Oregon Graduate Institute of Science &
Technology
This paper presents the flaws in the utilization of an Extended Kalman filter and
introduces an improvement in the form of Unscented Kalman Filter (UKF) which is
proposed by Julier and Uhlman. An UKF addresses the problem of EKF and solved by
using the deterministic sampling approach. The state distribution is represented by using
the minimal set of carefully chosen sample points. These sample points completely
capture a true mean and the covariance of the GRV and then captures the posterior mean

SCET ME Electrical Engineering

Harmonic Detection And Estimation Using Kalman Filter

2014-15

and the covariance accurately up to 3rd order (in Taylor series expansion) for any
nonlinearity. An EKF can accurately applicable only for first-order differential equation.
Remarkably, the computational complexity of the UKF is the same order as that of the
EKE.

IEEE Transactions on Power Systems, Vol. 11, No. 4, November 1996


An Adaptive linear combiner for on-line tracking of Power System
harmonics
A.C.Liew, Saifur Rahman, P.K..Dash, D.P.Swain
This paper presents a new approach to estimate the harmonic components present
in power system by using the linear adaptive neuron called as ADALINE. The learning
parameters in the ADALINE algorithm are adjusted to reduce an error between the actual
and the desired outputs for satisfy the stable difference error equation. A estimator tracks
the Fourier coefficients of a signal data very accurately which are corrupted with noise
and decaying dc component. The Adaptive tracking of the harmonic components of a
power system can easily be done by using this algorithm.

SCET ME Electrical Engineering

10

Harmonic Detection And Estimation Using Kalman Filter

2014-15

CHAPTER 3
POWER SYSTEM HARMONICS
Ideally under linear load condition, voltage and current waveforms are perfect
sinusoids. However, because of the massive use of power electronic devices and other
non-linear loads, the power system voltage and current waveforms are distorted. This
deviation from a perfect sine wave can be represented by harmonics sinusoidal
components having a frequency that is an integral multiple of the fundamental frequency.
To quantify distortion, total harmonic distortion (THD) is used which express the
distortion in a form of percentage of magnitude of the fundamental of voltage and current
waveforms.

3.1 CAUSE OF HARMONICS:


Harmonics are caused by the non-linear loads which draws a non-sinusoidal
current from a sinusoidal voltage source. Some examples of harmonic producing loads
are electric arc furnaces, inverters, DC converters, static VAR compensators, AC or DC
motor drives and switch-mode power supplies. In case of a motor drive, the AC current at
input side of the rectifier looks mostly like a square wave instead of a sine wave (see
Figure 1.1).

Figure3.1: 6-Pulse rectifier input current waveform


The rectifier can be considered as a source of harmonic current and produces roughly a
same amount of harmonic current over a wide range of power system impedances. The
characteristic current harmonics produced by the rectifier are determined by the number
SCET ME Electrical Engineering

11

Harmonic Detection And Estimation Using Kalman Filter

2014-15

of pulses. The following equation determines the order of characteristic harmonics


present in distorted waveform for a given pulse number:
=
Where,
is the harmonic number (integer multiple of the fundamental)
is any positive integer
is the pulse number of the converter
This means that a 3-phase (or 6-pulse) rectifier will exhibit order of harmonics are
5th, 7th, 11th, 13th, 17th, 19th, 23rd, 25th etc. multiples of the fundamental. As a rough rule of
thumb, the magnitudes of harmonic currents will be given as division of the fundamental
current to the harmonic number (e.g. magnitude of the 5th harmonic would be about 1/5th
of the fundamental current). A 6-phase rectifier (or 12-pulse rectifier) will theoretically
produce orders of harmonic current components are 11th, 13th, 23rd, 25th etc. multiples of
the fundamental. Actually a small amount of harmonic components like 5th, 7th, 17th and
19th harmonics will be present with a 12-pulse system (with the magnitudes will be on the
order of about 10 percent of those for a 6-pulse drive).
Variable frequency drives (VFD) also produces harmonic currents at the output
side of the inverter which are seen or sensed by the motor. Most of these harmonic
components are integer multiples of the inverter operating frequency not to the power
supply frequency, but little generalization can be made about their magnitude since this
varies greatly with the type of drives and the switching algorithms for the inverter
semiconductors devices. In some case, inter harmonic currents may also be present at the
input or the output of the drives. Inter harmonics are not fit for the classical definition of
the harmonics since they are not necessarily occur at the integer multiples of the power
supply frequency or inverter fundamental frequency. Harmonics can occur at the input
side at the frequency of the power system frequency plus or minus the inverter operating
frequency. The inverter output contain harmonic components at the rectifier pulse
number times the power system frequency plus or minus the inverter operating
frequency. Proper DC link design i.e., proper selection of inductor and capacitor at DC
side can minimize the presence of inter harmonics.
SCET ME Electrical Engineering

12

Harmonic Detection And Estimation Using Kalman Filter

3.2 PROBLEMS
HARMONICS:

DUE

TO

VOLTAGE

AND

2014-15

CURRENT

Effect of harmonics on power system components and others are as below.

Generators:
In comparison with the utility power supplies, effects of harmonic voltages and
currents are significantly more pronounced on generators (especially on stand-alone
generators used as a back-up or those on a ship or used in the marine applications) due to
their source impedance which is being typically three to four times that of utility
transformers. The major impact of the voltage and current harmonics is to increase
heating of machines due to increase in iron losses and copper losses, since both of them
are frequency dependent and increase with increased in harmonics i.e., harmonic
frequencies. To reduce this effect of heating, the generators which are supplying to the
nonlinear loads must be required to be de rated. In addition, the presence of harmonic
components with nonlinear loading cause heating and torque pulsations with tensional
vibrations.

Transformers:
The effects of harmonic currents at the harmonic frequencies causes increase in
core losses due to increasing in iron losses (i.e., hysteresis and eddy currents) in
transformers. In addition, increasing in copper losses and stray flux losses result in
additional heating and winding insulation stresses, especially in case of high levels of
/ (i.e., rate of rise of voltage with respect to time) are present. Temperature cycling
and possibility of resonance between inductance of transformer winding and supply
capacitance can also causes additional losses. The small laminated core vibrations are
increased due to presence of harmonic frequencies, which can be appearing as an
additional audible noise. The increasing in RMS current due to harmonics will also
increase 2 (i.e., copper) losses.
The distribution transformers used with four-wire (i.e., three-phase and neutral
wire) distribution systems have typically a delta-wye configuration. Due to the delta
connected primary, the triplen (i.e. 3rd, 9th, 15th) harmonic currents cant propagate
downstream but they continuously circulates in the primary delta winding of the
SCET ME Electrical Engineering

13

Harmonic Detection And Estimation Using Kalman Filter

2014-15

distribution transformer which causing localized overheating in delta or primary side


winding. With linear loading, only zero sequence components are present in neutral
conductor because the triplen harmonic currents will cancel out in the neutral conductor.
However, when nonlinear loads are supplied through transformer, the triplen harmonics
currents are not cancel out in the phase, but instead add cumulatively in the neutral
conductor of transformer at a frequency of 180 Hz (3rd harmonic) which overheating the
transformer and occasionally causing overheating and burning of transformer neutral
conductor. Typically, the uses of appropriate K factor are recommended for non-linear
loads.

Induction Motor:
Harmonics distortion raises the losses in AC induction motors as similar way as in
transformers and cause in increasing heating due to the additional copper losses and iron
losses (i.e., hysteresis losses and eddy current) in stator winding, rotor circuit and rotor
laminations. In more, these losses are also compounded by skin effect especially at the
frequencies above 300 Hz. The Leakage magnetic fields caused by the harmonic currents
in the stator and rotor end windings which produces additional stray frequency eddy
current dependent losses. Substantial iron losses can also be produced in the induction
motors with skewed rotors due to the high-frequency-induced currents and rapid flux
changes (i.e., due to the hysteresis) in stator and rotor of induction motor.
Excessive heating in motor winding can degrade the bearing lubrication which
results in bearing collapse. Harmonic currents are also can result in bearing currents,
which can however prevented by the use of the insulated bearing which is a very
common practice used in the AC variable frequency drive-fed AC motors. Overheating
imposes significant limitation on the effective life of the induction motor. For every 10C
rise in temperature above rated temperature can affect the life of motor insulation which
may be reduced by as much as 50%. Squirrel cage rotors can be normally withstand
higher temperature levels compared to the wound rotors. The motor windings especially
with class B or below insulation, can also be susceptible damaged due to the high levels
of / (i.e., rate of rise of voltage w.r.t time) such as those attributed to the line
notching and associated with ringing due to the flow of the harmonic currents.
SCET ME Electrical Engineering

14

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Harmonic sequence components can also adversely affect induction motors.


Positive sequence components (i.e., 7th, 13th, 19th) will assist the torque production,
whereas the negative sequence components (5th, 11th, 17th) will act against to the
direction of rotation which resulting in torque pulsations. Zero sequence components
(i.e., triplen harmonics) which are stationary and do not rotate. Therefore, any harmonic
energy associated with triplen harmonic is dissipated as heat. The magnitude of torque
pulsations which is generated due to these harmonic sequence components can be
significant and cause in shafting tensional vibration problems.

Cables:
Cable losses dissipated as heat which is substantially increased when cable is
carrying harmonic currents due to the elevated 2 losses, the cable resistance R which is
determined by its DC value plus skin and proximity effect. The resistance of a conductor
is dependent on the frequency of the current being carried out by cable. Skin effect is a
phenomenon whereby the current tends to flow near the surface of the conductor where
the impedance is least. An analogous phenomenon, the proximity effect is due to the
mutual inductance of conductors which are arranged closely parallel to one another. Both
of these effects are dependent upon the conductor size, resistivity, frequency and the
permeability of the conductor material. At fundamental frequencies, the skin effect and
proximity effects are usually negligible for a smaller conductor. The associated losses
due to the changes in resistance, however, can be increase significantly with the
frequency, adding to the overall 2 losses.

Circuit Breakers and Fuses:


The vast majority of the low voltage thermal-magnetic type circuit breaker utilizes
bi-metallic trip mechanism which is responding to the heating effect of the RMS current.
In the presence of nonlinear loads, the RMS value of the current will be higher than for
linear loads of same power. Therefore, unless the current trip level is adjusted
accordingly, the circuit breaker may trip prematurely while carrying out nonlinear
current. Circuit breakers are designed to interrupt the current at the zero crossing. On
highly distorted supplies which may contain line notching and/or ringing, spurious zero
crossovers may cause premature interruption of the circuit breakers before they can
SCET ME Electrical Engineering

15

Harmonic Detection And Estimation Using Kalman Filter

2014-15

operate correctly in the event of an overload or fault. However, in the case of a short
circuit current, magnitude of harmonic current will be very minor in comparison to the
fault current. Fuse ruptures under over current or short-circuit conditions is based on the
heating effect of the RMS current according to the respective 2 characteristic. The
higher the RMS current, the faster the fuse will operate. On non-linear loads, the RMS
current will be higher than for the similarly-rated linear loads, therefore the fuse de rating
may be necessary to prevent the premature opening. In addition fuses at the harmonic
frequencies suffer from the skin effect and more importantly from the proximity effect
which resulting in non-uniform current distribution across the fuse elements which
placing additional thermal stress on the device.

Lighting:
One noticeable effect on lighting is the phenomenon known as flicker (i.e.,
repeated fluctuations in the light intensity). Lighting is highly sensitive to the RMS
voltage changes; even a slight deviation (of an order of 0.25%) is perceptible to the
human eyes in some types of lamps. Superimposed inter harmonic voltages in a supply
voltage are the significant cause of light flicker in both the incandescent and fluorescent
lamps.

Other negative effects of Harmonics:


a) Generally power factor correction capacitors are installed in the industrial plants
and commercial buildings. Fluorescent lighting used in the industrial plants and
commercial buildings also normally have capacitors which are fitted internally to
improve own power factor. These harmonic currents may interact with these
capacitances and the system inductances and excite parallel resonance which can
over heat, disrupt and/or damage the plant and equipment.
b) The power cables carrying harmonic loads act as EMI (electromagnetic
interference) generation in the adjacent signal or control cables via conducted and
radiated emissions. This EMI noise have a detrimental effect on telephones,
radios, televisions, computers, control systems and other types of equipment. Any
telemetry or protection or other equipment which relies to the conventional
measurement techniques or the heating effect cannot operate correctly in the
SCET ME Electrical Engineering

16

Harmonic Detection And Estimation Using Kalman Filter

2014-15

presence of the nonlinear loads. Circuit breakers and fuses will not offer an
expected level of protection. So it is therefore important that only the instruments
which are based on true RMS techniques must be used on the power systems
which supplying nonlinear loads.
c) At the installations place where the power conductors carry out nonlinear loads
and the internal telephone signal cable are run in parallel, voltages will be induced
in the telephone cables in that case. So frequency ranges 540 Hz to 1200 Hz (i.e.,
9th order harmonic to 20th order harmonic at 60 Hz fundamental) can be
troublesome.
d) There is also a possibility of both radiated and conducted interference above the
normal harmonic frequencies with a telephone systems and other equipment due
to the variable speed drives and other types of nonlinear loads, especially at the
high carrier frequencies.
e) Conventional meters are normally designed to read or measure only sinusoidalbased quantities. Nonlinear voltages and currents with higher RMS values are
impressed on these types of meters which introduce errors into the measurement
circuits which show or read false readings.

SCET ME Electrical Engineering

17

Harmonic Detection And Estimation Using Kalman Filter

2014-15

CHAPTER 4
STATE ESTIMATION THEORY
4.1 KALMAN FILTER:
The Kalman Filter is a mathematical method or technique which is used to use the
observed values with containing noise and other disturbances and produce the values
which are closer to the true values and the calculated values.
4.1.1 INTRODUCTION:
Kalman filter is known as a linear quadratic estimation (LQE) which is an
algorithm that uses numbers of series of measurements which are observed over a time
with containing noise (or random variations) and other types of inaccuracies, and
produces an estimates of a unknown variables which are more precise than those values
which are based on a single measurement alone. Furthermore the Kalman filter operates
recursively on the streams of a noisy input data to produces the statistically optimal
estimate of an underlying system state. This filter name is based on the name of
developer Rudolf (Rudy) E. Kalman who was scientist.
There are so many applications of Kalman filter in different fields but basic
application is to provide guidance, particularly in aircraft, navigation and control in
spacecraft and also used for time series analysis in signal processing and econometrics.
The Kalman filter is also one of the main topics in the field of the Robotic motion
planning and control, and sometimes included in the Trajectory optimization.
Actually the Kalman filter is an estimator but many times it is called or known as
Kalman filter because of the process of finding best estimates from the noisy data
amounts to filtering out noises. However the Kalman filter also does not just clean up the
data measurements but it also projects these data measurements onto the state estimate.
The Kalman filter algorithm works in a two-step process. In a prediction step, the
Kalman filter estimates the current state variables along with their uncertainties. Once the
outcome of next measurements (which is corrupted by some amount of error with

SCET ME Electrical Engineering

18

Harmonic Detection And Estimation Using Kalman Filter

2014-15

including some random noise) is observed, these estimates are updated by using weighted
average with more weight given to estimates with the higher certainty. Kalman filter
algorithm is recursive in nature, it can run in the real time using only the present input
measurements and previously calculated state and its uncertainty matrix (with no
additional past information is required). Kalman filter operation explained above is
represented in a form of figure4.1 and 4.2.

Figure4.1: Basic operation of Kalman filter

Figure4.2: Kalman filter operation in a form of loop

SCET ME Electrical Engineering

19

Harmonic Detection And Estimation Using Kalman Filter

2014-15

4.1.2 WHY KALMAN FILTER IS SO POPULAR:


Because of the following reasons, Kalman filter is so popular since last 35 years.
1. It is simple in structure, very effective and accurate.
2. Ti can utilize for online application.
3. User can easily implement.
4. Measurement equations do not require to inverted.
4.1.3 UNDERLAYING DYNAMIC SYSTEM MODEL:
Kalman filter is based on linear and non-linear dynamical systems which are
discretized in time domain. The vector of real numbers represents the state of the system.
At each discrete time increment, the new state is generated by applying a linear operator
with added some noise. Then the observed states are generated by using another linear
operator with some noise added which is usually called as a measurement noise.
Utilization of the Kalman filter for estimation of internal states of estimation
process where only the sequence of a noisy observations are known as the inputs and the
process is modeled in according with the state space representation of Kalman filter. It
means that specifying the following matrices: the state transition model, the observation
model, the covariance of process noise, the covariance of observation noise and
sometimes the control-input model for each time-steps , , , , , respectively
as described in further.
The Kalman filter model assumes that the state at ( 1) helps in measuring the true
state at time as below:
= 1 + +
Where,
is the state transition state space model which is applied to the previous state 1;
is the control-input state space model which is applied to the control vector ;
being the process noise which is drawn from the multivariate normal distribution
with zero mean and covariance .
(0, )

SCET ME Electrical Engineering

20

Harmonic Detection And Estimation Using Kalman Filter

2014-15

And observation of the true state at time is made according to:


= +
Here is called as observation state space model and it helps in mapping the observed
space from the true space and is called as observation or measurement noise (which is
Gaussian white noise) with zero mean and covariance .
(0, )
Starting from the initial states to the noise vectors, each and every steps are mutually
independent.

(A)

(B)
Figure4.3: Model Underlying the Kalman Filter
A lot of real dynamical systems can not exactly fitted this model because the Kalman
filter mainly deals with linear systems and mostly all the real systems are non-linear. In
fact unmodelld dynamics system can reduce the filtering performance, although it is
supposed to work finely with the inputs which are unknown stochastic signals. The
SCET ME Electrical Engineering

21

Harmonic Detection And Estimation Using Kalman Filter

2014-15

estimation algorithm becomes unstable because the unmodelled dynamic system


dependent on the inputs. But use of the white Gaussian noise make an algorithm diverge
so in the project, noise used as input noise and measurement noise are Gaussian white
noise.

4.2 EXTENDED KALMAN FILTER:


4.2.1 INTRODUCTION:
As discussed above, Kalman Filter is an optimal estimator for the linear system
models with additive independent white Gaussian noise in both the state transition and
the measurement systems. Unfortunately in engineering, most of the systems are
nonlinear. So some attempt must be immediately made for applying this filtering method
to the nonlinear systems. So go for the Extended Kalman filter.
This non-linear filter utilize linearize process and linearizes the nonlinear system
around the Kalman filter estimate which is based on the linearized or linear system. So it
is possible to apply Kalman filter (Extended Kalman filter) to the nonlinear space craft
navigation problems. Linearize process of an Extended Kalman filter is explained in the
next topic.
Kalman filtering is a digital signal processing tool which is extensively used in
many electric power system applications like voltage and current phasors, voltage flicker,
power system frequency, voltage dips, high-impedance faults, harmonic distortion,
high-frequency transients, voltage unbalance and other power system magnitudes can be
successfully computed by using Kalman filters for both linear and non-linear systems.
EKF is used for the nonlinear systems but is difficult to implement and difficult to
tune and it is reliable only for the systems which is because of use of linearize process.
To overcome above limitation of Extended Kalman filter, the unscented transformation
(UT) was developed as a method for propagation of mean and covariance information
through nonlinear transformations which is more accurate, easier to implement and uses
the same order of calculations as linearization in Extended Kalman filter.

SCET ME Electrical Engineering

22

Harmonic Detection And Estimation Using Kalman Filter

2014-15

4.2.2 LINEARIZE PROCESS:


Nonlinear system is modeled as below:
= 1 (1 , 1 , 1 )
= ( , )

~ (0, )
~ (0, )
^+
Now perform the Taylor series expansion of state equation around 1 = 1
and

1 = 0 to obtain the following:


1

^+
= 1 (1
, 1 , 0) +

^
^+ (1 1
)+
1

^+ 1
1

^+

^+
= 1 (1
, 1 , 0) + 1 (1 1 ) + 1 1
+

^
^
= 1 1 + [1 (1
, 1 , 0) 1 1
] + 1 1

= 1 1 + 1
+ 1
... (4.1)

Where, 1 and 1 are defined by above equation and known signal and the noise
signal are defined as follow:
+

= (^ , , 0) ^
(0, )

Now, linearize the measurement equations around = ^ and = 0 to obtain


= (^
, 0) +

(
^

^ ) +

^
= (^
, 0) + ( ) +

= + [ (^ , 0) ^ ] +
= + + . (4.2)
Where, and are defined by the above equation and known signal and the noise
signal are defined as follow:

= (^ , 0) ^

(0, )
We get a linear state space system in equation (4.1) and a linear measurement in equation
(4.2). It means that we can apply the standard Kalman filter equations to estimate the
SCET ME Electrical Engineering

23

Harmonic Detection And Estimation Using Kalman Filter

2014-15

state of the system. Standard equations for discrete time extended Kalman filter are as
follows:
+

= 1 1
1
+ 1 1 1

= ( + )1
+
= 1 (1
, 1 , 0)

+ = + ( )
= + [ ( , 0)]
+ = ( )
4.2.3 ALGORITHM FOR DISCRETE TIME EXTENDED KALMAN FILTER:
The discrete time Extended Kalman filter can be summarized by an algorithm as follows:
1. The system and measurement equations are given as follows:
= 1 (1 , 1 , 1 )
= ( , )
~ (0, )
~ (0, )
2. Initialize the filter as follows:
0^+ = (0 )
0+ = [(0 0+ )(0 0+ ) ]
3. For = 1,2, ., perform the following.
(a) Compute the following partial derivative matrices:
1 =
1 =

^+

^+

(b) Perform the time update of the state estimate and the estimation error
covariance as follows:
+

= 1 1
1
+ 1 1 1
+
= 1 (1
, 1 , 0)

(c) Compute the following partial derivative matrices:

SCET ME Electrical Engineering

24

Harmonic Detection And Estimation Using Kalman Filter


=
=

2014-15

(d) Perform the measurement update of the state estimate and the estimation
error covariance as follows:
= ( + )1
+ = + ( )
= + [ ( , 0)]
+ = ( )

4.3 UNSCENTED KALMAN FILTER:


The Extended Kalman filter (EKF) is most probably widely used estimation
algorithm for the nonlinear system. However more than 35 years of experience in the
estimation community, it is shown that Extended Kalman filter is difficult to implement,
difficult to tune and it is only reliable for the systems which are almost linear on the time
scale of the updates. Many of these difficulties are arise from its use of linearization i.e.,
linearize process. To overcome this limitation of Extended Kalman filter, the unscented
transformation (UT) was developed to propagate the mean and covariance information
through a nonlinear transformation which is more accurate, easier to implement and uses
the same order of calculations as linearization of Extended Kalman filter.
4.3.1 BASIC IDEA OF UNSCENTED TRANSFORMATION:
The Unscented Transformation (UT) is founded on the intuition that it is easier to
approximate a probability distribution than it is to approximate an arbitrary nonlinear
function or transformation. This approach is illustrated in figure4.4. In figure4.4, a set of
points (called as sigma points) are chosen with their mean and covariance represented as
^ and . Then after, the nonlinear function is applied to each sigma points in turn to
yield a cloud of the transformed points. Then after, the statistics of that transformed
points can be calculated to form the estimate of nonlinearly transformed mean and
covariance.
SCET ME Electrical Engineering

25

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure4.4: Principle of UT
Although this Unscented Transformation method bares a superficial resemblance
to particle filters. There are several fundamental differences. First difference is that the
sigma points are not drawn at random but they are chosen deterministically so that they
can exhibit certain specific properties (e.g., have a given mean and covariance). As a
result, high-order information about distribution can be easily captured with a fixed and
less number of points. Second difference is that the sigma points can be weighted in the
ways that are inconsistent with the distribution interpretation of the sigma points in a
particle filter. For example, weights on the sigma points do not have to lie in the
range [0,1].
4.3.2 PROCESS OF UNSCENTED TRANSFORMATION:
1. Begin with the -element vector with known mean ^ and covariance . By
given a known nonlinear transformation = (), estimate the mean and
covariance of denoted as and .
2. Form 2 sigma point vectors () as follows:
() = +

()

(+)

= ()

()

= 1, . ,2

= ()

= 1, . ,

= 1, . ,

Where, is the matrix square root of such that () = and


() is the row of .
SCET ME Electrical Engineering

26

Harmonic Detection And Estimation Using Kalman Filter

2014-15

3. Transform the sigma points as follows:


() = ( () )

= 1, . ,2

4. Approximate the mean and covariance of as follows:


=
=

1
2
1
2

()
2
=1

()
2
) ( () )
=1(

4.4.3 PROPERTIES OF UNSCENTED TRANSFORMATION:


The Unscented Transformation has number of important properties are as follows:
1) Unscented Transformation works with the finite number of sigma points. So it
naturally lends itself to be used in the black box filtering library. For a given
model (with appropriately defined the inputs and outputs), the standard routine
can be used to calculate predicted quantities which is necessary for any given
transformation.
2) The computational cost of an Unscented Transformation algorithm has same order
of magnitude as EKF. In Unscented Transformation, the most expensive
operations are to calculate the matrix square root and outer products required to
compute the mean and covariance of the projected sigma points. However, both of
above operations are 0(3 ), which are the same as to evaluate the ( ) matrix
multiplications which needed to calculate the predicted covariance of EKF. This
contrasts with other methods such as GaussHermite quadrature in which the
required number of the point scales geometrically with number of dimensions.
3) In Unscented Transformation, any set of sigma points which encodes the mean
and covariance correctly. It also including in the set of equations of weights which
calculates the projected mean and covariance correctly to the second order.
Therefore, the estimation process includes second-order bias correction which is
the term of truncated second-order filter, without any need to calculate any
derivatives. Therefore, the Unscented Transformation is not same as using a
central difference scheme to calculate the Jacobian.

SCET ME Electrical Engineering

27

Harmonic Detection And Estimation Using Kalman Filter

2014-15

4) The Unscented Transformation algorithm can be used with discontinuous


transformations. The sigma points can straddle a discontinuity and thus have
effect of a discontinuity on transformed estimate. The improved accuracy of an
Unscented

Transformation

can

demonstrated

with

polar-to-Cartesian

transformation problem.
4.4.4 UNSCENTED KALMAN FILTERING:
The Unscented transformation developed in the previous section can be
generalized to give an Unscented Kalman filter. The Kalman filter algorithms are
attempts to propagate the mean and the covariance of the given system using time update
and measurement update equations. If the system is linear, then the mean and the
covariance can be exactly updated using Kalman filter. But if the system is nonlinear,
then the mean and the covariance can be approximately updated using an Extended
Kalman filter. However, the EKF is based on the linearization and the previous section
shows that the Unscented transformation is more accurate than the linearization to
propagate the means and the covariance. Therefore, we simply replace the Extended
Kalman filter equations with an Unscented transformations to obtain the Unscented
Kalman filter algorithm.
The Unscented Kalman filter algorithm can be summarized as follows.
1. An -state discrete time nonlinear system given by,
+1 = ( , , ) +
= ( , ) +
~ (0, )
~ (0, )
2. The UKF is initialized as follows.
0^+ = (0 )
0+ = (0 0^+ )(0 0^+ )
3. The Time update equations are used to propagate the state estimate and the
covariance from one measurement time to the next.

SCET ME Electrical Engineering

28

Harmonic Detection And Estimation Using Kalman Filter

2014-15

(a) To propagate from the time step ( 1) to , first choose the sigma points
1 () with an appropriate changes and current guess for the mean and the
^+
+
covariance of are 1
and 1
respectively:

1 () = 1 ^+ +

()

(+)

+
= (1
)

()

= 1, . ,2

= 1, . ,

+
= (1
)

= 1, . ,

(b) Use the known nonlinear system equation (. ) to transform the sigma points into
^() vectors with an appropriate change.
^() = (1 ^() , , )

= 1, . ,2

(c) Combine the ^() vectors to obtain a priori state estimate at time .
1

^ =

^()
2
=1

(d) Estimate a priori error covariance. However we should add 1 to the end of the
equation to take the process noise into account:
=

1
2

^()
2
^ )( ^() ^ ) + 1
=1 (

4. Now after the time update equations are done, we implement the measurement
update equations.
(a) Choose the sigma points () with an appropriate change and current guess for
the mean and the covariance of are ^ and respectively:
() = ^+ +

()

(+)

= (+ )

()

= 1, . ,2

= (+ )

= 1, . ,

= 1, . ,

This step can be omitted if desired. That is, instead of generating the new sigma
points we can reuse that sigma points which are obtained in the time update
equations. This will save the computational efforts.
(b) Use the known nonlinear measurement equation (. ) to transform the sigma
points into ^() vectors (predicted measurements):
^() = ( ^() , )
SCET ME Electrical Engineering

29

Harmonic Detection And Estimation Using Kalman Filter

2014-15

(c) Combine the ^() vectors to obtain the predicted measurement at time :
^ =

1
2

^()
2
=1

(d) Estimate the covariance of the predicted measurement. However, we should add
the to the end of the equation for taking the measurement noise into the
account:
=

1
2

^()
2
^ )( ^() ^ ) +
=1 (

(e) Estimate the cross covariance between ^ and ^ as follows:


=

1
2

^()
2
^ )( ^() ^ )
=1 (

(f) The measurement update of the state estimate can be performed using the normal
Kalman filter equations.
= 1
^+ = ^ + ( ^ )
+ =
In the above algorithm, we assume that the process and the measurement
equations are linear w.r.t the noise. But in general, the process and the measurement
equations may have noise that enters the process and the measurement equations
nonlinearly. That is,
+1 = ( , , , )
= ( , , )
In this case, the Unscented Kalman filter algorithm (represent as above) is not rigorous
because it treats the noise as an additive. To handle this situation, we can augment the
noises onto the state vector as follows:

()
= [ ]

Then we can use the Unscented Kalman filter to estimate the augmented state () . The
UKF is initialized as follows:
0 ^

(0 )
=[ 0 ]
0

SCET ME Electrical Engineering

30

Harmonic Detection And Estimation Using Kalman Filter

[(0 0 ^ )(0 0 ^ ) ] 0
=[
0
0
0
0

2014-15

0
0]
0

Then we use the Unscented Kalman filter algorithm presented above, except that we are
estimating the augmented mean and the covariance, so that we can remove 1 and
from equations.

4.4 APPLICATIONS OF KALMAN FILTER:


Applications of Kalman filters (linear and non-linear Kalman filter) in different fields are
as below:
1. Attitude and Heading Reference Systems
2. Autopilot
3. Battery state of charge (SOC) estimation
4. Brain-computer interface
5. Chaotic signals
6. Tracking and Vertex Fitting of charged particles in Particle Detectors
7. Tracking of objects in computer vision
8. Dynamic positioning
9. Economics, in particular macroeconomics, time series, and econometrics
10. Inertial guidance system
11. Orbit Determination
12. Power system state estimation
13. Radar tracker
14. Satellite navigation systems
15. Seismology
16. Sensorless control of AC motor variable-frequency drives
17. Simultaneous localization and mapping
18. Speech enhancement
19. Navigation system

SCET ME Electrical Engineering

31

Harmonic Detection And Estimation Using Kalman Filter

2014-15

4.5 APPLICATION OF KALMAN FILTER IN POWER SYSTEM:


Applications of Kalman filter in different fields are discussed above. Like that
Kalman filter have also have various applications in power system like Kalman filtering
would be investigated for its potential detection, classification and tracking of the
following:
1. Harmonics (Estimation and tracking)
2. Power System frequency estimation
3. Faults analysis(classification and location)
4. State estimation
5. Voltage flicker.
6. Voltage dips

SCET ME Electrical Engineering

32

Harmonic Detection And Estimation Using Kalman Filter

2014-15

CHAPTER 5
HARMONIC DETECTION THEOREY
5.1 THE DISCRETE FOURIER TRANSFORM (DFT):
5.1.1 INTRODUCTION:
To compute the Fourier transform (FT) numerically in the computer,
discretization plus numerical integration are required. This is approximation of true (i.e.,
mathematical) and analytically defined FT in the synthetic (digital) environment and it is
called as Discrete Fourier Transformation (DFT).
The Discrete Fourier Transform (DFT) is an equivalent of the continuous Fourier
Transform for the signals known only at instants separated by the sample times (i.e.
a finite sequence of the data).
Let () be a continuous signal which is the source of data. Let samples can be
denoted as [0], [1], [2],, [],, [ 1]. So the Fourier Transform original
signal () would be written as:
+

() = ()
We can regard each samples [] as an impulse having area []. Then, since the
integrand exists only at the sample points:
(1)

() =

()

= [0] 0 + [1] ++ [] ++ [ 1] (1)


i.e.,

() = 1
=0 []

Continuous Fourier transform can be evaluated over a finite interval rather than
from to + if the waveform is periodic.
Since operation treats the data as it are periodic, we can evaluate the Discrete
Fourier transform equation for a fundamental frequency (one cycle per sequence,
2

Hz,

rad/sec.) and its harmonic components (with considering the dc component at = 0).

SCET ME Electrical Engineering

33

Harmonic Detection And Estimation Using Kalman Filter


2 2

2014-15

i.e. set = 0, , 2,. ,. ( 1)


or, in general,
[] =


1
=0 []

( = 0 ( 1))

The Discrete Fourier transform algorithm is known as the basic estimation


algorithm which is applied to many applications in the power system for phasor
measurement and harmonic analysis. Improper application of DFT algorithm can lead to
the incorrect results. So some basic conditions or assumptions have to be carried out
before applying DFT algorithm which are as follows:
i. The signal having a constant magnitude.
ii. Fundamental frequency must be assumed in DFT algorithm.
iii. The sampling frequency of any signal must be equal or greater than twice the
highest frequency for getting correct information about the signal.
iv. Each frequencies in the signal is an integer multiple of fundamental frequency.
In DFT, basically the fundamental frequency is reciprocal of the window length of data
(). When all of these assumptions are fulfilled, we get accurate DFT result.
5.1.2 DISADVANTAGES OF DFT:
Major drawbacks of DFT application to a signal are as follows:
i. Aliasing,
ii. Leakage, and
iii. Picket-fence effect.
Aliasing effect can eliminated by increasing the sampling frequency ( ).
Generally aliasing effect occurs at the higher frequencies (i.e., at higher order harmonic
components). Hence the DFT spectrum may be erroneous.
The term leakage defines as the apparent spreading of the energy from one
frequency to the adjacent frequencies. Leakage effect can arises due to the improper
selection of the window width. The resulting error is called as spectral leakage. The
DFT of such a sampled waveform indicate non-zero values for all of the harmonic
frequencies (called inter harmonic frequency).

SCET ME Electrical Engineering

34

Harmonic Detection And Estimation Using Kalman Filter

2014-15

The picket-fence effect occurs if an analyzed waveform includes the frequency


which is not one of the discrete frequencies (i.e., an integer multiple of the fundamental
frequency). This affects an accuracy of magnitudes of each harmonic components present
in signal.

5.2 ADALINE:
5.2.1 INTRODUCTION TO A NEURAL NETWORL (ANN):
A Neural Network is the artificial representation of the human brain, trying to
simulate the learning process. An artificial neural network (ANN) often called as neural
network or simply neural network (NN) which is the most generic form of an Artificial
Intelligence.
The word neural network is referred to the network of biological neurons in a
nervous system of the human body. A Nervous system in the human body process and
transmit information from the human brain to the other parts of human body and from the
other parts of body to the brain. These are called as biological neurons. Similar types of
neurons are created artificially called as artificial neurons. By using some computational
models or mathematical models, artificial neurons try to process information and
compute the solution for required problems.
The artificial neurons are simple processing elements which sharing some
properties of the biological neurons. By interconnecting artificial neurons, they can form
a network which is capable to exhibit the complex global behavior which determined by
the connections, the processing elements and the element parameters.
Neural computing is the large number of highly interconnected processing
elements which are called as neurons and working together in order to solve the specific
problems. An ANN is just like a human which learn from the examples and repetition of
solutions when same type of problem is faced again.
Learning in the biological systems involves an adjustment of the synaptic
connections which existing between neurons. Similarly in an ANN, the neurons are
configured for some specific problems like pattern recognition or data classification
through learning process.
SCET ME Electrical Engineering

35

Harmonic Detection And Estimation Using Kalman Filter

2014-15

5.2.2 WHY NEURAL NETWORK:


A Neural networks uses different types of paradigm for computing. A Neural
networks are based on parallel architecture of the biological brains, which has properties
of processing or memory extraction like a human thinking process. Conventional
computers are good for the fast arithmetic and do what a programmer asks to do but
conventional computers have pitfalls in some cases like a noisy data or data from an
environment and massive parallelism. Changes in circumstances are not possible with
conventional computers. These pitfalls come into a picture and it need for such
algorithms which lead all these backdrops and find out some solutions that what the user
needs.
A Neural network helps us to find out the solution where there is not definite an
algorithm solution, only if we have a lot of examples that can expect behavior of the
system.
A Neural networks are a form of the multiprocessor computer system, with
i) Simple processing elements
ii) A high degree of interaction between neurons
iii) Simpler messages and
iv) Adaptive interaction between elements
5.2.3 NEURAL NETWORK STRUCTURE:
A Neural networks are models of a biological neural structures. The starting point
for most of neural networks is the model neuron, as shown in figure5.1, which is consists
of multiple inputs and a single output. Every input is modified by a weight, which is
multiplier and multiples with the input value. A neuron combines all these weighted
inputs with the reference to a threshold value and activation function, and use all these for
determining its output.

Figure5.1: A Model Neuron


SCET ME Electrical Engineering

36

Harmonic Detection And Estimation Using Kalman Filter

2014-15

After fair understanding of working of individual neurons, still there is a great deal
of the research and mostly conjecture which is regarding to the way of neurons organize
themselves and the type of mechanisms used by an arrays of the neurons to adapt their
behavior to the external stimuli. So there are large numbers of experimental neural
network structures which are currently in use reflecting the state of continuing research.
In our case, we only describe the structure, mathematics and behavior of that
structure called as back propagation network. This is the most generalized and prevalent
neural network currently in used.
The process to build the back propagation network is represents in the following
fashion. Initially, at starting take the number of the neurons and array them for forming
the layer. A formed layer has all its inputs connected to either the preceding layer or the
inputs from an external world, but not both within a same layer.
A layer has all its outputs connected either to the succeeding layer or to the outputs
to the external world, but not both within a same layer.
Next, multiple layers are arrayed one succeeding the other so that there is an input
layer, a multiple intermediate layers and finally an output layer as shown in figure5.2.
The intermediate layers are which have no inputs or outputs to the external world, called
as hidden layers.
Usually a back propagation neural networks are fully connected. It means that,
each neuron is connected to the every output from the preceding layer or one input from
the external world if a neuron is in the first layer and correspondingly each neuron has its
output connected to the every neuron in a succeeding layer.

Figure5.2: Back Propagation Network


SCET ME Electrical Engineering

37

Harmonic Detection And Estimation Using Kalman Filter

2014-15

In general, the input layer is considered as a distributor of signals from the external
world and hidden layers are considered as categorizers or feature detectors of such
signals.
= ( + )
The output layer is considered as a collector of a features detected and a producer
of the response. While this type of view of a neural network may be helpful in a
conceptualizing the functions of the layers, we should not take this model too literally as
a functions described may not be so specific or localized. Now with this picture of how
the neural network is constructed, we can now proceed to the description of the operation
of the network in a meaningful fashion.
5.2.4 NEURAL NETWORK OPERATION:
The output of each neuron is a function of its inputs. In particular, output of the
neuron in any of the layer can describe by the two sets of equations.
For every neuron, is the layer and for each of the inputs are represented as
and that layers are multiplied by the previously established weights represented as .
All these layers are summed together which resulting into the internal value of the
operation represented as . Then after, this value is biased by the previously established
threshold value represented as and sent it through the activation function represented as
. This activation function is called as the sigmoid function, which have an input to
output mapping as shown in figure 5.3. The resulting output represented as is applied
as an input to the next layer or if it is the last layer then it is a response of a neural
network. Neuralyst allows other threshold functions that can used in place of the sigmoid
function described here.

Figure 5.3:.Sigmoid Function


SCET ME Electrical Engineering

38

Harmonic Detection And Estimation Using Kalman Filter

2014-15

A predetermined set of the weights, predetermined set of the threshold values and
description of the network structure (means description of the number of layers and the
number of the neurons present in each layer), it is possible to compute the response of a
neural network at any set of inputs. Then after, we can get required response.
5.2.5 NEURAL NETWORK LEARNING:
Learning in the neural network is called as training. Like training in athletics,
training in the neural network requires a coach who describes to the neural network that
what it should have to produce as a response. From a difference between desired response
and actual response, an error is determined and that portion is propagated backward
through a network. At each neuron in the network, an error is used for adjusting the
weights and the threshold values of a neuron. So that next time, an error in a network
response will be less or minimize for the same given inputs.

Figure 5.4: Neuron Weight Adjustments


This corrective procedure is called as back propagation (so the name of the
neural network) and it is applied continuously and repetitively to the each set of inputs
and corresponding set of outputs produced in response to the inputs. This back
propagation procedure to be continue as long as an individual or total errors in the
response exceed the specified level or until there is no measurable error. At this point, a
neural network has learned training material and we can stop the training process and use
a neural network for producing responses to the new input data.

SCET ME Electrical Engineering

39

Harmonic Detection And Estimation Using Kalman Filter

2014-15

5.2.6 ADALINE:
ADALINE (Adaptive Linear Neuron or later Adaptive Linear Element) is a single
layer neural network. It was developed by Professor Bernard Widrow, based on
McCullochPitts neuron. ADALINE simply consist of weights, a bias and summation
functions. Main difference between the ADALINE and the standard McCulloch pitts
perceptron is in a learning phase in which weights are adjusted according to the weighted
sum of inputs. In a standard perceptron, net is passed to the activation transfer function
and an output of the function is used for weights adjusting. Here in this thesis we tried to
use this ADALINE technique for harmonic detection.

Fig 5.5: Adaline Neural Network


5.2.7 HARMONIC DETECTION PROCESS:
Mathematically, a distorted and periodic signal can easily and suitably represent
in terms of its fundamental frequency and harmonic components and that can be
expressed as the sum of sinusoidal waveforms referred to the Fourier series. In this, each
frequency is an integer multiple of the system fundamental frequency. In order to obtain
the approximation of such this type of waves, mathematical models are employed.
Consider a voltage waveform with harmonic components can be written as follows:
^ () = 0 +
=1[ cos(0 ) + (0 )]
Where, and are the coefficients and is the number of harmonics present in
voltage waveform, 0 is the fundamental angular frequency and is the instant of
measurement.

SCET ME Electrical Engineering

40

Harmonic Detection And Estimation Using Kalman Filter

2014-15

The input on a network is represented as follows:


() = [ cos 2 2 .1 ]
Where,
=

and and are the sampling time and the sample rate respectively.

The network output is represented as follows:

() =
=1 () = ()()

The error in the signal is represented as follows:


() = ^ () ()
Where, ^ () is the desired output.
Training algorithm is a main characteristic of an artificial neural network and the
training process of an ADALINE is a process of modifying the weights using the
Widrow-Hoff delta rule represented as follows:
( + 1) = () +

()()()
+ ()()

Where, is a (small) quantity which used to make + ()() 0. When the


perfect learning is attained, an error () in Widrow-Hoff delta rule will be brought to
the zero value and the weight vectors will yield the Fourier coefficients of a signal. ()
is the called as learning rate and is chosen by GA. The value of () must be consider
between 0 2 to ensure the Lyapunov stability and making the tracking error ()
converge to the zero value. If large value of () is chosen, learning occurs very
quickly but if its value is too large, it may lead to the instability and an errors may even
increase. For faster convergence in the presence of a random noise, a nonlinear weight
adaptation algorithm is desirable which is represented as follows:
( + 1) = () +

()()()
+ ()()

Where,
() = [() (cos ). .1 ]
The learning parameter can be made adaptive by using an expression represented as
follows:
() =

1+

SCET ME Electrical Engineering

41

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Where, and are the constant values. WidrowHoff learning rules changes the net
weights which are direct proportion to the output error and to the inputs of an ADALINE.
This algorithm does not need to calculate the derivatives. So computation becomes
simply and ADALINE converge becomes faster and more accurate compare to the other
harmonic detection methods like DFT and FFT algorithm.

5.3 EXTENDED KALMAN FILTER:


An approximate solution for the non-linear filtering problem which is defined
below is developed in this section. This solution involves linearization (i.e., linearize
process) of the non-linear process which traversing about the reference trajectory and the
modification or extension of a linear Kalman filter algorithm using a linearized model.
In practice, mostly processes are non-linear rather than a linear. Coupling of nonlinearities with the noisy data makes a signal-processing problem more challenging.
Instead of extending the solution to a continuous case, an Extended Kalman filter
algorithm is developed to test for a discrete non-linear system.
5.3.1 SYSTEM DYNAMICE:
Let us discuss the non-linear system which is in a form shown as follows:
+1 = + (5.1)
= ( ) + +1. (5.2)
Where, ~ (0, ) and ~ (0, ) are called white noise processes which are
uncorrelated with each other.
5.3.2 APPROXIMATE TIME UPDATE:
In order to find out a measurement update which can be conveniently programmed
^
(+1 ) is expanded into the Taylor series about 1/
called as a priori estimate at time
^+
(+1 ) = (+1/
)+

1.

+1 /

^
(+1 +1/
)+

. (5.3)
Neglecting the higher order terms (H.O.T.) in above equation, we get:
^+
(+1 ) = (+1/
)+

SCET ME Electrical Engineering

+1 /

~
+ +1
/ (5.4)

42

Harmonic Detection And Estimation Using Kalman Filter

2014-15

So representation of the Jacobian is as follows:


(, ) =

(, ). (5.5)

Equations (5.4) and (5.5) can be used for proceeding with the Kalman filter analysis.
5.3.3 APPROXIMATE TIME UPDATE:
To obtain the complete filtering algorithm, update equations are needed for the
measurement data. So we choose a linear and recursive set of equations for estimation,
^
+1/+1
= +1/ + +1 +1 ... (5.6)

Where, vector , and the gain matrix are being determined.


Define an estimation error as follows:

^
+1/+1
= +1/+1
+1... (5.7)

^
+1/+1
= +1/
+1 ... (5.8)

Equations (5.6) and (5.7) and (5.8) are combined with equation (5.2) foe producing the
following expression for an estimation error:

^
+1/+1
= +1 + +1 (+1 ) + +1 +1 + +1/
+1/
.. (5.9)

One required condition is that the estimate must be unbiased. For applying this
requirement to equation (5.9) and letting [+1/ ] = [ ] = 0, we obtain
^
^
+1 + +1 (+1/
) +1/
= 0.. (5.10)

By defining the residual as a difference between the observation and the expected value
of the observation in equation 5.11
^
1 = +1 (+1/
).. (5.11)

By solving equation (5.10) for +1 and substituting that result into equation (5.6) and
combining it to the equation (5.11), we yields the Extended Kalman filter estimate
equation.
^
^
+1/+1
= +1/
+ +1 +1 . (5.12

SCET ME Electrical Engineering

43

Harmonic Detection And Estimation Using Kalman Filter

2014-15

5.3.4 ESTIMATE ERROR COVARIANCE:


By using the definition of an error covariance, we get,

^
^
+1/ = [+1/
+1/
] (5.13)

And

^
^
+1/+1 = [+1/+1
+1/+1
]. (5.14)

An error-update equations may be derived. By taking equation (5.10) into account,


equation (5.9) becomes as follows:
^
^
^
+1/+1
= +1/
+ +1 [(+1 ) (+1
)] + +1 +1 .. (5.15)

By using this, we can generate an error covariance +1 in terms of the +1 as follows:


^
^
+1/+1 = +1/ + +1/ {[(+1 ) (+1
)][(+1 ) (+1
)] +1 +
^
{+1/
[(+1 ) (+1 )] }+1 + +1 {[(+1 )

^
^
(+1
)]+1/
} + +1 +1 +1 .. (5.16)

The gain +1 is now selected to minimize covariance +1 . Differentiating covariance


+1 with respect to the gain +1 and solving for +1 which results in a desired
optimal gain matrix.
^
^
^
+1 {(+1/
)[(+1 ) (+1
)] }} {{[(+1 )(+1
)][(+1 )
^
(+1
)] } +1 }1... (5.17)

Substituting this into equation (5.16) and simplifying, we get as follows:

^
^
+1/+1 = +1/ + +1/ {[(+1 )(+1
)]+1/
.. (5.18)

A complete linear estimate update due to the non-linear measurement is given by


equations (5.15), (5.18) and (5.19). However, these equations are impractical for
implementation because they depend on the conditional moments of +1 for computing
^
(+1
). To simplify the computation, we have to expand (+1/+1 ) into the power
^
series about +1/
as follows:
^
^
^
(+1/+1 ) = (+1/
) + (+1/
)(+1/+1 +1/
) + ... (5.19)

where,
^
(+1/
)=

()

SCET ME Electrical Engineering

+1 /

44

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Truncating the above series after first two terms, substituting a resulting approximation
into the equations (5.18), (5.19) and carry out an indicated expectation operations results
in the measurement error covariance update as follows:
^
+1/+1 = [ +1 (+1/
)]+1/

Above equations represents the approximate and linear measurement update for an error
covariance. A residual is computed using a non-linear measurement function (), which
^
is evaluated about a priori estimate +1/
. An error covariance is found by using the

Jacobian matrix.
5.3.5 Extended Kalman filter equations:
System model and measurement model are represented as follows:
+1 = +
= ( ) + +1
~ (0, )
~ (0, )
Time update equations:
The estimate (state prediction) equation:
^
^
+1/
= (/
)

The Jacobian matrices:


(, ) =
() =

(,)

(,)

An error covariance matrix (covariance prediction):


^
+1/ = +1/
+

Measurement update equations:


The Kalman gain:
^
^
^
+1 = +1/ (+1/
)])[(+1/
)+1/ (+1/
) + ]1

An error covariance matrix (covariance correction):


^
+1/+1 = [ +1 (+1/
)]+1/

SCET ME Electrical Engineering

45

Harmonic Detection And Estimation Using Kalman Filter

2014-15

The estimate (state correction) equation:


^
^
^
+1/+1
= +1/
+ +1 [+1 (+1/
)]

5.3.6 HARMONIC DETECTION AND ESTIMATION PROCESS:


A signal is not exactly periodic because amplitudes, frequencies and phases are
continuously changes slowly over a time. So for that purpose we first take a periodic
signal () with a zero dc component. So Fourier series representation of the signal can
be written as follows:
() =
=1 sin (k t + )
Here we use a discrete time domain (i.e. = 0,1,2, .) rather than a continuous domain.
As the signal () is not exactly periodic, but parameters amplitudes , frequency
and phases are slowly time varying. So we can state them as follows:
= ()
= ()
= ()
Here we assume for model that the signal () is corrupted by white Gaussian noise. So
the measurements are given as follows:
() = () + ()
Now the task is to estimates 1(t) ..., (t), 1(t) (t) from the measurements
where represented as the number of the significant harmonic components present in
signal. The parameters are only estimated up to order harmonics and higher
harmonics are assumed to be negligible. So total 2 of parameters are to be estimated.
Now here, we are estimating amplitudes as well as the frequency of harmonic
components presents in the signal up to order. This requires establishing the
estimator that uses both that the energy in the fundamental and in the higher order
harmonics for estimating frequency of the signal. Informations about the frequency
contained in any of the harmonic component depends on the energy of that harmonic. So
if the particular harmonic component is strong, then estimator of a frequency component

SCET ME Electrical Engineering

46

Harmonic Detection And Estimation Using Kalman Filter

2014-15

must give more weight for the information available in the strong harmonic component
and less weight to for the information available in the weak harmonic components.
An estimation of amplitude of the harmonic component is also assists in the
estimating of frequency. The estimator determines the frequency of harmonic component
by first estimating the harmonic amplitude of that harmonic component. Knowledge of
the frequency of harmonic component, the model can assists for the calculation of
amplitudes harmonic components.
State space representation of a signal can represented as follows:
( + 1) = () + ()
() = (()) + ()
= () + ()
Where,
() = [1 () , 2 () . . . . . () , 1 (), 2 () () ]
And

= [ 0
0

0 0
1 0]
0

Where, is an identity matrix of order,


(()) =
=1 sin (k t + )
And () is a white Gaussian noise with a zero mean and has a variance represented as
follows:
[()() ] =
The observation noise () is also a white Gaussian noise with zero mean and has a
variance represented as follows:
[()() ] =
Which is uncorrelated with () can be represented as follows:
[()()] = 0
SCET ME Electrical Engineering

47

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Here we have noise variance matrix which is diagonal.From the equation of


( + 1) in the state space representation, we can concluded that the amplitudes of
harmonic components are evolving randomly over a time. Also the same argument is true
for the fundamental frequency of the signal. The rate of the random walk can be
determined by diagonal matrix. A zero matrix will correspond to the constant
amplitude, frequency and the phase. An Extended Kalman filter will be applied for
estimating ^ (/) or ^ (/ 1) of () from the measurement (). Here ^ (/)
denotes estimation of () with given measurements at time and ^ (/ 1) denotes
estimation of () with given measurements at time 1.
^ (/) = ^ (/ 1) + ()[() ( ^ (/ 1) )]
^ ( + 1/) = ^ (/)
() = () ()(()() () + )1
( + 1) = [() ()()()] +
Where, () is the Jacobian of (). That is represented as follows:
() =

( ^ (/1))
^ (/1)

() = [sin( + ) sin( + ) 1^ cos( + ) ^ cos( )]


And the initial values for state and covariance are represented as follows:
^ (0) = [(0)] = (0)

(0) = [((0) (0)) ((0) (0)) ]

SCET ME Electrical Engineering

48

Harmonic Detection And Estimation Using Kalman Filter

2014-15

CHAPTER 6
SIMULATION RESULTS FOR STATE ESTIMATION AND
HARMONIC DETECTION
6.1 SIMULATION RESULTS FOR STATE ESTIMATION:
6.1.1 SIMULATION
METHODOLOGY:

RESULTS

FOR

EXTENDED

KALMAN

FILTER

Figure6.1: Plot for original signal and estimated signal using EKF

Figure6.2: Combine plot of original and estimated signal

SCET ME Electrical Engineering

49

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure6.3: Mean square plot for given signal using EKF


6.1.2

SIMULATION

RESULTS

FOR

UNSCENTED

KALMAN

FILTER

METHODOLOGY:

Figure6.4: Plot for original signal and estimated signal using UKF

SCET ME Electrical Engineering

50

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure6.5: Combine plot of original and estimated signal using UKF

Figure6.6: Mean square error plot for given signal using UKF

6.2 SIMULATION RESULTS FOR HARMONIC DETECTION:


6.2.1 SIMULATION FOR HARMONIC ANALYSIS:

Figure6.7: Simulation for Harmonic Analysis


SCET ME Electrical Engineering

51

Harmonic Detection And Estimation Using Kalman Filter


6.2.2 WAVEFORMS
SIMULATION:

OF

LOAD

VOLTAGE

AND

2014-15

CURRENT

FOR

Figure6.8: Voltage and Current waveform for harmonic Analysis


6.2.3 FFT ANALYSIS OF VOLTAGE AND CURRENT WAVEFORM:

Figure6.9: FFT analysis of Voltage waveform


SCET ME Electrical Engineering

52

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure6.10: FFT analysis of Current waveform


6.2.4 SIMULATION RESULTS FOR DFT METHODOLOGY:

Figure6.11: Voltage Harmonic detection using DFT


SCET ME Electrical Engineering

53

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure6.12: Current Harmonic detection using DFT


6.2.5 SIMULATION RESULTS FOR ADALINE METHODOLOGY:

(a) Basic structure Neural network

(b) Internal structure of Layer 1

(c) Internal structure of weight IB{1,1}


Figure6.13: Structure of ADALINE
SCET ME Electrical Engineering

54

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure6.14: Original and Estimated Voltage waveform

Figure6.15: Original and Estimated Current waveform


Co-efficients

Voltage Harmonics

Current Harmonics

-3.2472e+011

-3.8440e+010

1.5923e+011

6.5461e+009

-0.2875

-0.0384

0.1983

0.1991

0.0455

0.0041

-0.1781

-0.0353

2.1881

0.0696

SCET ME Electrical Engineering

55

Harmonic Detection And Estimation Using Kalman Filter


7

0.2352

0.0529

0.0974

-0.1984

10

10

0.0956

0.0243

11

-1.6718

-0.4562

11

12

0.1135

0.0215

12

13

13

-3.3910

-0.4675

14

14

0.1138

0.0219

15

0.7864

-0.3063

15

-4.2504

-0.9819

16

0.2031

0.0563

16

17

17

0.8407

0.2773

18

18

-0.1279

-0.0202

19

-3.2472e+011

-3.8440e+010

19

-1.5923e+011

-6.5461e+009

20

1.2818e+012

4.7314e+011

20

2.3379

1.9625

2014-15

Table1: Co-efficient of Voltage and Current Harmonics

SCET ME Electrical Engineering

56

Harmonic Detection And Estimation Using Kalman Filter

2014-15

6.2.6 SIMULATION RESULTS FOR EKF METHODOLOGY:

Figure6.16: Magnitude and Frequency of fundamental component of load Voltage

Figure6.17: Magnitude and Frequency of component of load Voltage

SCET ME Electrical Engineering

57

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure6.18: Magnitude and Frequency of component of load Voltage

Figure6.19: Magnitude and Frequency of component of load Voltage

Figure6.20: Magnitude and Frequency of component of load Voltage


SCET ME Electrical Engineering

58

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure6.21: Magnitude and Frequency of component of load Voltage

Figure6.22: Magnitude and Frequency of component of load Voltage

SCET ME Electrical Engineering

59

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure6.23: Magnitude and Frequency of component of load Voltage

Figure6.24: Magnitude and Frequency of component of load Voltage

Figure6.25: Magnitude and Frequency of component of load Voltage


SCET ME Electrical Engineering

60

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure6.26: Magnitude and Frequency of fundamental component of load Current

Figure6.27: Magnitude and Frequency of component of load Current

SCET ME Electrical Engineering

61

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure6.28: Magnitude and Frequency of component of load Current

Figure6.29: Magnitude and Frequency of component of load Current

Figure6.30: Magnitude and Frequency of component of load Current


SCET ME Electrical Engineering

62

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure6.31: Magnitude and Frequency of component of load Current

Figure6.32: Magnitude and Frequency of component of load Current

SCET ME Electrical Engineering

63

Harmonic Detection And Estimation Using Kalman Filter

2014-15

Figure6.33: Magnitude and Frequency of component of load Current

Figure6.34: Magnitude and Frequency of component of load Current

Figure6.35: Magnitude and Frequency of component of load Current


SCET ME Electrical Engineering

64

Harmonic Detection And Estimation Using Kalman Filter


Magnitude
Harmonic
component

2014-15

Frequency

1
3
5
7
9
11
13
15
17

FFT
583.70
1.40
114.99
85.16
1.40
52.65
45.70
1.40
33.74

EKF
583.70-583.71
1.40-1.41
114.19-115.00
85.16-85.17
1.40-1.41
52.65-52.66
45.705-45.715
1.40-1.41
33.74-33.75

FFT
50
150
250
350
450
550
650
750
850

EKF
50.0000-50.0001
150.0000-150.0001
250.0000-250.0001
350.0000-350.0001
450.0000-450.0001
550.0000-550.0001
650.0000-650.0001
750.0000-750.0001
850.0000-850.0001

19

31.58

31.58-31.59

950

950.0000-950.0001

Table2: Comparison of EKF and FFT for load Voltage


Magnitude

Frequency

Harmonic
component
1

FFT
116.40

EKF
116.40-116.41

FFT
50

EKF
50.0000-50.0001

3
5
7
9
11
13
15
17

0.49
23.27
16.74
0.49
10.81
8.85
0.49
7.02

0.49-0.50
23.27-23.28
16.74-16.75
0.49-0.50
10.81-10.82
8.85-8.86
0.49-0.50
7.02-7.03

150
250
350
450
550
650
750
850

150.0000-150.0001
250.0000-250.0001
350.0000-350.0001
450.0000-450.0001
550.0000-550.0001
650.0000-650.0001
750.0000-750.0001
850.0000-850.0001

19

6.02

6.02-6.03

950

950.0000-950.0001

Table3: Comparison of EKF and FFT for load Current

SCET ME Electrical Engineering

65

Harmonic Detection And Estimation Using Kalman Filter

2014-15

CHAPTER 7
CONCLUSION
7.1 CONCLUSION:
Efficiency of power the system depends on different aspects from which harmonic
distortion is one of them. Harmonic content present in a power circuit depend upon type
of load and non-linear load like electronic converters used in power system are cause of
harmonics.
There are various methods present for estimation and we focuses on the kalman
filter techniques (Extended kalman filter (EKF) and Unscented kalman filter (UKF)) for
non-linear system. Kalman filter is a recursive estimator whose algorithm is based on
least square error method.
Simulation results of an EKF for highly non-linear system show that is difficult to
implement, difficult to tune, and only reliable for the system that is mostly linear and
these difficulties are arise because of utilization of linearization. Unscented
transformation (UT) is developed which overcome limitation of EKF for propagation of
mean and covariance information through the nonlinear transformations. Simulation
results of an UKF shows that is easy to implement and reliable for highly non-linear
system.
Here in thesis various type of harmonic detection techniques like for like EKF,
DFT and ADALINE are used to detect harmonic components up to 20th components)
present in voltage and current waveform of three phase converter. Simulation result of
DFT shows that it suffers from aliasing and picket fence effect. After comparing
simulation results of EKF with FFT function in matlab, we conclude that EKF technique
accurately detect a magnitudes and frequencies of harmonic components. But as we
increase number of harmonic order for detection, EKF becomes difficult to implement
and difficult to tune because it is difficult to calculation or update covariance matrices
and Jacobian matrices in measurement update equation.

SCET ME Electrical Engineering

66

Harmonic Detection And Estimation Using Kalman Filter

2014-15

LIST OF REFERENCE:
1. Uma Mageswari, J. Joseph Ignatious, R. Vinodha, A comparitive study of
Kalman filter, Extended Kalman filter and Unscented Kalman filter for harmonic
analysis of the non-stationary signals, International Journal of Scientific &
Engineering Research, Volume 3, Issue 7, July-2012
2. A. Routray, A. K. Pradhan, K. P. Rao, A novel Kalman filter for frequency
estimation of distorted signal in power systems, IEEE transaction on
instrumentation and measurement-2002.
3. D.W.P. Thomas, M.S. Woolfson, Evaluation of frequency tracking methods,
IEEE Transaction on power delivery-2001.
4. Simon Julier, Jeffrey Uhlmann, Hugh F. Durrant-Whyte, A new method for the
nonlinear transformation of means and covariances in filters and estimators,
IEEE Transactions on automatic conterl, vol. 45, n. 3, March 2000.
5. H.C. So, K.W. Chan, Y.T. Chan, K.C. Ho, Linear prediction approach for
efficient frequency estimation of multiple real sinusoids: algorithm and analysis,
IEEE Transactions on Signal Processing 2005
6. J.Z. Yang, C.S. Yu, C.W. Liu, A new method for power signal harmonic analysis
IEEE transaction on power delivery-2005.
7. P.K. Dash, D.P. Swain, A.C Liew, An adaptive linear combiner for on line
tracking of power system harmonics, IEEE Transaction on power delivery-1996.
8. P. K. Dash, Shazia Hasan, B. K. Panigrahi, Hybrid UKF and PSO Technique for
Non stationary signals, Elsevier-2003.
9. S. J. Julier, J. K. Uhlmann, Unscented filtering and nonlinear estimation,
Proceedings of the IEEE-2000
10. S. J. Julier, J. K. Uhlmann, Unscented filtering and nonlinear estimation,
Proceedings of the IEEE 92 -2004
11. Y. N. Wang, J. C. Gu, C.M. Cheu, An improved adaline algorithm for online
tracking of harmonic components, International Journal of Power and Energy
Systems -2003
12. Dan Simon Optimal state estimation, A John Wiley and sons, inc., publication
SCET ME Electrical Engineering

67

Harmonic Detection And Estimation Using Kalman Filter

2014-15

13. Harmonics in power system Cause, Effect and Control


14. Harmonics in power system A Reference Guide to Cause, Effects and Correlative
measurement.
15. Muhittin, Study of Kalman filter, Extended Kalman filter and Unscented Kalman
filter (An approach to design a power system harmonic estimator), Thesis of
B.Tech in Electrical Engineering from NIT Rourkela 2010.
16. Michael A. Morgan, Harold A. Titus, Frequency, Amplitude and phase tracking
of nonsinusoidal signal in noise with Extended Kalman filter, Thesis for Master
of Science in Electrical Engineering from Naval Postgraduate School June 1991
17. S. Ghodratollah Seifossadat, Morteza Razzaz, Mahmood Moghaddasian, Mehdi
Monadi, Harmonic Estimation in Power Systems Using Adaptive Perceptrons
Based on a Genetic Algorithm, ISSN: 1790-5060, November 2007
18. Levent Sevgi, Numerical Fourier Transforms DFT and FFT

SCET ME Electrical Engineering

68

Harmonic Detection And Estimation Using Kalman Filter

2014-15

REVIEW CARD:

SCET ME Electrical Engineering

69

Harmonic Detection And Estimation Using Kalman Filter

SCET ME Electrical Engineering

2014-15

70

Harmonic Detection And Estimation Using Kalman Filter

SCET ME Electrical Engineering

2014-15

71

Harmonic Detection And Estimation Using Kalman Filter

SCET ME Electrical Engineering

2014-15

72

Harmonic Detection And Estimation Using Kalman Filter

SCET ME Electrical Engineering

2014-15

73

Harmonic Detection And Estimation Using Kalman Filter

SCET ME Electrical Engineering

2014-15

74

Harmonic Detection And Estimation Using Kalman Filter

2014-15

DIGITAL RECEPT:

SCET ME Electrical Engineering

75

Harmonic Detection And Estimation Using Kalman Filter

2014-15

TURNITIN ORIGINALITY REPORT:


Turnitin Originality Report

Processed on: 23-May-2015 16:36 IST


ID: 544369418
Word Count: 14909
Submitted: 2

Vidit DesaiBy Sarvajanik College Of Engg. & Tech. Surat 042

Similarity Index
18%
Similarity by Source
Internet Sources:
14%
Publications:
12%
Student Papers:
9%
include quoted include bibliography excluding matches < 1%
mode:
1

show

downloadprint

highest matches together

6% match (Internet from 06-Aug-2014)


http://www.e-driveonline.com/main/wpcontent/uploads/2013/11/siemens_drive_harmonics_in_power_systems_whitepaper.pdf
2
3% match (publications)
K. Xiong. "Detection of satellite attitude sensor faults using the UKF", IEEE
Transactions on Aerospace and Electronic Systems, 4/2007
3
1% match (Internet from 20-Jul-2014)
SCET ME Electrical Engineering

76

Harmonic Detection And Estimation Using Kalman Filter

2014-15

http://iraj.in/journal/journal_file/journal_pdf/1-35-139099466852-56.pdf
4
1% match (publications)
Simon. "The unscented Kalman filter", Optimal State Estimation, 05/05/2006
5
1% match (student papers from 22-Oct-2013)
Submitted to Jawaharlal Nehru Technological University
6
1% match (Internet from 16-Sep-2013)
http://www.ijser.org/viewPaperDetail.asp?r=73.678389286378&svr=09&lang=en_us&x?
I016118
7
1% match (Internet from 20-Aug-2010)
http://www-flare.cs.ucl.ac.uk/staff/s.prince/4C75/julier04.pdf
8
1% match (Internet from 02-Nov-2010)
http://www.cheshireeng.com/Neuralyst/nnbg.htm
9
1% match (publications)
T.K. Panigrahi. "A self-tuning optimised unscented Kalman filter for voltage flicker and
harmonic estimation", International Journal of Power and Energy Conversion, 2010
10
1% match (publications)
Simon. "Nonlinear Kalman filtering", Optimal State Estimation, 05/05/2006
11
1% match (Internet from 30-Aug-2010)
http://lrd.yahooapis.com/_ylc=X3oDMTVnMWg4YmpjBF9TAzIwMjMxNTI3MDIEYX
BwaWQDTHJlazRUTFYzNEdRVjYwVDFRYVlHeC5xMDYuMHVja2pJb3dfYzJFV3
NGejhWZzVHX2xkQjRPX1YweDZPdVNOME9zVjg2a0I2BGNsaWVudANib3NzBH
SCET ME Electrical Engineering

77

Harmonic Detection And Estimation Using Kalman Filter

2014-15

NlcnZpY2UDQk9TUwRzbGsDdGl0bGUEc3JjcHZpZANnSGxCajBnZUF1MHFFYVZt
VWdXZXZsbmxKbS5UVGt4OFZMRUFDRkhJ/SIG=12bfv4i2a/**http%3A//www.nd.e
du/~lemmon/courses/ee67033/pubs/julier-ukf-tac-2000.pdf
12
1% match (Internet from 21-Mar-2010)
http://dspace.nitrkl.ac.in/dspace/bitstream/2080/58/1/pkd1.pdf

SCET ME Electrical Engineering

78

Harmonic Detection And Estimation Using Kalman Filter

2014-15

PAPER PUBLICATION CERTIFICATE:

SCET ME Electrical Engineering

79

Вам также может понравиться