Exercises
11.4. Exercises#
Consider the following IIR system:
What is the order of this system?
Put this system into the standard form of (11.2). What are \(b\) and \(a\) for this system?
What is its impulse response?
Use scipy.signal.butter
to construct a high-pass filter at (and \(f_s=44100\)) with the following properties:
\(f_c = 500\)
a transition width of 250 Hz,
at most 1 dB of pass-band loss, and
stop-band attenuation of 60 dB.
What is the order of the resulting filter?
You are asked to implement a low-pass filter at \(f_s=44100\) with the following specification:
Cut-off frequency \(f_c = 1000\) Hz
No more than 1.5 dB of ripple in the pass-band (less is acceptable)
At least 80 dB of attenuation in the stop-band (more is acceptable)
A transition band of no more than 500 Hz (less is acceptable)
Which of the IIR filter(s) covered in this chapter could you use to implement a filter with these constraints?
Using the helper functions provided by scipy (e.g.,
scipy.signal.ellipord
), determine the order of the filter. If there are multiple filter types that will work, which one gives the smallest order?Use the Parks-McClellan method to implement an FIR filter with the given constraints. What order does the filter need to be to satisfy the constraints?
For this question, stick to single-pass (lfilter
) filtering, and not bidirectional (filtfilt
) filtering.
Hint
For part (c), the remez
function does not allow explicit constraints on the attenuation.
Try starting with a small order, measuring the frequency response, and then increasing the order until the constraints are satisfied.