3.17 Extra Exercises
- f
3.1. - Develop and list the source code of a Matlab/Octave routine that implements the overlap-save method using a structure similar to Listing 3.5.
- f
3.2. - Using FilterPro as in Section 3.4.9.0 or similar software, design a second-order lowpass Butterworth filter with passband frequency of 5 kHz. Show the schematics. Adopt commercial components with 10% of tolerance. What is the exact value of the passband frequency? Does it coincide with 5 kHz? After that, execute another design to obtain , trying to improve the attenuation using an approximation other than Butterworth’s. Comparing and , what can you say on how good are their magnitudes and phases?
- f
3.3. - Design a digital Butterworth filter
using the bilinear transform. The cutoff and rejection filters are
and ,
respectively. The linear gain at DC should be 1 and the minimum gain at the passband should
be 0.95. The maximum gain at the rejection band is 0.01. This filter can be obtained with the
commands:
Listing 3.44: MatlabOctaveCodeSnippets/snip_systems_buttord.m 1Gs=20*log10(0.01) 2Gp=20*log10(0.95) 3Wp=1/4 4Ws=2/3 5[n, Wc] = buttord(Wp, Ws, -Gp, -Gs) 6[b, a]=butter(n,Wc)
a) What are the gain and phase at frequencies and rad? b) What is the difference equation that corresponds to ?
- f
3.4. - The bilinear transform Eq. (3.79) was obtained by expanding the numerator and denominator of using a first order Taylor expansion. Compare it with the expansion of . What are the reasons for using the former expansion? An alternative point of view is to calculate the series expansion of for the matched Z-transform . Check the expansion for at [ url3iit].
- f
3.5. - Study the algorithm used to design [b, a]=butter(2,1/4) including the pre-warping stage.
- f
3.6. - Using the function fir1, compare the FIR filters with cutoff frequency
rad for
the windows Hamming, Hann and rectangular. The commands can be
and freqz can help. How do they compare with respect to: attenuation, decay, sidelobe and width of the main lobe.
- f
3.7. - Observe that fir1 in Matlab uses a modified cutoff frequency . Instead of being the frequency of half the power at passband, for fir1 is the frequency of half the gain at passband. In other words, considering a filter with gain at DC, fir1 provides a filter with gain (which corresponds to dB), instead of the commonly adopted dB value of . For the Hamming window, design an alternative to fir1 that allows the user to specify the cutoff frequency as the one in which .
- f
3.8. - The Kaiser window is very flexible. Study the project below that uses
Hz, passband
Hz, and
rejection band .
The minimum attenuation at rejection band is 40 dB and the maximum ripple at the passband is 5% (i. e.,
the filter can go from 1 to 0.95 at the passband).
1[n,w,beta,ftype]=kaiserord([1000,1200],[1,0],[0.05,0.01],11025); 2freqz(fir1(n,w,ftype,kaiser(n+1,beta),'noscale'),1,[],11025);
Design an IIR Butterworth that meets the requirements and compare the order with the Kaiser FIR filter.
- f
3.9. - Generate realizations (waveforms) of a Gauss-Markov process. Recall that a first-order Gauss-Markov process obeys , where is an i. i. d. Gaussian noise. Generate realizations of with samples each, using with unitary power, and for the following values of : . Provide a qualitative description of the difference between and . Calculate the autocorrelation of in terms of (or obtain it from references such as [JN84] or the Web).
- f
3.10. - Study the anti-aliasing filters at [ url3min].
- f
3.11. - Using FilterPro, execute the project of a stopband using default options, which should lead to an order 6 and cutoff frequency of 1 kHz. a) What does it mean “Min GBW reqd.” in the end of the “Schematic”? b) how to interpret the Group Delay plot? c) Why each stage of SOS has f0, BW and Q? d) Use “Edit” to re-do the project using Chebyshev with a maximum of 1 dB ripple in the passband instead of Bessel. How did that impact the “Group delay”?
- f
3.12. - Study the advantages and disadvantages when comparing Butterworth, Chebyshev and Bessel responses.
- f
3.13. - When cascading the 2nd order stages, why the stages with lower quality factor are placed first by Filter Pro?