Filters in the Electroencephalogram

Chapter 7 Filters in the Electroencephalogram


The use of filters in recording and displaying EEG data is an indispensable tool in producing interpretable EEG tracings. Without filters, many segments of EEG would be essentially unreadable. As we shall see in this chapter, the use of filters can affect the EEG signal in ways that range from the subtle to the dramatic. The main benefit of filters is that they can appear to “clean up” the EEG tracing, making it easier to interpret and generally more pleasing to the eye. Certain filter settings can also be used to accentuate particular types of EEG activity. Filters can, however, be used improperly, and at times their use can lead to unintended consequences.


Some consider the study of how filters work an inherently dry topic. The purpose of this chapter is to provide a simple overview of how EEG filters work so that they can be used appropriately by the EEG technologist and reader. There also follows a brief discussion of simple circuit design for analog EEG filters, a topic that has traditionally been a part of electroencephalography training. The basis of some of the techniques used to filter digital EEG signals is also introduced. Although detailed knowledge of filter design is not necessary to interpret EEGs, understanding the circuitry or algorithms used to build these filters can enhance understanding of filter behavior and increase the level of sophistication of EEG reading.


Figures 7-1 and 7-2 illustrate the impact of filters on an EEG page. Figure 7-1 shows an EEG recorded during a moderate amount of patient movement, a “raw” EEG trace displayed without the explicit use of filters. Figure 7-2 shows the same page displayed with typical filter settings. Note that, despite the fact that muscle artifact still obliterates portions of the top four and bottom four lines of the EEG (the temporal areas), in the filtered example, the amplitude of that muscle artifact is reduced, making it easier to see adjacent channels. Indeed, in the filtered example, the presence of certain waveforms can be intermittently recognized within the areas of muscle artifact (this artifact is generated by contraction of the temporalis muscles) that otherwise would not have been detectable. Also note that the baseline of each channel is flatter, allowing for easier interpretation—each channel is more likely to stay within its own horizontal area after the filters are used.




There are also potential pitfalls in choosing filter settings. When using filters on a page of EEG that has a cluttered appearance, one might think that if a given filter setting works moderately well, then even more aggressive settings might work even better. With filters, however, the strategy of “more is better” often does not hold true because implicit to the act of filtering the EEG signal is the potential loss of information. Overzealous filter settings can overly “clean” the EEG, resulting in the filtering out and disappearance of waveforms that may be of interest to the reader. As we will see, some filter settings can change the shape of brain waves in a way that might suggest the presence of waveforms that are not really there.



THE BASIC STRATEGY BEHIND CHOOSING FILTER SETTINGS


The most ideal filter design would be one that removes all of the electrical noise or artifact from the EEG and only allows true cerebral activity to pass through. Unfortunately, no such “smart” filters exists; filters can only remove waves according to rigid mathematical rules. Luckily, there are good rationales for filtering out certain components of EEG signals using fairly simple mathematical assumptions. These assumptions are based on the idea that the brain only generates EEG waves within a certain range of frequencies and that any activity outside that range (unusually slow activity and unusually fast activity) is not likely to be of cerebral origin. Indeed, one of the general assumptions of EEG filter design is that activities well below 1 Hz and well above 35 Hz do not arise from the brain and likely represent electrical noise or artifact. Like many assumptions, this claim is mostly true but not completely true, as we shall see. On the basis of the concept that the frequency of almost all brain electrical activity of interest lies within a particular bandwidth, EEG filters are typically set up so that one filter rejects the majority of very high-frequency activity and another filter rejects the majority of very low-frequency activity. The range of frequencies between these unwanted high and low frequencies that is allowed to pass through the filter setup is referred to as the bandpass. The way that different filter setups are associated with different bandpasses is illustrated here.


