Pages

Saturday, September 2, 2023

Mixed Signals

Recently for my research I've been working with digital signal filters, which are a way to change the frequencies that appear in a signal. Specifically, I've been using a Kaiser bandpass filter, which removes frequencies outside a given range. You might imagine that if we want a specific range of frequencies, we could just use a Fourier transform to set those points to zero. There's a problem with that though: In order for the transform to be precise, we need infinitely long data, so we can capture all frequencies. Since ours is finite, we will get spectral leakage, where the timespan of our data will introduce its own frequency to the spectrum. We can mitigate this by applying a window to the data, which tapers at the ends.

These filters are often displayed through their finite impulse response (FIR), which shows what the filter does to a single spike of signal. Below are responses for a square window, which corresponds to the sharp clipping I described above, and an example Kaiser window:

Notice that the square window has much more wiggling on the sides, while the Kaiser window damps out quickly. On the other hand, we do lose a little bit of power in the main lobe of the Kaiser – There are always tradeoffs in these situations.

Once we have the FIR for a filter, we can apply it to a signal with an operation called convolution:

You can picture this as sliding the filter across the signal and taking the sum of the product at each point – The Wikipedia article I linked has some nice animations. What I wanted to know was, how do the different settings for the Kaiser filter affect the result for the signals I'm working on? Below, you'll find a plot of a square pulse before and after filtering. The controls are the attenuation outside the band of desired frequencies, the width of desired frequencies, and the cutoff, which is related to how long the transition from the passed to the attenuated frequencies lasts.

Canvas not supported; please update your browser.

Attenuation

Width

Cutoff


No comments:

Post a Comment