510 likes | 734 Views
FIR Filters. FIR filters have transfer functions of the following form:. The impulse response is. This impulse response function is finite in duration . Such filters are referred to as finite impulse response or FIR filters.
E N D
FIR filters have transfer functions of the following form: The impulse response is
This impulse response function is finite in duration. Such filters are referred to as finite impulse response or FIR filters. Any filter whose transfer function does not have a denominator will have an impulse response that is finite in duration. There are no (realizable) analog filters with a finite impulse response, or (stable) analog filters whose transfer function does not have a denominator.
So why bother with FIR filters? FIR filters do have one interesting property: unlike IIR filters, they can have linear phase response. w H(ejw)
Example: Find the phase response of Solution: We let z=ejw, and find the angle of the complex value.
Now, let us find the criteria for an FIR filter to have linear phase. Suppose the FIR filter was of the simple form
The phase response of this filter is which is in fact linear.
If b0 = -b1 = b, we have The phase response is
As it turns out, as long as the coefficients aresymmetric (even or odd), the phase will be linear. The following are examples of linear-phase FIR filters:
Exercise: For each of the previous examples, find the (linear) relationship of phase to frequency H(ejw).
Linear Phase and Group Velocity What is so special about linear phase? Let f(w) be the phase response of a filter. Without loss of generality, let us assume that the filter has constant magnitude response.
Suppose we pass a sinewave through this filter. The corresponding output would be
Suppose we pass another sinewave through this filter. The corresponding output would be
Now suppose we pass the sum of the sinewaves through this filter. The corresponding output would be
Now if the phase response is linear, i.e., then the output would be
The filter effectively shifts different frequencies by the same amount in time. If the filter shifted the frequencies by different amounts in time (as it would with non-linear phase), then the signals would be delayed by different amounts and would not be aligned at the output of the filter. Such a non-aligned result is called dispersion. The derivative of the phase response is called the group velocity. For linear phase, the group velocity is constant (-b).
Design of FIR Filters Since there are no analog filters with a finite-duration impulse response, FIR filters can notbe patterned after analog filters—new, original design techniques have to be developed. The first design technique is the Fourier SeriesMethod. The second design technique is the Minimum Mean-Square Error Technique.
The Fourier Series Method Suppose we wished to design a filter with a desired frequency response, Hd(ejw). A typical example would be the following: Hd(ejw) w -wc wc
Let us take a periodic extension (in frequency domain) of this function: … … w -2p 2p We could represent this periodic extension by a Fourier series (in frequency domain).
The “period” would be 2p, and the fundamental “frequency” would be 2p/2p=1. where
We can readily construct the z-transform transfer function of this filter: Thus, the coefficients cn turn out to be nearly the FIR filter coefficients bn.
Example: Suppose the cutoff frequency of our desired filter is wc=p/2. Find the coefficients of an FIR filter. Solution:We calculate the filter coefficients as follows:
For a practical filter the summation in the Fourier series cannot be infinite: we must truncate the Fourier series to n=-r to r (where r is a finite integer): For r=5, the transfer function for our wc=p/2 filter is as follows:
Plots of the frequency response, for various values of r, are shown on the following slide.
While the frequency response improves for higher orders, you will notice that there is always “rippling” at the transition (even for higher orders). This “rippling” is called Gibbs phenomenon. This “rippling” can be decreased by the application ofwindows. A window is a filter which decreases the ripples. The window is applied in time-domain: the filter coefficients cn are weighted by factors wn which achieve an extra filtering function.
We have several types of windows: Hamming, von-Hann, or “Hanning,” Blackman, Kaiser. Such filters are available through MATLAB via commands like >> win = hamming(2*r+1); We can then multiply each of the coefficients by these Hamming coefficients: >> c = c.*win’;
The resultant filter coefficients cn will yield a filter with decreased “rippling” at the transition. The frequency plots for the previous filter with a Hamming window applied are shown on the following slide.
The “rippling” is greatly reduced, but the steepness of the frequency rolloff is decreased.
One last problem, is non-realizable: the impulse response has negative terms and the system is non-causal. The system basically responds r samples before the input is applied. We fix this problem by delayingthe impulse response by r samples.
Our equivalent causal (realizable) filter (with delay) transfer function is Thus, h[n] = c-n-r, and the order of the filter is 2r.
In our previous example for r=5, and wc=p/2 our non-realizable filter was The corresponding realizable filter is