Lab 4 - Digital Signal Processing. Digital Filter Design.
Exercise 1.1: Spectral analysis
Consider the following digital signal ...
Write a MATLAB program to
(a) Generate the signal above for L = 50 . Then, compute its 2048-point FFT and plot the magnitude spectrum X( f ) over 0 < f < 200 Hz. In the title of all your figures, display the window type, number of sample and the frequency resolution. Give your interpretation of the magnitude spectrum.
(b) Calculate the minimum number of samples L to achieve a sufficient frequency resolution. Generate the corresponding signal and plot its magnitude spectrum.
(c) Apply the Hamming window (equation defined below) to your signal (b) and plot its magnitude spectrum. Compared to the plot (b), give your interpretation in terms of frequency resolution and frequency leakage. Propose a solution to improve the frequency resolution and plot the resulting magnitude spectrum.
Exercise 1.2: FIR bandpass filter design using the Kaiser window
The steps for designing a FIR Bandpass filter design are follows. Given the filter specifications pass stop ...
1. Calculate ...
2. Calculate ...
3. Calculate ...
4. Calculate the filter length N from 1 with ... and round it up to the next odd integer, and set M from M = (N - 1)/2
5. Calculate the Kaiser window function from
6. Calculate the FIR from ...
To implement the FIR bandpass filter described above, you have to:
(a) Write a MATLAB function BandPass_KaiserW_NU whose input parameters are the filter specifications; and output parameters are the impulse response and the delay M.
(b) For ... plot the filter frequency response (magnitude spectrum in dB). For comparison, plot on this same graph
the response for the response for a rectangular window.
(c) Repeat (b) for ... 40 dB pass A and ... 20 dB
Exercise 2.1: Audio processing
Digital loudspeaker systems operate on the digitized audio input. They use (FIR or IIR) digital filters to split the audio input into the appropriate frequency bands, which are then converted to analog format, amplified, and drive the corresponding parts of the loudspeaker.
In case of the two-way crossover filters technique, the audio input is split into its low- and high-frequency components for the woofer and tweeter parts of the loudspeaker, respectively. To perform this operation, write a MATLAB program to
(a) Implement first-order IIR filters derived from the bilinear transformation2. The cutoff frequency of the lowpass and highpass filters, known as the crossover frequency, is fc = 2 kHz. The sampling frequency and attenuation are 8192 Hz and 6 dB, respectively.
(b) On the same graph, plot the filter frequency responses (magnitude spectrum in dB).
(c) Apply your filters to an audio input (MATLAB command: load handel) and listen to the audio output of using the soundsc function.
Note!
1. There is a mistake in Kaiser Window, it does not compile.
2. There is no Bilinear transformation task
Cite As
Sanzhar Askaruly (2024). Lab 4 - Digital Signal Processing. Digital Filter Design. (https://www.mathworks.com/matlabcentral/fileexchange/54534-lab-4-digital-signal-processing-digital-filter-design), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Lab4_DigitalSignalProcessing/
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |