merged document

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

Upload: vidit-desai

Post on 17-Aug-2015

216 views

Category:

Documents


1 download

DESCRIPTION

mmergrd doc

TRANSCRIPT

Harmonic Detection and Estimation Using Kalman Filter By Mr. Vidit Anilbhai Desai (Enrolment No. 130420707003) SupervisorProf. 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 3950012 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringi CERTIFICATE Thisistocertifythatresearchworkembodiedinthisthesisentitled Harmonic Detection and Estimation Using Kalman Filter carried out by Mr. Vidit AnilbhaiDesai(130420707003)studyingatSarvajanikcollegeofEngineeringand TechnologyforpartialfulfillmentofMasterofEngineeringdegreetobeawardedby GujaratTechnologicalUniversity.Thisresearchworkhasbeencarriedoutundermy 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) Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringii COMPLIANCE CERTIFICATE This is to certify that research work embodied in this thesis entitled Harmonic DetectionandEstimationUsingKalmanFiltercarriedoutbyMr.ViditAnilbhai Desai(130420707003)studyingatSarvajanikCollegeofEngineering&Technology (042)forpartialfulfillmentofMasterofEngineeringdegreetobeawardedbyGujarat 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) Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringiii PAPER PUBLICATION CERTIFICATE This is to certify that research work embodied in this thesis entitled Harmonic DetectionandEstimationUsingKalmanFiltercarriedoutbyMr.ViditAnilbhai Desai(130420707003)studyingatSarvajanikCollegeofEngineering&Technology (042)forpartialfulfillmentofMasterofEngineeringdegreetobeawardedbyGujarat TechnologicalUniversity,haspublishedarticleentitledMagnitudeandFrequency estimationusingExtendedKalmanFiltercarriedoutbyMr.ViditAnilbhaiDesai (130420707003) studying at Sarvajanik Collegeof Engineering & Technology (042) for partialfulfillmentofMasterofEngineeringdegreetobeawardedbyGujarat TechnologicalUniversity,haspublishedarticleentitledMagnitudeandFrequency estimationusingExtendedKalmanFilterunderreviewedbytheInternational Journal of Advance Engineering and Research development. Date: Place: Signature and Name of StudentSignature and Name of Guide (Desai Vidit Anilbhai) (Prof. Sandhya Rathore) Signature and Name of Principal (Dr. Vaishali Mungurwadi) Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringiv THESIS APPROVAL CERTIFICATE This is to certify that research work embodied in this thesis entitled Harmonic DetectionandEstimationUsingKalmanFiltercarriedoutbyMr.ViditAnilbhai Desai(130420707003)studyingatSarvajanikCollegeofEngineering&Technology (042)forpartialfulfillmentofMasterofEngineeringwithspecializationofElectrical Engineering by Gujarat Technological University. Date: Place: Examiners Sign and Name: Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringv DECLARATION OF ORIGINALITY We herebycertify thatwe are the sole authorsof this thesis and that neither anypart of thisthesisnorthewholeofthethesishasbeensubmittedforadegreetoanyother University or Institution.Wecertifythat,tothebestofourknowledge,thecurrentthesisdoesnotinfringeupon anyonescopyrightnorviolateanyproprietaryrightsandthatanyideas,techniques, quotationsoranyothermaterialfromtheworkofotherpeopleincludedinourthesis, publishedorotherwise,arefullyacknowledgedinaccordancewiththestandard referencingpractices.Furthermore,totheextentthatwehaveincludedcopyrighted materialthatsurpassestheboundaryoffairdealingwithinthemeaningoftheIndian Copyright (Amendment) Act 2012, we certify that we have obtained a written permission fromthecopyrightowner(s)toincludesuchmaterial(s)inthecurrentthesisandhave 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 allowablelimit.Eventhoughlateronincaseofanycomplaintpertainingofplagiarism, wearesoleresponsibleforthesameandweunderstandthatasperUGCnorms, UniversitycanevenrevokeMasterofEngineeringdegreeconferredtothestudent submitting this thesis. Date: Place: Signature of Student: Signature of Guide: Name of Student: Desai Vidit Anilbhai Name of Guide: Prof. Sandhya RathoreEnrollment No: 130420707003Institute Code: 042 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringvi ACKNOWLEDGEMENT I take this opportunity to express my profound gratitude and deep regards to myguide,Prof.SandhyaRathoreforherexemplaryguidance,monitoringandconstant 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. IwouldalsoliketothankDr.HirenPatel(HODofEED),myclassmates 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.Ialsothankmyfamilyforgivingmesuitableguidance,suggestions& motivation. VIDIT ANILBHAI DESAI Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringvii TABLE OF CONTENT CERTIFICATE I ACKNOWLEDGEMENT VI TABLE OF CONTENT VII LIST OF FIGURE X LIST OF TABLE XII ABSTRACT XIII CHAPTER 1: INTRODUCTION1 1.1 OVERVIEW1 1.2 WHY CHOOSE KALMAN FILTER METHODOLOGY3 1.3 AIM OF PROJECT3 1.4 RESEARCH OBJECTIVE3 1.5 STUDY METHODOLOGY4 CHAPTER 2: LITERATURE REVIEW5 CHAPTER 3: POWER SYSTEM HARMONICS11 3.1 CAUSE OF HARMONICS11 3.2 PROBLEMS DUE TO VOLTAGE AND CURRENT HARMONICS13 CHAPTER 4: STATE ESTIMATION THEOREY 18 4.1 KALMAN FILTER18 4.1.1 INTRODUCTION18 4.1.2 WHY KALMAN FILTER IS SO POPULAR20 4.1.3 UNDERLAYING DYNAMIC SYSTEM MODEL20 4.2 EXTENDED KALMAN FILTER22 4.2.1 INTRODUCTION22 4.2.2 LINEARIZE PROCESS23 4.2.3ALGORITHMFORDISCRETETIMEEXTENDEDKALMAN FILTER 24 4.3 UNSCENTED KALMAN FILTER25 4.3.1 BASIC IDEA OF UNSCENTED TRANSFORMATION25 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringviii 4.3.2 PROCESS OF UNSCENTED TRANSFORMATION26 4.3.3 PROPERTIES OF UNSCENTED TRANSFORMATION27 4.3.4 UNSCENTED KALMAN FILTERING28 4.4 APPLICATION OF KALMAN FILTER31 4.5 APPLICATION OF KALMAN FILTER IN POWER SYSTEM32 CHAPTER 5: HARMONIC DETECTION THEOREY33 5.1 THE DISCRETE FOURIER TRANSFORM (DFT)33 5.1.1 INTRODUCTION33 5.1.2 DISADVANTAGES OF DFT34 5.2 ADALINE35 5.2.1 INTRODUCTION TO A NEURAL NETWORK (ANN)35 5.2.2 WHY CHOOSE NEURAL NETWORK36 5.2.3 NEURAL NETWORK STRUCTURE36 5.2.4 NEURAL NETWORK OPERATION38 5.2.5 NEURAL NETWORK LEARNING39 5.2.6 ADALINE40 5.2.7 HARMONIC DETECTION PROCESS40 5.3 EXTENDED KALMAN FILTER42 5.3.1 SYSTEM DYNAMICS42 5.3.2 APPROXIMATION TIME UPDATE42 5.3.3 APPROXIMATION MEASUREMENT UPDATE43 5.3.4 ESTIMATION ERROR COVARIANCE44 5.3.5 EXTENDED KALMAN FILTER EQUATION45 5.3.6 HARMONIC DETECTION AND ESTIMATION PROCESS46 CHAPTER6:SIMULATIONRESULTSFORSTATEESTIMATIONAND HARMONIC DETECTION 49 6.1 SIMULATION RESULT FOR STATE ESTIMATION49 6.1.1SIMULATIONRESULTSFOREXTENDEDKALMANFILTER METHODOLOGY49 6.1.2SIMULATIONRESULTSFORUNSCENTEDKALMANFILTER50 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringix METHODOLOGY 6.2 SIMULATION RESULTS FOR HARMONIC DETECTION51 6.2.1 SIMULATION FOR HARMONIC ANALYSIS51 6.2.2WAVEFORMSOFLOADVOLTAGEANDCURRENTFOR SIMULATION 52 6.2.3 FFT ANALYSIS FOR VOLTAGE AND CURRENT WAVEFORM52 6.2.4 SIMULATION RESULTS FOR DFT METHODOLOGY53 6.2.5 SIMULATION RESULTS FOR ADALINE METHODOLOGY54 6.2.6 SIMULATION RESULTS FOR EKF METHODOLOGY57 CHAPTER 7: CONCLUSION66 7.1 CONCLUSION66 LIST OF REFERANCES67 REVIEW CARD DIGITAL RECEPT TURNITIN ORIGINALITY REPORT PAPER PUBLICATION CERTIFICATE Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringx LIST OF FIGURE Figure 1.1Study Framework4 Figure 3.16-Pulse rectifier input current waveform11 Figure 4.1Basic operation of Kalmanfiter19 Figure 4.2Kalman filter operation in a form of loop19 Figure 4.3Model Underlying the Kalmanfiter21 Figure 4.4Principle of UT26 Figure 5.1A Model Neurons36 Figure 5.2Back Propogation Network37 Figure 5.3Sigmoid Function38 Figure 5.4Neuron Weight Adjustments 39 Figure 5.5Adaline Neural Network40 Figure 6.1Plot for original signal and estimated signal using EKF49 Figure 6.2Combine plot for original and estimated signal49 Figure 6.3Mean square plot for given signal using EKF50 Figure 6.4Plot for original signal and estimated signal using UKF50 Figure 6.5Combine plot for original and estimated signal51 Figure 6.6Mean square plot for given signal using UKF51 Figure 6.7Simulation for harmonic analysis51 Figure 6.8Voltage and current waveform for harmonic analysis52 Figure 6.9FFT analysis of Voltage waveform52 Figure 6.10FFT analysis of Current waveform53 Figure 6.11Voltage harmonic detection using DFT53 Figure 6.12Current harmonic detection using DFT53 Figure 6.13Structure of ADALINE54 Figure 6.14Original and estimated Voltage waveform55 Figure 6.15Original and estimated Current waveform55 Figure 6.16Magnitudeandfrequencyoffundamentalcomponentofload Voltage 57 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringxi Figure 6.17Magnitude and frequency of 3

component of load Voltage57 Figure 6.18Magnitude and frequency of 5 component of load Voltage58 Figure 6.19Magnitude and frequency of 7 component of load Voltage58 Figure 6.20Magnitude and frequency of 9 component of load Voltage58 Figure 6.21Magnitude and frequency of 11 component of load Voltage59 Figure 6.22Magnitude and frequency of 13 component of load Voltage59 Figure 6.23Magnitude and frequency of 15 component of load Voltage60 Figure 6.24Magnitude and frequency of 17 component of load Voltage60 Figure 6.25Magnitude and frequency of 19 component of load Voltage60 Figure 6.26Magnitudeandfrequencyoffundamentalcomponentofload Current 61 Figure 6.27Magnitude and frequency of 3

component of load Current61 Figure 6.28Magnitude and frequency of 5 component of load Current62 Figure 6.29Magnitude and frequency of 7 component of load Current62 Figure 6.30Magnitude and frequency of 9 component of load Current62 Figure 6.31Magnitude and frequency of 11 component of load Current63 Figure 6.31Magnitude and frequency of 13 component of load Current63 Figure 6.33Magnitude and frequency of 15 component of load Current64 Figure 6.34Magnitude and frequency of 17 component of load Current64 Figure 6.35Magnitude and frequency of 19 component of load Current64 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringxii LIST OF TABLE Table 1Co-efficient of Voltage and Current harmonics56 Table 2Comparison of EKF and FFT for load Voltage65 Table 3Comparison of EKF and FFT for load Current65 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineeringxiii Harmonic Detection and Estimation Using Kalman FilterDissertation Phase-II Report Submitted By DESAI VIDIT ANILBHAI [130420707003] Guided By Prof. SandhyaRathore ABSTRACT Nowaday,becauseoftheutilizationofhighlynon-linearloadsandpower electronicdevices,harmonicsaregeneratedinthepowersystemwhichcreatestresson electricaldeviceswhichareconnectedtothepowersystem.Sofilterisdesignfor filteringharmonicsfrompowersystem.Butbeforedesigningafilter,itisrequiredto measure magnitude of harmonic components present in the system. So in this project we designtheoptimalestimatorandharmonicdetectorwithvariationinharmonic parameters. So for that first study the characteristics of Extended and Unscented Kalman filterandalsootherharmonicdetectiontechniques.ExtendedandUnscentedKalman filterareusedforstateestimateofpowersignalwithrandomnoiseinpowersystem. Harmonic components present in distorted voltage and current waveforms of three phase PWMconverteraredetectedbyExtendedKalmanfilterandcomparewithother techniqueslikeDiscreteFourierTransform(DFT)andADALINE.Kalmanfilter(both EKF and UKF) algorithms accurately tracks a static signal which is corrupted with noise. Instateestimation,resultsofbothEKFandUKFalgorithmsarecomparedandin harmonicdetection,voltageandcurrentharmonicsaredetectusingExtendedKalman filter and results are compared with DFT and ADALINE techniques. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering1 CHAPTER 1 INTRODUCTION 1.1 OVERVIEW: Under normal condition i.e., linear load is connected at load side in power system, measurement orestimation of amplitude, frequencyand phase of power signal. Suppose assumption is that power signal is not interrupted and noise or harmonics are not present (becauseinlinearload,onlyfundamentalcomponentispresent)inpowersignal.So easily measurement of amplitude of power signal by using true RMS meter. RMSvalue of a power signal is easily measured and from that easily calculates peak value of signal. Frequencyofidealpowersignalisdefineasaninverseofthetimeittakestocomplete one period of oscillation. So from definition of frequency, we can measure frequency of a powersignalandwecanmeasurephasebyfindingaphasedifferencebetweenvoltage and current signal. But now a day power electronic devices such as rectifiers and inverters are used in almostallkindofoperationinmotordriveswhichresultsinincreasinginjectionof harmonic components in power system. Again due to increase in application of series and shuntcapacitorsinthesystemandstaticVARcontrollersforpowerfactorcorrectionat strategiclocations,therearehighchancesofincreasepotentialforresonantconditions which magnify the existing harmonic levels. The power system components continuously injecttimevaryingharmonicsinthesystemgivingrisetonon-stationaryharmonic voltages and currents in the distribution system. Inanormalalternatingcurrentpowersystem,thecurrentvariessinusoidalata specificfrequency,usually50hertz.Whenalinearelectricalloadisconnectedtothe 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 suchasarectifier,inverterorconverterareconnectedtothesystem,itdrawsacurrent that is not necessarily sinusoidal but current waveform can become quite complex which dependsonthetypeofloadanditsinteractionwithothercomponentsofthesystem. Current harmonics causes voltage harmonics. Voltage provided by the voltage source will Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering2 bedistortedbycurrentharmonicsduetothesourceimpedance.Ifsourceimpedanceof thevoltagesourceissmall,thecurrentharmonicswillcauseonlysmallvoltage harmonics. Harmonic voltages and currents in the electric power system are result of non-linearelectricloads.Harmonicfrequenciesinpowergridareafrequentwhichcauseof powerqualityproblems.Powersystemsharmonicsresultsinincreasingheatinginthe equipmentandconductors,torquepulsationsinmotorsandmisfiringinvariablespeed drives. So it is desirable to reduce harmonics in power system. Almostallrealtimefunctionsarenon-linearandallthesystemscanbe represented in a form of discrete time system to a great extent of accuracy by using very smalltimesteps.Nowtheproblemistoestimatesthestatesofthisdiscrete-time controlledprocessanddetectionofharmoniccomponentspresentinthesystem.This process is generally expressed with the help of linear or non-linear differential equations. Differenttechniquesareusedforharmonicdetection(i.e.,findoutamplitudesand frequencies of different order of harmonic components presents in a power signal due to thenon-linearloadswhichareconnectedtothepowersystem)undernoisyconditions. 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 picketfenceeffects.HencebothDFTandFFTneederrorcompensationandadaptive window width. Some other well-known signal processing techniques like artificial neural networks,supervisedGauss-Newtonalgorithm,least-errorsquareandits variants,linear predictiontechniqueadaptivefilter,ExtendedKalmanfiltersetc.,havebeenusedfor time-varyingsignalparameterestimation.Mostofthesealgorithmsfromaboverequires heavycomputationaloutlayandalsosuffersfrominaccuraciesinthepresenceofthe noise with low signal to noise ratio (SNR). InourprojectwehavestudiedExtendedKalmanfilter(EKF)andUnscented Kalmanfilter(UKF)forstateestimationandExtendedKalmanfilter(EKF)andother techniqueslikeDFTandADALINEforharmonicdetection.Thecharacteristicsand algorithms are of above techniques are thoroughly studied and then simulated and results are compared for both state estimation and harmonic detection. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering3 1.2 WHY CHOOSE KALMAN FILTER METHODOLOGY? Amongalldifferenttechniquesdiscussedaboveforharmonicanalysis,Kalman filter(KF)isanoptimalestimatorbecauseitminimizethemeansquareerrorofthe estimatedparametersifallnoiseiswhiteGaussiannoise.Kalmanfilterisrecursivei.e., lastoutputoftheKalmanfilterisusedasaninputfornextcalculationorstep.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: Inprojectfirstweestimatestateofthesysteminwhichwefirstwestudythe characteristicsandalgorithmsofEKFandUKFandthenusingthatalgorithm,simulate staticpowersystemsignalandcomparetheresults.Thenafterwegoforharmonic detectioninwhichweestimatemagnitudesandfrequenciesofharmoniccomponents 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.StudyalgorithmofEKFandthensimulateastaticpowersignal(whichis represented in chapter 4) using EKF. 2.StudyalgorithmofUKFandthensimulateastaticpowersignal(whichis represented in chapter 4) using UKF. 3.Compare simulation results of EKF and UKF for static power signal. 4.HarmonicdetectionisdoneusingEKF,DFTandADALINEforvoltageand current of PWM converter. 5.ComparesimulationresultsofEKFwithDFTandADALINEforharmonic detection. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering4 1.5 STUDY METHODOLOGY: Studymethodologyrepresentssetofmethodsorideasoraprocedureofour project which is shown in figure 1.1.

Figure1.1: Study Framework Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering5 CHAPTER 2 LITERATURE REVIEW InternationalJournalofScientific&EngineeringResearch,Volume3, Issue7,July-20121ISSN2229-5518IJSER2012http://www .ijser.orgA Comparative Study Of Kalman Filter, Extended Kalman Filter And UnscentedKalmanFilterForHarmonicAnalysisOfTheNon-Stationary SignalsA. UmaMageswari, J.Joseph Ignatious, R.Vinodha. Thispaperpresentsanapproachfordesigninganoptimalestimatorfor measurementofthefrequencyandharmoniccomponentsofthetimevaryingsignal whichisembeddedinlowsignal-tonoiseratio.ThisledthestudyofKalmanfilter Extended Kalmanfilterand Unscented Kalman filter characteristics andimplementation ofallthesefilters.Inthispaper,ExtendedKalmanfilterandUnscentedKalmanfilter algorithmsareemployedtoestimatethemagnitudeofvoltageinthepresenceofthe random noise and distortions. A Kalman filter being an optimal estimator for tracking the signalwhichiscorruptedwithnoiseandharmonicdistortionquiteaccurately.Tracking of the harmonic components of the dynamic signal inthe communication system canbe easily done by using EKF and UKF algorithms and also their results are compared. The main advantage of an Unscented transformation which is used inthe UKF is that it does not utilize linearization (i.e., linearize process) for computation of the state of systemanderrorcovariancematrices,sothataccuratelyestimationofparametersofa 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 correctlywhich are used in the Unscented transformation. Therefore because of above drawback of UKF, it is proposed to use an adaptive particle swarm optimization techniqueforaccuratelytrackingthesignal.Itisfoundthattheconventionalparticle Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering6 swarmoptimization(PSO)issuperiorforoptimalchoiceofUKFparameteranderror covariance. ElSEVIER-2003 Hybrid UKF and PSO Technique for Non stationary signalsP. K. Dash, Shazia Hasan, B. K. Panigrahi Thispaperpresentsprocessofestimationoftheamplitudeandthefrequencyof 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 usingthemodifiedParticleSwarmOptimization(PSO)algorithm.Furthermoreto 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 Thispaperproposednewharmonicanalysismethodforpowersignalbecauseof limitationsoffastFouriertransform(FFT)anddiscreteFouriertransform(DFT)which arepopularaspowerfultoolsforharmonicanalysisofthepowersignal.BothFFTand DFT are suffers from the leakage, aliasing and picket fence effect. The major components ofFFTandDFTmethodsarefrequencyandphaseestimatingalgorithms,acorrection 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 performanceand this proposed methodhas not a drawbacks likealiasing, leakage and picket-fence effects like DFT and FFT. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering7 IEEE Transactions on Signal processing, Vol. 53, No. 7, July 2005 LinearPredictionApproachforEfficientFrequencyEstimationof 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 forthemultiplerealsinusoidsembeddedwiththepresenceofwhitenoise.Thesetwo estimatorsarebasedonlinearpredictionpropertyofthesinusoidalsignals.Thefirst algorithm(i.e.,estimator)employsgeneralizedunit-normconstraintforaccurate frequencyestimationwhilethesecondmethodusesamonicconstraint.Firstalgorithm minimizestheweightedleastsquares(WLS)costfunctionwhichissubjecttotheunit-norm constraint and second method is a WLS estimator with a monic constraint. Theweightingmatricesarethefunctionoffrequencyparameterswhichare obtainedintheiterativemannersforbothmethods.Bothofestimatorsprovidenearly identicalfrequencyestimatesforacaseofsinglerealtoneandtheirperformanceare approachestheCramrRaolowerbound(CRLB)forwhiteGaussiannoisebefore occurrence of threshold effect. IEEE, VOL. 92, NO. 3, MARCH 2004 Unscented Filtering and Nonlinear Estimation Simon J. Julier and Jefffrey K. Uhlamann Thispaperpresentsdevelopmentofanunscentedtransformation(UT)to overcomethelimitationofEKF,whichisapplicableforpropagationofmeanand covarianceinformationthroughthenonlineartransformations.AnUTmethodismore accurateandeasiertoimplement.Italsousethesameorderofcalculationsas linearizationinEKF.Thispaperreviewsthedevelopment,motivation,useand applications of UT. An Unscented transformation is based onthe two fundamental principles. Firstis performing the nonlinear transformation on a single point (rather than an entire pdf) and Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering8 secondistofindoutsetsofindividualpointsinthestatespacewhosesamplepdfsare approximates to the true pdfs of the state vector. IEEE Transactions on Instrumentation and Measurement, Vol. 51, No. 3, July 2002 ANovelKalmanFilterforFrequencyEstimationofDistortedSignals in Power Systems Aurobinda Routray, Ashok Kumar Pradhan, and K. Prahallad Rao ThispaperpresentsasimpleandnovelapproachindesigningofanExtended Kalmanfilter(EKF)forthepowersystemfrequencymeasurementandperformanceof this proposed EKF filter is compared with some of other methods which are estimate the frequencyofasignalundernoisycondition.Stabilityfortheproposedfilterisalso 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 withnoiseandotherdisturbancesduetoharmonicsandtheunderconditionwhere frequency is changing very suddenly and with unexpected manner. Inproposedalgorithm,hysteresismethodisusedforresettingcovariancematrix fortrackingoffrequencyveryquickly.TheproposedEKFfilterofferssuperior performancesinallcases.Alsothefilterrequireslesscomputationwhichmakesit 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 Thispaperpresentsanalysisofdifferentmethodswhicharetrackingthe fundamentalfrequencyandseewhetheritperformnecessarywiththeprotectionand control equipments. TheresultanalysisshowsthattheDFT(DiscreteFouriertransformwithphase composition),LEP(Linearestimationofphase)andDSPOC(Decompositionofsingle Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering9 phase into Orthogonal components) perform extremely well but they all are suffers from theperiodicerrorintheestimatedfrequencyifitdepartsfromtheassumedfrequency 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 ANewMethodfortheNonlinearTransformationofMeansand 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.ASetofsamples(calledsigmapoints)whichisusedforestimatingthemean and the covariance of probability distribution. This method yields the filter which is more accuratethantheExtendedKalmanfilter(EKF)andeasiertoimplementbecauseit doesntinvolveanylinearizationstepsbecauseofeliminatingthederivationand calculation of Jacobian matrices. The proposed algorithm predicts the mean and the covariance accurately up to the thirdorder.BecauseofthehigherordertermsareneglectedintheFourierseries,itis 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 ThispaperpresentstheflawsintheutilizationofanExtendedKalmanfilterand introducesanimprovementintheformofUnscentedKalmanFilter(UKF)whichis proposedbyJulierandUhlman.AnUKFaddressestheproblemofEKFandsolvedby using the deterministic sampling approach. The state distribution is representedby using theminimalsetofcarefullychosensamplepoints.Thesesamplepointscompletely capture a true mean and the covariance of the GRV and then captures the posterior mean Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering10 andthecovarianceaccuratelyupto3rdorder(inTaylorseriesexpansion)forany nonlinearity. An EKF can accurately applicable only for first-order differential equation. Remarkably,thecomputationalcomplexityoftheUKFisthesameorderasthatofthe EKE. IEEE Transactions on Power Systems, Vol. 11, No. 4, November 1996 AnAdaptivelinearcombinerforon-linetrackingofPowerSystem harmonicsA.C.Liew, Saifur Rahman, P.K..Dash, D.P.Swain This paper presents a new approach to estimate the harmonic components present inpowersystembyusingthelinearadaptiveneuroncalledasADALINE.Thelearning 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 theFouriercoefficientsofasignaldataveryaccuratelywhicharecorruptedwithnoise anddecayingdccomponent.TheAdaptivetrackingoftheharmoniccomponentsofa power system can easily be done by using this algorithm. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering11 CHAPTER 3 POWER SYSTEM HARMONICS Ideallyunderlinearloadcondition,voltageandcurrentwaveformsareperfect sinusoids.However,becauseofthemassiveuseofpowerelectronicdevicesandother non-linearloads,thepowersystemvoltageandcurrentwaveformsaredistorted.This deviationfromaperfectsinewavecanberepresentedbyharmonicssinusoidal components having a frequency that is an integral multiple of the fundamental frequency. Toquantifydistortion,totalharmonicdistortion(THD)isusedwhichexpressthe distortion in a form of percentage of magnitude of the fundamental of voltage and current waveforms. 3.1 CAUSE OF HARMONICS: Harmonicsarecausedbythenon-linearloadswhichdrawsanon-sinusoidal currentfromasinusoidalvoltagesource.Someexamplesofharmonicproducingloads areelectricarc 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 inputsideoftherectifierlooksmostlylikeasquarewaveinsteadofasinewave(see Figure 1.1). Figure3.1: 6-Pulse rectifier input current waveform Therectifiercanbeconsideredasasourceofharmoniccurrentandproducesroughlya sameamountofharmoniccurrentoverawiderangeofpowersystemimpedances.The characteristiccurrent harmonics produced by therectifier are determinedbythe number Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering12 ofpulses.Thefollowingequationdeterminestheorderofcharacteristicharmonics 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 ofthefundamentalcurrent).A6-phaserectifier(or12-pulserectifier)willtheoretically 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). Variablefrequencydrives(VFD)alsoproducesharmoniccurrentsattheoutput sideoftheinverterwhichareseenorsensedbythemotor.Mostoftheseharmonic componentsareintegermultiplesoftheinverteroperatingfrequencynottothepower supplyfrequency,butlittlegeneralizationcanbemadeabouttheirmagnitudesincethis variesgreatlywiththetypeofdrivesandtheswitchingalgorithmsfortheinverter 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 theharmonicssincetheyarenotnecessarilyoccurattheintegermultiplesofthepower supplyfrequencyorinverterfundamentalfrequency.Harmonicscanoccurattheinput side at the frequency of the power system frequency plus or minus the inverter operating frequency.Theinverteroutputcontainharmoniccomponentsattherectifierpulse numbertimesthepowersystemfrequencyplusorminustheinverteroperating frequency.ProperDClinkdesigni.e.,properselectionofinductorandcapacitoratDC side can minimize the presence of inter harmonics. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering13 3.2PROBLEMSDUETOVOLTAGEANDCURRENT HARMONICS: Effect of harmonics on power system components and others are as below. Generators: Incomparisonwiththeutilitypowersupplies,effectsofharmonicvoltagesand currentsaresignificantlymorepronouncedongenerators(especiallyonstand-alone generators used as a back-up or those on a ship or used in the marine applications) due to theirsourceimpedancewhichisbeingtypicallythreetofourtimesthatofutility transformers.Themajorimpactofthevoltageandcurrentharmonicsistoincrease heating of machines due to increase in iron losses and copper losses, since both of them arefrequencydependentandincreasewithincreasedinharmonicsi.e.,harmonic frequencies.Toreducethiseffectofheating,thegeneratorswhicharesupplyingtothe nonlinearloadsmustberequiredtobederated.Inaddition,thepresenceofharmonic componentswithnonlinearloadingcauseheatingandtorquepulsationswithtensional vibrations. Transformers: Theeffectsofharmoniccurrentsattheharmonicfrequenciescausesincreasein corelossesduetoincreasinginironlosses(i.e.,hysteresisandeddycurrents)in transformers.Inaddition,increasingincopperlossesandstrayfluxlossesresultin additionalheatingandwindinginsulationstresses,especiallyincaseofhighlevelsof / (i.e., rate of rise of voltage with respect to time) are present. Temperature cycling andpossibilityofresonancebetweeninductanceoftransformerwindingandsupply capacitancecanalsocausesadditionallosses.Thesmalllaminatedcorevibrationsare increasedduetopresenceofharmonicfrequencies,whichcanbeappearingasan additionalaudiblenoise.TheincreasinginRMScurrentduetoharmonicswillalso increase 2 (i.e., copper) losses. Thedistributiontransformersusedwithfour-wire(i.e.,three-phaseandneutral wire)distributionsystemshavetypicallyadelta-wyeconfiguration.Duetothedelta connectedprimary,thetriplen(i.e.3rd,9th,15th)harmoniccurrentscantpropagate downstreambuttheycontinuouslycirculatesintheprimarydeltawindingofthe Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering14 distributiontransformerwhichcausinglocalizedoverheatingindeltaorprimaryside winding.Withlinearloading,onlyzerosequencecomponentsarepresentinneutral conductor because the triplen harmonic currents will cancel out in the neutral conductor. However,whennonlinearloadsaresuppliedthroughtransformer,thetriplenharmonics currentsarenotcanceloutinthephase,butinsteadaddcumulativelyintheneutral conductor of transformer at a frequency of 180 Hz (3rd harmonic) which overheating the transformerandoccasionallycausingoverheatingandburningoftransformerneutral 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.,hysteresislossesandeddycurrent)instatorwinding,rotorcircuitandrotor laminations.Inmore,theselossesarealsocompoundedbyskineffectespeciallyatthe frequencies above 300 Hz. The Leakage magnetic fields caused by the harmonic currents inthestatorandrotorendwindingswhichproducesadditionalstrayfrequencyeddy currentdependentlosses.Substantialironlossescanalsobeproducedintheinduction motorswithskewedrotorsduetothehigh-frequency-inducedcurrentsandrapidflux changes (i.e., due to the hysteresis) in stator and rotor of induction motor. Excessiveheatinginmotorwindingcandegradethebearinglubricationwhich resultsinbearingcollapse.Harmoniccurrentsarealsocanresultinbearingcurrents, whichcanhoweverpreventedbytheuseoftheinsulatedbearingwhichisavery commonpracticeusedintheACvariablefrequencydrive-fedACmotors.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 maybereducedbyasmuchas50%.Squirrelcagerotorscanbenormallywithstand higher temperature levels compared tothe 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.,rateofriseofvoltagew.r.ttime)suchasthoseattributedtotheline notching and associated with ringing due to the flow of the harmonic currents. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering15 Harmonicsequencecomponentscanalsoadverselyaffectinductionmotors. Positivesequencecomponents(i.e.,7th,13th,19th)willassistthetorqueproduction, whereasthenegativesequencecomponents(5th,11th,17th)willactagainsttothe directionofrotationwhichresultingintorquepulsations.Zerosequencecomponents (i.e., triplen harmonics) which are stationary and do not rotate.Therefore, any harmonic energyassociatedwithtriplenharmonicisdissipatedasheat.Themagnitudeoftorque pulsationswhichisgeneratedduetotheseharmonicsequencecomponentscanbe significant and cause in shafting tensional vibration problems. Cables: Cablelossesdissipatedasheatwhichissubstantiallyincreasedwhencableis 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 isdependentonthefrequencyofthecurrentbeingcarriedoutbycable.Skineffectisa phenomenonwherebythecurrenttendstoflownearthesurfaceoftheconductorwhere theimpedanceisleast.Ananalogousphenomenon,theproximityeffectisduetothe mutual inductance of conductors which are arranged closely parallel to one another. Both oftheseeffectsaredependentupontheconductorsize,resistivity,frequencyandthe permeabilityoftheconductormaterial.Atfundamentalfrequencies,theskineffectand proximityeffectsareusuallynegligibleforasmallerconductor.Theassociatedlosses duetothechangesinresistance,however,canbeincreasesignificantlywiththe 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 thecurrent will behigher than for linearloadsofsamepower.Therefore,unlessthecurrenttriplevelisadjusted accordingly,thecircuitbreakermaytripprematurelywhilecarryingoutnonlinear current.Circuitbreakersaredesignedtointerruptthecurrentatthezerocrossing.On highly distorted supplies which may contain line notching and/or ringing, spurious zero crossoversmaycauseprematureinterruptionofthecircuitbreakersbeforetheycan Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering16 operatecorrectlyintheeventofanoverloadorfault.However,inthecaseofashort circuitcurrent,magnitudeofharmoniccurrentwillbeveryminorincomparisontothe fault current. Fuse ruptures under over current or short-circuit conditions is based on the heatingeffectoftheRMScurrentaccordingtotherespective2characteristic.The highertheRMScurrent,thefasterthefusewilloperate.Onnon-linearloads,theRMS current will be higher than for the similarly-rated linear loads, therefore the fuse de rating maybenecessarytopreventtheprematureopening.Inadditionfusesattheharmonic frequenciessufferfromtheskineffectandmoreimportantlyfromtheproximityeffect whichresultinginnon-uniformcurrentdistributionacrossthefuseelementswhich placing additional thermal stress on the device. Lighting: Onenoticeableeffectonlightingisthephenomenonknownasflicker(i.e., repeatedfluctuationsinthelightintensity).LightingishighlysensitivetotheRMS voltagechanges;evenaslightdeviation(ofanorderof0.25%)isperceptibletothe humaneyesinsometypesoflamps.Superimposedinterharmonicvoltagesinasupply 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 inthe industrial plants andcommercialbuildings.Fluorescentlightingusedintheindustrialplantsand commercial buildings also normally have capacitors which are fitted internally to improveownpowerfactor.Theseharmoniccurrentsmayinteractwiththese capacitances and the system inductances and excite parallel resonance which can over heat, disrupt and/or damage the plant and equipment. b)ThepowercablescarryingharmonicloadsactasEMI(electromagnetic interference) generation in the adjacent signal or control cables via conducted and radiatedemissions.ThisEMInoisehaveadetrimentaleffectontelephones, radios, televisions, computers, control systems and other types of equipment. Any telemetryorprotectionorotherequipmentwhichreliestotheconventional measurementtechniquesortheheatingeffectcannotoperatecorrectlyinthe Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering17 presenceofthenonlinearloads.Circuitbreakersandfuseswillnotofferan expected level of protection. So it is therefore important that only the instruments whicharebasedontrueRMStechniquesmustbeusedonthepowersystems which supplying nonlinear loads. c)Attheinstallationsplacewherethepowerconductorscarryoutnonlinearloads 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., 9thorderharmonicto20thorderharmonicat60Hzfundamental)canbe troublesome. d)Thereisalsoapossibilityofbothradiatedandconductedinterferenceabovethe normalharmonicfrequencieswithatelephonesystemsandotherequipmentdue tothevariablespeeddrivesandothertypesofnonlinearloads,especiallyatthe high carrier frequencies.e)Conventionalmetersarenormallydesignedtoreadormeasureonlysinusoidal-basedquantities.NonlinearvoltagesandcurrentswithhigherRMSvaluesare impressedonthesetypesofmeterswhichintroduceerrorsintothemeasurement circuits which show or read false readings. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering18 CHAPTER 4 STATE ESTIMATION THEORY 4.1 KALMAN FILTER: The Kalman Filter is a mathematical method or technique which is used to use the observedvalueswithcontainingnoiseandotherdisturbancesandproducethevalues which are closer to the true values and the calculated values. 4.1.1 INTRODUCTION: Kalmanfilterisknownasalinearquadraticestimation(LQE)whichisan algorithmthatusesnumbersofseriesofmeasurementswhichareobservedoveratime withcontainingnoise(orrandomvariations)andothertypesofinaccuracies,and producesan estimates ofa unknown variables which are more precise than thosevalues which are based on a single measurement alone.Furthermore the Kalman filter operates recursivelyonthestreamsofanoisyinputdatatoproducesthestatisticallyoptimal estimateofanunderlyingsystemstate.Thisfilternameisbasedonthenameof developer Rudolf (Rudy) E. Kalman who was scientist. TherearesomanyapplicationsofKalmanfilterindifferentfieldsbutbasic applicationistoprovideguidance,particularlyinaircraft,navigationandcontrolin spacecraftandalsousedfortimeseriesanalysisinsignalprocessingandeconometrics. TheKalmanfilterisalsooneofthemaintopicsinthefieldoftheRoboticmotion 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 Kalmanfilterbecauseoftheprocessoffindingbestestimatesfromthenoisydata 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 outcomeofnextmeasurements(whichiscorruptedbysomeamountoferrorwith Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering19 including some random noise) is observed, these estimates are updated by using weighted averagewithmoreweightgiventoestimateswiththehighercertainty.Kalmanfilter algorithmisrecursiveinnature,itcanrunintherealtimeusingonlythepresentinput measurementsandpreviouslycalculatedstateanditsuncertaintymatrix(withno additionalpastinformationisrequired).Kalmanfilteroperationexplainedaboveis 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 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering20 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: Kalmanfilterisbasedonlinearandnon-lineardynamicalsystemswhichare 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 withaddedsomenoise.Thentheobservedstatesaregeneratedbyusinganotherlinear operator with some noise added which is usually called as a measurement noise. UtilizationoftheKalmanfilterforestimationofinternalstatesofestimation process where only the sequence of a noisy observations are known as the inputs and the processismodeledinaccordingwiththestatespacerepresentationofKalmanfilter.It means that specifying the following matrices: the state transition model, the observation model,thecovarianceofprocessnoise,thecovarianceofobservationnoiseand sometimes the control-input model for each time-steps ,

