Analysis of Pre-Ictal and Non-Ictal Eeg Activity
Total Page:16
File Type:pdf, Size:1020Kb
ANALYSIS OF PRE-ICTAL AND NON-ICTAL EEG ACTIVITY: AN EMOTIV AND LabVIEW APPROACH Oscar Ferney Medina Thesis Prepared for the Degree of MASTER OF SCIENCE UNIVERSITY OF NORTH TEXAS December 2016 APPROVED: Vijay Vaidyanathan, Major Professor Kamesh Namuduri, Committee Member Xinrong Li, Committee Member Shengli Fu, Chair of the Department of Electrical Engineering Costas Tsatsoulis, Dean of the College of Engineering Victor Prybutok, Vice Provost of the Toulouse Graduate School Medina, Oscar Ferney. Analysis of Pre-ictal and Non-ictal EEG Activity: An EMOTIV and LabVIEW Approach. Master of Science (Electrical Engineering), December 2016, 67 pp., 2 tables, 38 figures, 26 numbered references. In the past few years, the study of electrical activity in the brain and its interactions with the body has become popular among researchers. One of the hottest topics related to brain activity is the epileptic seizure prediction. Currently, there are several techniques on how to predict a seizure; however, most of the techniques found in research papers are just mathematical models and not system implementations. The seizure prediction approach proposed in this thesis paper is achieved using the EMOTIV Epoc+ headset, MATLAB, and LabVIEW as the analog and digital signal processing devices. In addition, this thesis project incorporates the use of the Hilbert Huang transform (HHT) method to obtain intrinsic mode functions (IMF) and instantaneous frequency components of the transform. From the IMFs, features as variation coefficient (VC) and fluctuation indexes (FI) are extracted to feed a support vector machine that classifies the EEG data as pre-ictal and non-ictal EEGs. Outstanding patterns in non-ictal and pre-ictal are observed and demonstrated by significant differences between both types of EEG signals. In other words, a classification of EEG signals according to a category can be achieved proving that an epileptic seizure prediction technology has a future in engineering and biotechnology fields. Copyright 2016 by Oscar Ferney Medina ii ACKNOWLEDGEMENTS It has been quite an honor to work with Dr. Vijay Vaidyanathan for the past two and a half years. He has not only provided me with the opportunity to work with him in my research, but also be able to be part of the creation of the biomedical engineering department at the University of North Texas. He has also served as a mentor and a friend. Also, I would like to give thanks to Dr. Kamesh Namuduri for being patient with me throughout my time in the electrical engineering department and for providing the means to have a partnership with the biomedical and electrical engineering departments. Thanks to Ramanpreet Singh for being my unconditional friend and study partner. Without him, graduate school would have been a lot harder. Last, I would like to thank my parents, Adela and Oscar, and my sister Jennifer for being there for me in the most difficult times and providing their unconditional support. iii TABLE OF CONTENTS Page ACKNOWLEDGEMENTS ...................................................................................................................iii LIST OF TABLES ............................................................................................................................... vii LIST OF FIGURES ............................................................................................................................ viii CHAPTER 1. INTRODUCTION ........................................................................................................... 1 1.1 Motivation ............................................................................................................... 1 1.2 Electroencephalography (EEG) ............................................................................... 2 1.3 Epilepsy and Seizure Basics ..................................................................................... 3 1.3.1 Common Generalized Seizures [1] .............................................................. 4 1.3.2 Common Partial or Focal Seizures [1] ......................................................... 4 1.3.3 EEG Activity Terminology ............................................................................ 5 1.4 Artifacts ................................................................................................................... 5 1.5 Conclusion ............................................................................................................... 6 CHAPTER 2. METHODS .................................................................................................................... 7 2.1 EEG Acquisition device ............................................................................................ 7 2.1.1 Other EMOTIV Epoc+ Specifications ........................................................... 8 2.1.2 EMOTIV Pure EEG Raw EEG Software ......................................................... 8 2.2 Software .................................................................................................................. 9 2.2.1 Simulink ....................................................................................................... 9 2.2.2 MATLAB ..................................................................................................... 10 2.2.3 LabVIEW .................................................................................................... 11 2.3 Mathematical Background .................................................................................... 12 2.3.1 The Fourier Transform .............................................................................. 12 2.3.2 The Discrete Fourier Transform (DFT) ...................................................... 13 2.3.3 The Fast Fourier Transform (FFT) .............................................................. 13 2.3.4 Fourier Transform Digital Implementation ............................................... 14 2.3.5 Hilbert Huang Transform (HHT) ................................................................ 14 2.3.6 Empirical Mode Decomposition ............................................................... 14 iv 2.3.7 The Hilbert Transform ............................................................................... 17 2.3.8 Instantaneous Frequency ......................................................................... 17 2.3.9 Statistical Mean ........................................................................................ 18 2.3.10 Standard Deviation ................................................................................... 19 2.3.11 Feature Extraction ..................................................................................... 20 2.3.12 Variation Coefficient ................................................................................. 21 2.3.13 Fluctuation Index (FI) ................................................................................ 21 2.3.14 Machine Learning Algorithms for Classification ....................................... 23 2.3.15 Machine Learning Algorithms ................................................................... 24 2.3.16 Supervised Learning .................................................................................. 24 2.3.17 Support Vector Machine ........................................................................... 25 2.3.18 Linear Classification SVM .......................................................................... 26 2.3.19 Nonlinear Classification SVM .................................................................... 27 2.4 LabVIEW Code ....................................................................................................... 28 2.5 LabVIEW Code List ................................................................................................ 29 2.5.1 EMOTIV Epoc+ to LabVIEW ....................................................................... 29 2.5.2 LabVIEW EMOTIV Toolkit V2 ..................................................................... 30 2.5.3 EMOTIV Toolkit VI Modifications .............................................................. 30 2.6 Hilbert Huang Transform and EMD ...................................................................... 35 2.6.1 Feature Extraction ..................................................................................... 36 2.6.2 Support Vector Machine: Supervised Learning ........................................ 38 2.7 Conclusion ............................................................................................................. 39 CHAPTER 3. RESULTS AND DISCUSSION........................................................................................ 41 3.1 EEG Signal LabVIEW Reader .................................................................................. 41 3.2 Non-ictal and Pre-Ictal EEG Signal Analysis .......................................................... 42 3.3 EEG Signal Visual Inspection ................................................................................. 42 3.4 EMD and Features ................................................................................................. 45 3.5 SVM Training Data Set Analysis ............................................................................ 45 CHAPTER 4. COMMENTS, FUTURE WORK, AND CONCLUSION .................................................... 53 4.1 The Next Generation ............................................................................................. 53 v 4.2 Other Considerations