## 2 Data Transmission in a Wireless Seizure Detection System
### Transmission of EEG Features  
Another approach to reducing the amount of data transmitted to the data server is to only transmit those features of the EEG signals that are pertinent to seizure detection. By carrying out the feature extraction step at the sensor node and then transmitting only these features to the server, a substantial reduction in the power consumption of the wireless transmitter can be achieved (without affecting the seizure detection performance). A wide range of feature extraction techniques has been proposed for automatic seizure detection applications. A detailed survey of optimal features for online seizure detection is presented in [6], where the authors compare 65 previously proposed feature extraction techniques in terms of their detection performance and computation times on a standard desktop computer. However, the features that require computationally-intensive (and/or memory-intensive) operations to compute are not appropriate for deployment in a battery powered sensor node, due to their high energy cost. With the hardware and battery life limitations in mind, we have focused on simple time-domain, univariate features in our comparison study. We considered three different types of features: energy, line length [16] and nonlinear autocorrelation [17].  
* Energy: measures the instantaneous power of the signal amplitude averaged over an epoch of \(N\) samples and is defined as: \[E=\frac{1}{N}\sum_{i=1}^{N}x_{i}^{2}\] (1) where \(x_{i}\) represents the \(i\)-th data point within the epoch.
* Line Length: measures the sum of the absolute values of the distances between consecutive data points within an epoch size of \(N\) samples [16] and is defined as: \[LL=\frac{1}{N-1}\sum_{i=1}^{N-1}|x_{i+1}-x_{i}|\] (2)
* Nonlinear Autocorrelation: exploits the characteristic that seizures typically exhibit repetitive spikes in an EEG signal with similar maxima and minima over successive short intervals [17]. The calculation of this feature starts with dividing an epoch of \(N=512\) samples into 15-sample wide non-overlapping sub-windows (equivalent to 0.12 s at a sampling rate of 128 Hz) and computing the maximum and minimum values for each sub-window. Let \(max(S_{i})\) and \(min(S_{i})\) denote the maximum and minimum of the \(i\)-th sub-window, respectively. Next, the parameters, \(HV_{i}\) and \(LV_{i}\), are calculated as:  
\[HV_{i} =\min\{\max(S_{i}),\max(\max(S_{i+1}),\max(S_{i+2}))\} \tag{3}\] \[LV_{i} =\max\{\min(S_{i}),\min(\min(S_{i+1}),\min(S_{i+2}))\},\] (4) \[i=1,\ldots,N_{S}-2\]  
where \(HV_{i}\) and \(LV_{i}\) are the high and low values of the \(i\)-th sub-window, respectively. The symbol, \(N_{S}\), denotes the total number of sub-windows in an \(N\)-sample epoch. The nonlinear autocorrelation value, \(NLACC\), is defined as the sum of the differences between the high and low values of every sub-window, _i.e._,  
\[NLACC=\sum_{i=1}^{N_{S}}(HV_{i}-LV_{i}) \tag{5}\]  
Features extraction is performed for every epoch of \(N=512\) samples of EEG signals. At each sampling period, the EEG signals are sampled, and the intermediate values of features are updated and buffered in the embedded memory on the sensor node. At every \(N\) sampling period, the features computed over the last \(N\) periods of all channels are concatenated and transmitted to the data server. Upon the receipt of the features, the data server performs seizure classification.