
EEG DATA COMPRESSION by Alex Sanford Thesis submitted in partial fulfillment of the requirements for the Degree of Bachelor of Computer Science with Honours Acadia University March 2012 © Alex Sanford, 2012 This thesis by Alex Sanford is accepted in its present form by the School of Computer Science as satisfying the thesis requirements for the degree of Bachelor of Computer Science with Honours Approved by the Thesis Supervisor Dr. Jim Diamond Date Approved by the Head of the Department Dr. Danny Silver Date Approved by the Honours Committee Date ii I, Alex Sanford, grant permission to the University Librarian at Acadia University to reproduce, loan, or distrubute copies of my thesis in microform, paper or electronic formats on a non-profit basis. I, however, retain the copyright in my thesis. Signature of Author Date iii iv Contents Abstract xi Acknowledgments xiii 1 Introduction1 2 Background7 2.1 EEG Details................................7 2.1.1 EEG Data Characteristics.................... 10 2.1.2 EEG Data Capture........................ 11 2.2 Data Compression............................ 12 2.2.1 Compression Performance.................... 13 2.2.2 Lossy vs. Lossless Compression................. 14 Lossless Techniques........................ 14 Lossy Techniques......................... 15 2.2.3 Audio Compression........................ 15 2.2.4 FLAC............................... 18 Predictor............................. 18 Residual Encoding........................ 20 2.3 Digital Signal Filtering.......................... 20 2.3.1 FIR Filters............................ 21 2.3.2 Types of FIR Filters....................... 23 2.3.3 FIR Filter Design......................... 24 2.4 Related Work............................... 27 v 3 Theory and Approach 29 3.1 Converting EEG Data to Audio Data Format............. 30 3.2 EEG Data Filtering............................ 30 4 Data 33 4.1 Hand Motion Data............................ 33 4.2 Real and Imagined Motion Data..................... 34 4.3 P300 Data................................. 35 4.4 Sleep Data................................. 36 5 Method and Results 39 5.1 Method.................................. 39 5.1.1 Quantization........................... 40 Smallest Difference........................ 40 Maximum Amplitude....................... 41 5.1.2 Filtering EEG Data........................ 41 5.2 Results................................... 42 5.2.1 Compression of Unfiltered EEG................. 43 5.2.2 Compression of Low-pass Filtered EEG............. 45 5.2.3 Compression of Notch Filtered EEG.............. 47 6 Conclusions and Future Work 57 6.1 Future Work................................ 58 A Fourier Transform 61 B Fixed Polynomial Predictor 63 C Linear Predictive Coding 67 Bibliography 69 vi List of Tables 5.1 Average compression ratios of unfiltered data.............. 44 5.2 Average compression ratios of unfiltered data with generic compression programs.................................. 45 5.3 Some subframe information from audio and EEG data........ 46 5.4 Average compression ratios of low-pass filtered data.......... 47 5.5 Average compression ratios of hand motion data after notch filtering. 50 5.6 Compression performance of hand motion data with various low-pass filters (15 Hz width and 50 dB attenuation).............. 50 5.7 Compression performance of sleep data with various low-pass filters (15 Hz width and 50 dB attenuation).................. 53 5.8 Average compression ratios of low-pass filtered data with generic com- pression programs............................. 53 5.9 Average compression ratios of low-pass filtered data before and after adding high-order fixed polynomial prediction............. 53 vii viii List of Figures 1.1 One minute of EEG data.........................2 1.2 EEG data zoomed in to less than a second...............3 1.3 Recording from the Emotiv EPOC device................4 2.1 Illustration of applying PCM to a sine wave..............8 2.2 A compound signal............................9 2.3 The frequency components of a compound signal............ 10 2.4 Calculating a residual based on the original sample value and a prediction 17 2.5 Example impulse response plot..................... 22 2.6 Example frequency response plot.................... 23 2.7 Frequency response of an ideal low-pass filter.............. 25 2.8 Specification parameters of a low-pass filter............... 26 4.1 Sample of hand motion data....................... 34 4.2 Sample of real and imagined motion data................ 36 4.3 Sample of P300 data........................... 37 4.4 Sample of sleep data........................... 38 5.1 Unfiltered EEG data........................... 42 5.2 EEG data of Figure 5.1 with low-pass filter applied.......... 43 5.3 FFT of unfiltered EEG data....................... 48 5.4 FFT of low-pass filtered EEG data................... 49 5.5 FFT of notch filtered hand motion data................. 51 5.6 FFT of hand motion data with harmonics of 50 Hz filtered...... 52 ix 5.7 Compression ratio vs. cutoff frequency of hand motion data...... 54 5.8 Compression ratio vs. cutoff frequency of sleep data.......... 55 x Abstract Electroencephalography (EEG) is the recording of the brain's electrical activity at the scalp. EEG data is widely used by physicians and researchers for several types of medical tests and psychological research. EEG is also very popular in the emerging field of Brain Computer Interfaces, as evidenced by the current availability of several consumer-level EEG recording devices. EEG recordings can produce a lot of data. This data requires a lot of storage space and transmission time. One solution to this problem is data compression. This thesis presents a new approach to EEG data compression using audio compression techniques. Digital signal filtering is used as a way of increasing the performance of the compression at the cost of losing some information. The results are compared to the compression results obtained when using some generic compression software. When an appropriate filter is used, audio compression provides very good com- pression performance for EEG data, especially data recorded at high sampling rates. This method produced compressed EEG files which were 15{30% of the original size. This is superior to the generic compression algorithms which produced files which were 50{100% of the original size. xi xii Acknowledgments First, I would like to thank Jim Diamond for being a great supervisor and professor. His experience and knowledge have made this research possible, and his encourage- ment and patience has helped me to get this far. I greatly respect him as a teacher and as a friend, and have learned more from him than I've learned from many others. I would also like to thank the Faculty and Staff in the Jodrey School of Computer Science. The friendly, personal atmosphere of the school has made my research and education here a really great experience. Finally, a big thank you goes out to my family and friends for being there for me and seeing me through. Their love, understanding, and support are very valuable to me, and I couldn't have done this without them. xiii xiv Chapter 1 Introduction Electroencephalography (EEG) is the recording of the brain's electrical activity at the scalp. This information is useful for several applications, such as medical diagnosis, psychological research, and increasingly, it is being used in the field of Brain Computer Interfaces, or BCI (described further below). EEG is a popular way of recording electrical brain activity because it is non-invasive (i.e., it doesn't require subjects to have surgical implants in order to collect the data). EEG data is collected by placing electrodes on a subject's scalp. The electrodes are typically spread out over the head and there can be anywhere from a single electrode to over a hundred, depending on the application. For example, the MindSet1 EEG gaming device by Neurosky has only a single electrode, whereas the g.GAMMAsys2 EEG research device by g.tec may have up to 86. Electrodes are often placed in standard locations across the scalp based on the \10-20" system (see page 140 of [NL05]). In the past, EEG data was stored by being written onto paper. The earliest EEG devices were analog rather than digital (as mentioned in the introduction of [Hug08]). Modern EEG, however, is recorded and stored digitally on a computer. The data from each electrode on an EEG device is typically viewed or recorded as a separate channel, similar to how stereo audio data is stored in a left channel and a 1http://neurosky.com/Products/MindSet.aspx 2http://www.gtec.at/Products/Electrodes-and-Sensors/g.GAMMAsys-Specs-Features 1 2 CHAPTER 1. INTRODUCTION right channel. See Figure 1.1 for one minute of data from a single channel of EEG and Figure 1.2 for the same data zoomed in to under one second. Also, see Figure 1.3 for a multi-channel recording from the Emotiv EPOC device3. This device has 14 channels of data corresponding to its 14 electrodes. The channels are named based on the standard placement according to the 10-20 system. The channel names for the EPOC, which are listed on the left hand side of the figure, are AF3, F7, F3, FC5, T7, P7, O1, O2, P8, T8, FC6, F4, F8, and AF4. Each name specifies the location of the corresponding electrode on the subject's head. As can be seen, the recorded channels are stacked vertically. Figure 1.1: One minute of EEG data A very interesting application of EEG technology which was mentioned above 3http://emotiv.com/store/hardware/epoc-bci/epoc-neuroheadset/
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages84 Page
-
File Size-