LAB 5 FIR Dave Scheffler, Sarah Offutt PRELAB Comparison Filter Hanning poly2 poly3 poly4 deriv2 deriv3 deriv5 60 Hz gain (dB) -100.6 dB -94.48 dB -115.1 dB -120 dB -109.7 dB -57.65 dB -95.57 dB Which filter reduces noise the best? Which does the worst? Best=> poly4 Worst=> deriv2 Impulse Response {1, 0, -2, 0, 1} Zero Placement The filter removes that 50 Hz noise, it has zeros at those frequencies so that they are not seen. Frequency Sampling {0, 0, 0, -40, -40, -40, -40} {0, 0, -40, -40, -40, -40, -40} Where are the zeros located for these filters (in polar format)? 0.00, 27.69, 55.38, 83.08, 110.77, 138.46, 166.15 etc (can’t see) When x = -7 db LAB The corner frequency of the hanning filter is 36.33 Hz at -3 dB. Hanning Filter Derive5 filter There are no discontinuities in the hanning filter, but 4 can be seen in the deriv5 filter. This is due to the notches in the frequency response which correspond to the pi jumps seen in the phase response. Questions The z transform takes an analog signal and makes it a digital signal by using the following equation: F(z) = f(0) + f(T)z–1 + f(2T)z–2 + … + f(kT)z–k. The impulse response is the result of the application of an impulse to the signal. An impulse is an infinitely high amplitude and infinitely small width. The frequency response is looking at the signal’s amplitude and phase versus the signals frequency. The frequency response is in the digital domain. The FIR filter has a finite impulse response with no feedback. Because the filter has no feedback and all poles are in a trivial position (poles at the origin), the FIR filter is stable. The IIR filter has an infinite impulse response. It does contain feedback. Poles must be chosen carefully because poles can be anywhere which could cause instability. All poles must lie inside or on the unit circle in the left side or there is instability. Poles try to send the frequency response to infinity while zeroes try to bring the frequency response back to zero. This is why zeroes on the unit circle cause notches in the frequency response. One can eliminate certain frequencies by designing a filter with zeros at certain places on the unit circle. The elimination is also dependent on sampling. If you are sampling at 180 Hz, you would place a zero at 120 degrees to eliminate 60 Hz. From the impulse response, you can find the transfer function, and with the transfer function you can find the poles and zeroes. Problems You would sample at a different frequency. To eliminate a frequency you multiply the sampling frequency by the angle the zero is at divided by 360. As you cannot change the zero placement, the sampling can be adjusted to give you the right 50 Hz elimination. You design the filter with zeros at the correct locations per the equations discussed in problem two. We used a custom filter with zeros at -0.5 +/- 0.866j. Here is the response with noise: Here is the response without noise: