My FIR Filter page

From Class Wiki
Jump to navigation Jump to search

Back to my page

FIR Filters

What is an FIR Filter? FIR stands for Finite Impulse Response, which means that the response to an individual impulse is going to stop at some point in time, where and Infinite Impulse Response is going to have a response that, at least in theory, never stops. The FIR Filter is almost always more useful than the IIR filter, so FIR filters are more widely used.

What is it used for?

An FIR Filter is used in Digital Signal Processing. A digital signal is really a series of impulse functions that were sampled from the orignal sound/radio/whatever wave. From these impulse functions the computer can re-create the original waveform. This all works great, but what if you want to change something about the wave, like it's frequency response, or maybe the phase delay? This is where FIR filters come into play.

How does it work?

An FIR Filter is basically a convolution of two series of impulse functions. It takes the impulse functions stored digitally and convolves them with another series of impulse functions which represent a certain frequency response, or some other digital signal transformation. This convolution in time multiplies the original frequency response with the frequency response of the FIR Filter to give the desired output from the filter. Ideally you would use an infinite convolution like this: where K is a variable for the amount of interpolation desired in the filter. This isn't possible in real life. We can't store an infinite amount of data points, so we compromise and store as many as we can reasonably store while still allowing for time constraints. What we end up with looks more like this: The reason the outer sum goes from -(N-1) to 0 is because you are storing the previous N-1 impulses and using those data points in your convolution.

Adaptive Filters

An adaptive filter does what its name implies. It adapts. Basically, an adaptive filter will try to make it's characteristics look exactly like the characteristics of an unknown LTI system by trying to make the output of the adaptive filter look like the output of the unknow LTI system.

How does it work?

An adaptive filter works by taking the output of both the unknown system, and the adaptive FIR, finding the difference, and then using that difference to calculate new coefficients for the adaptive filter. By repeating this process over and over again, eventually the differences between the two will be minimized. Usually, we want this done quickly, so most of the time, it is best to decrease the difference between the systems as fast as possible. The best way to do this is by taking the gradient of the system, then plug in the error, and use that to calculate the next set of coefficients, stepping closer and closer to the point of no error (the smaller the step size, the slower the process, but the more accurate the results). The block diagram looks something like this. --Still having trouble getting pictures in here-- Now, this isn't something that you could do by hand very easily To do an adaptive filter, you really need to use a computer and have the computer do all the calculations for you, because it is just too much number crunching for one person to do. So this wasn't really available until computers became available. Now that it is available, what is it used for?

What is it used for?

Adaptive filters are used in many areas, but perhaps the biggest area is noise cancelling. The way this is done is quite brilliant. If you say that your unknown LTI system is silence, then the FIR will try to make its output to be zero. This is very useful if you have a signal that is made of two parts, a very quiet portion that you want, like someone's voice, and a portion that is loud that you don't want, like water running. If you put the signal into an adaptive filter with the unknown system being silence, it will try to make the incoming signal the same. The consant sound of the water will become filtered out, but the ever-changing quality of the voice will not be filtered out because the filter won't be able to keep up with the change.