,

,

,

,

respectively as described in further. TheKalmanfiltermodelassumesthatthestateat( 1)helpsinmeasuringthetrue 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,

) Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering21 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,

)Startingfromtheinitialstatestothenoisevectors,eachandeverystepsaremutually independent. (A) (B) Figure4.3: Model Underlying the Kalman Filter AlotofrealdynamicalsystemscannotexactlyfittedthismodelbecausetheKalman filter mainly deals with linear systemsand mostlyall thereal systems are non-linear.In factunmodellddynamicssystemcanreducethefilteringperformance,althoughitis supposedtoworkfinelywiththeinputswhichareunknownstochasticsignals.The Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering22 estimationalgorithmbecomesunstablebecausetheunmodelleddynamicsystem dependent on the inputs. But use of the white Gaussian noise make an algorithm diverge sointheproject,noiseusedasinputnoiseandmeasurementnoiseareGaussianwhite noise. 4.2 EXTENDED KALMAN FILTER: 4.2.1 INTRODUCTION: Asdiscussedabove,KalmanFilterisanoptimalestimatorforthelinearsystem modelswithadditiveindependentwhiteGaussiannoiseinboththestatetransitionand themeasurementsystems.Unfortunatelyinengineering,mostofthesystemsare nonlinear. So some attempt must be immediately made for applying this filtering method to the nonlinear systems. So go for the Extended Kalman filter. Thisnon-linearfilterutilizelinearizeprocessandlinearizesthenonlinearsystem around the Kalman filter estimate which is based on the linearized or linear system. So it ispossibletoapplyKalmanfilter(ExtendedKalmanfilter)tothenonlinearspacecraft navigation problems.Linearize process of an Extended Kalman filter is explained inthe next topic. Kalmanfilteringisadigitalsignalprocessingtoolwhichisextensivelyusedin many electric power system applications like voltage and current phasors, voltage flicker, powersystemfrequency,voltagedips,high-impedancefaults,harmonicdistortion, 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 tuneanditisreliableonlyforthesystemswhichisbecauseofuseoflinearizeprocess. ToovercomeabovelimitationofExtendedKalmanfilter,theunscentedtransformation (UT)wasdevelopedasamethodforpropagationofmeanandcovarianceinformation through nonlinear transformations which is more accurate,easier to implement and uses the same order of calculations as linearization in Extended Kalman filter. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering23 4.2.2 LINEARIZE PROCESS: Nonlinear system is modeled as below: = 1(1, 1, 1)

=

(

,

) ~ (0,

) ~ (0,

) NowperformtheTaylorseriesexpansionofstateequationaround1=1^+and

1= 0 to obtain the following: = 1(1^+ , 1, 0) +

1

1^+ (11^+) +

1

1^+ 1 = 1(1^+ , 1, 0) +1(11^+) +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).ItmeansthatwecanapplythestandardKalmanfilterequationstoestimatethe Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering24 stateofthesystem.StandardequationsfordiscretetimeextendedKalmanfilterareas 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+= [(00+)(00+)

] 3.For = 1,2, ., perform the following. (a)Compute thefollowing partial derivative matrices: 1=

1

1^+ 1=

1

1^+(b) Performthetimeupdateofthestateestimateandtheestimationerror covariance as follows:

= 1

1+

1

+ 1

1

1

= 1(1+, 1, 0) (c)Compute the following partial derivative matrices: Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering25

=

^

=

^ (d) Performthemeasurementupdateofthestateestimateandtheestimation error covariance as follows:

=

(

+

)1

+=

+

(

) =

+

[

(

, 0)]

+= (

)

4.3 UNSCENTED KALMAN FILTER: TheExtendedKalmanfilter(EKF)ismostprobablywidelyusedestimation algorithmforthenonlinearsystem.Howevermorethan35yearsofexperienceinthe 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., linearizeprocess.ToovercomethislimitationofExtendedKalmanfilter,theunscented transformation(UT)wasdevelopedtopropagatethemeanandcovarianceinformation 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 approximateaprobabilitydistributionthanitistoapproximateanarbitrarynonlinear 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.Thenafter,thenonlinearfunctionisappliedtoeachsigmapointsinturnto yieldacloudofthetransformedpoints.Thenafter,thestatisticsofthattransformed pointscanbecalculatedtoformtheestimateofnonlinearlytransformedmeanand covariance. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering26 Figure4.4: Principle of UT AlthoughthisUnscentedTransformationmethodbaresasuperficialresemblance toparticlefilters.Thereareseveralfundamentaldifferences.Firstdifferenceisthatthe sigmapointsarenotdrawnatrandombuttheyarechosendeterministicallysothatthey canexhibitcertainspecificproperties(e.g.,haveagivenmeanandcovariance).Asa result,high-orderinformationaboutdistribution canbeeasilycapturedwithafixedand less number of points. Second difference is that the sigma points can be weighted in the waysthatareinconsistentwiththedistributioninterpretationofthesigmapointsina particlefilter.Forexample,weightsonthesigmapointsdonothavetolieinthe range [0,1]. 4.3.2 PROCESS OF UNSCENTED TRANSFORMATION: 1.Beginwiththe-elementvectorwithknownmean^andcovariance.By givenaknownnonlineartransformation = (),estimatethemeanand covariance of denoted as

and

. 2.Form 2 sigma point vectors () as follows: ()=+() = 1, . ,2 ()=()

= 1, . , (+)=()

= 1, . , Where,isthematrixsquarerootofsuchthat()

=and ()

is the row of . Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering27 3.Transform the sigma points as follows: ()= (()) = 1, . ,2 4.Approximate the mean and covariance of as follows:

= 12 () 2=1

= 12 (()

)2=1(()

)

4.4.3 PROPERTIES OF UNSCENTED TRANSFORMATION: The Unscented Transformation has number of important properties are as follows: 1)UnscentedTransformationworkswiththefinitenumberofsigmapoints.Soit naturallylendsitselftobeusedintheblackboxfilteringlibrary.Foragiven model(withappropriatelydefinedtheinputsandoutputs),thestandardroutine canbeusedtocalculatepredictedquantitieswhichisnecessaryforanygiven transformation. 2)The computational cost of an Unscented Transformation algorithm has same order ofmagnitudeasEKF.InUnscentedTransformation,themostexpensive operationsaretocalculatethematrixsquarerootandouterproductsrequiredto 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 multiplicationswhichneededtocalculatethepredictedcovarianceofEKF.This contrastswithothermethodssuchasGaussHermitequadratureinwhichthe required number of the point scales geometrically with number of dimensions. 3)InUnscentedTransformation,anysetofsigmapointswhichencodesthemean and covariance correctly. It also including in the set of equations of weights which calculatestheprojectedmeanandcovariancecorrectlytothesecondorder. Therefore, the estimation process includes second-order bias correction which is thetermoftruncatedsecond-orderfilter,withoutanyneedtocalculateany derivatives.Therefore,theUnscentedTransformationisnotsameasusinga central difference scheme to calculate the Jacobian. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering28 4)TheUnscentedTransformationalgorithmcanbeusedwithdiscontinuous transformations.Thesigmapointscanstraddleadiscontinuityandthushave effectofadiscontinuityontransformedestimate.Theimprovedaccuracyofan UnscentedTransformationcandemonstratedwithpolar-to-Cartesian transformation problem. 4.4.4 UNSCENTED KALMAN FILTERING: TheUnscentedtransformationdevelopedintheprevioussectioncanbe generalizedtogiveanUnscentedKalmanfilter.TheKalmanfilteralgorithmsare attempts to propagate the mean and the covariance of the given system using time update andmeasurementupdateequations.Ifthesystemislinear,thenthemeanandthe covariancecanbeexactlyupdatedusingKalmanfilter.Butifthesystemisnonlinear, thenthemeanandthecovariancecanbeapproximatelyupdatedusinganExtended Kalmanfilter.However,theEKFisbasedonthelinearizationandtheprevioussection showsthattheUnscentedtransformationismoreaccuratethanthelinearizationto propagatethemeansandthecovariance.Therefore,wesimplyreplacetheExtended KalmanfilterequationswithanUnscentedtransformationstoobtaintheUnscented 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+= (00^+)(00^+)

3.TheTimeupdateequationsareusedtopropagatethestateestimateandthe covariance from one measurement time to the next. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering29 (a) Topropagatefromthetimestep( 1)to,firstchoosethesigmapoints

1()withanappropriatechangesandcurrentguessforthemeanandthe covariance of

are 1^+ and 1+ respectively: 1()=1^++() = 1, . ,2 ()=(1+)

= 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 .

^= 12

^() 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:

= 12(

^() 2=1

^)(

^()

^)

+1 4.Nowafterthetimeupdateequationsaredone,weimplementthemeasurement update equations. (a) Choosethesigmapoints

()withanappropriatechangeandcurrentguessfor 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 pointswecanreusethatsigmapointswhichareobtainedinthetimeupdate equations. This will save the computational efforts. (b) Usetheknownnonlinearmeasurementequation(. )totransformthesigma points into

^() vectors (predicted measurements):

^()= (

^(),

) Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering30 (c)Combine the

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

^= 12

^() 2=1 (d) Estimate the covariance of the predicted measurement. However, we should addthe

totheendoftheequationfortakingthemeasurementnoiseintothe account:

= 12(

^() 2=1

^)(

^()

^)

+

(e)Estimate the cross covariance between

^ and

^as follows:

= 12(

^() 2=1

^)(

^()

^)

(f)The measurement update of the state estimate can be performed using the normal Kalman filter equations.

=

1

^+=

^+

(

^)

+=

Intheabovealgorithm,weassumethattheprocessandthemeasurement equationsarelinearw.r.tthenoise.Butingeneral,theprocessandthemeasurement equationsmayhavenoisethatenterstheprocessandthemeasurementequations nonlinearly. That is, +1 =(

,

,

,

)

=

