Vysoke´Ucˇenítechnicke´V Brneˇ
Total Page:16
File Type:pdf, Size:1020Kb
View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Digital library of Brno University of Technology VYSOKE´ UCˇ ENI´ TECHNICKE´ V BRNEˇ BRNO UNIVERSITY OF TECHNOLOGY FAKULTA INFORMACˇ NI´CH TECHNOLOGII´ U´ STAV INTELIGENTNI´CH SYSTE´ MU˚ FACULTY OF INFORMATION TECHNOLOGY DEPARTMENT OF INTELLIGENT SYSTEMS EEG SIGNAL PROCESSING AND ANALYSIS BAKALA´ Rˇ SKA´ PRA´ CE BACHELOR’S THESIS AUTOR PRA´ CE MICHAL UHLIARIK AUTHOR BRNO 2014 VYSOKE´ UCˇ ENI´ TECHNICKE´ V BRNEˇ BRNO UNIVERSITY OF TECHNOLOGY FAKULTA INFORMACˇ NI´CH TECHNOLOGII´ U´ STAV INTELIGENTNI´CH SYSTE´ MU˚ FACULTY OF INFORMATION TECHNOLOGY DEPARTMENT OF INTELLIGENT SYSTEMS ZPRACOVA´ NI´ A ANALY´ ZA EEG SIGNA´ LU EEG SIGNAL PROCESSING AND ANALYSIS BAKALA´ Rˇ SKA´ PRA´ CE BACHELOR’S THESIS AUTOR PRA´ CE MICHAL UHLIARIK AUTHOR VEDOUCI´ PRA´ CE Ing. KAROLI´NA LANKASˇ OVA´ SUPERVISOR BRNO 2014 Abstrakt Tato práce se zabývá oblastí elektroencefalografie, zpracováním EEG signálù a jejich analýzou. Jsou vysvětleny základní principy vzniku biologických signálù v mozku, charakteristické mozkové vlny a jejich klasifikace. Dále práce ilustruje základní metodologie měření a záznamu těchto signálù, chyby měření, vliv a zdroje signálových artefaktù. Následně je rozebrána problematika pøedzpracování signálu, nejrozšířenější metodologie, jejich primární určení a teoretické podklady. Zároveň je obsažen i pøehled metod pro analýzu EEG signálu v èasové, frekvenční a èasově-frekvenční oblasti. Jádrem práce jsou metody analýzy EEG signálu v èasové oblasti, jsou uvedeny jejich teoretické podklady, omezení, odchylky a zaměøení, jako i vhodné matematické aparáty pro kompenzaci uvedených nedostatkù. Praktická èást popisuje architekturu a implementaci aplikace Easy EEG Player, která vznikla jako souèást téhle práce. Jsou popsány metody reprezentace, zpracováni a analýzy EEG dat za použití zvolených metodologií. Abstract This thesis covers topic of electroencephalography, EEG signal processing and analysis. It explains fundamental concepts of biological signal genesis in brain, characteristic brain waves and their classification. Then it illustrates basic methodologies of EEG signal recording, measurement errors, impact and sources of signal artifacts. Thesis provides overview of the most common methodologies for EEG preprocessing and analysis with special focus on methods for spectral analysis. Practical part of this thesis describes architecture and implementation of Easy EEG Player application created as a part of this thesis. Klíčová slova Elektroencefalogram, elektroencefalograf, EEG, zpracování signálu, neurónová síť, automatická analýza. Keywords Electroencephalogram, electroencephalograph, EEG, signal processing, neuron network, automatic analysis. Citace Michal Uhliarik: EEG Signal Processing and Analysis, bakaláøská práce, Brno, FIT VUT v Brně, 2014 EEG Signal Processing and Analysis Prohlášení Prohla¹uji, že jsem tuto bakaláøskou práci vypracoval samostatně pod vedením paní Ing. Karolíny Lanka¹ové a uvedl jsem v¹echny literární zdroje, ze kterých jsem èerpal. ....................... Michal Uhliarik May 21, 2014 Poděkování Zde bych chtěl poděkovat své vedoucí paní Ing. Karolíně Lanka¹ové za cenné rady a odborné vedení pøi tvorbě této práce. c Michal Uhliarik, 2014. Tato práce vznikla jako školní dílo na Vysokém učení technickém v Brně, Fakultě informačních technologií. Práce je chráněna autorským zákonem a její užití bez udělení oprávnění autorem je nezákonné, s výjimkou zákonem definovaných případů. Contents 1 Preface 3 2 Electroencephalography4 2.1 Introduction....................................4 2.2 History......................................4 2.3 EEG signal source................................5 2.4 Electroencephalograph description and methodology.............6 2.5 EEG recording characteristics..........................6 2.6 Basic EEG waves.................................7 3 EEG artifacts9 3.0.1 Endogenous EEG artifacts........................9 3.0.2 Exogenous artifacts........................... 10 4 EEG signal preprocessing 11 4.1 Filtering...................................... 11 4.1.1 High-pass filter.............................. 11 4.1.2 Low-pass filter.............................. 12 4.1.3 Notch filters................................ 12 4.2 EEG signal segmentation............................ 12 4.2.1 Segmentation with constant length of segments............ 13 4.2.2 Segmentation with adaptive length of segments............ 13 5 EEG signal analysis methods overview 14 5.1 Time domain signal analysis........................... 14 5.1.1 Processing of long term EEG recordings................ 14 5.2 Frequency domain analysis........................... 15 5.3 Time-frequency domain analysis........................ 15 5.3.1 Spectrogram............................... 15 5.3.2 Wavelet transform............................ 16 5.4 Topographical brain mapping.......................... 16 5.5 Artificial neural networks............................ 16 6 Spectral analysis 17 6.1 Nonparametric analysis............................. 17 6.1.1 Periodogram............................... 17 6.1.2 Bartlett's method............................ 18 6.1.3 Welch's method.............................. 18 1 6.2 Parametric analysis................................ 19 6.3 Window function................................. 19 6.3.1 Rectangular window........................... 20 6.3.2 Hann Window.............................. 20 6.3.3 Hamming Window............................ 20 6.3.4 Bartlett Window............................. 20 6.3.5 Blackman window............................ 21 7 Easy EEG Player 22 7.1 Technology overview............................... 22 7.1.1 Java glossary............................... 22 7.2 Architecture overview.............................. 23 8 Implementation 25 8.1 Infrastructure layer................................ 25 8.1.1 Input data decoding, parsing and conversion............. 25 8.1.2 Data representation........................... 26 8.1.3 Data persistence............................. 27 8.1.4 Data access................................ 27 8.2 Domain layer................................... 27 8.2.1 Common classes............................. 28 8.2.2 Spectral Density Estimation....................... 29 8.2.3 Window functions............................ 29 8.3 Presentation layer................................ 31 8.3.1 GUI technology overview........................ 31 8.3.2 Chart plotting library.......................... 31 8.3.3 Application GUI............................. 32 8.4 Software testing.................................. 34 9 Conclusion 36 2 Chapter 1 Preface Since the dawn of time, human kind was looking for a new ways how to prolong life, discover, monitor and treat abnormalities and diseases. In these days, more than ever is this trend eminent. Modern medicine is still looking for new, more affordable, effective, precise and non-invasive methods. Electroencephalography is one of the most widely spread and successful clinical methods for analysis and monitoring of cerebral diseases, activities and abnormalities. For over a century, it has been priceless source of knowledge about nervous system, and is commonly used up to this date. Main goal of this thesis is to introduce basic principles of electroencephalography, genesis of bioelectrical signals in human brain, their properties, basic classification of main EEG components and introduction to EEG signal processing and analysis. Practical part of this thesis covers implementation of software Easy EEG Player, which can be used for analysis of EEG recording with special regard to spectral analysis methods. Chapter2 provides theoretical introduction to electroencephalography, describes bioelectrical signals genesis and methods of their recording. Chapter3 contains information about EEG artifacts, their classification and identification. Afterwards, chapter4 covers the topic of EEG signal preprocessing, filtering and cleansing. Chapter5 provides comprehensive overview of EEG signal analysis methods and their comparison. Key part of this thesis is chapter6 covering topic of Frequency domain analysis, providing theoretical foundations for of EEG signal analysis implemented as a part of practical part of this thesis. Chapters7 and8 describe architecture and implementation of Easy EEG Player with the focus on individual architectural layers and used technologies. 3 Chapter 2 Electroencephalography 2.1 Introduction Electroencephalogram (abbreviated EEG) is recording of time-dependent fluctuation of electrical charge, originating in brain activity [14]. Electroencephalography is important non-invasive, clinical analytic method, based on observation of biological signals emitted by brain. It is used for wide range of medical areas and studies like metabolic disorders, various consciousness states, phases of sleep, effect of psychoactive substances and toxins, brain diseases and tumors. Electroencephalographic examinations are performed in case of nearly all brain disorders in neurology and also often in psychology. From amplitude and frequency of depicted signals, it is possible to identify certain emotional conditions of subject and thus EEG can be used as part of polygraph machine commonly known as lie detector. Biological signal observed by EEG is stochastic electric signal generated by living organism, more precisely it is generated by neural activity of nervous system resulting from ionic current flows within neurons of the brain. The neural activity in the brain of human fetus