UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

High impedance fault detection in power distribution systems with impedance-based methods in frequency… Liang, Zhibang 2016

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
24-ubc_2016_november_liang_zhibang.pdf [ 2.25MB ]
Metadata
JSON: 24-1.0319264.json
JSON-LD: 24-1.0319264-ld.json
RDF/XML (Pretty): 24-1.0319264-rdf.xml
RDF/JSON: 24-1.0319264-rdf.json
Turtle: 24-1.0319264-turtle.txt
N-Triples: 24-1.0319264-rdf-ntriples.txt
Original Record: 24-1.0319264-source.json
Full Text
24-1.0319264-fulltext.txt
Citation
24-1.0319264.ris

Full Text

HIGH IMPEDANCE FAULT DETECTION IN POWER DISTRIBUTION SYSTEMS WITH IMPEDANCE-BASED METHODS IN FREQUENCY DOMAIN by  Zhibang Liang  B.Eng., Sun Yat-sen University, 2013  A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF  MASTER OF APPLIED SCIENCE in THE FACULTY OF GRADUATE AND POSTDOCTORAL STUDIES (ELECTRICAL AND COMPUTER ENGINEERING)  THE UNIVERSITY OF BRITISH COLUMBIA (Vancouver)  October 2016  © Zhibang Liang, 2016 ii  Abstract    High Impedance Faults (HIFs) in electrical distribution systems generally present serious public safety hazards, utility liability problems and equipment damage due to a risk of arcing ignition of fires. However, it is extremely difficult to detect HIFs in electrical distribution systems by conventional overcurrent relays or fuses because they do not generate enough fault current to be detectable.      This thesis presents a new detection scheme for HIFs in electrical distribution systems based on observing the harmonic content in the one-sided amplitude spectrum of the impedance. The proposed new HIF detection algorithm can distinguish HIF events from other non-fault events with current waveforms that similar to HIF current waveforms. Four simulation cases have been tested in this thesis to verify the new HIF detection algorithm. The simulation results indicate a potential ability to establish a high impedance fault detection function block in BC Hydro’s distribution system protective devices.  iii  Preface     This research project is a continuation of the line of research of my supervisor Dr. Jose Marti in identifying impedances online from sampled voltage and current waveforms. Previously this method was applied in the Master’s thesis of Shima Shoaje for online load disaggregation and in an undergraduate project for the detection of high impedance faults. In the present thesis, I have further extended the fault detection algorithm and tested the proposed high impedance fault detection algorithm using simulation software. This project was performed under the sponsorship of BC Hydro under the MITACS Accelerate Grant “High Impedance Fault Detection System”. In addition, I have been responsible for literature research, running simulations, analyzing research data, and writing the thesis manuscript. My research supervisor, Prof. Jose Marti, has provided the topic, guidance, and feedback during the process of performing the research and writing the thesis.   iv  Table of Contents  Abstract .......................................................................................................................................... ii Preface ........................................................................................................................................... iii Table of Contents ......................................................................................................................... iv List of Tables ................................................................................................................................ vi List of Figures .............................................................................................................................. vii List of Abbreviations .....................................................................................................................x Acknowledgements ...................................................................................................................... xi Dedication .................................................................................................................................... xii Chapter 1: Introduction ................................................................................................................1 1.1 High Impedance Fault ..................................................................................................... 1 1.1.1 Definition of High Impedance Fault ........................................................................... 1 1.1.2 Characteristics of High Impedance Fault .................................................................... 2 1.1.3 Importance of High Impedance Fault Detection ......................................................... 5 1.2 Literature Review............................................................................................................ 6 1.2.1 Review of HIF Models................................................................................................ 7 1.2.2 Review of HIF Detection Techniques....................................................................... 12 1.3 Research Objective ....................................................................................................... 14 1.4 Thesis Outline ............................................................................................................... 14 Chapter 2: New HIF Detection Method .....................................................................................16 2.1 Basis of Algorithm ........................................................................................................ 16 2.2 Discrete Fourier Transform........................................................................................... 16 v  2.2.1 Definition of the DFT ............................................................................................... 16 2.2.2 Important Properties of the DFT ............................................................................... 18 2.2.3 Spectral Leakage of the DFT .................................................................................... 20 2.3 Proposed Detection Algorithm ..................................................................................... 21 2.3.1 Algorithm Description .............................................................................................. 21 Chapter 3: Simulation Analysis ..................................................................................................24 3.1 Circuit Simulation Design............................................................................................. 24 3.1.1 Selected HIF Model .................................................................................................. 24 3.1.2 Simulation Setting ..................................................................................................... 26 3.2 Simulation Circuits and Results Analysis ..................................................................... 27 3.2.1 Case A – High Impedance Fault (HIF) Case ............................................................ 27 3.2.2 Case B – Load Switching (LS) Case......................................................................... 33 3.2.3 Case C – Normal Operation without Disturbances ................................................... 43 3.2.4 Case D – Capacitor Switching Case ......................................................................... 51 3.3 Summary of Simulation Cases ...................................................................................... 56 3.4 Fast Fourier Transform (FFT) ....................................................................................... 58 Chapter 4: Conclusions ...............................................................................................................60 4.1 Contributions................................................................................................................. 60 4.2 Future Work .................................................................................................................. 61 Bibliography .................................................................................................................................62 Appendices ....................................................................................................................................69 Appendix A MATLAB Source Code for the HIF Detection Algorithm with DFT.................. 69 Appendix B MATLAB Source Code for the HIF Detection Algorithm with FFT .................. 74 vi   List of Tables  Table 1-1 Typical fault currents on different surfaces at 12.5kV feeder [4]. ................................. 2 Table 3-1 Parameters of simplified Emanuel HIF model. ............................................................ 25 Table 3-2 Load parameters for Case A. ........................................................................................ 28 Table 3-3 Impedance parameters for Case A. ............................................................................... 29 Table 3-4 Matlab source code of DFT. ......................................................................................... 31 Table 3-5 Parameters of circuit elements for Case D. .................................................................. 51    vii  List of Figures Figure 1-1 A typical high impedance fault on sand [5]. ................................................................. 2 Figure 1-2 Current and voltage during electric arc [7]. .................................................................. 4 Figure 1-3 Voltage-current characteristics during electric arc [7]. ................................................. 4 Figure 1-4 Rich harmonic content of HIF current [8]..................................................................... 5 Figure 1-5 The Emanuel HIF model proposed in 1990 [13]. ......................................................... 7 Figure 1-6 HIF model proposed in 1993......................................................................................... 8 Figure 1-7 HIF model presented in 1996 [15]. ............................................................................... 8 Figure 1-8 HIF model proposed in 2001 [16]. ................................................................................ 9 Figure 1-9 Simplified Emanuel model of HIF proposed in 2003. ................................................ 10 Figure 1-10 The HIF model proposed in 2004 [18]. ..................................................................... 11 Figure 1-11 New HIF model based on several Emanuel arc models [12]. ................................... 11 Figure 2-1 Complex-conjugate property for N is (a) an even number and (b) an odd number [38]........................................................................................................................................................ 19 Figure 2-2 Flowchart of proposed HIF detection algorithm. ........................................................ 23 Figure 3-1 HIF model applied in this thesis.................................................................................. 25 Figure 3-2 Simulated V-I curve of selected HIF model. .............................................................. 26 Figure 3-3 Simulation setting of EMTPWorks. ............................................................................ 27 Figure 3-4 Source equivalent parameters of a BC Hydro’s distribution feeder. .......................... 28 Figure 3-5 Case A: Simulation circuit with HIF. .......................................................................... 29 Figure 3-6 Voltage waveform at location m6 for Case A (HIF). .................................................. 30 Figure 3-7 Current waveform at location m2 for Case A (HIF). .................................................. 30 Figure 3-8  One-sided amplitude spectrum of the voltage 𝒗(𝒇) for Case A (HIF). ..................... 31 viii  Figure 3-9 One-sided amplitude spectrum of the current 𝒊(𝒇) for Case A (HIF). ........................ 32 Figure 3-10 One-sided amplitude spectrum of the impedance 𝒁(𝒇) for Case A (HIF)................ 33 Figure 3-11 Case B: Simulation circuit with a load switching. .................................................... 34 Figure 3-12 Voltage waveform at location m6 for Case B (load switching). ............................... 34 Figure 3-13 Current waveform at location m2 for Case B (load switching). ............................... 35 Figure 3-14 Comparison of the time domain signals between Case A (HIF) and Case B (load switching). ..................................................................................................................................... 36 Figure 3-15 One-sided amplitude spectrum of the voltage 𝒗(𝒇) for Case B (load switching). .... 37 Figure 3-16 One-sided amplitude spectrum of the current 𝒊(𝒇) for Case B (load switching). ..... 38 Figure 3-17 Comparison of the frequency domain signals between Case A (HIF) and Case B (load switching). ..................................................................................................................................... 39 Figure 3-18 One-sided amplitude spectrum of the impedance 𝒁(𝒇) for Case B (load switching)........................................................................................................................................................ 40 Figure 3-19 Comparison of one-sided amplitude spectrum of impedance 𝒁(𝒇) for Case A and Case B. ................................................................................................................................................... 41 Figure 3-20 One-sided amplitude spectrum of impedance 𝒁(𝒇) for Case A (HIF) with highlighted points. ............................................................................................................................................ 42 Figure 3-21 One-sided amplitude spectrum of impedance 𝒁(𝒇) for Case B (LS) with highlighted points. ............................................................................................................................................ 43 Figure 3-22 Case C: Simulation circuit with normal operation (no disturbances). ...................... 44 Figure 3-23 Voltage waveform at location m6 for Case C (no disturbances). ............................. 45 Figure 3-24 Current waveform at location m2 for Case C (no disturbances). .............................. 45 ix  Figure 3-25 Comparison of time domain signals between Case A (HIF) and Case C (no disturbances). ................................................................................................................................ 46 Figure 3-26 One-sided amplitude spectrum of the voltage 𝒗(𝒇) for Case C (no disturbances). .. 47 Figure 3-27 One-sided amplitude spectrum of the current 𝒊(𝒇) for Case C (no disturbances). ... 48 Figure 3-28 Comparison of frequency domain signals between Case A (HIF) and Case C (no disturbance). .................................................................................................................................. 49 Figure 3-29 One-sided amplitude spectrum of the impedance 𝒁(𝒇) for Case C (no disturbance)........................................................................................................................................................ 50 Figure 3-30 Case D: Simulation circuit with a capacitor switching event. .................................. 51 Figure 3-31 Voltage waveform at location m1 for Case D (capacitor switching). ....................... 52 Figure 3-32 Current waveform at location m2 for Case D (capacitor switching). ....................... 53 Figure 3-33 One-sided amplitude spectrum of the voltage 𝒗(𝒇) for Case D (capacitor switching)........................................................................................................................................................ 54 Figure 3-34 One-sided amplitude spectrum of the current 𝒊(𝒇) for Case D (capacitor switching)........................................................................................................................................................ 54 Figure 3-35 One-sided amplitude spectrum of the impedance 𝒁(𝒇)  for Case D (capacitor switching). ..................................................................................................................................... 55 Figure 3-36 Summary of One-sided amplitude spectrum of the impedance 𝒁(𝒇) for the four cases........................................................................................................................................................ 57 Figure 3-37 One-sided amplitude spectrum of the impedance 𝒁(𝒇) for Case A (HIF) calculated by FFT ................................................................................................................................................ 59  x  List of Abbreviations AEKF Adaptive Extended Kalman Filter ANN Artificial Neutral Network DC Direct Current DFT Discrete Fourier Transform DWT Discrete Wavelet Transform EDS Electrical Distribution System EMTP Electromagnetic Transient Program EMTP-RV Electromagnetic Transient Program-restructured Version FFT Fast Fourier Transform GUI Graphical User Interface HIF High Impedance Fault LS Load Switching PNN Probabilistic Neutral Network TACS Transient Analysis of Control Systems TVR Time-varying Resistance V-I Voltage-current   xi  Acknowledgements     I would like to offer my enduring gratitude to the faculty, staff and my fellow students at UBC, who have inspired me to continue my work in this field. I owe particular thanks to my research supervisor, Dr. Jose Marti, for his patient guidance, strong academic support and warm encouragement during my master study at UBC.      I would also like to thank my thesis committee members: Dr. Jose Marti, Dr. Martin Ordonez and Dr. Christine Chen.      I deeply thank engineers in BC Hydro and Powertech for their strong technical supports. Their expertise in BC Hydro’s electrical distribution system has made this work become possible.      I owe special thanks to my dear parents, who have supported me throughout my years of education, both morally and financially. xii  Dedication        To my dear parents and grandparents. 1  Chapter 1: Introduction    Fast reliable detection of high impedance fault (HIF) in electrical distribution systems (EDS) is a persistent challenge to electric utilities. Conventional overcurrent relays or fuses fail to detect HIFs because their fault currents are very small. The main goal of this thesis is to develop a new reliable HIF detection algorithm for electrical distribution systems.   1.1 High Impedance Fault    The nature of HIFs has been a topic of interest since the early 1970’s with the hope of finding some distinguishing characteristics in the waveforms for practical detections [1]. This section provides a brief overview of HIF in EDS.  1.1.1 Definition of High Impedance Fault    A high impedance fault (HIF) occurs when an energized primary conductor comes in contact with a semi-insulated object such as tree, structure or equipment, or touches the earth’s surface such as asphalt, concrete, grass, sod, and sand. These surfaces impose very high impedance and limit fault currents to very small values [2]. The majority of high impedance faults occur at distribution voltages of 15kV and below, with the problem getting worse at the lower voltages. The problem is less severe at 25kV and above, but HIFs can occur at these voltages as well [1].     Normally, HIF has a low current magnitude ranging from a few mA to 75A [3]. Table 1-1 shows typical fault current levels for different common surfaces. Figure 1-1 shows a typical high impedance fault on sand.  2  Surface Current (A) Dry asphalt 0 Wet sand 15 Dry sod 20 Dry grass 25 Wet sod 40 Wet grass 50 Reinforced concrete 75 Table 1-1 Typical fault currents on different surfaces at 12.5kV feeder [4].   Figure 1-1 A typical high impedance fault on sand [5].  1.1.2 Characteristics of High Impedance Fault    Two main characteristics of high impedance faults are low values of fault currents and the presence of arcing phenomena. The first main characteristic is due to the fact that these faults have 3  an impedance high enough in the fault path which limits the fault currents to very low values. This characteristic makes HIFs difficult to be detected by conventional over-current protection devices.     The presence of arcing phenomena, the second main characteristic of high impedance faults, is a result of existence of air gap between conductor and a semi-insulated object or earth’s surface. The air gap between the conductor and a semi-insulated object or earth’s surface creates a large electrical potential difference over a short distance due to the gradient difference in the electric field. When the voltage on conductor accumulates to a specific magnitude in each half-cycle, the air gap begins to break down and an arcing is produced. The experiments of [6] discover that the arc current begins to flow when the arc voltage reaches a breakdown voltage level of an air gap, and it remains flowing after the arc voltage becomes smaller than the breakdown voltage level and until satisfaction of an equal-area criterion. The voltage across the arc keeps constant when arc current flows. The arc can reignite during the following half cycle as long as the voltage reaches the breakdown voltage level again.  According to [7], the dynamic characteristics of arcs can be represented as in Figure 1-2 and Figure 1-3. The arcing phenomena makes high impedance fault currents that are rich in harmonics content. According to [8], HIF current has a large percent of odd harmonics resulting from HIF arcing activities. The upper plot of Figure 1-4 demonstrates a HIF current on bare ground while the lower plot demonstrates the percentage of odd harmonics of the HIF current [8]. 4   Figure 1-2 Current and voltage during electric arc [7].   Figure 1-3 Voltage-current characteristics during electric arc [7]. 5   Figure 1-4 Rich harmonic content of HIF current [8].     High impedance faults are also accompanied with random and dynamic behaviors. The arcing fault tends to generate heat to reduce moisture on most ground surfaces. The high temperature due to fault-generated heat may cause chemical reactions that alter surface conductivity. Fault current magnitude changes as the surface conductivity changes. Different seasons and different times of day can also affect ground surface conductivity. These dynamic characteristics change the level and content of HIF currents and make HIF detection a random process [8].   1.1.3 Importance of High Impedance Fault Detection    Because the impedance at the fault point is extremely high, the fault current almost does not cause an evident change in magnitude and leads to the failure of detection by conventional overcurrent relay. When high impedance fault happens, energized high voltage conductor may fall within reach of personnel and threaten life safety of humans or animals. Also, high impedance faults are usually associated with arcing at the point of contact and they present a serious public 6  safety hazard and a risk of arcing ignition of fires or melting of switch gear, equipment damage, etc. Therefore, from both public safety and power system operational reliability viewpoints, detection of high impedance faults is critically important [9].     Detection of high impedance faults with high reliability is a challenge for electric utilities. In power system protection, the reliability is measured by dependability and security. A high level of dependability happens when the faults can be correctly detected while a high level of security happens when the faults are not falsely indicated. The most popular HIF detection technique involves the adjustment of overcurrent protective devices [10], but this design has led into several unexpected service interruptions because the electric current level resulting from HIFs cannot be differentiated from other non-fault events in the power system [11], which affects the security of power system. A higher dependability forces a lower security level and vice versa. Therefore, the dilemma is to develop a sensitive high impedance fault detection technique with conserving on the power system protection security.  1.2 Literature Review    The problem of HIF detection in electrical distribution system has been a long-standing challenge to power industry. This section reviews the major contribution to the HIF detection field throughout a 55-year period, from 1960 up to 2015, from HIF modeling to HIF detection algorithms.  7  1.2.1 Review of HIF Models    An accurate simulation of HIF is essential for the development of effective HIF detection algorithms. The data of HIF model should reflect the complex characteristics of HIF such as    nonlinearity, asymmetry, and include random and dynamic qualities of arcing phenomena.       According to [12], HIF models can be divided into 2 groups. The first group is based on Emanuel model that was proposed in 1990 based on the sparks nature when the conductor makes contact with the ground [13]. The other HIF models can be regarded as the second group.  Figure 1-5 The Emanuel HIF model proposed in 1990 [13].      In 1990, Emanuel et al. introduced a HIF model consisting of two DC sources connected anti-parallel with two diodes to simulate the non-linear characteristics of voltage and current of HIF as seen in Figure 1-5. This model is based on laboratory measurements as well as theoretical components. In 1993, this model was improved for considering the nonlinearity in earth impedance. Resistance and inductance of Emanuel HIF model were replaced with two nonlinear resistances [14] as seen in Figure 1-6. 8   Figure 1-6 HIF model proposed in 1993.   Figure 1-7 HIF model presented in 1996 [15].      In 1996, David Chan et al. proposed a model formed of nonlinear impedance, time variable voltage power supplies and Transient Analysis of Control Systems (TACS) controlled switch based on the arc theory [15]. As shown in Figure 1-7, Switch 3 is a TACS controlled switch to control the arc re-ignition and extinction, and Switch 1 and 2 are conventional time-controlled 9  switches to isolate the feeder from the load and connect to the fault path. For the inputs, 𝑉𝑟 is the arc re-ignition voltage, 𝑉𝑚 is the peak value of applied voltage and 𝑉𝑟 is arc voltage. 𝑇𝑎 is the time from the applied voltage zero crossing to arc re-ignition point and ∆𝑡 is the time of arc conduction in one half cycle [15].   Figure 1-8 HIF model proposed in 2001 [16].     In 2001, S. R. Nam et al. presented a modeling method of HIF characteristics, i.e. buildup and shoulder as well as nonlinearity and asymmetry. The proposed HIF model employs two series time-varying resistances (TVRs) controlled by TACS in Electromagnetic Transient Program (EMTP) shown in Figure 1-8. One of the TVRs is used for modeling nonlinearity and asymmetry from the voltage-current characteristic for one cycle in the steady state after a HIF fault and the other TVR is used to represent buildup and shoulder characteristic from the waveforms in transient state after HIF [16]. 10     In 2003, a simplified Emanuel model based on arcing in sandy soil was proposed by T.M. Lai et al. [17] which is shown in Figure 1-9 Simplified Emanuel model of HIF proposed in 2003Figure 1-9. The two DC sources represent the inception voltage of air in soil and/or between trees and the distribution line. The two unequal resistances, R1 and R2, represent the fault resistances and the unequal values can generate asymmetric fault currents. When the phase voltage is higher than the positive DC voltage DC1, the fault current flows towards the ground. When the voltage is lower than the negative DC voltage DC2, the fault current reverses. For values of the phase voltage between DC1 and DC2, no fault current flows [17].   Figure 1-9 Simplified Emanuel model of HIF proposed in 2003.       In 2004, a more dynamic and random HIF model is presented by Yong Sheng and Steven M. Rovnyak [18], as shown in Figure 1-10. The model consists of a nonlinear resistor, two diodes and two DC sources that change amplitudes randomly every half cycle [18]. 11   Figure 1-10 The HIF model proposed in 2004 [18].      In 2010, a new HIF model proposed by A.R. Sedighi et al. used several Emanuel arc models in parallel to produce HIF current [12]. This model is shown in Figure 1-11. It applies STATISTIC switch in EMTP to produce the random state of HIF. The state of on and off on arc is demonstrated   Figure 1-11 New HIF model based on several Emanuel arc models [12]. 12  in Figure 1-11 in the sixth arc model. Arc parameters in this model depend on recorded current and voltage data [12].   1.2.2 Review of HIF Detection Techniques    The problem of HIF detection has long been recognized by the industry and many detection algorithms have been proposed in the literature in the past two decades.     In 1997, K.J Zori et al. proposed an algorithm based on the harmonic analysis of the bus voltage signals [19]. Through spectral analysis the arc voltage has been estimated by means of the least squares error technique. The main feature of this algorithm is that it is fast enough and possesses simplicity, but it can work only with the third harmonics of the line terminal voltages [19].     In 2004, Stoupis et al. introduced a new relay developed by ABB with new algorithms in the area of artificial intelligence: Artificial Neutral Networks (ANN), Discrete Wavelet Transform (DWT) and higher-order statistics algorithm [20]. In 2005, Sedighi et al. proposed a combined method to HIF classification which includes feature extraction using wavelet transform and classification using soft computing methods [21]. In 2006 GE Protection & Control Journal, Mark Adamiak et al. applied expert system pattern recognition on the harmonic energy levels on the currents in the high impedance arcing fault [22]. Latter, Daqing Hou presented a HIF detection algorithm using an SDI (Sum of Difference Current) quantity that revealed signatures of HIFs while remaining generally free of disturbance by distribution loads [23].    With the advancement of Smart Grid, the availability of measuring different parameters of power grid at several point along the monitored distribution networks (DNs) has encouraged the development of applying digital processing techniques in HIF detection, as for instance those based on the fault- introduced transient analysis [24] [25] [26]. In 2007, a novel technique based 13  on extracting HIF features by Discrete Wavelet Transform (DWT) for detecting a high impedance arcing fault due to a leaning tree was introduced [25]. In 2009, Samantaray et al. presented an intelligent approach for HIF detection in distribution network under non-linear loading condition using combined Adaptive Extended Kalman Filter (AEKF) and probabilistic neutral network (PNN) [27]. The AEKF is used to estimate the harmonic components of the corresponding HIF and NF (no-fault) current signals under non-linear loading and used as features for training and testing the PNN [27].     In 2012, a new technique for HIF detection using combined Extended Kalman Filter and random forest was introduced by Samantaray [28], which could detect HIF with reliability more than 99% compared to 90% with existing DT(decision tree) based technique [18]. In the same year, a new HIF detection algorithm using Phasor Measurement Unit (PMU) was proposed. The algorithm is based on changing of third harmonic current phasor and HIF detection index acquires with summation of error between current samples and estimated samples [29]. In 2013, Lopes et al. presented a transient based approach to diagnose HIF on smart distribution networks [30]. This approach does not require any information regarding the feeder data and loads along the system and uses the DWT to monitor fault-induced transients at strategic points of the power system, taking advantages of available Smart Grid communication channels. It analyzes signal high frequency components that propagate along the feeders after the fault inception by continuously computing the energy spectrum of detail-wavelet coefficients [30]. In 2014, Torres et al. proposed a new model for representing HIFs in distribution system and a new detection algorithm based on the harmonic analysis of current waveforms and certain logic aimed at discriminating HIFs from other phenomena in distribution system [31]. In 2015, Andrea Marti et al. presented a HIF detection algorithm in their report of UBC Capstone Project. Their HIF detection algorithm can 14  distinguish HIF from open circuit or normal load condition by observing admittance magnitudes in frequency domain [32].   1.3 Research Objective     The research in this thesis is originated from the Mitacs Accelerate project sponsored by BC Hydro. BC Hydro is the 3rd largest electrical utility in Canada, providing service to over 94% of BC. It has been powering our province’s homes and businesses for close to 50 years. The research objective is to develop a new HIF detection algorithm to differentiate between the cases with HIFs and non-fault states with load currents that behave similar to the HIF current waveform. It is hoped that the proposed HIF detection algorithm can be implemented in BC Hydro’s distribution system protective devices with sufficient embedded computing capabilities to help BC Hydro to identify HIFs more accurately and effectively improve the security and safety of BC Hydro’s electrical distribution system.    1.4 Thesis Outline This thesis consists of four chapters.  Chapter 1 provides an overall introduction to high impedance faults (HIFs) such as its definition, characteristics, HIF models and importance of detecting HIFs. A literature review of previous HIF detection algorithms in the past 55 years is included in Chapter 1.  A new HIF detection algorithm is presented in Chapter 2, which is based on observing the harmonics content of one-sided amplitude spectrum of the ratio of voltage to current in frequency domain by using discrete Fourier transform (DFT). 15     In Chapter 3, the experimental design of simulation, setup of simulation parameters as well as the simulation experiment results are presented and discussed. Four cases were simulated in Chapter 3, and they are HIF case, load switching, capacitor switching and normal operation without disturbances. Chapter 4 concludes the thesis by summarizing the major contributions and provides discussions on possible future work.  16  Chapter 2: New HIF Detection Method     This chapter proposes a new HIF detection algorithm based on discrete Fourier transform (DFT). Impedance identification based on voltage and current time series were introduced in [33] and applied to HIF identification in [32]. Unlike previous detection algorithms that observe only the current signal or voltage signal, the new HIF detection algorithm observes both current signal and voltage signal to calculate the impedance magnitude in the frequency domain.   2.1 Basis of Algorithm    As shown in Figure 1-3 in Chapter 1, the voltage-current characteristics curve (V-I curve) of the electric arc during an HIF event shows a strong nonlinear relationship. Based on this characteristic, a new HIF detection algorithm is proposed to observe the harmonic content of the ratio of voltage to current in the frequency domain by using discrete Fourier transform (DFT).   2.2  Discrete Fourier Transform 2.2.1 Definition of the DFT     The discrete Fourier transform (DFT) converts discrete data from time domain to frequency domain. It is a mathematical procedure that can determine the harmonic content of a discrete time sequence [34].  The Fourier transform is originally defined for continuous time signals     𝑋(𝑓) =  ∫ 𝑥(𝑡)𝑒−𝑗2𝜋𝑓𝑡𝑑𝑡∞−∞ (2.1) However, in practice data information are obtained by digital sampling rather than by analog processing. The DFT of the finite-duration discrete-time signal  𝑥(𝑛) of length N is defined as 17   𝑋(𝑘) =  ∑ 𝑥(𝑛)𝑒−𝑗(2𝜋𝑁 )𝑘𝑛𝑁−1𝑛=0, 𝑘 = 0, 1, … ,𝑁 − 1 (2.2) where 𝑛 is the time index, 𝑥(𝑛) is a discrete sequence of time-domain sampled values of the continuous variable 𝑥(𝑡), 𝑘 is the frequency index, and 𝑋(𝑘) is the kth DFT coefficient. Equation (2.2) is called the analysis equation for calculating the spectrum from the time-domain signal [35]. The frequency resolution of the DFT is the space between two successive 𝑋(𝑘), which is expressed as   ∆𝑓 =1𝑇𝑤=𝑓𝑠𝑁                 (2.3)  where 𝑇𝑤 is the time window length and 𝑓𝑠 is the sampling frequency. The frequency resolution is determined by time window length  𝑇𝑤. In order to prevent aliasing, the sampling frequency 𝑓𝑠 must be greater than twice of the highest frequency in the signal to be analyzed. This theoretically necessary sampling rate is called the Nyquist rate.     Because the DFT coefficient 𝑋(𝑘) is a complex variable, it can be expressed in polar form as  𝑋(𝑘) =  |𝑋(𝑘)|𝑒𝑗∅(𝑘) (2.4) where the magnitude spectrum is defined as  |𝑋(𝑘)| =  √{Re|𝑋(𝑘)|}2 + {Im|𝑋(𝑘)|}2 (2.5) To calculate one-sided amplitude spectrum [36], we have   𝐴𝑘̅̅̅̅ = { 1𝑁|𝑋(0)|,                   𝑘 = 0,2𝑁|𝑋(𝑘)|, 𝑘 = 1,… ,𝑁2 (2.6)  The phase spectrum is defined as 18   ∅(𝑘) ={    𝑡𝑎𝑛−1 {Im[𝑋(𝑘)]Re[𝑋(𝑘)]} ,                   if Re[𝑋(𝑘)] ≥ 0𝜋 + 𝑡𝑎𝑛−1 {Im[𝑋(𝑘)]Re[𝑋(𝑘)]} , if Re[𝑋(𝑘)] < 0   (2.7)  2.2.2 Important Properties of the DFT The DFT has several important properties which can be used to analyze digital signals. Some of them are listed below [37] [38]. (1) Symmetry.               Re[𝑋(𝑁 − 𝑘)] = Re[𝑋(𝑘)]     (2.8)                Im[𝑋(𝑁 − 𝑘)] = −Im[𝑋(𝑘)] (2.9)      (2) Linearity.    If {𝑥(𝑛)} and {𝑦(𝑛)} are digital signals of the same length, then  DFT[𝑎𝑥(𝑛) + 𝑏𝑦(𝑛)] = 𝑎DFT[𝑥(𝑛)] + 𝑏DFT[𝑦(𝑛)] (2.10)  In (2.10), a and b are arbitrary constants. Linearity enables us to analyze complicated composite    signals and systems by calculating their individual frequency components. The overall frequency response is the summation of individual results evaluated at every frequency component [38].  (3) Complex Conjugate.       If the sequence  {𝑥(𝑛), 0 ≤ 𝑛 ≤ 𝑁 − 1} is real valued, then                𝑋(−𝑘) = 𝑋∗(𝑘),            1 ≤ 𝑘 ≤ 𝑁 − 1, (2.11)      where  𝑋∗(𝑘) is the complex conjugate of 𝑋(𝑘) . Defining 𝑀 =𝑁2 if N is an even number, or 𝑀 = 𝑁−12 if N is an odd number, then we have               𝑋(𝑀 + 𝑘) = {𝑋∗(𝑀 − 𝑘), for 1 ≤ 𝑘 ≤ 𝑀 if 𝑁 is even,𝑋∗(𝑀 − 𝑘 + 1), for 1 ≤ 𝑘 ≤ 𝑀 if 𝑁 is odd.   (2.12) 19        Figure 2-1 Complex-conjugate property for N is (a) an even number and (b) an odd number [38].       According to Figure 2-1, the complex-conjugate property indicates that only the first (M +1) DFT coefficients from k = 0 to M are independent and need to be calculated. For complex signals, however, all N complex DFT coefficients carry useful information.  From the symmetry property, the kth DFT output will have the same magnitude as the (N-k)th DFT output. That is,                |𝑋(𝑘)| =  |𝑋(𝑁 − 𝑘)|, 𝑘 = 1,2, … ,𝑀 (2.13) So we obtain that the magnitude spectrum is an even function.  Also, the phase spectrum is an odd function, which is demonstrated in (2.14).                 ∅(𝑘) =  −∅(𝑁 − 𝑘),   𝑘 = 1,2, … ,𝑀 (2.14)  20  2.2.3 Spectral Leakage of the DFT     The DFT is a data processing tool whose input is a sequence of discrete signal and whose output is its digital spectral analysis. The discrete nature of the DFT yields intrinsic quantization errors and sampling artifacts [39]. The sampling period ∆𝑡 is computed from the sampling rate 𝑓𝑠 using  ∆𝑡 =  1𝑓𝑠 (2.15)  The kth output array element in the frequency domain is referred to as a frequency bucket or frequency bin. We can relate the frequency of bin k to the frequency of input signal using  𝑓𝑘 = 𝑘𝑁∆𝑡 (2.16)  where N is the number of samples. To combine (2.15) and (2.16), we have  𝑘 =  𝑁𝑓𝑘𝑓𝑠 (2.17)  Each bin k corresponds to a frequency 𝑓𝑘 and a bin number k is always an integer. Spectral leakage is the situation that spectral components belonging to frequencies between two successive frequency bins propagate to all bins [40].      For example [39], suppose that the number of samples, N=2048 and the sampling rate 𝑓𝑠 is 8000 Hz. For a 400 Hz waveform we expect the maximum amplitude to occur at 𝑘 =𝑁𝑓𝑘𝑓𝑠= 2048 ∗4008000= 102.4. Since a bin number k is always an integer, how can the DFT represent energy at k=102.4? The answer is that the energy leaks between bin k = 102 and k = 103 and this is named as spectral leakage [39]. The problem with spectral leakage can be different for different sampling frequencies. For a signal with 390.625 Hz, its bin k will be 𝑘 =𝑁𝑓𝑘𝑓𝑠= 2048 ∗390.6258000= 100, 21  exactly. Therefore, there is no spectral leakage for some frequencies while there may be a great deal of spectral leakage for other frequencies. In spectral leakage, the energy at one frequency appears to leak out into all other frequencies. This is the frequency-domain rationale for spectral leakage. Spectral leakage occurs only when the sample data set consists of a non-integer number of cycles [41]. To avoid spectral leakage, the sample data set to be analyzed must cover an integer number of periods. That is, when the number of samples per cycle period (signal frequency f) of frequency resolution ∆𝑓 is an integer, the leakage effect is avoided. This can be expressed in (2.18), where f is the frequency of the signal to be analyzed, and ∆𝑓 is the frequency resolution defined in (2.3).  𝑓 = 𝐷 × ∆𝑓 (2.18)                  In order to avoid leakage effect, we should select appropriate ∆𝑓 to ensure that D is an integer.  2.3 Proposed Detection Algorithm    This section proposes a new HIF detection algorithm based on observing the harmonic content of the impedance magnitude.   2.3.1 Algorithm Description    The proposed HIF detection algorithm is based on the analysis of the harmonic content in the impedance amplitude in the feeder in order to determine whether a HIF condition exists. The work presented in this thesis extends the previous work in [32] and presents a clear criteria to identify the harmonic impedance behavior to separate HIFs from other non-fault events with current waveforms that behave similar to HIF current waveforms. The algorithm can be summarized in the following steps: 22   Step 1. Measure time domain signals current  𝑖(𝑡) and voltage 𝑣(𝑡) at the beginning of the feeder.  Step 2. Apply the DFT on the current 𝑖(𝑡) and the voltage 𝑣(𝑡)  waveforms to transform them from time domain to frequency domain 𝑖(𝑓) & 𝑣(𝑓).  Step 3. Calculate the one-sided amplitude spectrum of current |𝑖(𝑓)| and one-sided amplitude spectrum of voltage |𝑣(𝑓)|.  Step 4. Calculate the one-sided amplitude spectrum of impedance |𝑍(𝑓)| by using |𝑣(𝑓)| divided by |𝑖(𝑓)|: |𝑍(𝑓)| =  |𝑣(𝑓)||𝑖(𝑓)| (2.19)  Step 5. Observe the waveform of the one-sided amplitude spectrum of the impedance |𝑍(𝑓)|. If the values of |𝑍(𝑓)| at the location of harmonics keep decreasing as the order of harmonic increases, then it is not an HIF event. Otherwise, it is an HIF event. The flowchart of the proposed HIF detection algorithm is shown in Figure 2-2. 23   Figure 2-2 Flowchart of proposed HIF detection algorithm. 24  Chapter 3: Simulation Analysis This chapter presents the circuit simulation results of an HIF event, a load switching event, a normal operation situation without any disturbances, and a capacitor switching event. The simulations of these events were run in EMTP program. The proposed HIF detection algorithm was implemented in Matlab R2012b.   3.1 Circuit Simulation Design This section has introduced the detailed information of circuit simulation design in EMTP-RV such as simulation parameter setting.     The Electromagnetic Transient Program (EMTP) is a computer program for simulating electromagnetic, electromechanical, and control system transients on power systems. The EMTP-RV software was used for the simulations. EMTPWorks is the user interface for EMTP-RV [42]. The version of EMTPWorks we use in this thesis is EMTPWorks 3.0.  3.1.1 Selected HIF Model    A key factor in developing an HIF detection algorithm is an appropriate model for representing HIFs. The simplified Emanuel HIF model in Figure 1-9 is widely used in many HIF simulation experiments [11] [17] [29] [43], as it combines many of the advantages of previous models and maintains simplicity and accuracy.     The parameters of the simplified Emanuel HIF model are shown in Table 3-1. Figure 3-1 shows the HIF model used in this research thesis.  25  Parameter Value R1 1.44 𝑘Ω R2 1.27 𝑘𝛺 DC1 6.092 𝑘𝑉 DC2 4.911 𝑘𝑉 Table 3-1 Parameters of simplified Emanuel HIF model.   Figure 3-1 HIF model applied in this thesis.  Since 25 kV is the most popular distribution voltage level of BC Hydro’s electrical distribution system, we connected a 25 kV source to the HIF model shown in Figure 3-1 and generated its Voltage-current characteristics curve(V-I curve) in EMTPWorks. The simulated V-I curve is shown in Figure 3-2. Comparing it with the V-I curve during an electric arc shown in Figure 1-3, we found that they are very similar and the range of the simulated current is within the range of 26  the HIF current, which is from a few mA to 75A [3]. Therefore, the assigned parameters in Table 3-1 for the selected HIF model were verified to be correct.    Figure 3-2 Simulated V-I curve of selected HIF model.  3.1.2 Simulation Setting    In order to avoid the spectral leakage problem mentioned in section 2.2.3, the simulation setting must be selected very carefully to meet the requirements of equation (2.18). The time window length 𝑇𝑤 and time step ∆𝑡 are two parameters that can be determined by the users in the EMTP simulation software. The time window length 𝑇𝑤  is the simulation time 𝑡𝑚𝑎𝑥  in the basic simulation options in EMTPWorks. The screenshot of the simulation setting can be seen in Figure 3-3. So we have ∆t = 0.25 𝑚𝑠, 𝑇𝑤 = 250 𝑚𝑠, 𝑓 = 60 𝐻𝑧. And the resolution frequency ∆𝒇 will be ∆𝑓 =1𝑇𝐶= 4 𝐻𝑧. 27      To substitute these parameters into equation (2.18), we make D an integer in equation (2.18), which meets the requirement to avoid the spectral leakage problem.    Figure 3-3 Simulation setting of EMTPWorks.  3.2 Simulation Circuits and Results Analysis Four cases will be simulated in this thesis, which are HIF case, load switching event, normal operation without disturbances, and capacitor switching event.   3.2.1 Case A – High Impedance Fault (HIF) Case    Case A is an HIF case, and the parameters of the source come from a 25 kV feeder of BC Hydro’s distribution system. We choose a feeder WHY_25111 as an example, and its source equivalent parameters are shown in Figure 3-4. The resistance and inductance for the feeder are 28  0.2568 𝑜ℎ𝑚/𝑘𝑚 and 2.0 𝑚𝐻/𝑘𝑚 respectively from [44]. The length of Feeder 1 is 10 km and that of Feeder 2 is 3 km. The load parameters are shown in Table 3-2 and the impedance parameters are summarized in Table 3-3. The simulated circuit for Case A is shown in Figure 3-5.     Figure 3-4 Source equivalent parameters of a BC Hydro’s distribution feeder.  Name kW kVAR Load 1 2503.3 724.7 Table 3-2 Load parameters for Case A.    29  Name R (Ω) L (mH) Source Impedance 0.0072 7.08 Line Impedance of Feeder 1 2.568 20 Line Impedance of Feeder 2 0.7704 6 Table 3-3 Impedance parameters for Case A.   Figure 3-5 Case A: Simulation circuit with HIF.  The HIF occurs at 𝑡 = 100 𝑚𝑠, which means that the Switch 1(SW1) closes at 𝑡 = 100 𝑚𝑠. The current and voltage waveforms at the beginning of the feeder are captured from the outputs of the simulation, and saved into MAT file format.  The voltage waveform at location m6 is shown in Figure 3-6, and the current waveform at location m2 is shown in Figure 3-7.  + AC125.2kVRMSLL /_0 DC16092DC24911D1D2+R12.44k +R22.27k+ Am2?iMPLOT+Feeder_12.568,20mHVM+m1?v+Feeder_20.7704,6mH+ A?im5+A?im3VM+?vm4VM+?vm6 LF2503.3kW724.7kVAR25.2kVRMSLLLoad1+Z_s0.0072,7.08mHVM+m7?vVM+m8?v+100ms|300|0SW130    Figure 3-7 Current waveform at location m2 for Case A (HIF).  Figure 3-6 Voltage waveform at location m6 for Case A (HIF). 31     The MAT files for the current and voltage waveforms are imported into Matlab, and transformed from time domain to frequency domain using the DFT. The Matlab source code of DFT function is shown in Table 3-4. After the DFT, we calculate the one-sided amplitude spectrum of the voltage  |𝑣(𝑓)|  and the one-sided amplitude spectrum of the current  |𝑖(𝑓)| , and plot them for the frequencies range from 0 to 1000 Hz, in Figure 3-8 and Figure 3-9, respectively.  function output = dft(input)   n = length(input);   output = zeros(size(input));   for k = 0 : n - 1  % For each output element     s = 0;     for t = 0 : n - 1  % For each input element       s = s + input(t + 1) * exp(-2i * pi * t * k / n);     end     output(k + 1) = s;   end end Table 3-4 Matlab source code of DFT.              0 100 200 300 400 500 600 700 800 900 1000020004000600080001000012000Frequency(Hz)Voltage(V)Voltage WaveformFigure 3-8  One-sided amplitude spectrum of the voltage |𝒗(𝒇)| for Case A (HIF). 32  Figure 3-9 One-sided amplitude spectrum of the current |𝒊(𝒇)| for Case A (HIF).      After calculating the one-sided amplitude spectrum of the current |𝑖(𝑓)| and the one-sided amplitude spectrum of the voltage |𝑣(𝑓)|, we applied equation (2.19) |𝑍(𝑓)| =  |𝑣(𝑓)||𝑖(𝑓)|, to calculate the one-sided amplitude spectrum of the impedance |𝑍(𝑓)| and plotted them in Figure 3-10. The red dashed lines indicates the location of harmonics.   0 100 200 300 400 500 600 700 800 900 1000020406080100120Current WaveformFrequency(Hz)Current(A)33   Figure 3-10 One-sided amplitude spectrum of the impedance |𝒁(𝒇)| for Case A (HIF).  3.2.2 Case B – Load Switching (LS) Case Case B consists of a 25 kV distribution system with a load switching event and is shown in Figure 3-11. The impedance parameters of the source and the feeder are the same as those in Case A. The Load 2 (0.096 MW, 0.004 MVAR) is switched in at 𝑡 = 100 𝑚𝑠. Repeating the procedure of Case A, we measured the current waveform and the voltage waveform at the beginning of the feeder, and saved the waveforms into a MAT file. The voltage waveform at location m6 is shown in Figure 3-12, and the current waveform at location m2 is shown in Figure 3-13.   0 100 200 300 400 500 600 700 800 900 1000020406080100120Impedance Waveform in Frequency DomainFrequency(Hz)Impedance(ohm)34   Figure 3-11 Case B: Simulation circuit with a load switching.   Figure 3-12 Voltage waveform at location m6 for Case B (load switching). 35   Figure 3-13 Current waveform at location m2 for Case B (load switching).     In order to compare the time domain signals of Case B with those of Case A, the time domain signal waveforms of both cases are summarized in Figure 3-14. We can observe that they look very similar and it is very difficult to distinguish the HIF cases from load switching events in the time domain signals.   36   Figure 3-14 Comparison of the time domain signals between Case A (HIF) and Case B (load switching). 37     The same process used in Case A has been repeated in Case B to transform the time domain signals to the frequency domain waveforms. The one-sided amplitude spectrum of the voltage  |𝑣(𝑓)|  of Case B is shown in Figure 3-15 and the one-sided amplitude spectrum of the current |𝑖(𝑓)| of Case B is shown in Figure 3-16.    Figure 3-15 One-sided amplitude spectrum of the voltage |𝒗(𝒇)| for Case B (load switching). 0 100 200 300 400 500 600 700 800 900 1000020004000600080001000012000Frequency(Hz)Voltage(V)Voltage Waveform38   Figure 3-16 One-sided amplitude spectrum of the current |𝒊(𝒇)| for Case B (load switching).0 100 200 300 400 500 600 700 800 900 1000020406080100120140Current WaveformFrequency(Hz)Current(A)39   Figure 3-17 Comparison of the frequency domain signals between Case A (HIF) and Case B (load switching).40  In order to make them look more clearly, the logarithmic scale is applied to the amplitude spectrums of current and voltage. In MATLAB, we use command mag2db to perform logarithmic scale. The one-sided amplitude spectrum of the current and voltage waveforms of Case B and those of Case A are summarized in Figure 3-17. We still cannot distinguish the HIF cases from load switching events by observing the one-sided amplitude spectrum of the current and voltage since the waveforms in both cases are almost the same. The one-sided amplitude spectrum of the impedance function |𝑍(𝑓)|  for Case B is calculated by equation (2.19) and plotted in Figure 3-18.  Figure 3-18 One-sided amplitude spectrum of the impedance |𝒁(𝒇)| for Case B (load switching).     0 100 200 300 400 500 600 700 800 900 1000020406080100120Impedance Waveform in Frequency DomainFrequency(Hz)Impedance(ohm)41  Comparing Figure 3-18 with Figure 3-10, we can easily see the differences between them after summarizing them in Figure 3-19. The red dashed lines in the figures indicate the location of harmonics. For Case B (a load switching event), the impedance values at the location of the harmonics (f=60, 120, …, 960 Hz.) decrease gradually as the harmonic order increases. However, in the HIF case, the impedance amplitude values at the locations of harmonic do not always keep decreasing as the harmonic order increases. Sometimes they increase as the harmonic order increases. In order to see this more clearly, we highlighted the data points at the location of the harmonics with black asterisks and re-plotted the waveform in Figure 3-20 for the HIF case. In this figure, the blue dash-dot lines indicate the location of harmonics.   Figure 3-19 Comparison of one-sided amplitude spectrum of impedance |𝒁(𝒇)| for Case A and Case B.  42   Figure 3-20 One-sided amplitude spectrum of impedance |𝒁(𝒇)| for Case A (HIF) with highlighted points. 0 100 200 300 400 500 600 700 800 900 1000020406080100120Impedance Waveform in Frequency DomainFrequency(Hz)Impedance(ohm)43   Figure 3-21 One-sided amplitude spectrum of impedance |𝒁(𝒇)| for Case B (LS) with highlighted points.     The re-plotted impedance waveform for the load switching (LS) case is shown in Figure 3-21, and we can see that the impedance amplitude values at the location of the harmonics keep decreasing as the harmonic order increases. This significant feature can be applied to distinguish HIFs from load switching events.  3.2.3 Case C – Normal Operation without Disturbances    Case C is a normal operation case without disturbances and its simulation circuit is the same as that of Case A after deleting the HIF model in the circuit. The simulation circuit of Case C is shown in Figure 3-22.  0 100 200 300 400 500 600 700 800 900 1000020406080100120Impedance Waveform in Frequency DomainFrequency(Hz)Impedance(ohm)44   Figure 3-22 Case C: Simulation circuit with normal operation (no disturbances).     The voltage waveform at location m6 and the current waveform at location m2 are measured and plotted in Figure 3-23 and Figure 3-24, respectively. +25.2kVRMSLL /_0AC1+ A?im2MPLOT+2.568,20mHFeeder_1VM+?vm1+0.7704,6mHFeeder_2+ Am5?iVM+m6?vLFLoad12503.3kW724.7kVAR25.2kVRMSLL+ 0.0072,7.08mHZ_sVM+ ?vm7VM+?vm845   Figure 3-23 Voltage waveform at location m6 for Case C (no disturbances).   Figure 3-24 Current waveform at location m2 for Case C (no disturbances).  46   Figure 3-25 Comparison of time domain signals between Case A (HIF) and Case C (no disturbances).47     Comparing the time domain signals of Case C with those of Case A (HIF), we summarized the time domain waveforms of both cases in Figure 3-25. As we can see from Figure 3-25, the time domain waveforms are very similar between Case A and Case C, so it is not easy to distinguish HIF events from normal operation situations without any disturbances by observing the time domain signals.    Figure 3-26 One-sided amplitude spectrum of the voltage |𝒗(𝒇)| for Case C (no disturbances). 0 100 200 300 400 500 600 700 800 900 1000020004000600080001000012000Frequency(Hz)Voltage(V)Voltage Waveform48   Figure 3-27 One-sided amplitude spectrum of the current |𝒊(𝒇)| for Case C (no disturbances).     The one-sided amplitude spectrum of the voltage  |𝑣(𝑓)| for Case C is shown in Figure 3-26 and that for the current |𝑖(𝑓)| is shown in Figure 3-27.  The one-sided amplitude spectrums of both voltage and current after logarithmic scale for Case A and Case C are summarized in Figure 3-28, and we still fail to find significant features to distinguish HIF events from normal operation situations without any disturbances.  0 100 200 300 400 500 600 700 800 900 1000020406080100120Current WaveformFrequency(Hz)Current(A)49   Figure 3-28 Comparison of frequency domain signals between Case A (HIF) and Case C (no disturbance). 50     The one-sided amplitude spectrum of the impedance |𝑍(𝑓)|  for Case C is calculated with equation (2.19) and it is plotted in Figure 3-29. The blue dash-dot lines indicate the location of the harmonics and the data points with black asterisks indicate the impedance amplitude values at the location of the harmonics. We can see that the impedance amplitude values at the location of the harmonics keep decreasing as the harmonic order increases, which shows the same variation tendency as those of a load switching event (Figure 3-21). Therefore, we can also apply this significant feature to distinguish HIF events from normal operation situations without any disturbances.   Figure 3-29 One-sided amplitude spectrum of the impedance |𝒁(𝒇)| for Case C (no disturbance).  0 100 200 300 400 500 600 700 800 900 1000102030405060708090100Impedance Waveform in Frequency DomainFrequency(Hz)Impedance(ohm)51  3.2.4 Case D – Capacitor Switching Case    Case D is a capacitor switching case selected from [45]. The simulation circuit is shown in Figure 3-30, and the circuit elements are selected in Table 3-5.  Figure 3-30 Case D: Simulation circuit with a capacitor switching event.  Source: Ls = 0.1 mH f = 60 Hz Vm = 100 V Feeder 1: R = 0.54 Ω L = 27 mH  Feeder 2: R = 0.36 Ω L = 18 mH  Load: R = 400 Ω L = 0.1 mH  Capacitor: C1 = 4.2 μF   Table 3-5 Parameters of circuit elements for Case D.     The waveforms of the time domain signals at the beginning of the feeder are measured and demonstrated below. The voltage waveform at location m1 of Case D is shown in Figure 3-31, and +100 /_0AC1+0.1mHLs+0.54,27mHFeeder_1+4.2uFC1+0.36,18mHFeeder_2+100ms|1000|0SW1+400,0.1mHLoadVM+?vm1+ A?im2+ A?im3+A?im4VM+?vm5VM+ ?vm6MPLOT+ A?im752  the current waveform at location m2 is shown in Figure 3-32. The one-sided amplitude spectrum of the voltage  |𝑣(𝑓)| of Case D is shown in Figure 3-33 and that of the current |𝑖(𝑓)| is shown in Figure 3-34.     Figure 3-31 Voltage waveform at location m1 for Case D (capacitor switching).  53   Figure 3-32 Current waveform at location m2 for Case D (capacitor switching).   54   Figure 3-33 One-sided amplitude spectrum of the voltage |𝒗(𝒇)| for Case D (capacitor switching).  Figure 3-34 One-sided amplitude spectrum of the current |𝒊(𝒇)| for Case D (capacitor switching). 0 100 200 300 400 500 600 700 800 900 10000102030405060Frequency(Hz)Voltage(V)Voltage Waveform0 100 200 300 400 500 600 700 800 900 100000.020.040.060.080.10.120.14Current WaveformFrequency(Hz)Current(A)55  The one-sided amplitude spectrum of the impedance |𝑍(𝑓)| for Case D is calculated with equation (2.19) and plotted in Figure 3-35. The blue dash-dot lines indicate the location of the harmonics and the data points with black asterisks indicate the impedance amplitude values at the location of the harmonics. We can see that the impedance amplitude values at the location of the harmonics keep decreasing as the harmonic order increases, which shows the same variation tendency as those of a load switching event (Figure 3-21), as well as that of a normal operation without any disturbances (Figure 3-29). Therefore, we can also apply this significant feature to distinguish HIF events from capacitor switching events.   Figure 3-35 One-sided amplitude spectrum of the impedance |𝒁(𝒇)| for Case D (capacitor switching).  0 100 200 300 400 500 600 700 800 900 1000050100150200250300350400Impedance Waveform in Frequency DomainFrequency(Hz)Impedance(ohm)56  3.3 Summary of Simulation Cases According to the simulation results of the one-sided amplitude spectrum of the impedance |𝑍(𝑓)|  for the four cases in Section 3.2, we can observe that the tendency of the impedance amplitude values at the location of the harmonics as the order of the harmonic increases is a significant feature to distinguish HIF events from other non-fault events with current waveforms similar to HIF current waveforms.  For the voltage and current in the simulations, we did not encounter the problem of division of zero over zero problem.    The one-sided amplitude spectrum of the impedance |𝑍(𝑓)|  of the four cases are summarized in Figure 3-36. The blue dash-dot lines indicate the location of the harmonics and the data points with red star markers indicate the impedance amplitude at the location of the harmonics. As for the non-fault events, Case B, Case C, Case D, the impedance amplitude values at the location of the harmonics always keep decreasing as the order of the harmonic increases. On the contrary, the impedance amplitude at the location of the harmonics do not always decrease as the order of the harmonic increases for the HIF events.     The simulations results demonstrate that the proposed new HIF detection algorithm based on the DFT of the impedance can effectively distinguish HIF events from other non-fault events that have current waveforms that are similar to those of the HIF current waveforms.   57   Figure 3-36 Summary of One-sided amplitude spectrum of the impedance |𝒁(𝒇)| for the four cases.58  3.4 Fast Fourier Transform (FFT)    The computational complexity of the DFT is 𝑁2. The DFT can be manipulated to obtain a very efficient algorithm to compute it, which requires a number of operations proportional to 𝑁log2𝑁 rather than 𝑁2. This efficient algorithm is called radix-2 fast Fourier transform (FFT) when the signals length N is a power-of-2 integer [46].     MATLAB provides a build-in function fft(x, N) to compute the DFT of the signal vector x by a high-speed radix-2 FFT algorithm, where N is a power-of-2 integer. The function fft(x, N) performs N-point FFT. If the length of x is less than N, then x is padded with trailing zeros to length N. If the length of x is larger than N, then fft(x, N) function truncates the sequence x and will perform the FFT of the first N samples only.     For the simulation cases in this chapter, the length of input vector x is 1001. In order to maintain the integrity of the signal information, we select N to be 1024 instead of truncating the sequence. Replacing the DFT function with fft (x, 1024) function in the MATLAB source code, we re-ran the MATLAB program to plot the one-sided amplitude spectrum of the impedance |𝑍(𝑓)|  of the HIF case in Figure 3-37. The blue dash-dot lines in the figure indicate the location of the harmonics. This waveform, however, is not accurate since the resolution frequency has been changed. The resolution frequency ∆𝑓  changed to 3.90625 Hz, and it could not meet the requirements of equation (2.18). Once the D in equation (2.18) is not an integer, the frequency bin 𝑓𝑘 fails to locate in the location of the harmonics, which leads to the occurrence of spectral leakage and the negative impact of the calculation results. Therefore, it is not applicable to utilize radix-2 FFT algorithm to reduce the computational complexity of DFT since the requirement of the number of data points to be a power-of-2 integer 59  is not compatible with the requirements to minimize the spectral leakage, which is essential for the HIF detection algorithm presented in this thesis.    Figure 3-37 One-sided amplitude spectrum of the impedance |𝒁(𝒇)| for Case A (HIF) calculated by FFT  0 100 200 300 400 500 600 700 800 900 1000050100150200250Impedance Waveform in Frequency Domain(FFT)Frequency(Hz)Impedance(ohm)60  Chapter 4: Conclusions    This chapter summarizes the major contributions of this research thesis and discusses the possible future work for the proposed new HIF detection algorithm.   4.1 Contributions    This Master of Applied Science research thesis implemented a new HIF detection algorithm based on observing the harmonic content in the one-sided amplitude spectrum of the impedance |𝑍(𝑓)|. The developed algorithm was effective in distinguishing HIF events from other non-fault events with current waveforms that behave similar to the HIF current waveforms.     The simulation results shown in this thesis indicate a potential ability to establish a high impedance fault detection function block in BC Hydro’s distribution system protective devices. The frequency range we need to observe is from 0 to 1000 Hz, which is applicable for most of the protective devices in the BC Hydro distribution systems. For example, the Cooper Form 6 Recloser, a microprocessor-based recloser that is widely used in the BC Hydro electrical distribution systems, can measure the harmonic content of current and voltage signals from the 2nd to the 15th harmonic [47].     In addition, the DFT is simple, fast and easy to implement compared to other HIF detection techniques, and is applicable to real time detection systems. Most of the BC Hydro distribution system protective devices can measure the harmonic content of current and voltage signals, and, therefore, it is likely that these devices have the capability to incorporate the DFT algorithm without high costs.   61  4.2 Future Work    The development of the proposed new HIF detection algorithm based on observing the harmonic content in the one-sided amplitude spectrum of impedance  |𝑍(𝑓)| in this thesis is still at the starting stages. Since HIF is very difficult to be perfectly modelled, simulation results shown in EMTP-RV may not be the same as those in a real world situation. Field tests must be performed to verify the value of the proposed method. In addition, more complicated cases should be considered in future work.              62  Bibliography   [1]  Report of PSRC Working Group D15, "High Impedance Fault Detection Technology," 1996. [2]  S. G. a. S. M. Brahma, "Detection of High Impedance Fault in Power Distribution Systems Using Mathematical Morphology," IEEE Transactions on Power Systems, vol. 28, no. 2, pp. 1226-1234, May 2013.  [3]  A. V. Masa, J.-C. Maun and S. Werben, "Characterization of high impedance faults in solidly grounded distribution networks," in 17th Power Systems Computation Conference (PSCC), Stockholm, Sweden, 2011.  [4]  B. M. Aucoin and R. H. Jones, "High Impedance Fault Detection Implementation Issues," IEEE Transactions on Power Delivery, vol. 11, no. 1, pp. 139-148, January 1996.  [5]  R. DAS and D. BAYOUMI, "SYSTEM FOR DETECTION OF HIGH IMPEDANCE FAULT," in 19th International Conference on Electricity Distribution, Vienna, 2007.  [6]  R. H. KAUFMANN and J. C. PAGE, "Arcing Fault Protection for Low-Voltage Power Distribution Systems - Nature or the Problem," Power Apparatus and Systems (AIEE), vol. 79, pp. 160-165, June 1960.  [7]  J. Slepian, R. C. Mason and C. L. Denault, A series of lectures on conduction of electricity in gases, East Pittsburgh, Pa., Educational Dept., Westinghouse Electric & Manufacturing Co., 1933.  63  [8]  D. Hou, "High-Impedance Fault Detection—Field Tests and Dependability Analysis," in 36th Annual Western Protective Relay Conference, Spokane, 2009.  [9]  M. Aucoin, B. D. Russell and C. L. Benner, "HIGH IMPEDANCE FAULT DETECTION FOR INDUSTRIAL POWER SYSTEMS," in Industry Applications Society Annual Meeting, San Diego, 1989.  [10]  B. D. Russell and M. Aucoin, "Detection of Downed Conductors on Utility Distribution Systems," Publication Sales Dept., IEEE Service Center, New York, 1989. [11]  M. F. Akorede and J. Katende, "Wavelet Transform Based Algorithm for High- Impedance Faults Detection in Distribution Feeders," European Journal of Scientific Research, vol. 41, no. 2, pp. 237-247, 2010.  [12]  A. R. Sedighi and M. R. Haghifam, "Simulation of High Impedance Ground Fault In Electrical Power Distribution Systems," in Power System Technology (POWERCON), Hangzhou, 2010.  [13]  A. E. Emanuel, D. Cyganski, J. A. Orr, S. Shiller and E. M. Gulachenski, "HIGH IMPEDANCE FAULT ARCING ON SANDY SOIL IN 15kV DISTRIBUTION FEEDERS: CONTRIBUTIONS TO THE EVALUATIONOF THE LOW FREQUENCY SPECTRUM," IEEE Transactions on Power Delivery, vol. 5, no. 2, pp. 676-686, April 1990.  [14]  A. M. Sharaf, L. A. Snider and K. Debnath, "A neural network based back error propagation relay algorithm for distribution system high impedance fault detection," Advances in Power System Control, Operation and Management, vol. 2, pp. 613-620, 1993.  64  [15]  D. C. T. Wai and X. Yibin, "A novel technique for high impedance fault identification," IEEE Transactions on Power Delivery, vol. 13, no. 3, pp. 738-744, July 1998.  [16]  S. R. Nam, J. K. Park, Y. C. Kang and T. H. Kim, "A modeling method of a high impedance fault in a distribution system using two series time-varying resistances in EMTP," in Power Engineering Society Summer Meeting, Vancouver, 2001.  [17]  T. M. Lai, L. A. Snider and E. Lo, "Wavelet transform based relay algorithm for the detection of stochastic high impedance faults," Electric Power Systems Research, vol. 76, no. 8, pp. 626-633, May 2006.  [18]  Y. Sheng and S. M. Rovnyak, "Decision tree-based methodology for high impedance fault detection," IEEE Transactions on Power Delivery, vol. 19, no. 2, pp. 533-536, April 2004.  [19]  K. J. Zoric, M. B. Djuric and V. V. Terzija, "Arcing faults detection on overhead lines from the voltage signals," Electrical Power & Energy Systems, vol. 19, no. 5, pp. 299-303, June 1997.  [20]  J. Stoupis, M. Maharsi, R. Nuqui, S. A. Kunsman and R. Das, "Reliable detection of high-impedance faults caused by downed conductors," ABB Review, pp. 28-32, January 2004.  [21]  A. R. Sedighi, M. R. Haghifam and O. P. Malik, "Soft computing applications in high impedance fault detection in distribution systems," Electric Power Systems Research, vol. 76, no. 1-3, pp. 136-144, September 2005.  [22]  M. Adamiak, C. Wester, M. Thakur and C. Jensen, "High impedance fault detection on distribution feeders," Protection and Control Journal (GE), pp. 25-31, April 2006.  65  [23]  D. Hou, "Detection of high-impedance faults in power distribution systems," in 33rd Annual Western Protective Relay Conference, 2006.  [24]  T. M. Lai, L. A. Sinder, E. Lo and D. Sutanto, "High-Impedance Fault Detection Using Discrete Wavelet Transform and Frequency Range and RMS Conversion," IEEE Transactions on Power Delivery, vol. 20, no. 1, pp. 397-407, January 2005.  [25]  N. I. Elkalashy, M. Lehtonen, H. A. Darwish, A. M. I. Taalab and M. A. Izzularab, "A novel selectivity technique for high impedance arcing fault detection in compensated MV networks," EUROPEAN TRANSACTIONS ON ELECTRICAL POWER, pp. 344-363, 2008.  [26]  V. T. Garcia and H. R. Paredes, "High impedance fault detection in Distribution System using Wavelet Transform," in Electrical Engineering Computing Science and Automatic Control (CCE), 2011 8th International Conference, Merida City, 2011.  [27]  S. Samantaray, P. Dash and S. Upadhyay, "Adaptive Kalman filter and neutral network based high impedance fault detection in power distribution networks," Electrical Power and Energy Systems, vol. 31, no. 4, pp. 167-172, May 2009.  [28]  S. R. Samantaray, "Ensembel decision tress for high impedance fault detection in power distribution network," Electrical Power and Energy System, vol. 43, no. 1, pp. 1048-1055, December 2012.  [29]  M. G. M. Zanjani, H. K. Kargar and M. G. M. Zanjani, "High impedance fault detection of distribution network by phasor measurement units," in Electrical Power Distribution Networks (EPDC), Tehran, 2012.  66  [30]  F. V. Lopes, W. C. Santos, D. Fernandes, W. L. A. Neves, N. S. D. Brito and B. A. Souza, "A transient based approach to diagnose high impedance faults on smart distribution networks," in Innovative Smart Grid Technologies Latin America (ISGT LA), 2013 IEEE PES Conference, Sao Paulo, 2013.  [31]  V. Torres, J. L. Guardado, H. F. Ruiz and S. Maximov, "Modeling and detection of high impedance faults," Electrical Power & Energy System, vol. 61, pp. 163-172, October 2014.  [32]  A. Marti, C. Fan, M. Li and D. Su, "High Impedance Fault Detection System," UBC Capstone Project, Vancouver, 2015. [33]  S. Shojae, "EMTP-based Load Disaggregation at Feeder Levels," UBC Theses and Dissertations, Vancouver, 2015. [34]  R. G. Lyons, Understanding Digital Signal Processing, New Jersey: Bernard Goodwin, 2004.  [35]  S. M. Kuo and B. H. Lee, Real-Time Digital Signal Processing: Implementations, Applications and Experiments with the TMS320C55x, Chichester: John Wiley & Sons, Ltd, 2001.  [36]  G. Muhammad, "Course CEN352 Webpage of King Saud University," [Online]. Available: http://faculty.ksu.edu.sa/ghulam/Documents/CEN352/DSP_CEN352_ch4_DFT.pdf.. [Accessed 10 April 2016]. [37]  E. C. Ifeachor and B. W. Jervis, Digital Signal processing: A Practical Approach, Second ed., Harlow: Pearson Education Limited, 2002.  67  [38]  S. M. Kuo, B. H. Lee and W. Tian, Real-Time Digital Signal Processing : Fundamentals, Implementations and Applications, Third ed., Chichester: Wiley, 2013.  [39]  D. Lyon, "The Discrete Fourier Transform Part 4: Spectral Leakage," Journal of Object Technology, vol. 8, no. 7, pp. 23-34, 2009.  [40]  M. A. Kashem, "FOURIER ANALYSIS PART 2: Continuous & Discrete Fourier Transforms," 2015. [Online]. Available: http://slideplayer.com/slide/7537718/. [Accessed 2 May 2016]. [41]  National Instruments, June 2011. [Online]. Available: http://zone.ni.com/reference/en-XX/help/371361H-01/lvanlsconcepts/spectral_leakage/. [Accessed 6 March 2016]. [42]  "CYME - Power Engineering Software," Eaton, [Online]. Available: http://www.cyme.com/software/emtp/. [Accessed 8 April 2016]. [43]  G. Narasimharao, "High Impedance Fault Detection and Classification of A Distribution System," International Journal of Engineering Research & Technology, vol. 1, no. 5, pp. 1-6, 2012.  [44]  S. Samantaray and P. K. Dash, "High impedance fault detection in distribution feeders using extended kalman filter and support vector machine," European Transactions on Electrical Power, vol. 20, no. 3, pp. 382-393, April 2010.  [45]  D. Sochuliakova, D. Niebur, C. O. Nwankpa, R. Fischl and D. Richardson, "Identification of Capacitor Position in a Radial System," IEEE Transactions on Power Delivery, vol. 14, no. 4, pp. 1368-1373, 1999.  68  [46]  K. R. Rao, D. N. Kim and J. J. Hwang, Fast Fourier Transform - Algorithms and Applications, Springer, 2010.  [47]  "Cooper Form 6 Microprocessor-Based Pole-Mount Recloser Control Installation and Operation Instructions," [Online]. Available: http://www.cooperindustries.com/content/dam/public/powersystems/resources/library/280_ReclosersControls/S2807010.pdf. [Accessed 1 August 2016].   69  Appendices  Appendix A  MATLAB Source Code for the HIF Detection Algorithm with DFT close all; clear all; clc;   format long; Tstep=0.25*(10^(-3)); %time step size t_end = 0.25;  %simulation time  N = round((t_end/Tstep) + 1);  %number of data points what; %List MATLAB-specific files in directory   %Waveform Selection% CWaveform = input('Enter current waveform file(mat file) name:', 's'); %enter mat file's name  SC=load(CWaveform); % current waveform L=numel(SC.X{1,1});  %number of sampling point Cxt=zeros(N,1);             %store t Cyt=zeros(N,1); t_inter=zeros(L,1);   %delete the CDA points Cxt(1,1)= SC.X{1,1}(1,1); %set up the first point(0,0) Cyt(1,1)= SC.Y{1,1}(1,1); cta=2;    %index for eliminated CDA cti=2; while (cti<L)  t_inter(cti,1)= SC.X{1,1}(cti,1)-SC.X{1,1}(cti-1,1);  if(t_inter(cti,1) > (0.75*Tstep))  % full time step        Cxt(cta,1)= SC.X{1,1}(cti,1);        Cyt(cta,1)= SC.Y{1,1}(cti,1);        cta=cta+1;        cti=cti+1;        else      cti=cti+1;      Cxt(cta,1)= SC.X{1,1}(cti,1);      Cyt(cta,1)= SC.Y{1,1}(cti,1);      cta=cta+1;      cti=cti+1;     end end %Last point when simulation ends Cxt(N,1)= SC.X{1,1}(L,1); Cyt(N,1)= SC.Y{1,1}(L,1); cta   70  VWaveform = input('Enter voltage waveform file(mat file) name:', 's'); SV=load(VWaveform); %voltage waveform VL=numel(SV.X{1,1});  %number of sampling point Vxt=zeros(N,1);             %store t Vyt=zeros(N,1); vt_inter=zeros(VL,1);   %delete the CDA points Vxt(1,1)= SV.X{1,1}(1,1); %set up the first point(0,0) Vyt(1,1)= SV.Y{1,1}(1,1); vta=2;    %index for eliminated CDA vti=2;   while (vti<VL) vt_inter(vti,1)= SV.X{1,1}(vti,1)-SV.X{1,1}(vti-1,1);  if(vt_inter(vti,1)>(0.75*Tstep))  % full time step        Vxt(vta,1)= SV.X{1,1}(vti,1);        Vyt(vta,1)= SV.Y{1,1}(vti,1);        vta=vta+1;        vti=vti+1;  else      vti=vti+1;      Vxt(vta,1)= SV.X{1,1}(vti,1);      Vyt(vta,1)= SV.Y{1,1}(vti,1);      vti=vti+1;      vta=vta+1;  end end vta % Last point when simulation ends Vxt(N,1)= SV.X{1,1}(VL,1); Vyt(N,1)= SV.Y{1,1}(VL,1);   %DFT calculation Fs=1/Tstep; %sampling frequency   Cfd=dft(Cyt); CfMag=abs(Cfd);  Vfd=dft(Vyt); VfMag=abs(Vfd);    %To judge N is odd or even number odd_or_even=mod(N,2) if (odd_or_even==1)   %If N is an odd number CfAbs=CfMag(1:(N-1)/2+1)/N;   VfAbs=VfMag(1:(N-1)/2+1)/N; f = Fs*(0:(N-1)/2)/(N-1); else   CfAbs=CfMag(1:N/2+1)/N;   %If N is an even number   VfAbs=VfMag(1:N/2+1)/N;   f = Fs*(0:N/2)/(N-1); end   71  Addmit= CfAbs./VfAbs; Z_mag=VfAbs./CfAbs;   %Plot figure(1);  plot(SC.X{1,1},SC.Y{1,1},'b-*',Cxt,Cyt,'g'); % current time domain legend('with CDA','without CDA'); title('Current Waveform'); xlabel('t (s)'); ylabel('Current(A)');   figure(2); plot(f,CfAbs); %Current  plot the single-sided amplitude spectrum P1 xlabel('Frequency(Hz)'); ylabel('Current(A)'); title('Current Waveform');       figure (3);  plot(SV.X{1},SV.Y{1},'b*-',Vxt,Vyt,'g');  legend('with CDA','without CDA');   title('Voltage Waveform'); xlabel('t(s)'); ylabel('Voltage(V)');   figure(4); plot(f,VfAbs); title('Voltage Waveform'); xlabel('Frequency(Hz)'); ylabel('Voltage(V)');   figure (5); plot(f,Addmit); title('Admittance Waveform'); xlabel('Frequency(Hz)'); ylabel('Admittance');   figure (6); plot(f,Z_mag); title('Impedance Waveform'); xlabel('Frequency(Hz)'); ylabel('Impedance(Ohm)');   kf=1; while (f(kf)<1000)     kf=kf+1; end   for i=1:kf   %f= 0~1 kHz Nf(i)=f(i); NAddmit(i)=Addmit(i); VVfAbs(i)=VfAbs(i); 72  CCfAbs(i)=CfAbs(i); end   figure (7); plot(Nf,CCfAbs); title('Current Waveform'); xlabel('Frequency(Hz)'); ylabel('Current(A)'); hold on; for fi1=120:60:960    %tag the f=60,120,180~~~960 Hz ytest1=min(CCfAbs):0.001:max(CCfAbs); xtest1=fi1*ones(length(ytest1),1); plot (xtest1,ytest1,'r-.') hold on; end   figure (8); plot(Nf,VVfAbs); xlabel('Frequency(Hz)'); ylabel('Voltage(V)'); title('Voltage Waveform'); hold on;   for fi2=120:60:960    %tag the f=60,120,180~~~960 Hz ytest2=min(VVfAbs):max(VVfAbs); xtest2=fi2*ones(length(ytest2),1); plot (xtest2,ytest2,'r-.') hold on; end   figure (9); plot(Nf,mag2db(NAddmit)); title('Admittance Waveform'); xlabel('Frequency(Hz)'); ylabel('Admittance(DB)');   figure(10); plot(Nf,NAddmit); title('Admittance Waveform'); xlabel('Frequency(Hz)'); ylabel('Admittance(S)'); hold on; for fi4=60:60:960    %tag the f=60,120,180~~~960 Hz ytest4=min(NAddmit):0.0001:max(NAddmit);   xtest4=fi4*ones(length(ytest4),1); plot (xtest4,ytest4,'b-.') hold on; end   Imped=VVfAbs./CCfAbs; %Key Feature in Frequency Domain for Impedance figure (11); plot(Nf,Imped,'g'); 73  title('Impedance Waveform in Frequency Domain'); xlabel('Frequency(Hz)'); ylabel('Impedance(ohm)'); hold on;   for fi=60:60:960    %tag the f=60,120,180~~~960 Hz ytest=min(Imped):max(Imped); xtest=fi*ones(length(ytest),1); plot (xtest,ytest,'b-.') hold on; end   %Highlight the locations of harmonic,freuency resolution is 4 Hz in this %case. for fha=1:1:16     Zy(fha)=Imped(1+15*fha);     fx(fha)=60*fha; end plot(fx,Zy,'k*-'); %k stands for blcak color hold on;   figure (12); plot(Nf(5:end),Imped(5:end),'g'); title('Impedance Waveform in Frequency Domain'); xlabel('Frequency(Hz)'); ylabel('Impedance(ohm)'); hold on; plot(fx,Zy,'k*-');  %Hamonic's location hold on; for fi=60:60:960    %tag the f=60,120,180~~~960 Hz ytest6=min(Imped):max(Imped(16:end)); xtest6=fi*ones(length(ytest6),1); plot (xtest6,ytest6,'b-.') hold on; end     figure (13); plot(Nf,mag2db(Imped),'g'); title('Impedance Waveform'); xlabel('Frequency(Hz)'); ylabel('Impedance(DB)'); hold on; for fi5=60:60:960    %tag the f=60,120,180~~~960 Hz ytest5=min(mag2db(Imped)):0.0001:max(mag2db(Imped)); xtest5=fi5*ones(length(ytest5),1); plot (xtest5,ytest5,'b-.') hold on; end   74  Appendix B  MATLAB Source Code for the HIF Detection Algorithm with FFT close all; clear all; clc; syms cta cti k kf;      format long; Tstep=0.25*(10^(-3)); %time step size t_end = 0.25; N = round((t_end/Tstep) + 1);  %number of data points what; %List MATLAB-specific files in directory   %Waveform Selection% CWaveform = input('Enter current waveform file(mat file) name:', 's'); %enter mat file's name  SC=load(CWaveform); % current waveform L=numel(SC.X{1,1});  %number of sampling point Cxt=zeros(N,1);             %store t Cyt=zeros(N,1); t_inter=zeros(L,1);   %delete the CDA points Cxt(1,1)= SC.X{1,1}(1,1); %set up the first point(0,0) Cyt(1,1)= SC.Y{1,1}(1,1); cta=2;    %index for eliminated CDA cti=2; while (cti<L) t_inter(cti,1)= SC.X{1,1}(cti,1)-SC.X{1,1}(cti-1,1);  if(t_inter(cti,1)>(0.75*Tstep))  % full time step        Cxt(cta,1)= SC.X{1,1}(cti,1);        Cyt(cta,1)= SC.Y{1,1}(cti,1);        cta=cta+1;        cti=cti+1;  else      cti=cti+1;      Cxt(cta,1)= SC.X{1,1}(cti,1);      Cyt(cta,1)= SC.Y{1,1}(cti,1);      cta=cta+1;      cti=cti+1;    end end %Last point when simulation ends Cxt(N,1)= SC.X{1,1}(L,1); Cyt(N,1)= SC.Y{1,1}(L,1); cta   VWaveform = input('Enter voltage waveform file(mat file) name:', 's'); SV=load(VWaveform); %voltage waveform VL=numel(SV.X{1,1});  %number of sampling point Vxt=zeros(N,1);             %store t Vyt=zeros(N,1); vt_inter=zeros(VL,1); 75    %delete the CDA points Vxt(1,1)= SV.X{1,1}(1,1); %set up the first point(0,0) Vyt(1,1)= SV.Y{1,1}(1,1); vta=2;    %index for eliminated CDA vti=2;   while (vti<VL) vt_inter(vti,1)= SV.X{1,1}(vti,1)-SV.X{1,1}(vti-1,1);  if(vt_inter(vti,1)>(0.75*Tstep))  % full time step        Vxt(vta,1)= SV.X{1,1}(vti,1);        Vyt(vta,1)= SV.Y{1,1}(vti,1);        vta=vta+1;        vti=vti+1;  else      vti=vti+1;      Vxt(vta,1)= SV.X{1,1}(vti,1);      Vyt(vta,1)= SV.Y{1,1}(vti,1);      vti=vti+1;      vta=vta+1;  end end vta % Last point when simulation ends Vxt(N,1)= SV.X{1,1}(VL,1); Vyt(N,1)= SV.Y{1,1}(VL,1);       % To select the FFT data ponits N, which should be the integer power of 2. k=1; Nfft=2^k; while (Nfft<N)     k=k+1; Nfft=2^k; end Nfft=2^(k)   Fs=1/Tstep; %sampling frequency   Afd=fft(Cyt,Nfft); P2=abs(Afd)/Nfft; P1=P2(1:Nfft/2+1); f = Fs*(0:Nfft/2)/Nfft;   Vfd=fft(Vyt,Nfft); P22=abs(Vfd/Nfft); P11=P22(1:Nfft/2+1); f = Fs*(0:(Nfft/2))/Nfft;   Z_mag=P11./P1;   figure(1); 76   plot(SC.X{1,1},SC.Y{1,1},'b-*',Cxt,Cyt,'g'); % current time domain legend('with CDA','without CDA'); title('Current Waveform(FFT)'); xlabel('t (s)'); ylabel('Current(A)');   figure(2); plot(f,P1); %Current plot the single-sided amplitude spectrum P1 xlabel('Frequency(Hz)'); ylabel('Current(A)'); title('Current Waveform(FFT)');   figure (3);  plot(SV.X{1},SV.Y{1},'b*-',Vxt,Vyt,'g');  legend('with CDA','without CDA');   title('Voltage Waveform with HIF'); xlabel('t(s)'); ylabel('Voltage(V)');    figure(4); plot(f,P11); title('Voltage Waveform with HIF'); xlabel('Frequency(Hz)'); ylabel('Voltage(V)');   Addmit= P1./P11; figure (5); plot(f,Addmit); title('Admittance Waveform with HIF'); xlabel('Frequency(Hz)'); ylabel('Admittance');     figure (6); plot(f,Z_mag); title('Impedance Waveform with HIF'); xlabel('Frequency(Hz)'); ylabel('Impedance(Ohm)');   kf=1; while (f(kf)<1000)     kf=kf+1; end   for i=1:kf   %f= 0~1 kHz Nf(i)=f(i); NAddmit(i)=Addmit(i); Np11(i)=P11(i); Np1(i)=P1(i); end   figure (7);   77  plot(Nf,Np1); title('Current Waveform with HIF'); xlabel('Frequency(Hz)'); ylabel('Current(DB)'); hold on; for fi1=60:60:960    %tag the f=60,120,180~~~960 Hz ytest1=min(Np1):0.001:max(Np1); xtest1=fi1*ones(length(ytest1),1); plot (xtest1,ytest1,'r--') hold on; end     figure (8);   plot(Nf,Np11); xlabel('Frequency(Hz)'); ylabel('Voltage(DB)'); title('Voltage Waveform with HIF'); hold on; for fi2=60:60:960    %tag the f=60,120,180~~~960 Hz ytest2=min(Np11):0.01:max(Np11); xtest2=fi2*ones(length(ytest2),1); plot (xtest2,ytest2,'r--') hold on; end   figure (9);   plot(Nf,NAddmit); title('Admittance Waveform with HIF'); xlabel('Frequency(Hz)'); ylabel('Admittance(DB)');   figure(10); plot(Nf,NAddmit); title('Admittance Waveform with HIF'); xlabel('Frequency(Hz)'); ylabel('Admittance(S)');   Imped=Np11./Np1;   figure (11); plot(Nf,Imped); title('Impedance Waveform with HIF'); xlabel('Frequency(Hz)'); ylabel('Impedance(ohm)'); hold on; for fi=60:60:960    %tag the f=60,120,180~~~960 Hz ytest=min(Imped):0.1:max(Imped); xtest=fi*ones(length(ytest),1); plot (xtest,ytest,'r--') hold on; 78  end     figure (12); plot(Nf(5:end),Imped(5:end),'g'); title('Impedance Waveform in Frequency Domain(FFT)'); xlabel('Frequency(Hz)'); ylabel('Impedance(ohm)'); hold on;   for fi=60:60:960    %tag the f=60,120,180~~~960 Hz ytest6=min(Imped):max(Imped(16:end)); xtest6=fi*ones(length(ytest6),1); plot (xtest6,ytest6,'b-.') hold on; end   figure (13); plot(Nf,mag2db(Imped)); title('Impedance Waveform with HIF'); xlabel('Frequency(Hz)'); ylabel('Impedance(DB)');   

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.24.1-0319264/manifest

Comment

Related Items