DEPARTMENT OF COMPUTER ENGINEERING SCHOOL OF ENGINEERING SCIENCES UNIVERSITY OF GHANA MASTER OF ENGINEERING (MENG) PROJECT ON DESIGN AND DEVELOPMENT OF POWER DISTRIBUTION NETWORK FAULT DATA COLLECTION DEVICE, FAULT DETECTION, LOCATION AND CLASSIFICATION USING MACHINE LEARNING ALGORITHMS PROJECT DESSERTATION SUBMITTED TO THE DEPARTMENT OF COMPUTER ENGINEERING IN PARTIAL FULLFILMENT OF THE REQUIREMENTS FOR THE AWARD OF MASTER OF ENGINEERING (MENG) IN COMPUTER ENGINEERING BY STUDENT: NICHOLAS AMETEFE DZABENG INDEX NUMBER: 10513061 SUPERVISOR: ROBERT ADJETEY SOWAH, PhD JULY, 2016 University of Ghana http://ugspace.ug.edu.gh DESIGN AND DEVELOPMENT OF POWER DISTRIBUTION NETWORK FAULT DATA COLLECTION DEVICE, FAULT DETECTION, LOCATION AND CLASSIFICATION USING MACHINE LEARNING ALGORITHMS By [Nicholas Ametefe Dzabeng] (10513061) Submitted to the Department of Computer Engineering in Partial Fulfilment of the Requirements for the Degree of Master of Engineering in Computer Engineering University of Ghana July 29, 2016 Name of Student: Nicholas Ametefe Dzabeng Signature of Student: _______________ Name of Supervisors: ROBERT ADJETEY SOWAH, PhD Signature of Supervisor: _________________ Head of Department: GODFREY A. MILLS, PhD Signature of Head: _______________ University of Ghana http://ugspace.ug.edu.gh i ORIGINALITY DECLARATION Department of Computer Engineering I certify that this dissertation is my own work except where indicated by referencing. I confirm that I have read and understood the guidelines on plagiarism in the Computer Engineering Master’s thesis/ dissertation handbook including the University of Ghana’s policy on plagiarism. I have acknowledged in the text of this dissertation all sources used. I have also fully referenced (including page numbers) all the relevant texts, figures, data, and tables quoted from books, journals, articles, internet websites, and works of other people. I have not used the services of any professional person or agency to produce this project document. I have also not presented the work of any student (present or past) from other academic or research Institutions. I understand that any false claim in respect of this project document will result in disciplinary action in accordance with the regulations of the University of Ghana. Please complete the information below by Hand and in BLOCK LETTERS. Student Name: ................................................................................................................... Index Number: .................................................................................................................. Student Signature: ............................................................. Date........................................ Thesis Title: ...................................................................................................................... …………........................................................................................................................... ……………........................................................................................................................ Certified by Supervisor: .................................................................................................. Supervisor’s Signature: ......................................................... Date.................................... Certified by Internal Supervisor: .......................................................................................... Internal Supervisor’s Signature: .................................................. Date….............................. University of Ghana http://ugspace.ug.edu.gh ii ABSTRACT The detection and location of faults on power transmission lines is essential to the protection and maintenance of a power system. Most methods of fault detection and location rely on measurements of electrical quantities provided by current and voltage transformers. In this work, current sensors and voltage sensors were used in the prototyped model of the data collection device. Training data were collected by taking into consideration variables of a simulation situation like fault type, sensor location on the node, short circuit and open circuit faults were also analyzed. The test data were analyzed using three machine learning classifiers namely: K- Nearest Neighbor (KNN), Decision Tree and Support Vector Machines (SVM). Simulation result indicates that the anticipated method for fault classification gives high accuracy (99.5%) and least fault distance estimation error (0.5%) for all discussed cases. In order to verify the accuracy of the proposed method, a comparison is carried out with decision tree (DT), KNN and SVM. Separate investigation was also carried out with testing the system by varying the load at the range of 0%- 100%. It is observed from the test results of the network model that, the fault detection, location and classification gives a high accuracy with machine learning decision tree giving a quick training time response of 0.000999928 seconds. University of Ghana http://ugspace.ug.edu.gh iii DEDICATION To my Parents and Lecturers who motivated and encouraged me to attain this hallmark in the best way. University of Ghana http://ugspace.ug.edu.gh iv ACKNOWLEDGEMENTS First of all, I thank God Almighty for all His blessings and giving strength to bring this research to a successful end. Secondly, special thanks my project supervisor, Robert Adjetey Sowah who has deeply helped, inspired and directed me whenever I call on him. Thirdly, special appreciation goes to my course mates, especially Mr. Eugene Mensah-Ananoo, who in diverse ways helped me to complete this project work. Finally, I’m grateful to University of Ghana, Computer Engineering Department and to all my colleagues. I thank everybody for their assistance during the research as well as all those who have not been mentioned but have significantly contributed to the success of this project. To all, I say God richly bless you. University of Ghana http://ugspace.ug.edu.gh v TABLE OF CONTENTS ORIGINALITY DECLARATION ............................................................................................... i ABSTRACT ....................................................................................................................................ii DEDICATION ........................................................................................................................... iii ACKNOWLEDGEMENTS ......................................................................................................... iv TABLE OF CONTENTS .............................................................................................................. v LIST OF FIGURES ...................................................................................................................... ix LIST OF TABLES ......................................................................................................................... x LIST OF ABBREVIATIONS ...................................................................................................... xi KNN- K- Nearest Neighbor ............................................................................................................ xi CHAPTER ONE ........................................................................................................................... 1 1 INTRODUCTION.............................................................................................................. 1 1.1 Background ................................................................................................................. 1 1.2 Problem Statement ..................................................................................................... 4 1.3 Objectives of Study ..................................................................................................... 4 1.4 Scope ............................................................................................................................ 5 1.5 Research Methodolody ............................................................................................... 5 1.6 Outline of the Project Dissertation ............................................................................ 6 CHAPTER TWO .......................................................................................................................... 7 2 LITERATURE REVIEW ................................................................................................. 7 2.1 Power Distribution System ........................................................................................ 7 2.2 Protection Systems ...................................................................................................... 7 2.3 Protection Systems for the Distribution Transformer ............................................ 8 2.4 Fault Types and Protection ........................................................................................ 8 2.4.1 Single –line –to ground fault .............................................................................. 8 2.4.2 Double line to ground fault ................................................................................. 9 2.4.3 Line – line fault .................................................................................................... 9 2.4.4 Open Circuit Fault .............................................................................................. 9 2.5 Protection of Transmission Lines .............................................................................. 9 2.5.1 Overcurrent Relaying ......................................................................................... 9 University of Ghana http://ugspace.ug.edu.gh vi 2.5.2 Directional Relaying .......................................................................................... 10 2.5.3 Distance Relaying .............................................................................................. 10 2.5.4 Pilot Relaying ..................................................................................................... 10 2.6 Fault Detection Systems ........................................................................................... 11 2.6.1 Fault Detection using ANN ............................................................................... 11 2.6.2 Fault Detection Using Wavelet based Transient Extraction ......................... 12 2.7 Fault Location Techniques ...................................................................................... 12 2.7.1 Fault Location using Phasor Measurements .................................................. 13 2.7.2 Fault Location using Wavelet Transforms ..................................................... 13 2.8 Fault Classification Methods ................................................................................... 14 2.8.1 Fault Classification in Transmission Line Network by KNN Algorithm ..... 14 2.8.2 Fault Classification in Transmission Lines using Artificial Neural Networks (ANN) 14 2.8.3 Fault Classification in Transmission Line using Decision Tree (DT) ........... 15 2.8.4 Fault Classification IN Transmission Lines using Support Vector Machine (SVM) 15 2.9 Contribution of Dissertation .................................................................................... 17 CHAPTER THREE .................................................................................................................... 18 3 MATERIALS AND METHODOLOGY ....................................................................... 18 3.1 Methodology .............................................................................................................. 18 3.1.1 The Power Distribution Network Modelling .................................................. 18 3.2 Data Collector Device ............................................................................................... 19 3.3 System Architecture Overview ................................................................................ 19 3.3.1 Voltage Sensor Array ........................................................................................ 20 3.3.2 Current Sensor Array ....................................................................................... 21 3.3.3 Position and Fault-Type Sensor Array............................................................ 22 3.3.4 Fault Location Sensors...................................................................................... 23 3.3.5 Fault Simulation using Toggle Switches ......................................................... 23 3.3.6 Microcontroller (ATMEGA 88) ....................................................................... 24 3.3.7 Serial-To-USB Convertor (FTDI) .................................................................... 24 3.4 Firmware ................................................................................................................... 25 3.4.1 Initializing Universal Synchronous Asynchronous Receiver Transmitter .. 25 University of Ghana http://ugspace.ug.edu.gh vii 3.4.2 Reading Current / Voltage Sensors (Analogue – Digital Convertor) ........... 25 3.4.3 Training Data Collector Firmware .................................................................. 27 3.4.4 Data Transmission (TRANSMISSION DATA TO PC) ................................ 27 3.5 Software ..................................................................................................................... 28 3.5.1 Data Collector Server (Wait/Delay Process Block) ........................................ 28 3.5.2 Database (My SQL) ........................................................................................... 28 3.5.3 Serial Commutation (Initialize Communication Peripheral)........................ 29 3.5.4 Collecting Data (Test/Real-Time Data Collection) ......................................... 29 3.6 Computer Software .................................................................................................. 31 3.6.1 Data Collector Server........................................................................................ 31 3.6.2 Training Procedure (Trainer Algorithm) ....................................................... 32 3.6.3 Data Validation and Testing (Testing/Real-Time Data Collector Firmware) 34 3.6.4 Main Application ............................................................................................... 36 3.6.5 Serial Communication ...................................................................................... 36 3.6.6 Reading Data from the Data Collector Device ............................................... 37 3.6.7 Process Data and Feature Selection ................................................................. 37 CHAPTER FOUR ....................................................................................................................... 38 4 EXPERIMENTATIONS AND RESULTS .................................................................... 38 4.1 Simulation.................................................................................................................. 38 4.2 Construction and Assembly ..................................................................................... 39 4.3 Collecting the Training Data ................................................................................... 39 4.4 Training the Classifiers ............................................................................................ 40 4.5 Training Results ........................................................................................................ 40 4.6 Real Time Implementation ...................................................................................... 42 4.7 Testing and Validation ............................................................................................. 43 CHAPTER FIVE ........................................................................................................................ 49 5 CONCLUSION ................................................................................................................ 49 5.1 Future Work ............................................................................................................. 50 REFERENCES ........................................................................................................................ 51 APPENDICES ......................................................................................................................... 54 University of Ghana http://ugspace.ug.edu.gh viii Appendix I ............................................................................................................................ 54 Appendix II .......................................................................................................................... 58 University of Ghana http://ugspace.ug.edu.gh ix LIST OF FIGURES Figure 2.1 Samples SVM Classifier.............................................................................................. 17 Figure 3.1 Model of Distribution line ........................................................................................... 19 Figure 3.2 Architectural Overview of the system ........................................................................ 20 Figure 3.3 Voltage Sensor Model ................................................................................................ 21 Figure 3.4 Current Sensor Model................................................................................................. 22 Figure 3.5 Position and Fault-Type Sensor Array Model ............................................................. 23 Figure 3.6 AVR Microcontroller .................................................................................................. 24 Figure 3.7 Block Diagram of Data collector device for training data collection ......................... 26 Figure 3.8 Data collector flowchart for training data collection .................................................. 27 Figure 3.9 ECG low voltage database schema............................................................................. 29 Figure 3.10 Data collector device for testing and real-time diagnostics ...................................... 30 Figure 3.11 Software Process Overview ....................................................................................... 31 Figure 3.12 Data Collector Flowchart ......................................................................................... 32 Figure 3.13 Training Flowchart ................................................................................................... 33 Figure 3.14 Data collector flowchart for real-time diagnostics ................................................... 35 Figure 3.15 Main Application Flowchart ..................................................................................... 36 Figure 4.1 Simulation diagram of the data collector device ........................................................ 38 Figure 4.2 The PCB design of the data collecting device ............................................................ 39 Figure 4.3 Faults simulation data ................................................................................................. 40 Figure 4.4 Inner picture of the data collector device ................................................................... 43 Figure 4.5 Picture of the set up with open circuit fault location at node 0 .................................. 44 Figure 4.6 Picture of the set up with open circuit fault location at node 1 .................................. 45 Figure 4.7 Picture of the set up with open circuit fault location at Node 2 ................................. 45 Figure 4.8 fault predictor at No fault condition ........................................................................... 46 Figure 4.9 fault predictor at open circuit fault condition ............................................................. 47 University of Ghana http://ugspace.ug.edu.gh x LIST OF TABLES Table 4.1 Training results for load variation between 20%-100% ............................................... 41 Table 4.2 Training results for load variation between 0% - 100% .............................................. 41 Table 4.3 My SQL data base for fault data capture ..................................................................... 42 Table 4.4 Table depicting results during testing .......................................................................... 48 University of Ghana http://ugspace.ug.edu.gh xi LIST OF ABBREVIATIONS KNN- K- Nearest Neighbor SVM- Support Vector Machine DT- Decision Tree PCB-Printed Circuit Board HRC Fuse- High Rapturing Capacity Fuse CT- Current Transformer PT- Potential Transformer University of Ghana http://ugspace.ug.edu.gh 1 CHAPTER ONE 1 INTRODUCTION 1.1 Background The distribution of electric power and its protection is a challenge for engineers due to the complex nature of the networks. The fundamental role of protection is to safeguard the entire system to maintain continuity of supply by detecting faults and to minimize damage to equipment [16]. A good protection system must ensure system reliability through the operation of the protection system for all types of faults in all locations in the network. The system must be dependable and secured. In a power distribution network, fault can occur due to overloading, overvoltage, power swings, etc. When a fault occurs, protection equipment initiates operation of circuit breakers, to de- energize the faulted part. Generally, circuit breakers serve as one of the primary devices in the network protection scheme against faults. This protective action must be done before excessive currents and voltages cause damage to connected equipment, such as transformers [16]. Fault detection and location and classification have been a goal of power system engineers since the creation of distribution and transmission systems. Quick fault detection can help protect equipment by allowing the disconnection of faulted lines before any significant damage is done. Accurate fault location can help utility personnel remove persistent faults and locate areas where faults regularly occur, thus reducing the frequency and length of power outages. As a result, while University of Ghana http://ugspace.ug.edu.gh 2 fault detection and location schemes have been developed in the past, a variety of algorithms continue to be developed to perform this task more accurately and more effectively [17]. When a fault occurs in a distribution network, it is important to quickly locate the fault by identifying either a faulty bus or a faulty line section in the network. Without locating the faulty section, no attempt can be made to remove the faults and restore the power supply. Fault location in electric power distribution systems still presents many challenges due to its varied topological and operational characteristics [18]. The traditional methods used for locating faults in a distribution network include visual inspection by power line patrol [13]. In relation to underground cable system, fault is also located by a special cable test van. However, these traditional fault location methods are unable to locate faults quickly. The increasing dependence on electricity calls for high demand of reliability in power supply. Nowadays, utilities companies are now under obligation, demanded by regulatory bodies to system performance benchmarks. This demand among others is driving the need for making the power distribution system intelligent and smart. A circuit breaker is one of the critical components of the power system that automatically detect faults and protect the power system by isolating the faulty point of the circuit [1]. Circuit breakers provided have inherent fault detection and isolation capabilities . University of Ghana http://ugspace.ug.edu.gh 3 These protection interventions are not adequate due to protection integrity on the distribution transformer at distribution substation which is riddled by indiscriminate use of copper links to replace blown High Rapturing Capacity (HRC) fuses and high ground resistance [14] and on the transmission line; the power system uses voltage and current signals to learn the hidden relationship existing in the input patterns. It was observed that the radial basis function neural ability to identify the precise fault direction and more rapidly. This makes it suitable for the real-time purpose [15]. But the main objective of this study is to develop an automatic circuit breaker with intelligent capabilities. In this, a data collecting device would be suitable for fault detection, location and classification. The proposed circuit breaker will have a fault location system integrated in it. To achieve this, data is collected by the device from the network. Data loggers can capture the fault events precisely but they are not equipped with fault diagnostic algorithms, which can quickly identify fault location line [16]. A fault detection indicates the occurrence of a fault in a monitored system; fault isolation establishes the type and/or location of the fault identification determines the magnitude of the fault. After a fault has been detected and diagnosed, in some applications it is required that the fault be self-corrected, usually through controller reconfiguration. This is usually referred to as fault accommodation [17]. The data is then processed by a collector server to determine the criteria for detection, location and classification of faults in the network. An isolation action is then effected by microcontroller action through data management scheme. The design will protect equipment and minimize equipment loss due to faults, resulting in reduced investment in power equipment. Furthermore, the network reliability is enhanced through reduced restoration period. This work is situated within the framework of protection and control in power distribution systems. Two limitations of the proposed design are as follows: i. It is limited according to the resources available, that is the memory and the processing speed. ii. For the system to be implemented in a real network, it has to work with the data collected from a network under fault conditions considering the variations in the current and voltage values. University of Ghana http://ugspace.ug.edu.gh 4 1.2 Problem Statement The distribution of electric power and its protection is a challenge for engineers due to the complex nature of the networks. In a power distribution network, fault can occur due to overloading, overvoltage, power swings, etc. Generally, circuit breakers serve as one of the primary devices in the network protection scheme against faults. When a fault occurs, protection equipment initiates operation of circuit breakers, to de-energize the faulted part. These circuit breakers are purposed to automatically connect or disconnect different parts of the power system in order to isolate the faults. This protective action must be done before excessive currents and voltages cause damage to connected equipment, such as transformers. Conventionally, a circuit breaker is an integral part of a protection scheme which accomplishes the task of fault detection, location and classification. However, there is no defined scheme that utilizes a standalone circuit breaker to accomplish these tasks. This project therefore, proposes a standalone, automatic and intelligent circuit breaker with fault detection, location and classification capabilities. In addition, this automatic circuit breaker will isolate loads from the distribution transformer. The proposed methodology would improve reliability through operation efficiency, increase productivity and reduces man-hours as a result of improvement in restoration conditions and increases revenue for utilities companies. 1.3 Objectives of Study The objectives of this study are as follows: i. To build and construct a hardware prototype data collecting device for fault monitoring with instantaneous date and time log-in feature. ii. Develop a machine learning algorithm for fault detection and location within the network. iii. Classify the various electrical faults using suitable machine learning algorithms. University of Ghana http://ugspace.ug.edu.gh 5 1.4 Scope This project work is situated within the framework of power distribution fault data collection, protection and control in power distribution systems. It is defined in the protection scheme through the control action of data collection device. Due to the data limitations available for this project, a single phase direct current DC network was considered. 1.5 Research Methodolody By observing the voltage and current signals of a line, one is able to identify the existence of faults in the system. These signals are also used to identify, locate and classify faults and based on these observations the faulted line is isolated. The algorithms investigated in this project consist of the following stages. i. The Fault Detection, location and classification: The k-Nearest Neighbor (kNN) is proposed to determine if a fault has occurred or not. The input to this network includes DC currents, I, and voltages, V, of the system at different nodes for fault detection. The output of the network shows the status of the transmission line. Each node in the network has two fault states (i.e. short circuit and open circuit). The complexity of the algorithm employed in the network is determined by, O (2𝑁 + 2). (where O – indicates the big O- notation, N- Denotes the number of nodes in the network); that is fault detection. ii. The position sensors feed information to the KNN for the fault location. iii. The position information, currents and voltages at each node of the network is used for the classification of the fault. iv. Fault Isolation: The control action of the fault isolation is done based on the fault detected in the transmission network. In order to perform the above tasks, the module of the data collector device was designed and simulated in Proteus (version 7.8) and this provides a convenient means of modelling the transmission line. The program was written using embedded C on ATMEL studio 6.2 IDE platform. The AVR-Ready2 development board by Mickroelectronika with AVR mickroprog was used in writing the program onto the microcontroller University of Ghana http://ugspace.ug.edu.gh 6 (ATMEGA 88). The data collected from the device was passed to the PC through the USART-USB- convertor; this was used to train the KNN, Decision Tree (DT) and the Support Vector Machine (SVM). 1.6 Outline of the Project Dissertation This dissertation consists of five chapters including the introduction which form the chapter one. Chapter two presents the literature review of the theory of fault detection, location and classification incorporated in the power distribution networks. Chapter three presents the methodology and the verification process of the data collecting device, the collector server, the fault classification algorithms and the application of the device in the network. Chapter four presents the discussion of the developed data collecting device for the network and the result. Finally, chapter five comprises of the conclusion, recommendations and future work. University of Ghana http://ugspace.ug.edu.gh 7 CHAPTER TWO 2 LITERATURE REVIEW 2.1 Power Distribution System The primary purpose of an electricity distribution system is to meet the customer’s demands for energy after receiving the bulk electrical energy from transmission or sub-transmission substation. There are basically two major types of distribution substations: primary substation and customer substation. The primary substation serves as a load centre and the customer substation interfaces to the low voltage (LV) network. Customer substation refers to a distribution room normally provided by the customer. The distribution room can accommodate a number of HV switchgear panel and the transformer to enable LV connection to the customer incoming switchboard. Depending on the geographical location, the distribution network can be in the form of overhead lines or underground cables. Cables are commonly used in urban areas and overhead lines are adopted for rural areas. Different network configurations are possible in order to meet the required supply reliability. Protection, control and monitoring equipment are provided to enable effective operation of the distribution network [17]. 2.2 Protection Systems Power quality requirements resulting from the deregulated electrical markets have motivated the improvement of fault location methods in the distribution system to speed up the restoration process. Also building robust protection for the system has become another priority for electrical power distribution engineers and researchers. A new fault location scheme designed for single phase to ground, short circuit fault and overhead tree phase power distribution was developed using steady state analysis method to locate the fault [2]. According to [3], Power quality requirements resulting from the deregulated electrical markets have motivated the improvement of fault location methods in the distribution system to speed up the restoration process. An existing work on a fault location based on fuzzy logic algorithm has been design to detect fault on single line-ground fault, phase-phase fault, double line to ground fault and three fault [1]. A new fault location University of Ghana http://ugspace.ug.edu.gh 8 scheme designed for single phase to ground, short circuit fault and overhead three phase power distribution was developed using steady state analysis method to locate the fault [2]. A further consideration on the load profile by variation and its formulation, considering only local measurements was used for large distribution systems under different fault types [3]. Models in the past proposed circuit breaker used for modelling is a thyristor controlled type. Details of the power circuit and its firing control part were demonstrated in graphical diagrams using elements of the MATLAB’s Power System Blockset (PSB) [4]. In this project work a microprocessor based circuit breaker is modelled with a fault location, detection and classification scheme using machine learning algorithm. 2.3 Protection Systems for the Distribution Transformer Transformers are a critical and one of the expensive components of the power distribution system. Due to the long lead time for repair and replacement of transformers, a major goal of transformer protection will restrict the damage to a faulted transformer & also protect it from thieves to avoid long term area blackouts. The comprehensive transformer protection provided by multiple function protective relays is appropriate for critical transformers of all applications [2]. 2.4 Fault Types and Protection Fault is an unwanted short circuit condition that occurs either between two phases of wires or between a phase of wire and ground. Short circuit is the most risky fault type as flow of heavy currents can cause overheating or create mechanical forces which may damage equipment and other elements of power system [1][4].. 2.4.1 Single –line –to ground fault Phase to Ground (L-G) Fault. L-G is a short circuit between any one of phase conductor sand earth. It may be caused either by insulation failure between a phase conductor and earth or breaking and falling of phase conductor to the ground. University of Ghana http://ugspace.ug.edu.gh 9 2.4.2 Double line to ground fault Two Phases to Ground (L-L-G) Fault .L-L-G is a short circuit between any two phases and earth 2.4.3 Line – line fault Phase to Phase (L-L) Fault. L-L is a short circuit between any two phases of the system also a three-Phase (L- L-L) Fault, L-L-L is a short circuit between any two phases of the system. 2.4.4 Open Circuit Fault This type of fault is caused by breaking of conducting path. Such fault occurs when one or more phases of conductor break or a cable joint/jumper (at the tension tower location) on an overhead line fails. Such situations may also arise when circuit breakers or isolators open but fail to close in one or more phases. During the open circuit of one of the two phases, unbalanced current flows in the system, thereby heating rotating machines. Protective schemes must be provided to deal with such abnormal conditions. 2.5 Protection of Transmission Lines Transmission line system is regarded with great importance in power system. Faults that occur frequently with transmission lines system, should affect electricity users. Faults, aforementioned may be caused by neither a single person, animal or natural occurrences. Thus to prevent and decrease damage that would happen, must systematically protect the transmission line system [20]. . 2.5.1 Overcurrent Relaying Overcurrent relays generally provide the same level of protection as power fuses. Higher sensitivity and fault clearing times can be achieved in some instances by using an overcurrent relay connected to measure residual current. This application allows pick up settings to be lower than expected maximum load current. It is also University of Ghana http://ugspace.ug.edu.gh 10 possible to apply an instantaneous overcurrent relay set to respond only to faults within the first 75% of the transformer [23]. 2.5.2 Directional Relaying Protective relays are intelligent electronic devices (IEDs) which receive measured signals from the secondary side of CTs and VTs detect whether the protected unit is in a stressed condition (based on their type and configuration) or not. A trip signal is sent by protective relays to the circuit breakers to disconnect the faulty components from power system if necessary. Utilization of the current-only directional relays for possible distribution side protection, like optimized fault localization using centralized breaking scheme, solutions to close-in faults can be referred to in [24]. This is a key focus area for enabling the smart grid. 2.5.3 Distance Relaying Transmission line system using distance relay is very popular. Protective relaying is one of several features of power system design concerned with minimizing damage to equipment and interruptions to service when electrical failures occur. Distance relays are generally used for phase fault primary and back-up protection on sub-transmission lines, and on transmission lines where high-speed automatic reclosing is not necessary to maintain stability and where the short time delay for end-zone faults can be tolerated on the transmission line [20]. The fundamental principle is based on the measure of particular fixed settings, mainly the impedance at fundamental frequency between the relay location and the fault point [21], and [22]. 2.5.4 Pilot Relaying Pilot relaying is the best type for line protection. It is used whenever high-speed protection is required for all types of short circuits and for any fault location. For two-terminal lines, and for many multi-terminal lines, all the terminal breakers are tripped practically simultaneously, thereby permitting high-speed automatic reclosing. The combination of high-speed tripping and high-speed reclosing permits the transmission system to be loaded more nearly to its stability limit, thereby providing the maximum return on the investment. University of Ghana http://ugspace.ug.edu.gh 11 2.6 Fault Detection Systems The electrical power system consists of so many different complex dynamic and interacting elements, which are always prone to disturbance or an electrical fault. The use of high capacity electrical generating power plants and concept of grid, i.e. synchronized electrical power plants and geographical displaced grids, required fault detection and operation of protection equipment in minimum possible time so that the power system can remain in stable condition. The faults on electrical power system transmission lines are supposed to be first detected and then be classified correctly and should be cleared in least fast as possible time. The protection system used for a transmission line can also be used to initiate the other relays to protect the power system from outages. A good fault detection system provides an effective, reliable, fast and secure way of a relaying operation [19]. 2.6.1 Fault Detection using ANN It is necessary to identify the fault and classify its type with the aim of establishing safety and stability of the power system. Lim and Shoureshi [3] developed ANN based monitoring system for health assessment of electric transmission lines. Their system showed satisfactory performance in fault classification by using both MLP (multilayer perceptron) and ART (Adaptive Resonance Theory) classifiers [3]. From [2], considering the input and output data, In order to build up an ANN, the inputs and outputs of the neural network have to be defined for pattern recognition. The inputs to the network should provide a true representation of the situation under consideration. The process of generating input patterns to the ANN fault detector (FD) was considered [2]. The simulated training data set was used to train the fault detector. The fault detection task can be formulated as a pattern classification problem. The fully connected three-layer feed-forward neural network (FFNN) was used to classify faulty/non-faulty data sets and the error back- propagation algorithm was used for training. The numbers of neurons in the input and hidden layers were selected empirically through extensive simulations. Various network configurations were trained and tested in order to establish an appropriate University of Ghana http://ugspace.ug.edu.gh 12 network with satisfactory performances, which were the fault tolerance, time response and generalization capabilities [2]. 2.6.2 Fault Detection Using Wavelet based Transient Extraction Wavelet transform (WT) is a novel signal processing technique developed from the Fourier transform (FT) and has been widely used to signal processing application [5],[6]. The wavelet transform can also be employed for pre-processing of input data to improve the performance of artificial-neural-network (ANN)-based algorithms [7]. In [8] principal component analysis technique is proposed to identify the dominant pattern of the signal pre- processed by the wavelet transform. This way, the extracted information of the voltage and current signals by wavelet transform at different scales is utilized. This technique improves the capability of traveling-wave detection especially for the faint and close-in faults. 2.7 Fault Location Techniques The increasing demand of electricity has resulted in a number of lines in operation and their total length. These lines experience faults which are caused by storms, lightning, snow, freezing rain, insulation breakdown and, short circuits caused by birds and other external objects. In most cases, electrical faults manifest in mechanical damage, which must be repaired before returning the line to service. The restoration can be expedited if the location of the fault is either known or can be estimated with reasonable accuracy. Fault locators provide estimate for both sustained and transient faults [9]. Generally, transient faults causes’ minor damage that is not easily visible on inspection. Fault locators help identify those locations for early repairs to prevent recurrence and consequent major damages. This is mainly because of the impact of transmission line faults on the power systems and the time required to physically check the lines is much larger than the faults in the sub-transmission and distribution systems. Of late, the location of faults on sub-transmission and distribution systems has started receiving some attention as many utilities are operating in a deregulated environment and are competing with each other to increase the availability of power supply to the customers. University of Ghana http://ugspace.ug.edu.gh 13 The basic method of fault location consisted of visual inspection. Other methods of the locating of transmission line faults consist of using voltages and currents measured at one or both terminals of a line. The methods can be divided into three categories: methods that are based on traveling waves, methods that use high frequency components of currents and voltages and, methods that use the fundamental frequency voltages and currents measured at the terminals of a line. The last method, also classified as impedance-based method, consists of calculating line impedances as seen from the line terminals and estimating distances of the faults. Impedance-based methods are more sufficient if it is located in the incoming bay of the substation. As a result the algorithm finds one or several possible faulted line sections based on distance [9]. 2.7.1 Fault Location using Phasor Measurements In electrical utilities, transmission lines form the backbone of power systems. With regard to reliability and maintenance costs of power delivery, accurate fault location for transmission lines is of vital importance in restoring power service, and reducing outage time as much as possible. The developed fault location/detection indices can be used for transmission line protection as well [15]–[17]. However, due to the high installation cost of PMUs, majority of utilities install PMUs only at key substations. Thus, the digital measurements at two line terminals are acquired asynchronously in the absence of GPS signal. Therefore, fault location estimation based on two-terminal data will suffer in terms of accuracy. Consequently, fault locations based on post fault data synchronization algorithms were considered in some papers. 2.7.2 Fault Location using Wavelet Transforms This method presents a wavelet transform (WT) and MATLAB based simulation for estimating fault location on transmission lines. The simulation is developed as a one-end frequency based technique and used both voltage and current effect resulting from remote end of the power system. One cycle of waveform, covering pre-fault and post-fault information is abstracted for analysis. The discrete wavelet transform (DWT) is used for data pre-processing. Discrete Wavelet Transform is applied for determining the fundamental component, which can be useful to provide valuable information to the Distance relay to respond to a fault. It is applied for decomposition of fault transients, because of its ability to extract information from the transient signal, University of Ghana http://ugspace.ug.edu.gh 14 simultaneously both in time and frequency domain. MATLAB software is used to simulate different operating and fault conditions on high voltage transmission line, namely single phase to ground fault, line to line fault, double line to ground and three phase short circuit [25]. 2.8 Fault Classification Methods Different types of faults can be classified into several types. Some major faults are phase fault such as phase to ground fault, phase to phase fault, phase-phase to ground fault, three phase fault. Other faults of electricity are of no major importance. But they still are considered for the power system operation. They are open circuit faults, inter turn fault, and other faults [11]. 2.8.1 Fault Classification in Transmission Line Network by KNN Algorithm The purpose of the k- Nearest Neighbours (KNN) algorithm is to use a database in which the data points are separated into several separate classes to predict the classification of a new sample point. Depending upon its threshold value as compared with test signals by standard deviation mathematical formulae we can detect and classify which type of fault will occur in transmission line. The difference in actual value and the test signal will give us the nearest threshold value about exact fault information. The logic uses wavelet transform for extracting the hidden information in the current wave forms when a fault occurs, which is then suitably transformed to extract fault signatures and characterize the faults [10]. 2.8.2 Fault Classification in Transmission Lines using Artificial Neural Networks (ANN) The feasibility of using artificial neural network (ANN) for transmission line protection has been confirmed [12]. ANN consists of highly distributed interconnections of non- linear processing elements and can be considered as an adaptable system that can learn relationships through repeated presentation of data, and is capable of generalizing to new, previously unseen data [12]. Neural networks are used for both regression and classification [12]. In regression, the outputs represent some desired, continuously valued transformation of the input patterns. In classification, the objective is to assign the input patterns to one of several categories [12]. ANNs possess excellent features such as generalization capability, noise immunity, robustness and fault tolerance. Therefore, the decisions made by ANN based relaying algorithm will not be seriously affected by variations in system conditions. For this, neural network for a particular application must be trained [12]. University of Ghana http://ugspace.ug.edu.gh 15 2.8.3 Fault Classification in Transmission Line using Decision Tree (DT) DT is the data mining classification algorithm used for high-dimension pattern classification. The mathematical representation of the DT algorithm is built on the following definitions  1 2, ,.............., TmX X X X (2.1)  1 2, ,........, ,.......,i ij inX x x x x (2.2)  1 2, ,....., ,.... Ti mS S S S S (2.3) Where m is the number of available observations (cases), n the number of independent variables (features), S the m-dimensional vector of the categorical (dependent) variable to be predicted from , iX X the ith component vector of n dimensional independent variables, 1 2, ,...... ,......i i ij inx x x x the independent variables (predictors) of the pattern vector iX and T the vector transpose notation. The goal of DT data mining is to predict S based on observing X . As many DTs with various accuracy levels can be constructed from a given X , finding the optimal tree is difficult in practice because of the large size of the search space. However, powerful algorithms have been developed to construct DTs with a reasonable trade-off between accuracy and complexity. These algorithms use strategies that grow a DT by making a series of locally optimum decisions about which feature (system parameter) to use for partitioning the data set X . 2.8.4 Fault Classification IN Transmission Lines using Support Vector Machine (SVM) As with any supervised learning methods training the network is very important. The SVM is therefore first trained and the trained network is used to classify or predict new data. In addition to obtain more accurate results various SVM kernel functions are used and the parameters of kernel functions must be tuned. The main features of SVM are: The upper bound on the generalization error does not depend on the dimension of the space The error bound is minimized by maximizing the margin g. University of Ghana http://ugspace.ug.edu.gh 16 Considering the binary classification task with data point ( 1,2,3...... )ix i m  having labels 1iy   and the decision function be ( ) ( . )f x sign w x b  (2.4) Where w is the n dimensional vector and b is the scalar. The vector w and scalar b determines the position of the separating hyper plane. If the dataset is separable then the data will be correctly classified where ( . ) 0"iy w x b i  . Thus canonical hyper plane is such that . 1w x b  for closest points on one side and . 1w x b   for closest points on other side as in Fig. 2. 1 .For separating . 0w x b  the normal vector is w and hence, the margin is given by the projection of 1 2x x on to this vector. Since, 1. 1w x b   and 2. 1w x b   , the margin is 1 || ||g w . To maximize the margin the task is, therefore, subject to the constraint ( . ) 0i iy w x b  ; and the learning task can be reduced to minimization of the primal Lagrangian  2 1min ( ) 2 g w w  (2.5) University of Ghana http://ugspace.ug.edu.gh 17 X2 X1 F(X) = 0 X1 X2 Figure 2.1 Samples SVM Classifier 2.9 Contribution of Dissertation In this dissertation, a unique contribution was made by realizing a device that collected data for training using machine learning Decision tree, Support vector machine and k- Nearest Neighbour to predict, locate and classify the faults on defined nodes in the power distribution network with fast training time. The machine learning algorithms were implemented in python language. University of Ghana http://ugspace.ug.edu.gh 18 CHAPTER THREE 3 MATERIALS AND METHODOLOGY 3.1 Methodology This chapter shows the method that was used in collecting data, detecting fault, classifying the type of fault and locating the position or area where the fault has occurred. This chapter also discusses the procedure by which the data collecting device was realized and how the control action was executed when the device detect fault(s) and locates the faults in the power distribution network. The overhead cables were modelled by using resistor network. The transmission lines are commonly found in densely populated cities. The line parameter dependent functions uses the method of mapping to translate voltages and currents on an electrical transmission line and define them with respect to the nodes of the network. 3.1.1 The Power Distribution Network Modelling In this work, a DC network with three (3) nodes is modelled with discrete components. Resistors R1, R2 and R3 are used to model the impedance of a transmission line between chosen nodes. SOURCE VOLTAGE, VOLTAGE 0, VOLTAGE 1 and VOLTAGE 2 are voltage sensors and they form the voltage sensor array. CURRENT 0, CURRENT 1 and CURRENT 2 are current sensors and they form the current sensor array. OCCT 0 O, OCCT 1 O and OCCT 2 O are normally closed (NC) switches which are used to introduce open circuit faults at the different nodes. SCCT 0 O, SCCT 1 O and SCCT 2 O are normally opened (NO) used to introduce short circuit faults at the different nodes. The LOAD is used to model the load demand on the network. University of Ghana http://ugspace.ug.edu.gh 19 Figure 3.1 Model of Distribution line 3.2 Data Collector Device This is an embedded device designed to collect data from the distribution lines and constantly transmit the data to the computer for training purposes and real-time prediction of the state of the distribution line. 3.3 System Architecture Overview The system is made up of two main devices namely the Data Collector Device and a Computer which are interfaced with a Serial-To-USB convertor. The operational development is also in two phases namely the Training Phase and the Testing/Implementation Phase. The data collection device is made up of hardware and firmware whilst the computer has a database application, a training algorithm and application software. University of Ghana http://ugspace.ug.edu.gh 20 Figure 3.2 Architectural Overview of the system 3.3.1 Voltage Sensor Array Ideally, the voltage sensor would be a potential transformer with its output stepped down and converted to a DC voltage within a range that is compatible with the ADC configuration in the microcontroller. But for the purposes of the prototype project work, a simple voltage divider circuit is used to sense voltages at each nodes. University of Ghana http://ugspace.ug.edu.gh 21 Figure 3.3 Voltage Sensor Model The voltage sensor array uses the voltage divider concept in sensing the voltage values from the network. Resistor voltage dividers were used to create the reference voltages to reduce the magnitude of a voltage so it can be measured, and may also be used as signal attenuators at low frequencies. For direct currents which are relatively low frequencies, a voltage divider may be sufficiently accurate if made only of resistors; where frequency response over a wide range is required, a voltage divider may have capacitive elements added to compensate load capacitance. In electric power transmission, a capacitive voltage divider is used for measurement of high voltage but since this prototype data collecting device is fed with a DC source, it considered a 10kΩ resistor for the voltage sensing values. 3.3.2 Current Sensor Array Ideally, the current sensor would be a current transformer with its output stepped down and converted to a DC voltage within a range that is compatible with the ADC configuration in the microcontroller. But for the purposes of this work Microbe’s current click is used to sense currents at the nodes. University of Ghana http://ugspace.ug.edu.gh 22 Figure 3.4 Current Sensor Model 3.3.3 Position and Fault-Type Sensor Array The open circuit at node ‘0’ ‘OCCT x O’ and short circuit at node ‘0’ ‘SCCT x O’ do not only have the functionality of introducing faults to the distribution network but also reveals the particular node that the fault has occurred to the microcontroller. These devices are toggle switches. Toggle switches are two (2) mechanically linked switches one of which is a normally closed (NC) and the other normally open (NO). While one of the contacts is used to introduce faults the other is used to send signal the micro controller indicating the type of fault introduced and the particular node to which the fault was introduced. In Fig 2.6 switches SW7, SW9 and SW11 supply short circuit fault data at position 0, position 1 and position 2 respectively while switches SW8, SW10 and SW12 supply open circuit fault data at position 0, position 1 and position 2 respectively. University of Ghana http://ugspace.ug.edu.gh 23 Figure 3.5 Position and Fault-Type Sensor Array Model 3.3.4 Fault Location Sensors Power cable fault location techniques are used in power system for accurate pinpointing of the fault positions. The benefits of accurate location of fault are: 1. Fast repair to restore back the power system. 2. Improve the system availability and performance. 3. Reduce operating cost and save the time required by the crew searching in bad weather, noisy area and tough terrains. 3.3.5 Fault Simulation using Toggle Switches Toggle switches are actuated by moving a lever back and forth to open or close an electrical circuit. The toggle switches are actuated by moving a lever back and forth to open or close an electrical circuit. The University of Ghana http://ugspace.ug.edu.gh 24 toggle switches were connected such a way that it can be used to create and rectify a fault within the transmission line and simulate faults at the nodes. 3.3.6 Microcontroller (ATMEGA 88) The microcontroller (ATMEGA88) collates all data from the sensors, organizes them and periodically transmits the data to the computer for filing. The Analogue-To-Digital (ADC) peripheral of the microcontroller is used to read the voltage and current values into the controller memory. The Universal Synchronous Asynchronous Receiver Transmitter (USART) is used to send the data to the computer. Figure 3.6 AVR Microcontroller 3.3.7 Serial-To-USB Convertor (FTDI) This is the channel of communication between the microcontroller and the computer. The controller uses serial communication and the computer uses the USB. The FTDI cable is a USB to Serial (TTL level) converter which allows for a simple way to connect TTL interface devices to USB. The VCC pins of this FTDI cable are configured to operate at 5V with 3.3V I/O. The FTDI cable is designed around an FT232RQ, which is housed in a USB A connector. The other side of the cable is terminated with a 0.1" pitch, 6-pin connector with the following pin out: RTS, RX, TX, 5V, CTS, GND (RTS is the green cable and GND is black). University of Ghana http://ugspace.ug.edu.gh 25 3.4 Firmware 3.4.1 Initializing Universal Synchronous Asynchronous Receiver Transmitter The Universal Synchronous and Asynchronous serial Receiver and Transmitter (USART) is a highly flexible serial communication device. The universal synchronous and asynchronous receiver/transmitter (USART) takes bytes of data and transmits the individual bits in a sequential fashion. At the destination, a second UART re-assembles the bits into complete bytes. Each UART contains a shift register, which is the fundamental method of conversion between serial and parallel forms. The USART is initialized to use:  Baud Rate = 9600  Data Bits = 8  Parity = NONE  Stop Bits = 1 3.4.2 Reading Current / Voltage Sensors (Analogue – Digital Convertor) The training data includes voltages and currents at various nodes of the distribution network with the type and location of fault information. University of Ghana http://ugspace.ug.edu.gh 26 Figure 3.7 Block Diagram of Data collector device for training data collection Voltage sensors, current sensors, position sensors and fault-type sensors are installed at the different nodes of the power distribution network. These sensors are used to gather the required data to the microcontroller. University of Ghana http://ugspace.ug.edu.gh 27 3.4.3 Training Data Collector Firmware The main task of the Training Data Collector Firmware is to periodically transmit read network data including voltage, current, position and fault-type data to the computer. Figure 3.8 Data collector flowchart for training data collection 3.4.4 Data Transmission (TRANSMISSION DATA TO PC) This process transmits the data to the PC using the USART. University of Ghana http://ugspace.ug.edu.gh 28 3.5 Software 3.5.1 Data Collector Server (Wait/Delay Process Block) This block defines the frequency of transmission of the data. It is set to 500ms delay. 3.5.2 Database (My SQL) The data base was named “ecglvdrdb” with a single table called data. The number of fields in the table is 10; source: which indicates the state of the transformer whether it is ON or OFF. volts 0: indicates voltage at node 0 volts1: indicates voltage at node 1 volts2: indicates voltage at node 2 amp 0: indicates current at node 0 amp 1: indicates current at node 1 amp 2: indicates current at node 2 The fault: indicates what type of fault, whether it a short circuit or open circuit or no fault Location: indicates the location of the fault at the specific node of the network Class: indicate the single value that defines the type of fault and its location together. University of Ghana http://ugspace.ug.edu.gh 29 Figure 3.9 ECG low voltage database schema 3.5.3 Serial Commutation (Initialize Communication Peripheral) This is the communication protocol between the microcontroller and the PC. It is required that the transmitted bits are synchronized hence the parameters for the application’s peripheral has to be the same as that of the microcontroller. The communication peripheral is initialized to use:  Baud Rate = 9600  Data Bits = 8  Parity = NONE  Stop Bits = 1 3.5.4 Collecting Data (Test/Real-Time Data Collection) The test data includes voltages and currents at various nodes of the distribution network only. The position and location information is encoded into seven (7) classes. University of Ghana http://ugspace.ug.edu.gh 30 Class 1 indicates No Fault Status Class 2 indicates Open Circuit at Position 0 Status Class 3 indicates Open Circuit at Position 1 Status Class 4 indicates Open Circuit at Position 2 Status Class 5 indicates Short Circuit at Position 0 Status Class 6 indicates Short Circuit at Position 1 Status Class 7 indicates Short Circuit at Position 2 Status This step simplifies the classification problem by reducing the output vector of the classifier from a two-dimensional space to a one-dimensional one. Figure 3.10 Data collector device for testing and real-time diagnostics University of Ghana http://ugspace.ug.edu.gh 31 3.6 Computer Software The computer software section of the system can be broken down into three (3) main parts namely:  Data Collector (database server)  Trainer (Machine Learning Algorithm)  Main Application (Frontend) Figure 3.11 Software Process Overview 3.6.1 Data Collector Server This server reads training data from the data collector device via the serial-to-USB converter and stores them in a database. The server waits until there is data in the received buffer and it reads the data into an array until it the termination character ‘/n’ is encountered. The raw date is then formatted and written to the database table. University of Ghana http://ugspace.ug.edu.gh 32 Figure 3.12 Data Collector Flowchart 3.6.2 Training Procedure (Trainer Algorithm) The K-Nearest Neighbour (KNN) classification algorithm is trained to learn the pattern of the data. The training data is read from the database table into memory. The data is then processed by partitioning the data into input data (x) and output data (y). The input data consists of voltage at node 0, voltage at node 1, voltage at node 2, current at node 0, current at node 1 and current at node 2. And the output data is the label class of fault the input data belongs to. There are University of Ghana http://ugspace.ug.edu.gh 33 seven (7) classes in all. The KNN learning algorithm is trained with the input data with k = 3. The trained algorithm is then saved to complete the training task. Figure 3.13 Training Flowchart University of Ghana http://ugspace.ug.edu.gh 34 The purpose of the k-Nearest Neighbour (kNN) algorithm is to use a data base in which the data points are separated into several separate classes to predict the classification of a new sample point. This sort of situation is best motivated through examples. To train the network, a suitable number of representative examples of the relevant phenomenon must be selected so that the network can learn the fundamental characteristics of the problem and, once training is completed, provide correct outputs in new situations not envisaged during training. The implementation procedures in the training of the kNN are presented as follows: Step 1: Obtain input data and target data from the simulation Step 2: Assemble and pre-process the training data for the kNN Step 3: Create the network object and train the network until condition of network setting parameters are reached Step 4: Test and conduct fault detection, location and classification Step 5: Stored the trained network. Steps (1-5) are offline processes Step 6: Pre-process the new input before they are subjected to the trained network to obtain required data 3.6.3 Data Validation and Testing (Testing/Real-Time Data Collector Firmware) The main task of the Testing/Real-Time Data Collector Firmware is to periodically transmit read network data including voltage and current data to the computer in 500ms. The functionality of the blocks in Fig 2.9 and Fig 2.10 are same as the ones expounded above. University of Ghana http://ugspace.ug.edu.gh 35 Figure 3.14 Data collector flowchart for real-time diagnostics University of Ghana http://ugspace.ug.edu.gh 36 3.6.4 Main Application Figure 3.15 Main Application Flowchart 3.6.5 Serial Communication The most basic method for communication with an embedded processor is asynchronous serial. It is implemented over a symmetric pair of wires connecting two devices (referred as host and target here, though these terms are arbitrary). Whenever the host has data to send to the target, it does so by sending an encoded bit stream over it’s transmit (TX) wire. University of Ghana http://ugspace.ug.edu.gh 37 This data is received by the target over its receive (RX) wire. The communication is similar in the opposite direction. This mode of communications is called asynchronous because the host and target share no time reference (no clock signal). Instead, temporal properties are encoded in the bit stream by the transmitter and must be decoded by the receiver. A commonly used device for encoding and decoding such asynchronous bit streams is a Universal Asynchronous Receiver/Transmitter (UART). 3.6.6 Reading Data from the Data Collector Device The current and voltage sensors are interfaced with the microcontroller via ADC. The ADC is initialized to use a sampling frequency of 125 KHz and an external voltage reference of 5V. The average of eight (8) readings is used to represent a particular reading. 3.6.7 Process Data and Feature Selection The data is acquired through the fault simulation. For each of the faults to be simulated, one of the toggle switches is selected and the corresponding current and voltage values recorded and labelled. A feature selection algorithm is written in python language, and can be seen as the combination of a search technique for proposing new feature subsets, along with an evaluation measure which scores the different feature subsets. The simplest algorithm is to test each possible subset of features finding the one which minimizes the error rate. This is an exhaustive search of the space, and is computationally intractable for all but the smallest of feature sets. The choice of evaluation metric heavily influences the algorithm, and it is these evaluation metrics which distinguish between the three main categories of feature selection algorithms: wrappers, filters and embedded methods. University of Ghana http://ugspace.ug.edu.gh 38 CHAPTER FOUR 4 EXPERIMENTATIONS AND RESULTS 4.1 Simulation The simulation diagram of the data collection device is show below, it consist of the cable modelling circuit with it associated switches, current and voltage sensors and the AVR microcontroller. Figure 4.1 Simulation diagram of the data collector device University of Ghana http://ugspace.ug.edu.gh 39 4.2 Construction and Assembly Figure 4.2 The PCB design of the data collecting device 4.3 Collecting the Training Data The data collected from the device during the simulation of a fault has been put in the table with the title heading ‘Virtual Terminal’. The results obtained from the faults indicated in each column as the ON or OFF states of the device, voltage reading from node 0, 1 and 2; current readings from nodes 0,1 and 2; the location and class to which the faults fits. The data was collected by varying the load, and fault was introduced into the system by using the toggle switches. For each fault introduced by the toggle switch, the load is varied accordingly. University of Ghana http://ugspace.ug.edu.gh 40 Figure 4.3 Faults simulation data 4.4 Training the Classifiers The classifiers algorithm considered in this project design were KNN, DT and SVM. The data collected were partitioned into two parts; one half was used for training the classifier and the other half was used for testing. 4.5 Training Results A data size of 801 x 7 was used (i.e.7 features in one sample and 801 samples); target was 801 x 1. It was observed that the dependability stays at 100% while the accuracy is 100%. Further, the response time of the proposed scheme is compared with that of other differential existing schemes along with their dependability for crucial different fault situations during load variations. The comparative assessments based on response time and dependability (in PCB board) are presented in table 4.2 and the training results presents in table 4.1 University of Ghana http://ugspace.ug.edu.gh 41 Table 4.1 Training results for load variation between 20%-100% Algorithms Accuracy level Training Time SVM 1.0 0.00300002098083 KNN 1.0 0.0019998550415 Decision tree (DT) 1.0 0.000999927520752 Table 4.2 Training results for load variation between 0% - 100% Algorithms Accuracy level Training Time SVM 0.973783 0.023 KNN 0.992509 0.006 Decision tree (DT) 0.995006242 0.000999928 University of Ghana http://ugspace.ug.edu.gh 42 Table 4.3 My SQL data base for fault data capture 4.6 Real Time Implementation The PC is connected to the data collecting device and the toggle switch is move to and front to cause a fault in the network. The loads were varied to observe the current and voltage values. University of Ghana http://ugspace.ug.edu.gh 43 Figure 4.4 Inner picture of the data collector device 4.7 Testing and Validation A validation data set consisting of different fault types was generated using the transmission network model shown in Figure 4.5. For different faults on the model system, fault type; fault identification, location and classification with variation of the load values are changed to investigate the effects of these factors on the performance of the proposed algorithm. University of Ghana http://ugspace.ug.edu.gh 44 Figure 4.5 Picture of the set up with open circuit fault location at node 0 University of Ghana http://ugspace.ug.edu.gh 45 Figure 4.6 Picture of the set up with open circuit fault location at node 1 Figure 4.7 Picture of the set up with open circuit fault location at Node 2 University of Ghana http://ugspace.ug.edu.gh 46 Figure 4.8 fault predictor at No fault condition The PC is connected to the data collecting device and the toggle switch is move to and front to cause a fault in the network. The device predict fault at open circuit fault condition at node 0; with the current and voltage readings at the specific node as well as the date and time the fault occurred indicated in Fig 4.5 the fault condition and the result tabulated in table 4.4. University of Ghana http://ugspace.ug.edu.gh 47 Figure 4.9 fault predictor at open circuit fault condition Table 4.4 shows the results obtained when the data collecting device was tested under various fault conditions. There were seven cases considered in this testing. A unique fault was introduced into the network and the results indicated that for each of the cases, the device performed very well with the data collection. Case I: No fault condition was tested in the network with the current and voltage readings obtained accurately and the transformer indicates Online. Case II : Open circuit fault at node (location) 0,1 and 2 was tested and the corresponding current and voltage readings were obtained with the transformer indicating Offline. Case III: Short circuit fault at node (location) 0, 1 and 2 was tested and the corresponding current and voltage readings were obtained with the transformer indicating Offline. . University of Ghana http://ugspace.ug.edu.gh 48 Table 4.4 Table depicting results during testing Case Transformer state Source Fault Location Current (milliamps) Voltage (volts) Node 0 Node 1 Node 2 Node 0 Node 1 Node 2 1 Online ON No fault N/A 225 209 064 172 169 169 2 Offline ON Open circuit 0 016 168 007 000 000 000 3 Offline ON Open circuit 1 015 168 007 183 00 000 4 Offline ON Open circuit 2 014 182 029 177 174 000 5 Offline OFF Short circuit 0 009 180 007 000 000 000 6 Offline OFF Short circuit 1 009 243 235 010 000 000 7 Offline OFF Short circuit 2 012 241 231 014 005 000 University of Ghana http://ugspace.ug.edu.gh 49 CHAPTER FIVE 5 CONCLUSION The proposed prototype data collecting device for fault monitoring with instantaneous date and time log-in feature provides a new technique for fault identification, location and classification on the transmission line network using machine learning algorithms. In this dissertation, the machine learning algorithms for fault detection, classification and location technique were also realized. The techniques used depend upon the current and voltage signals from the sensors. The features were extracted from the current and voltage signals by using machine learning decision tree, the support vector machine and K- Nearest Neighbour (KNN). The feature vector is then given as input to the machine learning algorithms. The capabilities of machine learning algorithms in pattern classification were utilized. Simulation studies were performed for each of the algorithms and the performance of the scheme with different system parameters and conditions for fault location was investigated. The test result shows that the accuracy obtained for fault classification with the proposed decision tree is found to be better compared to kNN and SVM with respect to accuracy at 99.5% and the training time response at 0.000999928 seconds The DT is tested with data sets with wide variations in operating conditions of the power system network including the load variation and provides accurate results. The robustness and accuracy of the proposed DT showed the potential of the proposed method for protection of the distribution transformer in large power network. Dealing with current transformer which are being modelled using the current sensors and voltage transformer also modelled using the voltage divider technique; the device can handle much larger database, with the principles presented in this methodology. University of Ghana http://ugspace.ug.edu.gh 50 5.1 Future Work The device can be improved by considering, earth fault in addition to the three phase fault. Sensor weights could be developed for the sensors at different locations to illustrate the importance of the sensors in the system. University of Ghana http://ugspace.ug.edu.gh 51 REFERENCES [1] AIEE Committee Report, “Power system fault control, ”Transactions of the American Institute of Electrical Engineers,vol.70, no.1, pp.410–417, Dec.,2014. [2] Muntaser Abdulwahid Salman and Suhail Muhammad Ali, “ANN Based Detection and Location of Severe Three Phase Trip on the Transmission Lines of an Uncontrolled Power System” Anbar Journal of Engineering Sciences (AJES-2009), pp.40-42, 2009. [3] M. Kezunovic and I. Rikalo, “Detect and classify faults using Neural networks,” IEEE Computer Applications in Power, vol.9, no.4, pp.42–47, 1996. [4] Electrical Manufacturers Association, “Standards for power circuit breakers,”Tech.Rep.SG4-1954, National Electrical Manufacturers Association, New York, NY, USA, 1954. [5] Chaari, M. Meunier, and F. Brouaye,“Wavelet: a New Tool for the Resonant Grounded Power Distribution Systems Relaying”, IEEE Transactions on Power Delivery, vol. 11, no.3, pp. 1301-1308, July 1997. [6] P. P. Bedekar and D. Hamai, “Fault Type Classification and Fault Distance Location for All the Types of Faults for 220kV Transmission Line”, International Journal of Science Technology & Management, Volume No.03, Issue No. 08, August 2014 [7] F. Martin and J. A. Aguado, “Wavelet-based ANN approach for transmission line protection,” IEEE Transaction on Power Delivery., vol. 18, no. 4, pp. 1572–1574, Oct. 2003. [8] Peyman Jafarian, Majid Sanaye-Pasand, “A Travelling-Wave-Based Protection Technique Using Wavelet/PCA Analysis” IEEE Transaction on Power Delivery, vol. 25, no. 2, pp. 588 - 599, Apr. 2010. University of Ghana http://ugspace.ug.edu.gh 52 [9] T.W. Stringfield, D.J. Marihart and R.F. Stevens, “Fault Location Methods for Overhead Lines”, Transactions of the AIEE, Part III, Power Apparatus and Systems, Vol. 76 pp. 518- 530. , Aug. 1957. [10] Chaitanya V. Koleshwar and Sudhir P. Dhanure, “Advance Method for Fault Classification in Transmission Line System by KNN Algorithm” International Journal of Advanced Computer Technology (IJACT), ISSN: 2319-7900, volume 3, June 25, 2014. [11] Pituk Bunnoon, “Fault Detection Approaches to Power System: State-of-the-Art Article Reviews for Searching a New Approach in the Future” International Journal of Electrical and Computer Engineering (IJECE), pp. 553~560, Vol. 3, No. 4, August, 2013. [12] V. S. Kale, S. R. Bhide, P. P. Bedekar and G. V. K. Mohan, “Detection and Classification of Faults on Parallel Transmission Lines using Wavelet Transform and Neural Network” International Journal for Electrical and Computer Engineering, ISSN (Print): 2278-8948, Volume-2, Issue-5, 2013. [13] R. H. Salim, M. Resener, A. D. Filomena, K. R. Caino De Oliviera, A. S. Bretas, “Extended Fault-Location Formulation for Power Distribution Systems”, IEEE Transactions on Power Delivery, Vol. 24, No 2. pp. 508-516, 2009. [14] George Eduful and Godfred Mensah “An Investigation into Protection Integrity of Distribution Transformers -A Case Study” Proceeding of the world congress on Engineering, vol. II, 2010. [15] Anant Oonsivilai and Sanom Saichoomdee “Distance Transmission Line Protection Based on Radial Basis Function Neural Network” International Journal of Electrical, Computer, Energetic, Electronic and Communication Engineering .Vol. 3, No:12, 2009 [16] H. Zayandehroodi, A. Mohamed, H. Shareef and M. Mohammadjafari“ Automated Fault Location in a Power System with Distributed Generations using Radial basis Function Neural Networks” International Journal of Applied Sciences, Vol. 10, No. 23, p. 3032-3041, 2010. University of Ghana http://ugspace.ug.edu.gh 53 [17] Xiaodong Zhang, Marios M. Polycarpou, and Thomas Parisini “A Robust Detection and Isolation Scheme for Abrupt and Incipient Faults in Nonlinear Systems” IEEE Transactions on Automatic Control, Vol.47, No.4, April, 2002. [18] F. C. Chan “Electric Power Distribution Systems” Vol.III [19] Majid Jamil, Sanjeev Kumar Sharma and Rajveer Singh “Fault Detection and Classification in Electrical Power Transmission System Using Artificial Neural Network” Springer open journal, July, 2015. [20] Anant Oonsivilai and Sanom Saichoomdee “Distance Transmission Line Protection Based on Radial Basis Function Neural Network” International Journal of Electrical, Computer, Energetic, Electronic and Communication Engineering .Vol. 3, No:12, 2009. [21] P.M. Anderson, Power System Protection, McGraw-Hill, 1999. [22] D. V. Coury, D. C. Jorge, “Artificial neural network approach to distance protection of transmission lines”. IEEE Transactions on Power Delivery, pp. 102-108, 1998. [23] Phadke Arun “Power System Protection” The Electric Power Engineering Handbook, Ed. L.L. Grigsby and Boca Raton: CRC Press LLC, 2001 [24] A. Ukil, B. Deck, V. H. Shah, “Smart Distribution Protection Using Current-Only Directional Overcurrent Relay” IEEEPES Conference on Innovative Smart Grid Technology, 2010. [25] Shilpi Sahu (M.E. Student), Dr. A. K. Sharma “Detection of Fault Location in Transmission Lines using Wavelet Transform” International Journal of Engineering Research and Applications, Vol. 3 pp.149-151, Sep-Oct 2013,. [26] Murari Mohan Saha, R. Das, P. Verho and D. Novosel, “ Review of Fault Location Techniques for Distribution Systems” Power System and Communication Infrastructure for the future,Sept., 2002. University of Ghana http://ugspace.ug.edu.gh 54 APPENDICES Appendix I CODE FOR READING ADC CHANNEL int ADC_read (uint8_t mux) { char i = 0; int ADC_temp = 0; int ADC1 = 0; ADC_init(&mux); //ADCSRA = _BV(ADEN) | _BV(ADPS2);//the division factor between the system clock frequency and the input clock to the ADC is set to 16 //do a dummy readout first ADCSRA |= (1<