The tracking of nonstationary EEG with time-varying ARMA models is discussed. A method for detecting spindles in rat EEG is presented. The method is based on tracking of a single system pole of the ARMA model.
The end to automatic analysis of EEG is often detection of certain waveforms or segmentation of the EEG into pseudostationary epochs and the subsequent classification of these. The parameters of autoregressive (AR) and autoregressive moving average (ARMA) models have been found to exhibit reasonably good discrimination efficiency in many cases . However, there are situations where different classes would necessitate different orders of the model. The estimation of model orders for each segment would be computationally unfeasible and in practice we have to use orders that are sufficient for each class. This means that the variances of the parameter estimates will be large for the classes for which the orders are too high and the discrimination efficiency decreases. However, the variances of the roots of the model characteristic polynomials do not all behave like this. Some roots can retain small variances while the increase in the parameter variances affects other roots more than these.
The use of model roots has been proposed earlier for the classification of stationary epochs of EEG . It has also been observed that epileptic seizures can be predicted by the movement of some roots in the complex plane .
We extend these results to time-varying EEG by using an adaptive predictor to estimate the model parameters from which the roots corresponding to the AR part (poles) are calculated. As an example we use this method to segment and classify the electrocorticogram of a drowsy rat.
II. Tracking of parameters
Time-varying ARMA(p,q) models for the process xt can be written as
xt = Xp k=1 ak(t)xt−k +Xq `=1 b`(t)et−` + et , (1)
where et is the prediction error process and the parameters ak(t) and b`(t) are estimated with an adaptive predictor. There are several algorithms that can be used as predictors. The most common ones are the LMS, RLS and the Kalman filters. We use here the recursive least squares (RLS) algorithm . See  for discussion on the tracking of EEG with the Kalman filter.
where θt = [ˆa1(t),..., aˆp(t), ˆb1(t),..., ˆbq(t)]0 (2) and the transpose is denoted by prime. To maintain the tracking capability of the algorithm we must have λ < 1 but otherwise the trade-off between tracking speed and estimate variance is controlled via the forgetting factor λ.
The calculation of all the roots from ˆak(t) for each time can be computationally too expensive if some standard method, such as the calculation of the eigenvalues of the associated companion matrix, is used.
However, the approximation by tracking of a root or several roots based on previous estimates can be performed with various methods ,. We track a single root of the polynomial with one iteration of the Newton’s method at a time.
III. Detection of Rat EEG Spindles
Rat EEG spindles are burst-like waveforms occurring when rats are drowsy. Their frequency of occurrence correlates e.g. with the learning capability and the effect of certain drugs. A typical epoch of rat EEG waveform is presented in Fig. 1. The spectral characteristics of spindles are distinguishable from that of background and therefore the use of parametric models in e.g. spindle detection is evident . The rat EEG can be described as toggling between the spindle and non-spindle states. Both states can be modeled with ARMA(4, 2) models.
IV. The Method
The procedure of the spindle detection was as follows:
1. Select two segments from the data, one for each class. Use these as the learning sets for the classes.
2. Run these segments through RLS to obtain parameter estimates for the classes taking care to adjust the initial values.
3. Calculate the roots of interest and determine the classification (detection) boundary.
4. Run the whole data through RLS and a root tracker, classify and run further through an optional postprocessor (e.g. a median filter).