EEG amplifier signal pipeline, and why you (mostly) do not need to worry about aliasing
by Dr. David Schubring
Scientific Consultant (Brain Products)
EEG amplifiers serve two main purposes: amplifying and digitizing the brain signal. Amplification of the comparatively tiny brain signal brings it to a level where it can be used by the analog-to-digital converter (ADC). The ADC converts the analog, continuous brain signal to a quantified, digital representation that can then be further analyzed by computer software (e.g., BrainVision Analyzer).
For most intents and purposes, the physiological signal should be translated as truthfully as possible into the digital representation. A notable exception is frequency selective filtering, i.e., removing parts of the signals with a specified frequency. One purpose of such filters is to prevent aliasing artifacts in a signal, which are dependent on the sampling rate: With a given sampling rate (e.g., 1 000 Hz), theoretically up to half of that frequency can still be represented in the recording (the so-called Nyquist frequency, up to 500 Hz for a 1 000 Hz sampling rate). If frequencies above the Nyquist frequency were still present in the original signal when it gets sampled, it would be represented as a lower frequency instead. For example, a 750 Hz signal recorded with a 1 000 Hz sampling rate without anti-aliasing filters could get misinterpreted as a 250 Hz signal. In practice, the anti-aliasing filters are often considerably lower than the Nyquist frequency to ensure a signal which is free of aliasing artifacts with real-time filters, e.g., at 1/4 of the sampling rate (around 250 Hz for a 1 000 Hz sampling rate).
Figure 1: Examples of a recording with aliasing artifacts (top) and without aliasing artifacts due to anti-aliasing filters (bottom). Additionally, even without aliasing artifacts, some signal degradation can be seen if the sampling rate is not at least 5-10 times the original frequency of interest. Please note that this figure is not representative of the actual anti-aliasing filters in our amplifiers, but serves as an extreme example with low sampling rates.
When considering the sampling rate, it is also important to distinguish between the hardware sampling rate and the target sampling rate in the software. Usually, the EEG amplifier only has a limited selection of hardware sampling rates depending on the specific ADC. However, one might save the recorded data with a lower sampling rate to save space on the hard disk.
Therefore, BrainVision Recorder can downsample the EEG data coming from the hardware. Both hardware and software need an anti-aliasing filter according to the sampling rate. For most practical purposes, only the last filter in this signal chain, with the lowest frequency cutoff, matters. These anti-aliasing filters are always employed automatically and cannot be changed manually. The cutoff frequency of the filter that was used in a recording is documented in the headerfile (.vhdr) and can be checked by viewing the “Recording Infos” in BrainVision Analyzer after acquisition.
Figure 2: Signal pipeline on the hardware (top) and software (bottom) level.
Another purpose of filtering is to further limit the signal to the frequency range of interest, e.g., to filter out high frequency activity and/or line noise (50 Hz or 60 Hz, depending on the region). This can be configured by the user in the BrainVision Recorder software. It is important to note that these filters in the Recorder workspace are employed after the anti-aliasing filters on both the hardware and software level (see Figure 2 bottom right), so it is not necessary to manually set a filter to prevent aliasing. Rather, we recommend to not use any raw data saving filters without particular reasons but to instead consider offline filtering during post processing. During recording, visualization can be facilitated by using display filters.
Figure 3: User-configurable display filters in the BrainVision Recorder workspace.
When comparing amplifiers, please note that the available hardware sampling rates and corresponding hardware anti-aliasing filters differ. For example, the only amplifiers where the low-pass hardware filter can be changed are the BrainAmp DC and the BrainAmp MR plus , where either a 250 Hz or 1 000 Hz hardware filter can be chosen. (In case of an incompatible combination of a low target sampling rate and a high hardware filter, an additional anti-aliasing filter is employed in the software before downsampling.) On the software side, Recorder uses the same filter as Analyzer (IIR Butterworth filter). The only difference is the filter direction and adjustability: Analyzer filters in two directions with zero phase shift and the filter can be adjusted (e.g. change filter order, redo or undo filtering). Recorder on the other hand can only filter in one direction (forward), so some phase shift occurs. Also, filters in Recorder cannot be modified, i.e., they always use filter order 2 (12 dB/Oct) and once they are enabled they are ingrained in the data. This is another reason to not use any raw data saving filters.
Figure 4: Hardware filters in the actiCHamp (Plus), BrainAmp, and LiveAmp.
In a nutshell
The Recorder settings should normally only use display filters for live monitoring, but no additional raw data saving filters are needed: Anti-aliasing filters are already implemented automatically, and for data analysis offline filtering gives more flexibility than online filtering. More examples and explanations on this topic are also discussed in our free Brain Products Academy event: Foundations of EEG – EEG Hardware. If you have more questions regarding filtering in the EEG amplifier signal pipeline, feel free to contact the Brain Products Technical Support team at any time.