Rather than being used to reject spurious activity, occasionally filtering techniques can be used to bring out certain EEG activity that might otherwise have been hidden in other, higher voltage activity. In this application, the electroencephalographer may purposely attenuate the slow activity in a record (even though it represents true cerebral activity) to accentuate or “bring out” fast activity that would otherwise be lost in high-voltage slow waves. Examples of such special filtering techniques (which are not necessarily used during every EEG reading session) are illustrated in Figures 7-3 and 7-4. These figures show how aggressive use of the low-frequency filter can be used to bring out the presence of spike-wave discharges.





TYPES OF FILTERS


The three commonly used filter types in clinical EEG are low-frequency filters, high-frequency filters, and notch filters. The purpose of a low-frequency filter is to filter out low-frequency activity and to leave higher frequencies as they are. Because low-frequency filters attenuate low frequencies and allow high frequencies to “pass through,” engineers often refer to low-frequency filters as high-pass filters. Likewise, high-frequency filters are designed to filter out high-frequency activity and allow low-frequency activity to pass through and are sometimes referred to by engineers as low-pass filters. Although the use of the terms high pass and low pass to name filters is more common in the world of electrical engineering, these are not the preferred terms in clinical electroencephalography. In the world of clinical EEG, the alternate terms high-frequency filter (HFF—filters out the high frequencies) and low-frequency filter (LFF—filters out the low frequencies) are used, with the terms high filter (HF) and low filter (LF) sometimes used as shorthand abbreviations. Thus, HF is synonymous with HFF and LF is synonymous with LFF.


The notch filter is the third type of filter. Its purpose is to filter out activity at a specific frequency (rather than a frequency range). Because the alternating current in standard electric outlets in North America oscillates at 60 Hz, electric fields produced by the 60-Hz activity in the environment that surrounds us in our indoor environments frequently contaminates the EEG. Sixty-hertz notch filters (filters designed specifically to filter out 60-Hz activity) are used to attenuate or eliminate this unwanted signal. In countries where line frequencies are 50 Hz, 50-Hz notch filters are used for the same purpose.



FILTER NAMING CONVENTIONS


There are two different naming schemes for high- and low-frequency filters. A filter can be named after a frequency (e.g., a “5-Hz low filter”) or after its time constant (e.g., a “low-filter with time constant of 0.1 seconds”). When a filter is named after a particular frequency, this is referred to as the nominal frequency or the cutoff frequency of the filter. Whether the filters on a particular EEG machine are named according to a cutoff frequency or a time constant is the decision of the manufacturer. Because referring to filters by their cutoff frequencies is becoming more common, and also because cutoff frequencies are easier to understand, we discuss the relationship between a filter’s electrical characteristics and its cutoff frequency first.



Low-Frequency Filters


The term cutoff frequency conjures up the image of an all-or-nothing effect at the frequency named. For example, a class may have a particular cutoff grade for passing or failing—one point below the cutoff grade, and the student does not go on. An amusement park may have a particular height cutoff to go on certain rides—all individuals below that height are excluded from the ride. The behavior of low-frequency filters in terms of their cutoff frequencies is not at all so absolute as the behavior of classroom teachers or amusement park officials. In fact, it may be surprisins to learn how little a filter affects activity at its cutoff frequency. When a low-frequency filter encounters a sine wave that happens to be exactly at its cutoff frequency, it cuts down the amplitude of that wave by approximately 30%. Sine waves at frequencies somewhat below that frequency are reduced by somewhat more than 30%—the farther the wave’s frequency is below the filter’s nominal frequency, the more it is attenuated. Perhaps more surprising, sine waves at frequencies somewhat above the cutoff frequency are also reduced in size by the filter, although by somewhat less than 30%. Again, the more the sine wave’s frequency exceeds the low-frequency filter’s nominal frequency, the less it is affected by the filter.



Visual Effects of Low-Frequency Filters


When standard low frequency filter settings such as a cutoff frequency of 1 Hz or below are used for the low-frequency filter, the main effect is to help keep each EEG channel within its own horizontal area, eliminating large drifts upward or downward into the space of other channels. This is because this baseline drifting actually represents a very low frequency wave. More aggressive use of the low-frequency filter (higher cutoff frequencies such as 3 Hz or 5 Hz) initially begins to attenuate delta frequencies and, when even higher cutoff frequencies are used, may almost completely eliminate some slow activity, sometimes with the advantage of bringing out other features in the EEG (see Figures 7-5, 7-6, 7-7, 7-8, and 7-9). Examples of how different low-frequency filters might affect a simple trace of the posterior rhythm are shown in Figure 7-10. Note that when successively more restrictive settings are used for the low filter, the baselines of each channel become straighter, but faster activity is relatively preserved.









Roll-off Characteristics


The graph in Figure 7-11 illustrates how a 5-Hz LF would handle sine waves of varying frequencies. The curve describes what portion of a pure sine wave (y axis) at a given frequency (x axis) would be allowed to pass through the filter. Considering the example of this 5-Hz low-frequency filter in more detail, the curve shows that a 5-Hz sine wave presented to this filter will lose 30% of its amplitude after passing through the filter. (Why the amount of reduction at the cutoff frequency is specifically 30% is explained later.) If the original 5-Hz wave presented to the filter has an amplitude of 100 μV (the input wave), then the filter’s output wave would only have an amplitude of 70 μV. What does the 5-Hz LF do with waves just above and just below 5 Hz? The roll-off curve for this filter shown in this figure indicates that a 4-Hz curve would be attenuated by 33%, but a 6-Hz sine wave would only be attenuated by 26%. The type of curve shown in Figure 7-11 that shows how a given filter processes pure sine waves of different frequencies is called the roll-off characteristic of the filter. Figure 7-12 shows how a 5-Hz LFF handles input waves of 10 Hz, 5 Hz, 2 Hz, and 0.5 Hz of the same amplitude, attenuating the lowest frequency waves dramatically but only causing a mild reduction in the amplitude of the 10-Hz wave. The exact amount of reduction at each frequency is given by the roll-off characteristic shown in the previous figure. Figure 7-13 shows the roll-off characteristics of 0.1-, 1-, 5-, and 10-Hz low filters.





Of course, when filters are applied to real EEG signals the waves presented to the filter consist of mixed frequencies. The filter attenuates each frequency component of the waves according to the rule of the roll-off characteristic even in wave mixtures. Low-frequency filters are especially useful for filtering out certain artifacts caused by patient motion that might shift a channel’s baseline or other sources of low-frequency noise.




WAVE ATTENUATION AND DECIBELS


The reason that filters are named after the wave frequency at which they attenuate the amplitude by 30% deserves some explanation. The amount that a filter reduces a given wave can also be stated in decibels. A bel is defined as the common logarithm of the ratio of the powers of two waves and a decibel is defined as 10 times that number:



image



where p1 and p2 are the powers of the two waves being compared.


Note, therefore, that the decibel unit is not an absolute measurement, but rather a comparison—a ratio or percent change. (Even when the decibel unit is used to describe the intensity of sound, it always represents a comparison to a defined, standard sound level.) Because the decibel unit is used to describe the change in power rather than the change in voltage (amplitude), but voltage measurements rather than power measurements are routinely used in EEG, the relationship between power and wave amplitude must be considered. In fact, the power of a wave varies as the square of its amplitude. For that reason, if amplitudes are used in the previous formula, their values must be squared to preserve the relationship:



image



where a1 and a2 are the amplitudes of the two waves being compared.


This equation can be rewritten taking the squared terms out of the parentheses:



image



The nominal or cutoff frequency of a filter is defined by the frequency at which the power is attenuated by 50%. This frequency at which the power is reduced by 50% is also called the “3-dB point” of a filter because the formula tells us that a 50% reduction in power is equal to approximately 3 dB: when p1 is twice p2, 10 log (2) ≅ 3.01. What ratio of amplitudes corresponds to a 2:1 ration of powers? Because the amplitudes must be squared to get the power, the corresponding pair of amplitudes that would also manifest a 3-dB change would represent approximately a 70% reduction in wave height, such as from 10 to 7:



10 log (102/72) = 10 log (100/49) ≅ 3 dB



Because a reduction in amplitude of 30% corresponds to a 50% reduction in total power, filter cutoff frequencies are named after the point at which the filter decreases the power by 50% and, therefore, the amplitude by 30%.


The steepness of the roll-off characteristic of a filter is sometimes described in the units of decibels per octave. The term octave is best known in the music world, describing the difference between two notes such as “middle C” and “high C.” In both the world of music and the world of electrical signals, an octave represents a doubling or a halving of a wave frequency. Therefore, 2 Hz is one octave below 4 Hz (and “middle C” on the piano represents a tone at 256 Hz, whereas the note one octave above, “high C,” is the tone at 512 Hz). Simple low-filter frequency-response curves “roll off” at a maximum of 6 dB per octave, although this roll-off rate is not constant across the entire frequency band.



BANDPASS FILTERS


As mentioned earlier, an HFF and an LFF are typically combined to create a specific bandpass. Typical filter settings with which many routine EEGs are initially recorded include a pairing of an LFF set at 1 Hz and an HFF set at 70 Hz. Taking into account the fact that the roll-off characteristics for these filters are relatively gradual (rather than creating a “brick wall” where no activity below 1 Hz or above 70 Hz can pass), it is no surprise that a fair amount of EEG activity with frequencies above and below the nominal frequencies of 1 Hz and 70 Hz still may appear in the recording. Figure 7-15 shows two possible bandpass setups, one with LFF = 1 Hz and HFF = 70 Hz, and the other with LFF = 5 Hz and HFF = 70 Hz. Figure 7-16 illustrates the same bandpass setup, but plotting the curves with the frequency on a linear scale for comparison. Figure 7-17 illustrates the bandpass curve that uses a more aggressive HFF setting of 35 Hz. Note that, comparing the Figures 7-15 and 7-17, the shapes of the curves are similar, and the portions of the curves on the left (representing the low frequencies) are nearly identical. The portions of the curves on the right side (representing the higher frequencies) show more attenuation when the HFF is set to 35 Hz rather than 70 Hz.






50-HZ AND 60-HZ NOTCH FILTERS


Unlike HFFs and LFFs, which have a gradual roll-off curve, the purpose of a notch filter is to exclude a single frequency from the EEG signal. These notch filters are most useful when the field of AC current from the electrical wiring and outlets that surround the patient contaminates the record. The ideal notch filter’s transmission curve shows a flat response for all frequencies, except for the nominal frequency of the filter, where there is a notch in the curve denoting near complete attenuation of any waves at that particular frequency (see Figure 7-18). Of course, in the world of working EEG, notch filters may not operate as perfectly as this description implies, but they typically do a good job of suppressing unwanted AC line voltage artifact. Figure 7-19 shows a sample of EEG with 60-Hz contamination in multiple channels. Figure 7-20 shows detail of the 60-Hz artifact. The reader should become adept at identifying the 60-Hz sine wave that comprises the fine structure of this type of artifact. Figure 7-21 shows the same page of EEG with the 60-Hz notch filter “in” (applied).






Some of the imperfections of notch filters can be overlooked, such as the fact that a 60-Hz notch filter will also attenuate some adjacent frequencies, such as 59 Hz and 61 Hz. The good news is that the electroencephalographer is rarely interested in these nearby frequencies because they are in a range much faster than the cerebral rhythms that are of interest during routine analysis; this type of shortcoming is rarely noticed. Also, a notch filter may have difficulty suppressing particularly large amounts of 60-Hz activity. The 60-Hz notch filter is useful in countries in North America and other locations where AC electricity is supplied at 60 Hz. The 50-Hz notch filter is used in the majority of countries where the line frequency is 50 Hz (in North America, the 50-Hz notch filter would serve no useful purpose).

Mar 12, 2017 | Posted by in NEUROLOGY | Comments Off on Filters in the Electroencephalogram
Premium Wordpress Themes by UFO Themes