DSP Filter Design With Sptool Matlab
DSP Filter Design With Sptool Matlab
Engineering, Islamabad
Lab # 8
Filter Design with SPTool
1.2
1.3
1.4
Viewing the time domain information of the original and filtered signals using the
Signal Browser
1.5
2. Overview
SPTool is a complete GUI-based interactive tool to design and implement digital
filters. It combines with a set of tools to perform the all steps of designing and analyzing the
signal and filter in both frequency and time domains.
2.1
and name it in SPTool. In this step, youll create a new signal at the command line and then
import it into SPTool.
1.
2.
click the From Workspace radio button to display the contents of the workspace.)
4.
b)
You can also move the variable speech into the Data field by clicking on speech
in the Workspace Contents list and then clicking on the arrow to the left of the
Data field.
C@SE
c)
d)
Name the signal by clicking in the Name field and typing speech.
e)
Press OK.
2.2
Design a Filter
You can import an existing filter into SPTool, or you can design and edit a new filter
using the Filter Designer. In this step, youll create a new filter. You will start designing by
taking one pole at origin and zero at . Which is a basic example covered in lecture.
1.
Press New Design in SPTool to activate the Filter Designer and generate a
default filter.
2.
The Filter Designer window is displayed with the default filter filt1.
3.
4.
C@SE
When the new filter is computed, the magnitude response of the filter is displayed with a
solid line in the main axes display area. To bring the responses for the first time click on the
view button in main SPTool menu.
2.3
2.
Click to select the signal speech[vector] from the Signals list and click to
select the filter (named filt1[design]) from the Filters list.
3.
4.
5.
Name the new signal by clicking in the Output Signal field and typing
filsp.
6.
Press OK.
The filter is applied to the selected signal. The new, filtered signal filsp[vector] is
displayed in the Signals list.
2.4
C@SE
Shift + click on the speech and filsp signals in the Signals list of SPTool to
select both signals.
2.
3.
The signal thats displayed in the Selection pop-up menu and in the
4.
2.5
You can get an idea of the frequency content of the two signals by displaying their
power spectra using the Spectrum Viewer, as described below:
1.
Reactivate SPTool by selecting it from the Window menu of the Signal Browser.
2.
Click on the speech[vector] signal in the Signals list of SPTool to select it.
3.
Press Apply in the Spectrum Viewer to compute and display spect1. The
spectrum of the speech signal is displayed in the main axes display area.
Exercise
1. Generate a sinusoid of 2 KHz, 5 KHz & 8 KHz.
2. Add them all & import the signal in SPTOOL.
3. Design a LPF which eliminates all the frequencies.
Lab Assignment
1. Design a band stop filter having a Bandwidth of 100 Hz. Order of the filter be 5. Initial
cutoff frequency is 4 KHz. While the sampling frequency is 32 KHz.
2. Place poles in the exact same location of the zeros above and see what happens.
C@SE
Rubric
#
Good
Satisfactory
Poor
1
2
3
4
5
Points
Total
C@SE