3.21  Extra Exercises


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.7.
3.2. Using FilterPro as in Section 3.10.1.0 or similar software, design a second-order lowpass Butterworth filter H1(s) 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 H2(s), trying to improve the attenuation using an approximation other than Butterworth’s. Comparing H1(s) and H2(s), what can you say on how good are their magnitudes and phases?
3.3. Design a digital Butterworth filter H(z) using the bilinear transform. The cutoff and rejection filters are π4 and 2π3, 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.51: 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 π4 and 2π3 rad? b) What is the difference equation that corresponds to H(z)?
3.4. The bilinear transform Eq. (3.71) was obtained by expanding the numerator and denominator of z = esTs2esTs using a first order Taylor expansion. Compare it with the expansion of z = esTs 1 + sTs. What are the reasons for using the former expansion? An alternative point of view is to calculate the series expansion of ln z for the matched Z-transform s = ln (z)Ts. Check the expansion for x > 0 at [ url3iit].
3.5. Study the algorithm used to design [b, a]=butter(2,1/4) including the pre-warping stage.
3.6. Using the function fir1, compare the FIR filters with cutoff frequency π4 rad for the windows Hamming, Hann and rectangular. The commands can be

1bham=fir1(30,1/3,hamming(31)); 
2bhan=fir1(30,1/3,hanning(31)); 
3bret=fir1(30,1/3,rectwin(31));

and freqz can help. How do they compare with respect to: attenuation, decay, sidelobe and width of the main lobe.
3.7. Observe that fir1 in Matlab uses a modified cutoff frequency fc. Instead of fc being the frequency of half the power at passband, for fir1 fc is the frequency of half the gain at passband. In other words, considering a filter with gain |H(0)| = G at DC, fir1 provides a filter with gain |H(fc)| 0.5G (which corresponds to 20log 100.5 6 dB), instead of the commonly adopted 3 dB value of |H(fc)| G2. For the Hamming window, design an alternative to fir1 that allows the user to specify the cutoff frequency as the one in which |H(fc)| G2.
3.8. The Kaiser window is very flexible. Study the project below that uses Fs = 11025 Hz, passband [0,1000] Hz, and rejection band [1200,Fs2]. 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.
3.9. Generate realizations (waveforms) of a Gauss-Markov process. Recall that a first-order Gauss-Markov process obeys s[n] = as[n 1] + ν[n],n 0, where ν[n] is an i. i. d. Gaussian noise. Generate realizations of s[n] with N = 100 samples each, using ν[n] with unitary power, and for the following values of a: 0,.1,.9,.99,.5,2,3. Provide a qualitative description of the difference between |a| < 1 and |a| > 1. Calculate the autocorrelation of s[n] in terms of a (or obtain it from references such as [JN84] or the Web).
3.10. Study the anti-aliasing filters at [ url3min].
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”?
3.12. Study the advantages and disadvantages when comparing Butterworth, Chebyshev and Bessel responses.
3.13. When cascading the 2nd order stages, why the stages with lower quality factor Q are placed first by Filter Pro?
3.14. Compare the MFB and Sallen-Key topologies. Can you find a more sophisticated topology in the literature? If yes, describe it.
3.15. Briefly explain what sensitivity means.