230 likes | 345 Views
BIEN425 – Lecture 11. By the end of the lecture, you should be able to: Design and implement FIR filters using frequency-sampling method Compare the advantages / disadvantages of FIR filter design using windowing versus frequency-sampling methods. Alternative for designing FIR given A r (f).
E N D
BIEN425 – Lecture 11 • By the end of the lecture, you should be able to: • Design and implement FIR filters using frequency-sampling method • Compare the advantages / disadvantages of FIR filter design using windowing versus frequency-sampling methods.
Alternative for designing FIR given Ar(f) • Supposed N frequency samples equally spaced • Recall: • Note then h(k) = IDFT{H(fi)} • To ensure that filter is linear-phase, H(f) will have to be of the form
Example • Choosing Ar(f) to be ideal
Example: optimizing trans. band • hx(k) will be different depending on the value of x
Strategy: • Find the value of x so that the stopband attenuation As(x) is maximized • Find As(x) for 3 arbitrarily chosen x values • Assume As(x) follows a quadratic polynomial • Solve for c to fit the data points • Solve for x As x
Kaiser and Chebyshev windows • Don’t worry about the complexity • Just have to know the characteristics
So far, we have only deal with low-pass • WHY? • Because it’s straight-forward? Of course! • What if we want other filters • We can translate low-pass into any other filter types • Highpass? Very simple • Bandpass? Here is the example
Let’s design a bandpass filter • Want: bandpass 50-100Hz • Procedure: • Create lowpass filter with the width in the passband (i,e. Fc = 24Hz) • Compute h(k) – introduce concept of taps • Apply windows if necessary • Shift to desired frequency s_shift=sin(2*pi*76/fs*(0:30)); h_shifted=h.*s_shift;
Other options • Least-square method • In a sense, we would like to design a filter so that its actual response Ar(f) matches the desired response Ad(f) by minimizing the objective function J • So far, every frequency is treated with the same weight (or importance)
We could specify weighted importance for particular frequency bands with the variable w(i) • Note that this is not the window parameters • As a result, given the distribution of the weights we could find h(i) so that J is minimized.