(

,

,

) Inthiscase,theUnscentedKalmanfilteralgorithm(representasabove)isnotrigorous becauseittreatsthenoiseasanadditive.Tohandlethissituation,wecanaugmentthe 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)00] Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering31 0+= [[(00^)(00^)

] 0 00 000 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 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering32 4.5 APPLICATION OF KALMAN FILTER IN POWER SYSTEM: ApplicationsofKalmanfilterindifferentfieldsarediscussedabove.Likethat Kalman filter have also have various applicationsin power system likeKalman filtering wouldbeinvestigatedforitspotentialdetection,classificationandtrackingofthe 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 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering33 CHAPTER 5 HARMONIC DETECTION THEOREY5.1 THE DISCRETE FOURIER TRANSFORM (DFT): 5.1.1 INTRODUCTION:TocomputetheFouriertransform(FT)numericallyinthecomputer, 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 denotedas[0],[1],[2],, [],, [ 1].SotheFourierTransformoriginal signal () would be written as: () = ()

+ Wecanregardeachsamples[]asanimpulsehavingarea[].Then,sincethe integrand exists only at the sample points: () = ()

(1)0 = [0]0 + [1] ++ [] ++ [ 1](1) i.e., () = [] 1=0 ContinuousFouriertransformcanbeevaluatedoverafiniteintervalratherthan from to + if the waveform is periodic. Sinceoperationtreatsthedataasitareperiodic,wecanevaluatetheDiscrete Fouriertransformequationforafundamentalfrequency(onecyclepersequence, 1

Hz, 2

rad/sec.) and its harmonic components (with considering the dc component at = 0). Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering34 i.e. set = 0, 2

, 2

2,. 2

,. 2

( 1)or, in general, [] =1

[]2

1=0 ( = 0 ( 1)) TheDiscreteFouriertransformalgorithmisknownasthebasicestimation algorithmwhichisappliedtomanyapplicationsinthepowersystemforphasor measurement and harmonic analysis. Improper application of DFT algorithmcan lead to theincorrectresults.Sosomebasicconditionsorassumptionshavetobecarriedout 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.Thesamplingfrequencyofanysignalmustbeequalorgreaterthantwicethe highest frequency for getting correct information about the signal. iv. Each frequencies in the signal is an integer multiple of fundamental frequency. InDFT,basicallythefundamentalfrequencyisreciprocalofthewindowlengthofdata (). 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. Aliasingeffectcaneliminatedbyincreasingthesamplingfrequency(

). Generallyaliasingeffectoccursatthehigherfrequencies(i.e.,athigherorderharmonic components). Hence the DFT spectrum may be erroneous. Thetermleakagedefinesastheapparentspreadingoftheenergyfromone frequencytotheadjacentfrequencies.Leakageeffectcanarisesduetotheimproper selectionofthewindowwidth.Theresultingerroriscalledasspectralleakage.The DFTofsuchasampledwaveformindicatenon-zerovaluesforalloftheharmonic frequencies (called inter harmonic frequency). Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering35 Thepicket-fenceeffectoccursifananalyzedwaveformincludesthefrequency which is not one of thediscrete 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): ANeuralNetworkistheartificialrepresentationofthehumanbrain,tryingto simulate the learning process. Anartificial neural network(ANN) oftencalled as neural networkorsimplyneuralnetwork(NN)whichisthemostgenericformofanArtificial Intelligence. Thewordneuralnetworkisreferredtothenetworkofbiologicalneuronsina 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 tothe brain. These are calledas biological neurons. Similar types of neurons are created artificially called as artificial neurons. By using some computational modelsormathematicalmodels,artificialneuronstrytoprocessinformationand compute the solution for required problems. Theartificialneuronsaresimpleprocessingelementswhichsharingsome properties of the biological neurons. By interconnectingartificial 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. Neuralcomputingisthelargenumberofhighlyinterconnectedprocessing 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. Learninginthebiologicalsystemsinvolvesanadjustmentofthesynaptic connectionswhichexistingbetweenneurons.SimilarlyinanANN,theneuronsare configuredforsomespecificproblemslikepatternrecognitionordataclassification through learning process. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering36 5.2.2 WHY NEURAL NETWORK: ANeuralnetworksusesdifferenttypesofparadigmforcomputing.ANeural networks are based on parallel architecture of the biological brains, which has properties ofprocessingormemoryextractionlikeahumanthinkingprocess.Conventional computersaregoodforthefastarithmeticanddowhataprogrammeraskstodobut conventionalcomputershavepitfallsinsomecaseslikeanoisydataordatafroman environmentandmassiveparallelism.Changesincircumstancesarenotpossiblewith conventionalcomputers.Thesepitfallscomeintoapictureanditneedforsuch algorithms which lead all these backdrops and find out some solutions that what the user needs. ANeuralnetworkhelpsustofindoutthesolutionwherethereisnotdefinitean algorithmsolution,onlyifwehavealotofexamplesthatcanexpectbehaviorofthe 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 ofmultipleinputsandasingleoutput.Everyinputismodifiedbyaweight,whichis multiplierandmultipleswiththeinputvalue.Aneuroncombinesalltheseweighted inputs with the reference to a threshold value and activation function, and use all these for determining its output. Figure5.1: A Model Neuron Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering37 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 themselvesandthetypeofmechanismsusedbyanarraysoftheneuronstoadapttheir behaviortotheexternalstimuli.Sotherearelargenumbersofexperimentalneural network structures which are currently in use reflecting the state of continuing research. Inourcase,weonlydescribethestructure,mathematicsandbehaviorofthat structure called as back propagation network. This is the most generalized and prevalent neural network currently in used. Theprocesstobuildthebackpropagationnetworkisrepresentsinthefollowing fashion.Initially,atstartingtakethenumberoftheneuronsandarraythemforforming 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,amultipleintermediatelayersandfinallyanoutputlayerasshowninfigure5.2. The intermediate layers are which have no inputs or outputs to the external world, called as hidden layers. Usuallyabackpropagationneuralnetworksarefullyconnected.Itmeansthat, 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 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering38 In general, the input layer is considered as a distributor of signals from the external worldandhiddenlayersareconsideredascategorizersorfeaturedetectorsofsuch signals.

=(

+

) The output layer is considered as a collector of a features detected and a producer oftheresponse.Whilethistypeofviewofaneuralnetworkmaybehelpfulina conceptualizing the functions of the layers, we should not take this model too literally as a functions described maynot be so specific or localized.Now with thispicture 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 functionof its inputs.In particular, output of the

neuron in any of the layer can describe by the two sets of equations. Foreveryneuron,isthelayerandforeachofthe inputsarerepresentedas

andthatlayersaremultipliedbythepreviouslyestablishedweightsrepresentedas

. Alltheselayersaresummedtogetherwhichresultingintotheinternalvalueofthe 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

.Thisactivationfunctioniscalledasthesigmoidfunction,whichhaveaninputto output mapping as shown in figure 5.3. The resulting output represented as

is applied asaninputtothenextlayerorifitisthelastlayerthenitisaresponseofaneural network. Neuralyst allows other threshold functions that can used in place of the sigmoid function described here. Figure 5.3:.Sigmoid Function Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering39 A predetermined set of the weights, predetermined set of the threshold values and descriptionofthenetworkstructure(meansdescriptionofthenumberoflayersandthe 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: Learningintheneuralnetworkiscalledastraining.Liketraininginathletics, 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 andactualresponse,anerrorisdeterminedandthatportionispropagatedbackward throughanetwork.Ateachneuroninthenetwork,anerrorisusedforadjustingthe weightsandthethresholdvaluesofaneuron.Sothatnexttime,anerrorinanetwork response will be less or minimize for the same given inputs. Figure 5.4: Neuron Weight Adjustments Thiscorrectiveprocedureiscalledasbackpropagation(sothenameofthe neuralnetwork)anditisappliedcontinuouslyandrepetitivelytotheeachsetofinputs andcorrespondingsetofoutputsproducedinresponsetotheinputs.Thisback propagationproceduretobecontinueaslongasanindividualortotalerrorsinthe 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. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering40 5.2.6 ADALINE: ADALINE (Adaptive Linear Neuron or later Adaptive Linear Element) is a single layerneuralnetwork.ItwasdevelopedbyProfessorBernardWidrow,basedon McCullochPittsneuron.ADALINEsimplyconsistofweights,abiasandsummation functions.MaindifferencebetweentheADALINEandthestandardMcCullochpitts perceptron is in a learning phase in which weights are adjusted according to the weighted sumofinputs.Inastandardperceptron,netispassedtotheactivationtransferfunction 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 periodicsignalcaneasily andsuitablyrepresent intermsofitsfundamentalfrequencyandharmoniccomponentsandthatcanbe 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 theapproximationofsuchthistypeofwaves,mathematicalmodelsareemployed. Consider a voltage waveform with harmonic components can be written as follows:

^() = 0+ [

cos(0) +

(0)]

=1 Where,

and

arethecoefficientsandisthenumberofharmonicspresentin voltagewaveform,0isthefundamentalangularfrequencyandistheinstantof measurement. Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering41 The input on a network is represented as follows: () = [ cos 2 2 .1

]

Where, =2

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. Trainingalgorithmisamaincharacteristicofanartificialneuralnetworkandthe trainingprocessofanADALINEisaprocessofmodifyingtheweightsusingthe Widrow-Hoff delta rule represented as follows: ( +1) = () + ()()()+

()() Where,isa(small)quantitywhichusedtomake +

()() 0.Whenthe 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. () isthecalledaslearningrateandischosenbyGA.Thevalueof()mustbeconsider between 0 2 to ensure the Lyapunov stability and making the tracking error() convergetothezerovalue.Iflargevalueof()ischosen,learningoccursvery quickly but if its value is too large, it may lead to the instability and an errors may even increase.Forfasterconvergenceinthepresenceofarandomnoise,anonlinearweight adaptation algorithm is desirable which is represented as follows: ( + 1) = () + ()()()+

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

Thelearningparametercanbemadeadaptivebyusinganexpressionrepresentedas follows: () =

1+ Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering42 Where,andaretheconstantvalues.WidrowHofflearningruleschangesthenet weights which are direct proportion to the output error and to the inputs of an ADALINE. Thisalgorithmdoesnotneedtocalculatethederivatives.Socomputationbecomes 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: Anapproximatesolutionforthenon-linearfilteringproblemwhichisdefined belowisdevelopedinthissection.Thissolutioninvolveslinearization(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 non-linearitieswiththenoisydatamakesasignal-processingproblemmorechallenging. Insteadofextendingthesolutiontoacontinuouscase,anExtendedKalmanfilter 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,

)arecalledwhitenoiseprocesseswhichare 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/^+ ) +

+1^/++1~/ (5.4) Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering43 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: Toobtainthecompletefilteringalgorithm,updateequationsareneededforthe 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)arecombinedwithequation(5.2)foeproducingthe following expression for an estimation error:

+1/+1=+1++1(+1) ++1

+1++1/+1/^.. (5.9) Onerequiredconditionisthattheestimatemustbeunbiased.Forapplyingthis requirement to equation (5.9) and letting [+1/] = [

] = 0, we obtain +1++1(+1/^ ) +1/^=0.. (5.10) By defining the residualas a difference between the observation and theexpected value of the observation in equation 5.11 1=+1 (+1/^).. (5.11) Bysolvingequation(5.10)for+1andsubstitutingthatresultintoequation(5.6)and combiningittotheequation(5.11),weyieldstheExtendedKalmanfilterestimate equation. +1/+1^=+1/^++1

+1. (5.12 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering44 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) Anerror-updateequationsmaybederived.Bytakingequation(5.10)intoaccount, 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) Thegain+1isnowselectedtominimizecovariance+1.Differentiatingcovariance

+1withrespecttothegain+1andsolvingfor+1whichresultsinadesired 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) Acompletelinearestimateupdateduetothenon-linearmeasurementisgivenby equations(5.15),(5.18)and(5.19).However,theseequationsareimpracticalfor implementation because they depend on the conditional moments of +1 for computing (+1^). Tosimplifythecomputation,wehavetoexpand(+1/+1)intothepower series about +1/^ as follows: (+1/+1) =(+1/^) +(+1/^)(+1/+1+1/^)+... (5.19) where, (+1/^) = ()

+1^/ Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering45 Truncatingtheaboveseriesafterfirsttwoterms,substitutingaresultingapproximation 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 andlinear measurement update for an error covariance. A residual is computed using a non-linear measurement function (), which isevaluatedaboutaprioriestimate+1/^.Anerrorcovarianceisfoundbyusingthe 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/ Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering46 The estimate (state correction) equation: +1/+1^=+1/^++1[+1 (+1/^ )] 5.3.6 HARMONIC DETECTION AND ESTIMATION PROCESS: Asignalisnotexactlyperiodicbecauseamplitudes,frequenciesandphasesare continuouslychangesslowlyoveratime.Soforthatpurposewefirsttakeaperiodic signal() with a zero dc component. So Fourier series representationof the signal can be written as follows: () =

=1sin (k

t +

) Herewe use a discrete time domain (i.e. = 0,1,2, .) rather than acontinuous domain. Asthesignal()isnotexactlyperiodic,butparametersamplitudes

,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 whererepresentedasthenumberofthesignificantharmoniccomponentspresentin signal.Theparametersareonlyestimateduptoorderharmonicsandhigher harmonics are assumed to be negligible. So total 2 of parameters are to be estimated. Nowhere,weareestimatingamplitudesaswellasthefrequencyofharmonic componentspresentsinthesignaluptoorder.Thisrequiresestablishingthe estimatorthatusesboththattheenergyinthefundamentalandinthehigherorder harmonicsforestimatingfrequencyofthesignal.Informationsaboutthefrequency 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 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering47 mustgivemoreweightfortheinformationavailableinthestrongharmoniccomponent and less weight to for the information available in the weak harmonic components. Anestimationofamplitudeoftheharmoniccomponentisalsoassistsinthe estimating of frequency. The estimator determines the frequency of harmonic component byfirstestimatingtheharmonicamplitudeofthatharmoniccomponent.Knowledgeof thefrequencyofharmoniccomponent,themodelcanassistsforthecalculationof amplitudes harmonic components. State space representation of a signal can represented as follows: ( +1) =() +() () = (()) +() = () + () Where, () =[1 () ,2 () . . . . .

() ,1(),2()

() ]

And = [

0 00 1 00 0

] Where,

is an identity matrix of order, (()) =

=1sin (k

t +

) And () is a white Gaussian noise with a zero mean and has a variance represented as follows: [()()

] = Theobservationnoise()isalsoawhiteGaussiannoisewithzeromeanandhasa variance represented as follows: [()()

] = Which is uncorrelated with () can be represented as follows: [()()] = 0 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering48 Herewehavenoisevariancematrixwhichisdiagonal.Fromtheequationof ( +1)inthestatespacerepresentation,wecanconcludedthattheamplitudesof harmonic components are evolving randomly over a time. Also the same argument is true forthefundamentalfrequencyofthesignal.Therateoftherandomwalkcanbe determinedbydiagonalmatrix.Azeromatrixwillcorrespondtotheconstant amplitude,frequencyandthephase.AnExtendedKalmanfilterwillbeappliedfor estimating^(/)or^(/ 1)of()fromthemeasurement ().Here^(/) denotesestimationof()withgivenmeasurementsattimeand^(/ 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))

] Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering49 CHAPTER 6 SIMULATION RESULTS FOR STATE ESTIMATION AND HARMONIC DETECTION6.1 SIMULATION RESULTS FOR STATE ESTIMATION: 6.1.1SIMULATIONRESULTSFOREXTENDEDKALMANFILTER METHODOLOGY: Figure6.1: Plot for original signal and estimated signal using EKF Figure6.2: Combine plot of original and estimated signal Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering50 Figure6.3: Mean square plot for given signal using EKF 6.1.2SIMULATIONRESULTSFORUNSCENTEDKALMANFILTER METHODOLOGY: Figure6.4: Plot for original signal and estimated signal using UKF Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering51 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 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering52 6.2.2WAVEFORMSOFLOADVOLTAGEANDCURRENTFOR SIMULATION: 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 Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering53 Figure6.10: FFT analysis of Current waveform 6.2.4 SIMULATION RESULTS FOR DFT METHODOLOGY: Figure6.11: Voltage Harmonic detection using DFT Harmonic Detection And Estimation Using Kalman Filter 2014-15 SCET ME Electrical Engineering54 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}