Low-Cost EEG-based Seizure Monitoring Hat with Improved Patient ComplianceTiffany Kyu, Hilary Yen, Tiana Baghdikian, Julius Yee, Phillip Cox, Chang-Min HurAbstract—Traditional epileptic seizure monitoring is achieved in a hospital setting; however, it is limited by its cost, lack of mobility, and constant maintenance. Advances in biotechnology have enabled seizure monitoring in nonclinical environments, however, these devices are expensive and obtrusive. We present a low-cost EEG-based seizure monitoring hat that promotes long-term patient compliance through its comfortable and socially-acceptable design without compromising signal quality. This device utilizes Biopac’s dry electrode technology, and we validate the efficacy of its signal acquisition compared to the gold standard wet Ag/AgCl electrodes used in clinical settings. Sewn fabric integrated into a plastic frame achieves high comfort and subtlety. This device is effective in capturing and identifying seizure signals with a 98% accuracy utilizing a custom signal processing algorithm with FFT and the Neural Pattern Recognition toolbox in MATLAB. Our prototype overcomes many of the current clinical and market limitations and achieves long-term and continuous acquisition of seizure signals throughout a patient’s daily life.Index Terms—EEG, dry electrodeI. IntroductionEpilepsy is the fourth most common neurological disorder in the United States, and it is characterized by unpredictable, recurrent, and unprovoked seizures \cite{Alarc_n}. 65 million people around the world suffer from epilepsy where one-third of these people live with seizures that cannot be controlled by anti-epileptic drugs \cite{Baker_1997}. Uncontrollable seizures can even be fatal in cases of Sudden Unexpected Death in Epilepsy (SUDEP) [1, 2, 4, 5-7]. There is no known cause of SUDEP, but preliminary studies have shown that seizures may be a precipitating factor. Early SUDEP research has identified that improving active monitoring of seizures, especially at night, can enable a rapid human response (i.e. shoulder tapping) that could potentially prevent SUDEP [1, 5, 6]. This work aims to develop an at-home wearable EEG (electroencephalogram) monitoring device.Standard hospital EEG monitoring requires constant replenishment of conductive gels, which can cause skin discomfort [2, 3, 4]. In addition, hospital monitoring is costly and requires long-term inpatient care. Current available EEG epilepsy monitoring devices fail to promote active seizure monitoring throughout patients’ daily lives due to their obtrusive design. This research overcomes this limitation and provides epileptic patients with a dry electrode-based EEG monitoring device that is comfortable, low-cost, and socially acceptable. Our device provides near real-time and continuous seizure monitoring and hopes to improve the scientific community’s understanding of the relationship between seizures and SUDEP.In this study, an EEG hat is proposed for long-term measurement and improved patient compliance. First, we evaluated various commercially available dry electrodes focusing on the electrode-skin impedance, attenuation, noise, movement artifacts, and accuracy. Dry electrodes are chosen because they reduce impedance presented by hair through protrusions that penetrate to the scalp [10-12]. In addition, the use of dry electrodes allows us to measure biopotentials without preparation of the skin and replenishment of conductive gel. We use a circuit tested by Sullivan et al to increase the signal by a gain of 1000, and filter out signals with a bandpass filter with a cutoff between 1Hz and 100Hz [9]. Acquired data is Fourier transformed, filtered to extract features, and is then identified as seizures by the Neural Pattern Recognition toolbox in MATLAB®. Hardware, data acquisition algorithms, and electrodes are combined into an adjustable plastic frame to promote patient compliance through a socially acceptable and comfortable design.II. Materials and MethodsA. Evaluation of Dry ElectrodesTwo types of electrodes were studied in this project: the Biopac® 10mm Ag/AgCl post dry electrode and the Cognionics® Flexible Dry EEG sensor as shown in Fig. 1. Dry electrodes are designed to operate without electrolyte or conductive gel [12]. Electrode characteristic data was compared to hospital-grade wet electrodes. With each electrode and test, data was collected using a human skin and tissue substitute, represented by a sausage. In these experiments, we fed signals of varying frequencies (30, 10, 5 Hz) and amplitudes (150, 80, 20mV) to simulate a seizure. The dry electrodes and Ag/AgCl wet electrode disc were consistently placed 1 cm from the edge of the system, and they were fixed to the model using Smith and Nephew Hypafix®. A current was applied, using the 33500B series waveform generatorFig.1: The Biopac® 10mm Ag/AgCl (upper right) and Cognionics® Flexible Dry EEG sensor (upper left) were compared to a standard wet electrode (bottom).(Keysight Technologies, Westlake Village, CA), to the system from a constant height and distance from each electrode to ensure reliable and reproducible results. The electrode output was directly read by the InfiniiVision 3000A X-series oscilloscope (Keysight Technologies, Westlake Village, CA). Using this method, we can measure attenuation, noise, and movement artifact [9, 11]. Experiments were repeated with this phantom utilizing an artificial wig, mimicking hair, in order to study the effects of its interference.B. Development and Integration of HardwareThe EEG circuit was developed according to the schematic used by Sullivan et al as shown in Fig. 2 [9]. The circuit consists of two operational amplifiers that result in a net gain of 1000. Signals are passed through a bandpass filter with cutoff frequencies of 1Hz and 100Hz.As the circuit was designed for use with dry electrodes the circuit uses the INA116, an instrumental amplifier with guard pins to protect high impedance inputs [9]. There is also a reset circuit to protect against offset currents. Both measures are put in place to alleviate problems which arise from high impedances inherent to dry electrodes.The INA116 instrumental amplifier (Texas Instruments, Dallas, TX) and LT6010 operational amplifier (Linear Technology, Milpitas, CA) are used. The INA116 was chosen for its low input bias current of 3fA, low input current noise of 0.1fA/(Hz)½, and integrated guard pins. The LT6010 was chosen for its low noise (14nV/Hz1/2). Both components draw minimal power, as the circuit only uses 10.5mW. Signals are transmitted remotely to a computer via a Wi-Fi component attached to the circuit.The circuit was tested by inputting known signals, using a 33500B series waveform generator (Keysight Technologies, Westlake Village, CA), with frequencies between 10-1 Hz to 104 Hz and observed using a InfiniiVision 3000A X-series oscilloscope (Keysight Technologies, Westlake Village, CA) to ensure signals are properly filtered and to observe mid-band gain.C. Signal Processing AlgorithmAfter the signal is amplified and filtered by the circuit, we must differentiate between seizure and non-seizure signals. The steps we took are illustrated in Fig. 3. A low pass filter is used on input EEG signal files. Fast Fourier Transform (FFT) is then applied to decompose the signal into the amplitude and frequency domain [13, 14]. The decomposed signal is separated into five feature categories: δ, 𝜃, α, 𝛽, γ, which have bandwidths of 0.5 - 3 Hz, 3 - 8 Hz, 8 - 12 Hz, 12 – 38 Hz, and 38 – 42 Hz respectively, as shown in Fig. 4. These five features are used to obtain a power spectrum at a certain period of time. The neural pattern recognition toolbox in MATLAB® is then used to distinguish between the seizure and non-seizure signals [18]. Using Bonn University’s EEG Database, the neural network is trained to detect potential seizure waves. The EEG database consists of 100 files per patient, each of which contains 4096 data points. EEG data from two patients: one with seizures and one without seizures is used. The mean of the absolute value of all the points in aFig.2: EEG amplifying circuit. The two operational amplifiers create a gain of 1000. The reset circuit protect against offset current. The shield is driven by the guard pins, and minimizes the noise the electrode picks up. [9]Fig.3: Signal Processing Flowchart. The original EEG signal is subjected to various steps in order to identify seizures.Fig. 4: The raw EEG signal of a patient is filtered via FFT and separated into the five feature categories δ, 𝜃, α, 𝛽, and γ.frequency band wave was calculated. The neural pattern recognition toolbox uses the first 75 files for both patient’s data to train and define seizure and non-seizure pattern classes. Scalar target values are set to either 1 or -1, which indicates whether an input is classified as seizure or non-seizure. Once the neural network is trained, the remaining 25 files for both patients are tested for seizure detection accuracy. With the algorithm trained, it can now detect whether a patient is having a seizure or not.D. EEG Cap AssemblyThe EEG-based seizure-monitoring hat is comfortable and inconspicuous in its design. The hemisphere-shaped hat frame is made of plastic with an adjustable strap to accommodate individuals with heads of various sizes (Fig. 6). Twelve dry electrodes are securely attached to the angled supports, with two electrodes on each support and an arc length of three inches from each other. These 12 electrodes are placed in specific reference positions F3, AFZ, F4, FC1, FZ, FC2, CP1, CP2, P3, PZ, P4, and POZ as depicted in Fig. X, which is labeled according to the 10-20 International System of Electrode Placement. These electrode positions are sufficient for accurate EEG readings as shown from literature [11]. The reference and ground electrodes are placed at the back of the ear labeled A1 and A2 in Fig. 5.Electrode leads and wires are securely attached to the angled supports to reduce wire movement. 5 mm diameter holes in the plastic frame permit electrode leads and wires to be threaded through and aligned on the outside of the head frame. These wires terminate with the connection to the flexible circuit attached at the front of the frame as labeled (Fig. 6).50% cotton and 50% polyester fabric is sewn to surround the inside and outside of the plastic frame, improving user comfort and maintaining an inconspicuous design. On the inside of the frame, the fabric is sewn around the electrodes to prevent diminished signal acquisition. Epileptic patients can place the hat on their head (Fig. 6) and easily adjust the strap to ensure a tight fit while still permitting movement. Patients can wear this EEG-based seizure monitoring hat in their daily environment.III. Results and DiscussionA. Highest Performing Dry ElectrodeEach electrode was characterized for their signal quality through attenuation, noise, and movement artifact to determine which is most comparable to the current standard of wet electrodes. Attenuation was calculated as already reported by Chen et al [13]. The observed negative attenuations reflect an increase in signal as it travels through the electrode. Additionally, lower amplitudes have a smaller attenuation, which can be explained by an increase in noise artifact at these low values. Fig. 7 shows the averaged values and standard deviations of attenuation measurement results for each of the three aforementioned electrodes. Results showed that the attenuation of the Biopac® electrode is similar to that of the conventional wet electrode for different amplitudes and frequencies that mimic a seizure, and this electrode’s result isFig. 5 Montage of dry electrode placement on patient scalp labeled according to the International System of Electrode Placement.