4.9: Predicting Waveform Distortion from the Impulse Response Function

Applied Event-Related Potential Data Analysis 2e · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    4.9: Predicting Waveform Distortion from the Impulse Response Function

    In Exercise 4.4, you saw that a 10 Hz filter “smeared out” an ERP waveform, producing reduced P1 and N1 amplitudes and spreading out the onset and offset of the waveform. However, a 25 Hz filter produced hardly any distortion at all. The present exercise will show you how this pattern of distortion can be predicted from the impulse response functions of the 10 Hz and 25 Hz filters.

    Before we see how this works, click the Reset button under the lower right corner of the plot region and then click Reset ERPLAB Studio in the window that appears.

    Now go to the ERPsets panel in the ERP tab and load P1+N1+P2+All_Filtered.erp. This ERPset has the individual P1, N1, and P2 components from the previous exercises, along with the entire ERP waveform (created by summing together the three components). Each of these waveforms is in a separate channel. Bin 1 has the unfiltered data; Bin 2 has the data filtered at 25 Hz; Bin 3 has the data filtered at 10 Hz. It should look like Screenshot 4.22. You can see that the 10 Hz filter reduced the P1 and N1 amplitudes and shifted the onset and offset times of the individual components and the entire waveform.

    Screenshot 4.22
    P1+N1+P2+All_Filtered

    Now let’s see how this is related to the impulse response functions of the 10 Hz and 25 Hz filters. Go to the Filtering panel and click the Advanced button. Within the Advanced window, set the Low-Pass filter to 25 Hz. To see the impulse response function, select Filter impulse responses in the Display section of the Advanced window, and make sure the X limits are set to 0 100. As shown in Screenshot 4.23 (top), this impulse response function has a peak value of about 0.5 at time zero and then falls rapidly to zero by 20 ms.

    Now change the half-amplitude cutoff to 10 Hz. The impulse response function should now look like the one in Screenshot 2.23 (bottom). It has a peak value of about 0.24 at time zero and then falls gradually to zero by about 70 ms.

    Screenshot 23
    10 and 25 Hz Impulse Response Functions

    The fact that the 10 Hz impulse response function has a peak amplitude that is much lower than that of the 25 Hz impulse response function explains why the 10 Hz filter reduces the amplitudes of the P1 and N1 components much more than the 25 Hz filter (Screenshot 4.22 above). Note that the amplitude of the P2 wave is only slightly reduced by the 10 Hz filter; this is a result of an interaction between the shape of the impulse response function and the shape of the waveform that is too complicated to explain here (see the free online Chapter 12 from An Introduction to the Event-Related Potential Technique for a more complete description of filtering with an impulse response function).

    The greater temporal spreading produced by the 10 Hz filter than by the 25 Hz filter is explained by the fact that the 10 Hz impulse response function is much wider than that of the 25 Hz impulse response function. Remember that, when we filter the data, each point in the ERP waveform is replaced by a scaled-and-shifted copy of the impulse response function. Replacing an early point in the ERP waveform with a broad impulse response function will cause the filtered waveform to start earlier than the unfiltered waveform. Similarly, replacing a late point in the ERP waveform with a broad impulse response function will cause the filtered waveform to end later than the unfiltered waveform.

    When you look at the filtered and unfiltered versions of the overall ERP waveform (the lower right panel of Screenshot 4.23), you can see the temporal spreading at the beginning and end of the overall waveform. But you should keep in mind that each of the underlying components is also being smeared out. You can’t really see this in the overall waveform, because you can’t tell when a given underlying component begins and ends. But, because this is simulated data and you have the waveforms for the underlying components, you can see that their onset and offset times are also being distorted. This ability to see the smearing of the individual components is one of many advantages of looking at the effects of a filter on simulated data.

    Now we’re going to look at the effects of an even more extreme filter. First, load the ERPset file named P1+N1+P2+All.erp into the ERPsets panel. This ERPset contains the unfiltered data. Now go to the Filtering panel and select a high-pass cutoff of 1 Hz, a low-pass cutoff of 10 Hz, and a roll-off of 48 dB/octave (as shown in Screenshot 4.24). 

    Screenshot 4.24
    Filtering Panel

    Click Run and name the ERPset P1+N1+P2+All_filt1-10_48dB. The result should look like Screenshot 4.25.

    Screenshot 4.25
    Filtered Waveforms 1-10 Hz 48 dB

    You can see a ton of distortion in the individual components and in the overall waveform. Each of these waveforms now spreads broadly in both directions, starting in the prestimulus baseline period. However, the most concerning distortion in the overall waveform is that the filter has induced an artifactual negative peak at approximately 30 ms. 

    By applying a filter like this to real data, you might think you’ve discovered a new ERP component when in fact you’ve just created an artifactual peak. Imagine how embarrassing it would be to publish a paper claiming that you’ve discovered a new component and then having other researchers demonstrate that you fell prey to a filtering artifact. This sort of thing has actually happened, and I don’t want it to happen to you. This is why we have spent so much time going through the details of how filters work in the time domain. If you just look at the frequency response function of a filter, you would not predict this pattern of distortion. But it’s easily predictable if you look at the impulse response function. And it’s even more obvious if you try filtering some simulated ERP components and ERP waveforms.

    Let’s take a look at the impulse response function of this filter. With the same filter settings you used to create this ERPset, click the Advanced button in the Filtering panel, change the Display to Filter impulse response, and set the X limits to 0 200. You should see something like Screenshot 4.26.

    Screenshot 4.26
    Extreme Impulse Response Function

    This view isn’t always ideal, so I applied the filter to an actual impulse and created the impulse response function shown in Figure 4.6. Now you can see both sides of the function, and you can see the timing plotted the same way that eStudio plots ERP waveforms.

    Impulse Response Function 1-10 Hz, 48 dB
    Figure 4.6. Result of filtering an impulse of amplitude 1 at time zero with a bandpass of 1-10 Hz and a roll-off of 48 dB/octave.

    The first thing to notice is that this function extends for hundreds of milliseconds both before and after time zero. Because filtering replaces each point in the ERP waveform with a scaled-and-shifted copy of the impulse response function, you can immediately see that this filter is going to spread the onset and offset of the waveform by a large amount.

    The second thing to notice is that this function contains both a positive peak around time zero and then negative values at longer latencies. Let’s think about the effects of these negative values for the time point at 250 ms in the P2 component. There is a large positive voltage at this time point in the unfiltered waveform. Filtering the waveform replaces this voltage with a scaled-and-shifted copy of the impulse response function. The negative values from 50-400 ms on each side of the impulse response function will then become negative values up to 400 ms before and after 250 ms in the filtered values. If you look at the filtered P2 wave, you will see that it contains large and long-lasting negative values before and after the time period of the original unfiltered P2 wave. It doesn’t look exactly like the impulse response function, of course, because the scaling-and-shifting process is repeated for every time point, and then the results are summed together.

    Now let’s take a look at a simulation showing how these artifacts can lead to completely incorrect conclusions when you are comparing two different experimental conditions or two different groups of subjects. I mentioned this simulation in the opening of the chapter (to get you motivated to go through all the exercises you’ve now completed). Now we’re going to take a closer look.

    Start by loading the ERPset named Simulated P2 Effect.erp. This ERPset is a simulation of two experimental conditions, A and B. As in previous simulations, the Condition A waveform is the sum of a P1 wave, an N1 wave, and a P2 wave. Condition B is the same, except that the amplitude of the P2 wave was increased by 50% (see Screenshot 4.27). As you can see from the waveforms, this effect begins at approximately 100 ms, which is because the P2 wave begins at that time. Condition B remains more positive than Condition A from 100 ms until the end of the waveforms. Note that we could also think of this as a simulation of a control group and a patient group rather than two experimental conditions.

    Screenshot 4.27
    Conditions A and B

    Now go to the Filtering panel and filter this ERPset with the parameters from the last several screenshots (high-pass cutoff of 1 Hz, low-pass cutoff of 10 Hz, roll-off of 48 dB/octave). You can name the resulting ERPset Simulated P2 Effect_filt1-10_48dB. The result should look like Screenshot 4.28.

    Screenshot 4.28
    Conditions A and B 1-10 48 dB

    This is the set of waveforms that you saw in the opening of the book. Here’s what you read in that section: If you were to describe these results in a journal article, you might say that both the N1 and P2 components are larger in Condition B than in Condition A. Or you might be more careful and say that there is greater extended negativity in Condition B than in Condition A up until the peak of the N1 wave, along with a greater positivity in the P2 latency range for condition B than for Condition A. But both of these descriptions contain a clear falsehood that is a result of filtering.

    Now we can explain why filtering produced this bogus increase in negative voltage in the early part of the Condition B waveform. Condition B had a larger P2 than Condition A. We saw earlier that the broad set of negative values in the filter’s impulse response causes the large positivity of the P2 to be preceded and followed by artifactual negative voltages (see the lower left panel of Screenshot 4.25). Because the P2 was bigger in Condition B than in Condition A, this negative artifact was also larger in condition B than in Condition A. And this is what is primarily responsible for the bogus difference between conditions in the early part of the filtered waveforms.

    I hope you now feel like you have a general understanding of how filtering works in the time domain, why it’s important to look at a filter’s impulse response function, and why it’s valuable to look at the effects of a filter on simulated waveforms. The next sections of the book will show you how to take what you’ve learned and use this knowledge to select filter settings that will be effective at reducing noise but will avoid producing the kinds of waveform distortions that you’ve seen in this exercise. But before we get to that, we need to take a look at the distortions produced by high-pass filters. That will be the focus of the next exercise.

    But first I want to remind you of something I said earlier, namely that filtering in the time domain is mathematically equivalent to filtering in the frequency domain. You will get the same waveform distortion no matter whether the filtering is implemented in the time domain or the frequency domain. However, it's a lot easier to understand why filters distort ERP waveforms when we think about them in the time domain rather than the frequency domain.


    This page titled 4.9: Predicting Waveform Distortion from the Impulse Response Function was last modified on Thu, 01 Oct 2026 18:52:58 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Steven J Luck.