**Appendix: Principles of the A-line AEP recording and analysis.**

The A-line monitor uses an AEP window of 80 ms.
The pre-processing of the EEG sweeps consists of artifact rejection and 16-100
Hz Finite Impulse Response (FIR) 170^{th} order band-pass filtering. An FIR filter was chosen instead of an Infinite Impulse Response
(IIR) filter, because, even though the FIR filter requires many more
coefficients than an IIR filter, it has linear phase, whereas the IIR filter
does not. Linear phase is important to prevent the filter from changing the
peak latencies in the AEP.

1)
Introduction

ARX modeling is the technology used for night vision in helicopters where the
need is to rapidly extract a stable image from the infra red camera image that
is disturbed by the vibration of the helicopter. Similar, the AEP waveform is
disturbed by spontaneous EEG and EMG activity and signal processing should be
applied to extract the AEP. The classical method is Moving Time Averaging
(MTA). The principal disadvantage of the MTA is the need of a large number of
repetitions of the stimuli, hence producing a delay of typically 1-5 minutes.
On the other, the ARX model can extract a common component present in two signals obtained by relatively low
numbers of repetitions, here 15 and 256 sweeps. Single sweep analysis has been
carried out on visual evoked potentials by ARX modelling but as the amplitude
of the AEP is much smaller a preaveraging of 15 sweeps has been applied.

2) Definition of the ARX model

The ARX model has two inputs: the moving time
average of the last 15 sweeps (X_{1}) and
the moving time average of the last 256 sweeps (X_{2}). The average of the 256 sweeps has a better
signal to noise ratio than the average of 15 sweeps, but the average of 15
sweeps has a shorter delay than the average of the 256 sweeps. The objective of
the ARX model is to merge the rapid response from input X_{1} with the better SNR of input
X_{2}.

The central equation of the ARX model is :

_{} (Eq. 1)

where the *a’s
*and * b’s *are the coefficients of the model. The *n* is the model order. By setting up a
number of equations with the same structure as equation 1, but shifted in time,
it is possible to determine the coefficients. The coefficients are determined
in a such way that the best prediction is obtained in Equation 1 in a least
mean square sense. When the coefficients of the model are determined, the
ARX-AEP is obtained by filtering of
input *X _{2}
*with the

** **

*Figure A.1.
The ARX-model and the AEP extraction,
showing the two inputs, an MTA of 15 sweeps and an MTA of 256 sweeps. The
output, ARX-AEP, is X _{2}
filtered by the a and b coefficients obtained for each new sweep.*

2) Model order.

The order of the ARX-model should ideally be calculated for each
sweep, but this is a very time consuming process. Hence, to comply with the
need of fast processing time, an average model-order of five for both *a*- and
*b*-coefficients was implemented
in the A-line.

3) Stability.

The coefficients of the ARX model are calculated for each sweep. The stability of the ARX model is important in order to ensure that the ARX extracted AEP is reliable. Stability is tested by a pole-zero analysis of the ARX polynomial; if a sweep has poles outside the unit-circle, then the sweep is rejected. Furthermore, if the amplitude of the ARX extracted sweep is more than 3 times that of the MTA extracted, then the sweep is rejected as well.

Subsequently, the ARX-AEP is smoothed exponentially , using :

ARX-AEP_{mean}= 0.1ARX-AEP_{new} + 0.9 ARX-AEP_{old } (Eq.
2)

*C) Index
calculation.*

The last step in the A-line signal
processing chain is the index calculation, the purpose being a mapping of the
2-dimensional morphological changes of the AEP into a single number,
facilitating an easier clinical interpretation of the AEP.

The A-line ARX Index (AAI), is
calculated as the sum of absolute differences in the 20-80 ms window of the
AEP. The 20 ms start of the window was chosen in order not to include Brainstem
AEP (BAEP) and auricular muscular artifacts, and the 80 ms end of the window
was chosen in order not to include Long Latency AEP (LLAEP).