75
Fundamentals of Digital Signal Processing Lab Collection Editor: Erik Luther

Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

Fundamentals of Digital Signal ProcessingLab

Collection Editor:Erik Luther

Page 2: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz
Page 3: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

Fundamentals of Digital Signal ProcessingLab

Collection Editor:Erik Luther

Authors:Jim CahowErik Luther

Online:< http://cnx.org/content/col10303/1.5/ >

C O N N E X I O N S

Rice University, Houston, Texas

Page 4: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

This selection and arrangement of content as a collection is copyrighted by Erik Luther. It is licensed under the

Creative Commons Attribution 2.0 license (http://creativecommons.org/licenses/by/2.0/).

Collection structure revised: January 3, 2006

PDF generated: October 25, 2012

For copyright and attribution information for the modules contained in this collection, see p. 67.

Page 5: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

Table of Contents

1 DSP Laboratory: Introduction, Hardware and Software Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 DSP Laboratory: Analog to Digital and Digital to Analog Conversion . . . . . . . . . . . . . . . . . . . . . . 73 DSP Laboratory: Time and Frequency Displays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 DSP Laboratory: Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 Interactive Digital Filter Design - Online Tool for IIR Filter and FIR Filter

Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 DSP Laboratory: IIR Notch Filter Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 DSP Laboratory: IIR Filter Design via the Bilinear Transformation . . . . . . . . . . . . . . . . . . . . . . . 418 DSP Laboratory: FIR Filter Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Attributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Page 6: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

iv

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 7: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

Chapter 1

DSP Laboratory: Introduction,

Hardware and Software Setup1

1.1 DSP Workstation Hardware List & Setup

1.1.1 Hardware: Dell Dimension 4550 PC with a Pentium 4 microprocessor

• · Runs software to design/implement digital �lters· Controls data acquisition and analysis· Communicates with the DSP board and/or soundcard· Edits/assembles/downloads code for the DSP chip on the DSP board

1.1.1.1 National Instruments SPEEDY-33

A self-contained, high-performance, programmable DSP board for signal processing applications. TheSPEEDY-33 comes equipped with a Texas Instruments DSP for high speed DSP calculations and Analog toDigital (A/D) and Digital to Analog (D/A) converters for interaction with the outside world.

• Speci�cations of the NI SPEEDY-332 are as follows:

· Bundled with LabVIEW DSP3 programming environment· Includes a Texas Instruments VC33 �oating point DSP processor· 13-ns Instruction Cycle Time· 150 Million Floating-Point Operations Per Second (MFLOPS)· 75 Million Instructions Per Second (MIPS)· USB interface used for connection to the PC· 16-bit stereo audio codec with two on-board microphones· Software-controlled adjustable sampling rate (8, 18, 24, 36, 44.1, and 48 kHz)· Eight memory-mapped LED's and eight memory-mapped general purpose switch inputs· Serial Port, CompactFlash interface

1This content is available online at <http://cnx.org/content/m13036/1.2/>.2http://digital.ni.com/express.nsf/bycode/ex3wxw3http://digital.ni.com/express.nsf/bycode/ex3wxw

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

1

Page 8: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

2CHAPTER 1. DSP LABORATORY: INTRODUCTION, HARDWARE AND

SOFTWARE SETUP

Figure 1.1: National Instruments Speedy 33

1.1.1.1.1 Condenser Microphone.

1.1.1.1.2 Personal Headphone set with individual volume control.

1.1.1.1.3 Black 3 prong headphone booster.

1.1.1.1.4 Audio Cable to go from the computer sound card to the microphone.

1.1.1.1.5 Male to male adapter cable.

Alternative option to NI Speedy 33:

1.1.1.2 Texas Instruments 6711 DSK

• Digital Signal Processing Board with PCM3003 Audio Daughter Card

The DSP board is responsible for the high-speed DSP calculations and the daughter card controls the A/Dand D/A conversion between the DSP board and the outside world.

• Speci�cations of the DSP board and daughter card are as follows:

· TI TMS320C6711 �oating point DSP processor· Software-controlled adjustable sampling rate (8, 9.6, 12, 16, 24, and 48 kHz)· 16-bit stereo audio codec with two on-board microphones. A lowpass anti-aliasing �lter at theinput channel with a �xed cuto� frequency = 24 kHz

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 9: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

3

1.1.2 Software:

The software used in the lab is National Instruments LabVIEW DSP Module4 ; a block diagram-based graph-ical programming package for digital signal processing that will be used for: data acquisition, time domaindata display, frequency domain calculation and display, �lter implementation, convolution and correlationcalculations, speech/signal modeling, and real-time �ltering. Using LabVIEW DSP Module in conjunctionwith the LabVIEW Digital Filter Design Toolkit, the DSP board and the rest of the lab equipment will notonly allow students to perform data acquisition, analysis, and �ltering, it will also give them the ability tolisten to the �ltered output.

1.1.3 Test Equipment:

1. Wavetek 270 Function Generator2. Tektronix 2213A Oscilloscope

1.2 System Set-up

Before beginning the lab, you need to make sure that the system is set up correctly. Follow the instructionsbelow to setup the station.

note: Instructions are included for both the SPEEDY-33 and TI 6711 DSK, follow instructionsappropriate to the hardware on your station.

4http://digital.ni.com/express.nsf/bycode/ex3wxw

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 10: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

4CHAPTER 1. DSP LABORATORY: INTRODUCTION, HARDWARE AND

SOFTWARE SETUP

1.2.1 Hardware Setup

1.2.1.1 NI SPEEDY-33 Setup Instructions

NI SPEEDY-33 DSP Board

Figure 1.2: NI SPEEDY-33 Installation Guide Part #: 371581A-01, 324158A-01

• Log on to the computer• Connect a USB cable between the PC USB Port of the SPEEDY-33 (Figure 2 #7) and the USB port

of your PC. The SPEEDY-33 is powered by the USB port. Once you connect the cable, the greenPower LED (Figure 2 #2) on the SPEEDY-33 will light.

• Con�rm that the Power LED on the SPEEDY-33 is lit.• If the New Hardware Found Wizard starts, follow the instructions to con�gure the drivers.• Connect your headphones to the black 3-pronged headphone booster and connect this booster to the

Audio Stereo Output Port (Figure 2 #4) on the SPEEDY-33. Turn on the headphone volume booster.• Connect the light gray cable coming out of the computer (which is the audio output from the computer

sound card) to the short gray male-male adapter cable and connect this, in turn, to the Audio StereoInput Port (Figure 2 #3) of the SPEEDY-33. The soundcard output (either CD audio or microphone)will be the input to the DSP board for most of this lab.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 11: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

5

• Switch the Jumpers on the SPEEDY-33 to the Line position. Refer to Figure 1 for the location of theLine/Microphone Jumpers (Figure 2 #9).

1.2.1.2 TI 6711 DSK Setup Instructions

• Plug the A/C adapter into the DSP board and make sure that the power LED is lit.• Connect your headphones to the black 3-pronged headphone booster and connect this booster to the

OUT jack on the audio daughter card attached to the DSP board. Do not use the OUT jack directlyon the DSP board. Turn on the headphone volume booster.

• Connect the light gray cable coming out of the computer (which is the audio output from the computersound card) to the short gray male-male adapter cable and connect this, in turn, to the IN jack of theaudio daughter card. Do not use the IN jack directly on the DSP board. The soundcard output (eitherCD audio or microphone) will be the input to the DSP board for most of this lab.

• Log on to the computer.• Once you log on, a DSK Init window should appear on the task bar. Click on it to open up the window

and then press ENTER as often as needed to complete the initialization. This con�gures the parallelport of the computer to communicate with the DSP board. Note: If you forgot to supply power to theDSP board prior to this step, the initialization will fail. In which case, you will have to log o�, powerup the DSP board, and then log on again and run the initialization routine again.

• Select the EE 453 folder and create a folder within this folder to store your lab �les. Use somedescriptive name to identify your lab group. The path for this folder will be Desktop\ee 453\<foldername>

• Activate Surround Mixer, a program which controls the input/output operation of the sound card.The Surround Mixer control panel is a mixer consisting of numerous volume bars, each controlling adi�erent aspect of the sound card. The far left volume bar controls the master volume. Make sure thatthe master volume is set to 100%. The volume bars in the middle control the various types of soundsources that the sound card can play (wave �les, microphone input, MIDI input, music CD input, etc).Make sure that the wav/mp3, microphone, and line-in volumes are set to 100%.

• Beneath each of the volume bars is a mute box that can be toggled on/o�. When checked, thecorresponding sound source is deactivated. Make sure that all source buttons are muted for now.

• Keep the Surround Mixer open throughout the lab. You will be selecting various inputs (wave, micro-phone, and line-in) throughout the lab.

note: When you are �nished with each lab, exit LabVIEW, log o� the computer, turn o� thefunction generator and the headphone volume booster, and unplug the DSP board from the A/Cadapter. Turn in Answered Questions to the TA.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 12: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

6CHAPTER 1. DSP LABORATORY: INTRODUCTION, HARDWARE AND

SOFTWARE SETUP

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 13: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

Chapter 2

DSP Laboratory: Analog to Digital and

Digital to Analog Conversion1

2.1 A/D and D/A Conversion

NI LabVIEW DSP is a block diagram-based DSP development platform that allows the user to quickly setup complex DSP algorithms. The true power of LabVIEW lies in its ability to interface with external DSPdevices and/or internal sound cards that are installed on the PC. The developed algorithms are downloadedto the DSP board, which then runs the algorithm in a real-time environment. In this lab, we will onlyscratch the surface regarding LabVIEW DSP's capabilities. For starters, we will look at how LabVIEWDSP interfaces with the A/D and D/A operations of the DSP board. Speci�cally, we will simply connectthe A/D converter to the D/A converter so that the DSP system plays back audio signal sent to it.

2.1.1 Simple Sampling/Reconstruction System

1. Keeping the Surround Mixer open, start LabVIEW Embedded Edition. On the startup screen fromthe Execution Target dropdown menu select your hardware device. Refer to Figure 2 below for details.Execution target determines where your application will execute when you run it.

2. Note: All the screenshots of LabVIEW windows are taken with the SPEEDY-33 selected as the exe-cution target. However, the instructions still apply for any other target unless otherwise speci�ed.

1This content is available online at <http://cnx.org/content/m13035/1.1/>.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

7

Page 14: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

8CHAPTER 2. DSP LABORATORY: ANALOG TO DIGITAL AND DIGITAL

TO ANALOG CONVERSION

Figure 2.1: Switch Execution Target to your DSP hardware device

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 15: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

9

2.1.1.1 Start With a New Blank LabVIEW VI

1. Select File�New VI to start a new LabVIEW application. (Note: A LabVIEW application is calledVirtual Instrument or VI). Any LabVIEW VI consists of two windows; a Front Panel where you willdesign your user interface and a Block Diagram where you will add various block components or VIsand wire them together to design your DSP system. On starting a new VI you will see the Front Paneland Block Diagram windows for your application appear on the screen.

2. Switch over to the Block Diagram window by left clicking on it and start developing your application.You will now develop a simple VI to read in an analog input from the A/D channel and play it backusing the D/A channel. From the menu select Window�Show Functions Palette. The Functions palletcontains functions or VIs that you will wire together to develop the application. Click on the ElementalI/O palette and bring out the Analog Input Elemental I/O node and place it on the block diagram.This node is used to read in analog input from the A/D channel. Similarly place the Analog OutputElemental I/O node on the block diagram. Refer to Figure 3 below for details.

Figure 2.2: Analog Input and Analog Output Elemental I/O nodes.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 16: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

10CHAPTER 2. DSP LABORATORY: ANALOG TO DIGITAL AND DIGITAL

TO ANALOG CONVERSION

3. The Analog Input and Output nodes control the input/output �ow of sound waves/data between theanalog input channels and the DSP. The Analog Input node controls the A/D converter, which convertsthe analog input signal (from the microphone, function generator, or any other analog sound source)to a sequence of numbers (digital data) and passes the data on to the DSP. The analog Output nodecontrols the D/A converter, which takes the digital data from the DSP and converts it back to ananalog signal.

4. Now we need to con�gure the Analog Input and Analog Output nodes. Double click on the AnalogInput node to bring up its con�guration dialog. In this dialog specify the following setting:

• General Tab:• Resource: 2 channel multiple samples• Con�guration Tab• Sample Rate in Hz: 48000• Framesize: 256

5. Click OK when done.

Figure 2.3

6. Double click on the Analog Output node. On its Con�guration dialog specify the parameters as follows:

• General Tab:• Resource: 2 channel multiple samples• Con�guration Tab• Sample Rate in Hz: 48000

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 17: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

11

Figure 2.4

7. Before running any DSP algorithm, the Analog Input and Output nodes need to be wired together.Hover your mouse over the Left channel output of the Analog Input node, the mouse curser will changeto a wire spindle. Left click and drag the wire to the Left channel input of the Analog Output node.

8. We will now place a While Loop so that the process can be run in a loop. Bring out a While Loopfrom the Functions�Structures Palette. Place the While Loop around the two nodes by left clickingon the top left corner and dragging it to the bottom right. The �nal application will look like Figure4. Notice a stop button appears which is wired to the conditional terminal of the loop. You will alsosee a stop button on the front panel. Once the application is run you will press this button to stop theapplication.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 18: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

12CHAPTER 2. DSP LABORATORY: ANALOG TO DIGITAL AND DIGITAL

TO ANALOG CONVERSION

Figure 2.5: Completed Application

9. Save your VI by selecting File�Save As and storing it in the directory you created earlier. You cangive the �le any name you want (such as lab1setup), but use the default extension of vi.

10. Now you need to prepare an audio input for your system. First, go to the Surround Mixer and activatethe Wave/mp3 input. Place a CD in the CD player in the PC, select the Windows Media Playerprogram, and press play. (Note: The program may automatically start when you insert the CD).You should not hear anything yet, because you haven't compiled and downloaded the simple playbackprogram to the DSP yet.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 19: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

13

2.1.1.2 Run LabVIEW Code On The DSP

1. You're �nally ready to run this very simple DSP system. (If using the SPEEDY-33 make sure that theJumpers are in the Line position). To run the application left click on the run arrow on the toolbaras shown in Figure 4. Notice on the LabVIEW DSP Module Status Monitor window comes up anddisplays the Status as the application is compiled and downloaded onto the DSP. The Memory Usagebar at the bottom displays the amount of memory being used. Once Status displays Running on Targetyou should hear the music through the headphones.

Figure 2.6: LabVIEW DSP Module Status Monitor

2. To use the microphone input instead of the CD Audio input, simply mute the Wave input button onthe Surround Mixer and activate the Microphone input instead. Give it a try. You can very quicklytoggle between (or even combine) di�erent inputs by using the Surround Mixer.

3. Stop the program by pressing the Stop button on the Front Panel.4. E�ects of Sampling Frequency on Sound Quality5. Now we'll brie�y examine the e�ects of sampling frequency on the sound quality of both music and

voice signals.6. Run the program again with CD audio input (using the original sampling frequency of 48000 Hz.) and

note the sound quality.7. Stop the program and change the sampling frequency (in both the Audio Input and Audio Output

nodes) to 18000 Hz. Run the program again and listen to the sound quality. Repeat with a samplingfrequency of 8000 Hz.

8. Repeat steps 1-2 but use the microphone input instead of the CD input.

2.1.2 Answer These Questions

Exercise 2.1Describe how sampling frequency seems to a�ect the sound quality for both speech and music.Based on your observations, which seems to be most a�ected by sampling frequency, music orspeech?

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 20: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

14CHAPTER 2. DSP LABORATORY: ANALOG TO DIGITAL AND DIGITAL

TO ANALOG CONVERSION

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 21: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

Chapter 3

DSP Laboratory: Time and Frequency

Displays1

3.1 Time and Frequency Displays

LabVIEW DSP gives you the ability to view the data in time domain or take its Fourier Transform and viewits frequency content. In this section of the lab, we'll learn how to set up and interpret these views. In thelater labs, you will need to set up these displays on a regular basis, so you may want to refer to this part ofthe lab in the future.

3.1.1 Time Domain

Whenever an analog signal is passed through an A/D converter, its samples are stored as a number (usuallyas an integer). If we have a 16-bit system, there are 216 = 65,536 possible values that can be stored. Thesestored values can be displayed either as discrete samples or as a smooth line connecting the samples. Theinstructions below outline how to set up a basic time-domain display using a Waveform Chart.

Switch over to the Front Panel and right click on the Front panel window anywhere to bring out theControls palette. From the Graph palette bring out the Waveform Chart and place it on the Front Panel, asshown in step 1 of Figure 1. Right click on the Waveform Chart and select Properties from the popup menuas shown in step 2 of Figure 6. In the Chart Properties window on the Appearance tab change the Label toLeft Channel Time Domain. Specify the settings as shown in step 4 of Figure 1. Deselecting Autoscale willensure that the Y-axis of the chart does not change with the data values. Minimum and Maximum valuesof -32000 and 32000 will cover all the values for a 16-bit A/D channel.

1This content is available online at <http://cnx.org/content/m13037/1.1/>.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

15

Page 22: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

16 CHAPTER 3. DSP LABORATORY: TIME AND FREQUENCY DISPLAYS

Figure 3.1: Waveform Chart Properties

The Waveform Chart maintains a bu�er of values that are plotted on it, the number of points that arestored can be adjusted by Right Clicking on the Chart and selecting Chart History Length. . . from the popupmenu. By default the chart history length is 1024. Right Click on Waveform Chart from the Visible Itemssub menu and select X Scrollbar to show the toolbar for the X-axis. From the same sub menu (Visible Items)select Graph Palette. This palette gives you the ability to zoom in on the data.

1. Wire the Left output of the Analog Input Node to the Waveform Chart as shown in Figure 1 below.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 23: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

17

Figure 3.2: Chart Time Domain Data

2. Un-mute the microphone Input, run the program and speak into the microphone. You should be ableto �see� your voice, in addition to hearing it. Play around with the properties of the Waveform Chart(Right Click and select Properties form the menu) and become familiar with the di�erent options. Alsouse the zoom tools on the Graph Palette and become familiar with it.

3. If you stop the program the currently displayed data will freeze on the Waveform Chart.4. Often, you'll �nd it necessary to display less (or more) of the signal in the time-domain display. This is

done by changing the Chart History Length from the popup menu of the Waveform Chart. The timerange that will be displayed will always be

Time Range = Chart History Length/Sample Frequency

Example 3.1Using the default settings, the displayed time range is 1024/48000 = 0.02133 = 21.33 msec.

3.1.2 Frequency Domain Magnitude Display

1. To display the frequency content of the audio signal we will take a Fast Fourier Transform (FFT) ofthe data and display it in a Waveform Chart. Add a second Waveform Chart Display to the FrontPanel (as described in step 1 on page 7). Change the label of this Chart to Left Channel FrequencyDomain and enable Autoscale for the Y-axis by checking the box in the Waveform Chart Propertieswindow on the Scales Tab. On the Scales Tab switch over to the X axis properties by selecting it inthe dropdown menu and change the X-axis range to 0-255.

2. Switch over to the Block Diagram and resize the while loop as shown in Figure 8. Place the SpectralMeasurements Express VI from the Functions�Signal Processing�Frequency Domain Sub-Palette.Refer to Figure 8 for details.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 24: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

18 CHAPTER 3. DSP LABORATORY: TIME AND FREQUENCY DISPLAYS

Figure 3.3: FFT of the Audio Input

3. Wire the Block Diagram as in Figure 3.

Figure 3.4: Frequency Domain Block Diagram

note: The frequency-domain Waveform Chart will display the magnitude response in the range0 (DC) to Fs /2.

1. With the CD Audio input selected, run the program and examine the spectrum of the music signal.Now change the input to microphone and examine the frequency spectrum of your voice as well. Stopthe program when done.

2. The frequency spectrum is always displayed from 0 Hz. (DC) to Fs/2. For voice signals, which havemost of the energy < 2000 Hz, the voice frequencies only cover a small portion of the display (assuming

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 25: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

19

Fs = 48000 Hz.). To get a more detailed view of your voice spectrum, change the sampling frequencyto 8000 Hz. (making sure to change both the Anaog Input and Analog Output nodes). Now, yourvoice spectrum will cover a wider range of the display. Run the VI.

3. Speak into the microphone using a single held-out note (like AHHHHHHHHHH or EEEEEEEEEEE).Examine both the time-domain and frequency domain displays. If necessary, change the Chart HistoryLength so that about 4-5 periods of the signal are on the time-domain display. Because a note like thisis periodic, you should notice a fairly steady time signal as well as a well-de�ned frequency spectrumconsisting of large peaks at your note's fundamental frequency and its harmonics. Change the frequency(pitch) of this note and examine how it a�ects the frequency spectrum. Also try experimenting withvarious notes. Once you get a fairly steady display in both the time- and frequency-domains, holdyour note and stop the program to freeze the displays. You can now zoom into various parts of thespectrum to examine it closely.

3.1.2.1 Answer These Questions

Exercise 3.1From your time-domain plot, determine the fundamental period of your voice note (AHHHHHH,EEEEEEEE, etc.). Remember that the time base is in milliseconds. Measure the period as accu-rately as possible and record the period below. From your frequency-domain plot, determine thefrequency of the 1st harmonic (fundamental frequency) and record it below as well. Do these resultsconcur with each other? Why or why not?

Exercise 3.2Fundamental Period of signal __________ Fundamental Frequency of signal

__________

• We are now ready to use the third input � the function generator. Begin by going to the SurroundMixer and changing the active playback device to Line-in. Make sure that the volume is set to 100%.Locate the black cable (with an RCA-type connector on the end) coming out of the computer � thiscable is connected to the Line-in port of the sound card. Connect the other end of this cable to the FuncOut port of the function generator using the RCA to BNC adapter. Turn on the function generatorand set the following parameters. You need to press EXEC after setting each one.

· FREQ: 400 Hz· AMPL: 0.2 V· OFST: 0 V (DC o�set)· MODE: CONTINUOUS (use the [U+F0AD][U+F0AF] keys to cycle through the options if needed)· FUNC: SINE (use the [U+F0AD][U+F0AF] keys to cycle through the options if needed)

• After all of these are set, press the OUT/ON button (bottom middle) and use the [U+F0AD][U+F0AF]keys to select OUTPUT ON. If you now run your VI again, you should hear a 400 Hz tone. You shouldalso see the sine wave in the time- and frequency-domain Charts on your Front Panel. Use the Zoomtools to view the signals in detail.

3.1.2.2 Answer These Questions

Exercise 3.3From the time-domain plot, measure the period of the sine wave and record it below. From thefrequency-domain plot, measure the frequency of the sine wave and record it as well. Discusswhether these results concur with each other.

Exercise 3.4Period of the sine wave __________ Frequency of the sine wave __________

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 26: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

20 CHAPTER 3. DSP LABORATORY: TIME AND FREQUENCY DISPLAYS

• Now change the amplitude of the sine wave to 1 V and observe the resulting frequency spectrum. Isthis expected?

3.1.2.3 Answer These Questions

Exercise 3.5Explain in detail what is happening to your frequency spectrum when you increase the amplitudeof the sine wave to 1 V. Why is this happening?

• When you're done, stop the program and save the VI.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 27: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

Chapter 4

DSP Laboratory: Aliasing1

4.1 Aliasing

note: This section has di�erent instructions for the Speedy 33 and the 6711. Please select thesection of the SPEEDY-33 or the 6711 based on the hardware setup on your station.

4.1.1 SPEEDY-33 Instructions:

We will now look at aliasing and its e�ect on the sampled signal. As you know, aliasing exists wheneversignal frequencies greater than Fs/2 are sampled using a sampling frequency of Fs. To eliminate aliasing,most sound cards and DSP boards have some sort of built-in analog anti-aliasing �lter that removes all inputsignals greater than a certain frequency prior to sampling. It is important to remember that anti-aliasing�lters must do the �ltering prior to sampling � otherwise, the high-frequency signals would have alreadyaliased to lower frequencies by the sampling process.

Some boards (and most Soundcards) have anti-aliasing �lters with variable cuto� frequencies that removeall frequencies > Fs/2. As Fs changes, the cuto� frequency of the anti-aliasing �lter changes as well. If aboard has a variable frequency anti-aliasing �lter that is always set to Fs/2, there will never be aliasing(at least in theory). Although this type of operation is ideal from a performance point of view, it doesn'tallow the user to examine the e�ect of aliasing. The SPEEDY-33 does not have an anti-aliasing �lter. Anyfrequency greater than 24kHz can cause aliasing if the sampling frequency is set to 48kHz.

• Set the sampling frequency to 48000 Hz (in both the Analog Input and Analog Output nodes).• Set the function generator to a 0.2 V, 100 Hz, sinusoid.• Move the [U+F0AC][U+F0AE] arrows on the function generator so that the hundreds-digit on the

frequency display is �ashing.• You can now easily increase the frequency in steps of 100 Hz. by pressing the [U+F0AD][U+F0AF]

buttons.• Run the program and observe the frequency display, time display, and sound as you sweep the signal

frequency from 100 Hz. to 50 kHz.• Pay particular attention to the amplitude and sound of the reconstructed signal for input frequencies

> 24 kHz.

4.1.1.1 Answer These Questions

Exercise 4.1Describe what you hear and see (especially the frequency spectrum) when you sweep the sinusoid

1This content is available online at <http://cnx.org/content/m13034/1.2/>.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

21

Page 28: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

22 CHAPTER 4. DSP LABORATORY: ALIASING

frequency from 100 Hz. to 50 kHz. Take special note of what happens to both the amplitude andfrequency of the reconstructed sinusoid once you get past 24 kHz.

• Repeat the experiment above, but set the sampling frequency to Fs = 8000 Hz. Here, pay specialattention to what happens once you get above 4 kHz.

4.1.1.2 Answer These Questions

Exercise 4.2What happens to the amplitude of the reconstructed signal once the input signal frequency hits24 kHz? Explain.

• To really see the e�ects of aliasing, change the input signal to a square wave (square [2] on the functiongenerator) and sweep from 100 Hz. to 50 kHz (keeping the sampling frequency at 8000 Hz.). Carefullyexamine the frequency-domain graph as you sweep the signal through its frequency ranges.

4.1.1.3 Answer These Questions

Exercise 4.3Describe what you observe in the frequency domain when you sweep a square wave from 100 Hz.to 50 kHz. Is this expected?

4.1.2 6711 DSK Instructions:

We will now look at aliasing and the operation of the anti-aliasing �lter on the DSP board. As you know,aliasing exists whenever signal frequencies greater than Fs/2 are sampled using a sampling frequency ofFs. To eliminate aliasing, most sound cards and DSP boards have some sort of built-in analog anti-aliasing�lter that removes all input signals greater than a certain frequency prior to sampling. It is important toremember that anti-aliasing �lters must do the �ltering prior to sampling � otherwise, the high-frequencysignals would have already aliased to lower frequencies by the sampling process.

Some boards (and most Soundcards) have anti-aliasing �lters with variable cuto� frequencies that removeall frequencies > Fs/2. As Fs changes, the cuto� frequency of the anti-aliasing �lter changes as well. If aboard has a variable frequency anti-aliasing �lter that is always set to Fs/2, there will never be aliasing (atleast in theory). Although this type of operation is ideal from a performance point of view, it doesn't allowthe user to examine the e�ect of aliasing. Fortunately for us, our particular DSP board (or more precisely,the Audio Daughter Card attached to the DSP board) has a �xed-frequency anti-aliasing �lter with a cuto�frequency of 24 kHz. If Fs = 48 kHz, this �lter will prevent aliasing completely. However, if Fs is chosen tobe some value < 48 kHz, the anti-aliasing �lter won't remove all frequencies > Fs/2, so some aliasing willresult. The fact that our anti-aliasing �lter is �xed rather than variable allows us to examine what happenswhen we have aliasing. We will examine this now.

• Set the sampling frequency to 48000 Hz (in both the Analog Input and Analog Output nodes).• Set the function generator to a 0.2 V, 100 Hz, sinusoid. Move the [U+F0AC][U+F0AE] arrows on the

function generator so that the hundreds-digit on the frequency display is �ashing.• You can now easily increase the frequency in steps of 100 Hz. by pressing the [U+F0AD][U+F0AF]

buttons.• Run the program and observe the frequency display, time display, and sound as you sweep the signal

frequency from 100 Hz. to 50 kHz.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 29: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

23

• Pay particular attention to the amplitude and sound of the reconstructed signal for input frequencies> 24 kHz.

4.1.2.1 Answer These Questions

Exercise 4.4Describe what you hear and see (especially the frequency spectrum) when you sweep the sinusoidfrequency from 100 Hz. to 50 kHz. Take special note of what happens to both the amplitude andfrequency of the reconstructed sinusoid once you get past 24 kHz.

• Repeat the experiment above, but set the sampling frequency to Fs = 8000 Hz. Here, pay specialattention to what happens once you get above 4 kHz and again once you get above 24 kHz.

4.1.2.2 Answer These Questions

Exercise 4.5Explain the di�erence in the results of the experiment when we change the sampling frequencyfrom 48000 Hz to 8000 Hz. Pay particular attention to what happens once the signal hits 4000 Hz.and when it hits 24000 Hz.

Exercise 4.6What happens to the amplitude of the reconstructed signal once the input signal frequency hits24 kHz? Explain.

• To really see the e�ects of aliasing, change the input signal to a square wave (square [2] on the functiongenerator) and sweep from 100 Hz. to 50 kHz. (keeping the sampling frequency at 8000 Hz.). Carefullyexamine the frequency-domain graph as you sweep the signal through its frequency ranges.

4.1.2.3 Answer These Questions

Exercise 4.7Describe what you observe in the frequency domain when you sweep a square wave from 100 Hz.to 50 kHz. Is this expected?

4.1.3 Conclusion

When you are done with each lab, exit LabVIEW, log o� the computer, turn o� the function generatorand the headphone volume booster, and unplug the DSP board from the A/C adapter. Turn in AnsweredQuestions to the TA.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 30: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

24 CHAPTER 4. DSP LABORATORY: ALIASING

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 31: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

Chapter 5

Interactive Digital Filter Design - Online

Tool for IIR Filter and FIR Filter Design1

5.1 Digital Filter Design

1This content is available online at <http://cnx.org/content/m13115/1.10/>.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

25

Page 32: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

26CHAPTER 5. INTERACTIVE DIGITAL FILTER DESIGN - ONLINE TOOL

FOR IIR FILTER AND FIR FILTER DESIGN

5.1.1 Introduction to Digital Filter Design in LabVIEW

The Interactive Digital Filter Design Utility is a compiled LabVIEW applicaiton that allows you to inter-actively specify and design �oating point digital IIR �lters and FIR �lters online. This utility was createdwith LabVIEW 82 and the LabVIEW Digital Filter Design Toolkit3 to provide an interacive tool for digital�lter design. Only a portion of the functionality available in the LabVIEW Digital Filter Design Toolkit isused in this utility. The full toolkit contains a complete set of �lter design tools for designing a wide range of�oating point and �xed point digital �lters. Once the LabVIEW plug-in has been installed, the InteractiveDigital Filter Design utility will run within the box below.

This is an unsupported media type. To view, please seehttp://cnx.org/content/m13115/latest/DFD_Utility.llb

Download the full source code for the LabVIEW Interactive Digital Filter Design Utility here4 . Thisallows you to run the same Interactive Digital Filter Design Utility from your Windows PC without beingconnected to the web.

5.1.2 Requirements

The Digital Filter Design Utility can be run on Windows OS within this web page or downloaded for o�ineuse. You will need to download and install the free LabVIEW Runtime Engine and enable the browserplug-in for local execution. Visit the following link for instructions on installing the LabVIEW RuntimeEngine and con�guring the browser plug-in5 to enable the Interactive Digital Filter Design Utility and otheronline web based LabVIEW applications.

5.2 How to Use the Digital Filter Design Utility

The Digital Filter Design Utility provides two �lter design tools for either classical design or design bypole-zero placement.

Classical design mode allows you to specify a FIR or IIR �lter design by setting design parameterssuch as �lter type, sampling frequency, passband/stopband edge frequencies, passband and stopband ripplelevels, and stopband attenuation. You can select from design methods that include Butterworth, Chebyshev,Inverse Chebyshev, Elliptic, Kaiser Window, Dolph-Chebyshev, and Equi-Ripple. LabVIEW will then usethe design parameters to suggest a �lter meeting as many of those speci�cations as possible. You are thenfree to optimize the design to meet your needs.

The pole-zero placement interface allows you specify the location of multiple poles and zero either byentering the coordinate locations directly or graphically by clicking on the z-plane. The resulting �lter isthen displayed using the Bode Plot.

The resulting �lter coe�cients can then be saved to a text �le to facilitate deploying your design on realhardware or for further analysis.

5.3 Getting Started

To start a design, you �rst choose from one of the two available interactive design tools by making a selectionfrom the tree control on the left side of the interface. Select Classical Design to design a �lter based onspeci�cations such as passband / stopband edge frequencies, passband ripple, and stopband attenuation.

2http://digital.ni.com/express.nsf/bycode/exnymx3http://digital.ni.com/express.nsf/bycode/ex6d3j4http://digital.ni.com/demo.nsf/websearch/61a1e8001e5b0ccd86256ab90075c1b55http://digital.ni.com/express.nsf/bycode/exwgjq

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 33: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

27

Select Pole-Zero Placement to design a �lter by specifying the locations of poles and zeros on the complexplane.

The following sections detail how to work with each alternative.

5.4 Classical Filter Design

This tool allows you to design multiple digital �lter types by adjusting the �lter speci�cations manually orby interactively changing the passband and stopband cursors in the magnitude vs. frequency graph. As thecursors move, the pole/zero plot and the text based interface change dynamically to set the values for thedesired �lter.

Digital Filter Design Utility

Figure 5.1: The Classical Filter Design Interface

5.4.1 Classical Filter Parameter Descriptions

• Filter Type: Speci�es the type of �lter you want. The default is a lowpass �lter type. You also canselect a highpass, bandpass, or bandstop �lter type.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 34: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

28CHAPTER 5. INTERACTIVE DIGITAL FILTER DESIGN - ONLINE TOOL

FOR IIR FILTER AND FIR FILTER DESIGN

5.4.2 Filter Speci�cation

• Sampling Frequency [Hz]: Speci�es the sampling frequency of the �lter in hertz• Passband Edge Frequency [Hz]: Speci�es the �rst passband edge frequency of the �lter in hertz.• Passband Edge Frequency [Hz]: Speci�es the second passband edge frequency of the �lter in hertz.

This option does not appear for lowpass or highpass �lters.• Passband Ripple: Speci�es the passband ripple of the �lter in units determined by the Magnitude

in dB option.• Stopband Edge Frequency [Hz]: Speci�es the �rst stopband edge frequency of the �lter in hertz.• Stopband Edge Frequency [Hz]: Speci�es the second stopband edge frequency of the �lter in hertz.

This option does not appear for lowpass or highpass �lters.• Stopband Attenuation: Speci�es the stopband attenuation of the �lter in units determined by the

Magnitude in dB option.• Design Method: Speci�es the method of �lter design. The default is Elliptic. You also can select

Butterworth, Chebyshev, Inverse Chebyshev, Kaiser Window, Dolph Chebyshev Window, and EquiRipple FIR �lter designs. Elliptic, Butterworth, Chebyshev, and Inverse Chebyshev designs are IIR�lter designs. Kaiser Window, Dolph Chebyshev Window, and Equi Ripple FIR designs are FIR �lterdesigns.

5.4.3 Design Feedback

• Filter Order: Returns the order of the designed �lter. For FIR �lters, order +1 equals the numberof coe�cients or �lter taps.

• Error Message: Contains details about errors that occur during �lter creation.• Magnitude in dB: Speci�es whether the VI uses decibels or a linear scale to express the magnitude

response and for entry of the Passband and Stopband Attenuation input parameters. If checked, theVI converts linear magnitude response to decibels.

• Passband: Speci�es the color of the lines in the magnitude plot that represent the passband responseand the passband frequencies. The default is blue. Click the color box next to the parameter name toselect a di�erent color.

• Stopband: Speci�es the color of the lines in the magnitude plot that represent the stopband atten-uation and the stopband frequencies. The default is red. Click the color box next to the parametername to select a di�erent color.

• Magnitude: Contains the plot of the magnitude response. You can drag the cursors in the plot tochange the speci�cations. The color you specify in passband represents the passband response and thepassband frequencies. The color you specify in stopband represents the stopband attenuation and thestopband frequencies. The green vertical line in the graph represents the half sampling frequency, alsoknown as the Nyquist frequency.

• Z Plane: Contains the plot of the zeroes and poles of the �lter in the Z plane.

5.5 Pole/Zero Placement Design

The Pole-Zero Placement Option allows you to interactively place and move poles and zeros on thez-plane. To do so, you can enter complex value coordinates to specify exact values or click on a graph of thecomplex half plane to move or place them with the mouse. The magnitude response of the resulting �lterupdates immediately as you place or move poles / zeros.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 35: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

29

Digital Filter Design Utility

Figure 5.2: The Pole-Zero Placement Filter Design Interface

5.5.1 Zeroes

• Real: Speci�es the real part value if coordinates are rectangular, or the radius value if coordinates arepolar.

• Imag: Speci�es the imaginary part value if coordinates are rectangular, or the angle value if coordinatesare polar.

• Is Real?: Makes the speci�ed pole or zero point real if you place a checkmark in the checkbox.• Is Linear Phase Pair?: Makes the speci�ed pole or zero a linear phase pair if you place a checkmark

in the checkbox.• On Unit Circle?: Places the pole or zero point on the unit circle if you place a checkmark in the

checkbox.• Order: Speci�es the order of the pole or zero.

5.5.2 Poles

• Speci�es the properties for each pole in the �lter. Contains the following options:

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 36: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

30CHAPTER 5. INTERACTIVE DIGITAL FILTER DESIGN - ONLINE TOOL

FOR IIR FILTER AND FIR FILTER DESIGN

• Real: Speci�es the real part value if coordinates are rectangular, or the radius value if coordinates arepolar.

• Imag: Speci�es the imaginary part value if coordinates are rectangular, or the angle value if coordinatesare polar.

• Is Real?: Makes the speci�ed pole or zero point real if you place a checkmark in the checkbox.• Is Linear Phase Pair?: Makes the speci�ed pole or zero a linear phase pair if you place a checkmark

in the checkbox.• On Unit Circle?: Places the pole or zero point on the unit circle if you place a checkmark in the

checkbox.• Order: Speci�es the order of the pole or zero.

5.5.3 Filter Settings

• Gain: Sets the gain of the �lter manually. You can use this control only if you remove the checkmarkfrom the Normalized Gain checkbox.

• Normalized Gain: Speci�es whether the VI automatically adjusts the gain of the �lter. The defaultcontains a checkmark in the checkbox, in which the VI adjusts the gain so the maximum response is 1.0(0 dB). Remove the checkmark from the checkbox to adjust the gain manually with the Gain control.

• fs [Hz]: Speci�es the sampling frequency in hertz. The input must contain a value greater than zero.• Coordinates: Speci�es whether the VI displays poles and zeroes in rectangular or polar coordinates.

The default is rectangular coordinates.• Load Filter from File: Opens a �le dialog you can use to select a �le of a �lter that loads into the

Express VI.• Zero: Speci�es the color of the zeroes in the Z Plane plot. The default is blue. Click the color box

next to the parameter name to select a di�erent color.• Pole: Speci�es the color of the poles in the Z Plane plot. The default is red. Click the color box next

to the parameter name to select a di�erent color.• Delete selected: Deletes the selected pole or zero from the �lter.• Add Zero: Adds a zero to the �lter.• Add Pole: Adds a pole to the �lter.• Z Plane: Plots the number and location of poles and zeroes.• Magnitude: Plots the �lter magnitude response.• Magnitude in dB: Speci�es whether the VI uses decibels or a linear scale in the magnitude plot. If

a checkmark is in the checkbox, the VI converts linear magnitude response to decibels.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 37: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

31

5.6 LabVIEW Resources

To simplify working in LabVIEW with the �lters that you design with the interactive utility on this page,we have posted several utility VIs for LabVIEW that allow you to import and export the designs that yousave or load using the "Save Filter Spec" or "Load Filter Spec" buttons from the utility. You can downloada zip �le containing these utilities here6 .

6http://cnx.org/content/m13115/latest/DigitalFilterDesignUtils.zip

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 38: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

32CHAPTER 5. INTERACTIVE DIGITAL FILTER DESIGN - ONLINE TOOL

FOR IIR FILTER AND FIR FILTER DESIGN

5.7 What is LabVIEW?

LabVIEW is a graphical programming & mathematics environment for designing, prototyping, and deployingsystems. The Interactive Digital Filter Design Utility included on this site was built using LabVIEW 8 andthe LabVIEW Digital Filter Design Toolkit.

The LabVIEW Digital Filter Design Toolkit7 is a software add-on for LabVIEW that facilitates speci�-cation, design, analysis, and implementation of digital �lters. Without prior knowledge about programmingin LabVIEW, you can use the Digital Filter Design Toolkit Express VIs to interact graphically with �lterspeci�cations to design digital �lters. For more information on the LabVIEW Digital Filter Design toolkit,view the online web event Designing Digital Filters with NI LabVIEW and the Digital Filter Design Toolkit8

.The LabVIEW Digital Filter Design Toolkit9 provides VIs that you can use to design a digital IIR or

FIR �lter, analyze the characteristics of the digital �lter, change the implementation structure of the digital�lter, and process data with the digital �lter. Besides the �oating point support, the LabVIEW DigitalFilter Design Toolkit provides a set of VIs that you can use to generate a �xed point digital �lter model,analyze the characteristics of the �xed point digital �lter, simulate the performance of the �xed point digital�lter, and generate integer C or LabVIEW code for a speci�c �xed point target. In addition to tools thathelp you create conventional digital �lters, the LabVIEW Digital Filter Design Toolkit includes tools formultirate digital �lter design.

Visit ni.com10 for more information about the LabVIEW Digital Filter Design Toolkit11 and other NIproducts and resources.

7http://digital.ni.com/express.nsf/bycode/ex6d3j8http://sine.ni.com/apps/we/nievn.ni?action=display_o�erings_by_event&event_id=17399&event_subtype=WEB_EVENT_DEMAND&site=NIC9http://digital.ni.com/express.nsf/bycode/ex6d3j

10http://digital.ni.com/express.nsf/bycode/exyx3d11http://digital.ni.com/express.nsf/bycode/ex6d3j

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 39: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

Chapter 6

DSP Laboratory: IIR Notch Filter

Design1

6.1 Notch IIR Filter Design

The purpose of this lab is to examine IIR �lter design/implementation using LabVIEW DSP. Particularattention is drawn to the comparison between theoretical �lter characteristics and actual �lter performance.In this lab, it is assumed that the student is already familiar with the basic operation of LabVIEW DSP.

6.1.1 Create a VI for Plotting Time and Frequency Domain Data

1. Open Surround Mixer, a program which controls the input/output operation of the sound card. Makesure that the Wave/mp3 and Line-in volumes are set to approximately 75%. Make sure that all sourcebuttons are muted for now. Keep the Surround Mixer open throughout the lab. You will be selectingvarious inputs (Wave and Line-in) throughout the lab.

2. Start LabVIEW Embedded Edition (Start�All Programs�LabVIEW Embedded Edition) and open ablank VI (Virtual Instrument).

1This content is available online at <http://cnx.org/content/m13038/1.2/>.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

33

Page 40: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

34 CHAPTER 6. DSP LABORATORY: IIR NOTCH FILTER DESIGN

Figure 6.1: Pass-Through VI

3. We will build the VI whose Block Diagram is shown in Figure

• Switch execution target to your hardware by going to Operate�Switch Execution Target in Lab-VIEW Embedded.

• Go to the Block Diagram of the blank VI, navigate the function palette to the Analog Input, clickand drop an analog input element on the Block Diagram. It is located under Functions�ElementalIO�Analog Input. See Figure 2.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 41: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

35

Figure 6.2: Elemental I/O sub palette

• Double-click on the Analog Input elemental I/O for con�guration. In the con�guration window,select the �General� tab. Click on the drop down under resource and select 2 channel MultipleSamples. On the Con�guration tab, set the Sampling Rate to 16000 Hz and the Framesize to 256.Click �OK� to close the window.

• Drop an Add function located on the Numeric sub palette of the Functions palette: Func-tions�Numeric�Add.

• Drop an Analog Output elemental I/O. Functions�Elemental I/O�Analog Output. Double clickon the Analog Output you just dropped on the Block Diagram and set the Sample Rate to 16000Hz on the Con�guration tab. Click �OK� to close.

• Drop a �Spectral Measurement� Express VI on the block diagram. Functions�Signal Process-ing�Frequency Domain�Spectral Measurements. This VI will allow us to build the power spec-trum of the sound signal. Double click on the Spectral Measurements Express VI to open itscon�guration window. In the window, select Power Spectrum for Spectral Measurements and dBfor results (See Figure)

• Click �OK� to validate the con�guration.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 42: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

36 CHAPTER 6. DSP LABORATORY: IIR NOTCH FILTER DESIGN

Figure 6.3: Spectral Measurements Con�guration

• Now let's switch to the Front Panel (Windows�Show Front Panel) and drop twoWaveform Graphs.The Waveform Graph is located on the Graph Sub palette: Controls�Graphs�Waveform Graph.Name one �Time Domain� and the other �Power Spectrum.� Do not add the stop button yet.

Figure 6.4: VI Front Panel

• Let's switch back to the Block Diagram and wire everything already on the diagram as shown inFigure 1.

• Select the while loop from Functions�Structures�While Loop, click and drag to enclose everythingon the Block Diagram within the loop. You Block Diagram should now be similar to the one inFigure 1 and the Front Panel similar to the one in Figure 4.

note: This setup is similar to that found in the �DSP Laboratory: Time and FrequencyDisplays� Module except that the Left and Right channels are being combined into a singlechannel.

4. In Surround Mixer activate the Wave/mp3 source and put a CD into the computer's CD-ROM drive.Run the Windows Media Player program in the EE 453 folder to start the CD. Finally, press the Runicon and you should hear your music through the headphones. If there is distortion/clipping (due tothe volume being too high), adjust the CD volume on the Surround Mixer to lower the volume untilthe clipping stops. Now adjust the two displays to make one a time-domain display and the other afrequency-domain display. Remember how to set/unset the automatic scaling on the displays. It isusually best to use Auto scaling on the frequency-domain display but not the time-domain display.

5. Once you have veri�ed that everything is working properly, stop the CD, then stop the LabVIEWprogram (but don't exit LabVIEW).

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 43: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

37

6. 11. Save the VI by selecting File�Save As. Make sure to save the �le in your personal directory �Desktop\ee 453\<folder name>. You can give the �le any name you want (such as lab2setup).

6.1.2 Notch Filter

Now we're going to add some noise to the music and then �lter it out. The �rst type of noise we're goingto add is a single frequency sinusoidal noise. As you know from class, the best �lter to use for this type of�lter is a simple notch �lter.

1. Using the BNC to RCA adapter, connect the long black cable coming from the computer soundcard(the line-in cable) to the FUNC OUT output of the function generator.

2. Turn on the function generator and set it up to generate a 1000 Hz, 0.2 V sine wave. Don't forget toactivate the signal by pressing the OUT/ON button on the function generator, setting its value to 1,and then pressing the EXEC button.

3. In Surround Mixer, activate the Line-in input. Run the program in LabVIEW and you should hearan annoying 1000 Hz. tone. Adjust the volume of the Line-in source in Surround Mixer so that theoutput sine wave amplitude is close to 5000 units.

4. Now restart the CD. You should hear the music, but it will be corrupted with a very annoying sinusoidaltone. (Depending on your music selection, you may possibly need to increase the amplitude of thesinusoidal noise so that it can be heard over the music). Examine both the time- and frequency-domaindisplays of the signal + noise. Stop the program before the noise drives you crazy.

5. Add a Biquad VI from Functions�Signal Processing�Filters�Biquad.vi . This block allows you tospecify the coe�cients of a generic 2nd-order digital �lter. A biquad is just a particular con�gurationfor a 2nd-order digital �lter.

6. Determine the transfer function of the notch �lter needed to remove the 1000 Hz. noise. Use a valueof alpha = 0.9.

7. Double click on the Biquad VI and enter the coe�cient values. Insert the Biquad VI between theoutput of the Add function and the inputs to the Analog Output elemental I/O (see Figure 5 for themodi�ed Block Diagram). (You'll need to break the existing connections �rst).

8. Re-run the program and take notice of whether the �lter e�ectively removes the noise without removingtoo much of the music signal. Take special note of the frequency spectrum of the �ltered signal + noise.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 44: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

38 CHAPTER 6. DSP LABORATORY: IIR NOTCH FILTER DESIGN

Figure 6.5: Modi�ed Block Diagram with the Biquad VI

6.1.2.1 Answer These Questions

Exercise 6.1Calculate the transfer function of the notch �lter needed to remove the sinusoidal noise. Showyour work.

Exercise 6.2Does this �lter seem to remove much of the music signal along with the noise? Explain why orwhy not.

• To see how sensitive this �lter is, increase the frequency of the sinusoidal noise in increments of 10Hz until the �lter no longer seems to be removing the sinusoidal noise adequately. This is somewhatsubjective and may also depend on the music that you're combining with the sinusoidal noise.

6.1.3

6.1.3.1 Answer These Questions

Exercise 6.3At what sinusoidal noise frequency does this �lter no longer e�ectively remove the sinusoidal tone

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 45: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

39

from the music?

• Now turn o� the music so that you only have the sinusoidal noise going through the system. Sweepthe sine wave frequency through a range from about 500-3000 Hz. and note how the tone cuts out inthe vicinity of 1000 Hz. Next determine the smallest frequency > 1000 Hz. at which the output signalappears to be at full amplitude.

6.1.4

6.1.4.1 Answer These Questions

Exercise 6.4At what sinusoidal noise frequency does the �lter no longer attenuate the sine wave at all?

• Using alpha = 0.5, repeat from step Don't forget to turn your music back on and to reset your sinusoidto 1000 Hz. before starting the test. Also, use the same music as you did before. Otherwise, you maynot be able to compare the 2 di�erent �lters accurately.

6.1.5

6.1.5.1 Answer These Questions

Exercise 6.5Using this new alpha vaue, calculate the transfer function of the notch �lter needed to remove thesinusoidal noise. Show your work below.

Exercise 6.6What e�ect did decreasing alpha have on the quality of the remaining music? Explain.

Exercise 6.7Using this new alpha, at what sinusoidal noise frequency did the �lter stop removing the sinusoidaltone from the music?

Exercise 6.8At what sinusoidal noise frequency does the �lter no longer attenuate the sine wave at all?

Exercise 6.9Based on your observation, does decreasing [U+F061] seem to make the �lter remove a larger orsmaller range of sinusoidal frequencies? Explain why this is so.

6.1.6

When done with this part of the lab, stop the program, remove the notch �lter block, and save the VI. ThisVI is used in other labs.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 46: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

40 CHAPTER 6. DSP LABORATORY: IIR NOTCH FILTER DESIGN

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 47: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

Chapter 7

DSP Laboratory: IIR Filter Design via

the Bilinear Transformation1

7.1 IIR Filter Design via the Bilinear Transformation

The purpose of this lab is to examine IIR �lter design/implementation using LabVIEW DSP. Particularattention is drawn to the comparison between theoretical �lter characteristics and actual �lter performance.In this lab, it is assumed that the student is already familiar with the basic operation of LabVIEW DSP.

7.1.1 Create a VI for Plotting Time and Frequency Domain Data

1. Open Surround Mixer, a program which controls the input/output operation of the sound card. Makesure that the Wave/mp3 and Line-in volumes are set to approximately 75%. Make sure that all sourcebuttons are muted for now. Keep the Surround Mixer open throughout the lab. You will be selectingvarious inputs (Wave and Line-in) throughout the lab.

2. Start LabVIEW Embedded Edition (Start�All Programs�LabVIEW Embedded Edition) and open ablank VI (Virtual Instrument).

1This content is available online at <http://cnx.org/content/m13039/1.1/>.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

41

Page 48: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

42CHAPTER 7. DSP LABORATORY: IIR FILTER DESIGN VIA THE

BILINEAR TRANSFORMATION

Figure 7.1: Pass-Through VI

3. We will build the VI whose Block Diagram is shown in Figure

• Switch execution target to your hardware by going to Operate�Switch Execution Target in Lab-VIEW Embedded.

• Go to the Block Diagram of the blank VI, navigate the function palette to the Analog Input, clickand drop an analog input element on the Block Diagram. It is located under Functions�ElementalIO�Analog Input. See Figure 2.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 49: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

43

Figure 7.2: Elemental I/O sub palette

• Double-click on the Analog Input elemental I/O for con�guration. In the con�guration window,select the �General� tab. Click on the drop down under resource and select 2 channel MultipleSamples. On the Con�guration tab, set the Sampling Rate to 16000 Hz and the Framesize to 256.Click �OK� to close the window.

• Drop an Add function located on the Numeric sub palette of the Functions palette: Func-tions�Numeric�Add.

• Drop an Analog Output elemental I/O. Functions�Elemental I/O�Analog Output. Double clickon the Analog Output you just dropped on the Block Diagram and set the Sample Rate to 16000Hz on the Con�guration tab. Click �OK� to close.

• Drop a �Spectral Measurement� Express VI on the block diagram. Functions�Signal Process-ing�Frequency Domain�Spectral Measurements. This VI will allow us to build the power spec-trum of the sound signal. Double click on the Spectral Measurements Express VI to open itscon�guration window. In the window, select Power Spectrum for Spectral Measurements and dBfor results (See Figure)

• Click �OK� to validate the con�guration.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 50: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

44CHAPTER 7. DSP LABORATORY: IIR FILTER DESIGN VIA THE

BILINEAR TRANSFORMATION

Figure 7.3: Spectral Measurements Con�guration

• Now let's switch to the Front Panel (Windows�Show Front Panel) and drop twoWaveform Graphs.The Waveform Graph is located on the Graph Sub palette: Controls�Graphs�Waveform Graph.Name one �Time Domain� and the other �Power Spectrum.� Do not add the stop button yet.

Figure 7.4: VI Front Panel

• Let's switch back to the Block Diagram and wire everything already on the diagram as shown inFigure 1.

• Select the while loop from Functions�Structures�While Loop, click and drag to enclose everythingon the Block Diagram within the loop. You Block Diagram should now be similar to the one inFigure 1 and the Front Panel similar to the one in Figure 4.

note: This setup is similar to that found in the �DSP Laboratory: Time and FrequencyDisplays� Module except that the Left and Right channels are being combined into a singlechannel.

4. In Surround Mixer activate the Wave/mp3 source and put a CD into the computer's CD-ROM drive.Run the Windows Media Player program in the EE 453 folder to start the CD. Finally, press the Runicon and you should hear your music through the headphones. If there is distortion/clipping (due tothe volume being too high), adjust the CD volume on the Surround Mixer to lower the volume untilthe clipping stops. Now adjust the two displays to make one a time-domain display and the other afrequency-domain display. Remember how to set/unset the automatic scaling on the displays. It isusually best to use Auto scaling on the frequency-domain display but not the time-domain display.

5. Once you have veri�ed that everything is working properly, stop the CD, then stop the LabVIEWprogram (but don't exit LabVIEW).

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 51: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

45

6. 11. Save the VI by selecting File�Save As. Make sure to save the �le in your personal directory �Desktop\ee 453\<folder name>. You can give the �le any name you want (such as lab2setup).

7.1.2 IIR Filter Design via the Bilinear Transformation

LabVIEW DSP allows the user to implement standard IIR digital �lters designed using a �lter designsupplemental program, called Digital Filter Design Toolkit. The DFD toolkit is an add-on module toLabVIEW (not LabVIEW Embedded). This module allows the user to design complex �lters, save themand implement them using LabVIEW DSP.

Figure 7.5: New Block Diagram with DFD Filter

1. Go to the Functions palette and add the DFD Filter Express VI to your existing Block Diagram:Functions�Signal Processing�Filters�DFD Filter

2. Wire the Express VI as shown in Figure 6. The output of the Add function is the input �Signal� of theExpress VI and the �Filtered Signal� goes into the Analog Output. Set the function generator's signalto a frequency of 500 Hz.

3. Follow the steps below to implement a lowpass �lter that will be implemented on the DSP. LaunchLabVIEW by going to Start�All Programs�National Instruments�LabVIEW 7.1�LabVIEW. Let's tryto understand what is happening. We �rst launched LabVIEW Embedded Edition which allowed usto target the DSP hardware and run our program. Now, we are launching LabVIEW, not LabVIEWEmbedded Edition. The program you built earlier should still be open. We will use the Digital FilterDesign Toolkit available in the LabVIEW environment to design the �lter.

4. Create a blank VI (New�Blank VI).

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 52: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

46CHAPTER 7. DSP LABORATORY: IIR FILTER DESIGN VIA THE

BILINEAR TRANSFORMATION

5. Switch to the Block Diagram and drop a DFD Classical Filter Design on the Block Diagram: It is inFunctions�All Functions�Digital Filter Design�Filter Design�DFD Classical Filter Design.

6. In the DFD Classical Filter Design Express VI, enter the following settings:

• Filter Type: Lowpass• Sampling Frequency: 16000 Hz• Passband Edge Frequency: 1000 Hz• Passband ripple: 3 dB (standard for Butterworth �lters)• Stopband Edge Frequency: 1500 Hz• Minimum stopband attenuation 20 dB• Design Method: Butterworth

note: Leave the other settings to their default values.

Figure 7.6: DFD Classical Filter Design Con�guration Window

7. Check the graph to the left to make sure the �lter response appears as expected and click �OK� to setthe con�gurations.

8. Some �lter parameters are described below:

• Sampling Frequency � self-explanatory. Make sure to set it to the sampling frequency that youplan on using!

• Center Frequency � (not used for lowpass �lters). Set this to the middle frequency of the passbandfor Bandpass/Highpass �lters or the middle frequency of the stopband for Bandstop �lters.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 53: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

47

• Bandwidth � Set this to the frequency width of the passband (stopband for Bandstop �lters).Recall that Lowpass �lters have a lower passband frequency of 0 Hz and that Highpass �lters hasan upper passband frequency of Fs/2.

• Stopband Attenuation � Set this to the desired attenuation in dB at the edge of the stopband. ForBandstop �lters, this parameter must be negative (because the stopband is really the passband).For all other �lter types, this parameter must be positive.

• Passband Ripple � Set this to the desired attenuation (in dB) at the edge of the Passband. ForButterworth �lters, the standard (but not required) value to use is 3 dB.

• Filter Order N � Set this to the desired �lter order. However, after you press the Apply button,the program calculates which �lter order you need to meet the given specs. For most applications,then, you can put any number here and then change it to the necessary value when instructed.There may be some situations, however, when you want to force the �lter order to be some setvalue. In this case, the desired speci�cations may not be met.

note: Regarding calculation of �lter order N: This program uses the same design equationsthat we use in EE 453. For IIR �lters, the program automatically does prewarping.

9. Build the following Block Diagram to save the �lter settings: Drop a �DFD Save to File� VI on theBlock Diagram. This VI is located at Functions�All Functions�Digital Filter Design�Utilities�DFDSave to File. Wire the Block Diagram as shown in Figure 6.

Figure 7.7: Filter Design

10. Run the �lter design VI you just built. When prompted to save your design, navigate to your folderand save your �lter under any chosen name. Save and close this VI.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 54: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

48CHAPTER 7. DSP LABORATORY: IIR FILTER DESIGN VIA THE

BILINEAR TRANSFORMATION

7.1.2.1 Answer These Questions

Exercise 7.1Calculate, by hand, the predicted �lter order needed to meet the speci�cations of the lowpass �lter.Show your work below.

Exercise 7.2Does your predicted �lter order agree with the �lter order suggested by LabVIEW DSP? YES /NO

7.1.3

1. Let's now go back to the original DSP program and add the newly designed �lter. Switch to the BlockDiagram and Double-click on the DFD Filter Express VI you added on the Block Diagram in step 1.In �Path� section of the �Con�gure Filter� prompt, click the Browse button and navigate to the �lterdesign you saved earlier, click �OK� to accept. Run the program.

2. Because the signal frequency is signi�cantly lower than the passband cuto� frequency, the signal shouldpass through the �lter with very little attenuation. Change the frequency plot to manual scale. Sweepthe input signal frequency through the range 500 Hz. � 3000 Hz. and note the resulting time-domainand frequency-domain plots.

3. Set the input sine wave to the following frequencies: 1000 Hz, 1200 Hz, 1500 Hz, 2000 Hz, and 3000Hz. For each frequency input, observe the corresponding �lter output (both displays as well as theactual sound) and measure/record the exact amplitude of the output signal for each frequency. Theeasiest way to measure the amplitudes is to stop the simulation and then place your mouse pointer atthe appropriate position on the graph. Note: You will need to change the scale of the graphs to readaccurately. Call your lab assistant for help on how to change the scale.

7.1.3.1 Answer These Questions

Exercise 7.3Record the amplitude and corresponding attenuation (in dB) of the �ltered sinusoid for each ofthe frequencies below.

The equation for attenuation is: attenuation = -20log(output amplitude/(maximum

amplitude.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 55: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

49

Figure 7.8: Table for recording Problem 3 Results.

Exercise 7.4Take special note of the attenuations at 1000 Hz and 1500 Hz. What do you expect these valuesto be theoretically? (show work) How do your actual values compare to the theoretical values?

7.1.4

• Put the input frequency to 800 Hz and run the program again. Without changing anything else,change the sampling frequency in the Analog Input and Analog Output elements to 8000 Hz and runthe program. Observe what happens to the output signal. When done, set all sampling frequenciesback to 16000 Hz.

7.1.4.1 Answer These Questions

Exercise 7.5Explain what happens to the �lter's performance when the sampling frequency is changed from Fs= 16000 Hz to 8000 Hz. Speci�cally, what happens to the 800 Hz signal when it is passed throughthe �lter now? Explain what this implies about the importance of operating a digital �lter usingthe same sampling frequency that you used to design it.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 56: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

50CHAPTER 7. DSP LABORATORY: IIR FILTER DESIGN VIA THE

BILINEAR TRANSFORMATION

7.1.5

• Now deactivate the Line-In input in Surround Mixer and run the program again using your CD inputinstead. Listen to and observe the output of the �lter (in both the time and frequency domain).

7.1.5.1 Answer These Questions

Exercise 7.6Discuss the e�ect of the lowpass �lter on the music signal.

7.1.6

1. To really see the e�ect of the �lter more graphically, remove the Analog Input element and Add func-tion from the Block Diagram and add a EMB Uniform White Noise Waveform node instead (Func-tions�Embedded Signal Generation�EMB Uniform White Noise Waveform.vi). This block generateswhite noise. White noise has energy spread equally across the frequency spectrum. For this reason, awhite noise generator is often a good test of a �lter's performance. Connect this block to the input ofthe IIR Filter. Double click on the Noise block and set the Amplitude = 10000, save and close it.

2. Run the program and observe the sound of the noise and take note of both its spectrum and time-domain shape. Now remove the lowpass �lter block completely from the worksheet and connect theoutput of the Noise block directly to the Analog Output element. Re-run the program and observe thesignal again. This is what un�ltered white noise looks/sounds like.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 57: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

51

Figure 7.9: Program with Noise Generator

7.1.6.1 Answer These Questions

Exercise 7.7Discuss how the shape of the white noise signal changes when it is passed through the lowpass�lter. Also, describe how the sound changes.

7.1.7

• Now follow steps 4 to 7 to design a bandpass �lter to meet the following speci�cations:

· Type: Chebyshev I· FSTL: 1000 Hz· FPL: 1500 Hz· FPU: 3500 Hz· FSTU: 4000 Hz· Passband ripple: 1 dB· Minimum stopband attenuation: 40 dB· Sampling Frequency: 16000 Hz

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 58: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

52CHAPTER 7. DSP LABORATORY: IIR FILTER DESIGN VIA THE

BILINEAR TRANSFORMATION

• Save the �lter to your folder (giving it a descriptive name like bpcheby1500-3500) and examine thevarious tabs in the �lter design program.

7.1.7.1 Answer These Questions

Exercise 7.8What is the IIR �lter order needed to meet the bandpass �lter speci�cations given? (You do nothave to verify this value, just state what it is).

1. Re-add an IIR �lter block back into your system and connect it to the system the same way you didthe previous IIR block. Load your new �lter coe�cient �le into the IIR �lter block. Keeping the NoiseGenerator as your input signal, run the program again and note the di�erence between how the noisegets �ltered by the bandpass and lowpass �lters.

2. Remove the Noise block and re-add the Analog Input node and the Add Function. Connect these tothe rest of the system as you did earlier and run the system using your CD input. Observe the outputsignal.

3. Add a second IIR �lter block to your system in parallel with the �rst block. Load the original lowpass�lter coe�cient �le into this block. Double-click on the Analog Output Element and select 2 channelsmultiple samples. Now send the output of one �lter to one of the channels of the Analog Outputelement and the output of the other �lter to the other channel. (Note: Only one of the �lter outputscan be connected to the displays. It doesn't matter which one you have connected). Run the programusing your CD input, and listen to the �ltered output. You should hear a di�erent signal in each ear.

4. As a �nal experiment, break the parallel �lter connections and connect the 2 �lter blocks in cascaderather than parallel by passing the output of one �lter through the other �lter and sending the outputof the 2nd �lter to the Analog Output element. Run the program using your CD input.

7.1.8

7.1.8.1 Answer These Questions

Exercise 7.9When the lowpass and bandpass �lters are cascaded together, what happens to the output signal?Why?

7.1.9

note: Call your TA over to verify that you have completed this last part of the lab. If timepermits, feel free to design a few other types of IIR �lters and connecting them in various ways.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 59: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

Chapter 8

DSP Laboratory: FIR Filter Design1

8.1 FIR Filter Design

The purpose of this lab is to examine FIR �lter design/implementation using LabVIEW Digital Filter DesignToolkit and LabVIEW DSP Module. In this lab, it is assumed that the student is already familiar with thebasic operation of LabVIEW.

8.1.1 Con�gure Sound Output on the Computer

1. Keep the Surround Mixer open throughout the lab. You will be selecting various inputs (wave, micro-phone, and line-in) throughout the lab.

2. Select and activate Surround Mixer, a program which controls the input/output operation of the soundcard. Beneath each of the volume bars is a mute box that can be toggled on/o�. When checked, thecorresponding sound source is deactivated. Make sure that all source buttons are muted for now.

8.1.2 Create a VI for Plotting Time and Frequency Domain Data

1. Start LabVIEW Embedded Edition and change the target to the SPEEDY-33 board.

1This content is available online at <http://cnx.org/content/m13040/1.1/>.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

53

Page 60: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

54 CHAPTER 8. DSP LABORATORY: FIR FILTER DESIGN

Figure 8.1

2. Create a New Blank VI.3. Open the Front Panel and place two All Controls�Graphs�Waveform Graphs4. Label them Time Domain and Frequency Domain.5. Open the Block Diagram and place the following objects in it.

• All Functions�Elemental I/O�Analog Input node.• All Functions�Elemental I/O�Analog Output node.• All Functions�Numeric�Add function.• All Functions�Signal Processing�Frequency Domain�Spectral Measurements.

note: When you place the Analog Input node, it will display only one channel. It is afteryou con�gure it that the right and left channels will be shown.

6. Double click the Analog Input node and change the Resource under the General Tab to be 2 channelmultiple samples.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 61: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

55

Figure 8.2

7. Go to the Con�guration Tab and set the Sample Rate to 8000 Hz and the Framesize to 256.

Figure 8.3

8. Double click on the Analog Output node and change the resource to 2 channel multiple samples andcheck that the Sample Rate is set to 8000 Hz.

9. Double click in the Spectral Measurements Express VI and select Power Spectrum from the type ofMeasurement.

10. Rearrange the objects in the Block Diagram so that you have plenty of space between them. This

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 62: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

56 CHAPTER 8. DSP LABORATORY: FIR FILTER DESIGN

makes it easier to connect them together.11. Connect the 2 outputs of the Analog Input node (Left and Right channels) to the 2 inputs of the Add

function. Connect the output of the Add function to both inputs of the Analog Output node. Whatyou are doing here is converting the stereo signal into a mono signal. Then, connect the output of theAdd function to the Time Domain Waveform graph indicator and to the Signals Input of the SpectralMeasurements. Finally, connect the Power Spectrum output to the Frequency Domain Graph.

12. Place a while loop around the objects in the Block Diagram to execute this functions continuously.

Figure 8.4

13. In the Surround Mixer activate the Wave/mp3 source and put a CD into the computer's CD-ROMdrive. Run the Windows Media Player program in the EE 453 folder to start the CD. Finally, pressthe Run button in LabVIEW. You should hear your music through the headphones. If there is dis-tortion/clipping (due to the volume being too high), adjust the CD volume on the Surround Mixer tolower the volume until the clipping stops.

14. Once you have veri�ed that everything is working properly, stop the CD, then stop the LabVIEW VI.(Do not exit LabVIEW)

15. Save this VI by selecting File�Save As. Make sure to save the �le in your personal directory - - Desktop\ee 453\<folder name>. You can give the �le any name you want (such as lab3setup), but use thedefault extension of .vi

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 63: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

57

8.1.3 FIR Filter Design

Now we will design an FIR �lter using the same LabVIEW DFD toolkit used for the IIR �lters. ThisLabVIEW DFD toolkit designs 3 di�erent types of FIR �lters: Kaiser-Window �lters, Equi-Ripple �ltersand Dolph-Chevyshev Windows �lters. We will focus on the Kaiser-Window FIR �lters.

1. Open LabVIEW (not the Embedded Edition) and create a New Blank VI.2. In the block diagram, place the All Functions�Digital Filter Design�Filter Design�DFD Classical Filter

Design Express VI.3. Double click in the VI and con�gure a lowpass FIR �lter with the following settings:

• Type: Lowpass• Passband edge frequency: 400 Hz• Stopband edge frequency: 800 Hz• Passband ripple: 1dB (doesn't matter because stopband specs will determine passband ripple)• Minimum stopband attenuation: 40 dB• Sampling Frequency: 8000 Hz.• Design Method: Kaiser Window

Figure 8.5

4. Once you have all the parameters set correctly, press OK.5. Place the DFD Save to File VI found in All Functions�Digital Filter Design�Utilities.6. Wire the �lter out to the �lter in of the DFD Save to File function. Wire the error clusters.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 64: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

58 CHAPTER 8. DSP LABORATORY: FIR FILTER DESIGN

7. Save the VI in Desktop \ ee 453 \<folder name> using some meaningful title such as Filter Design.vi.

Figure 8.6

8. Run the VI and when prompted save the Filter Coe�cients into the same folder with a meaningfulname such as LPFIR400.fds. Make sure to use the default extension (fds) when saving this coe�cient�le.

Exercise 8.1Determine the predicted �lter length M using the Kaiser-window design equation:

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 65: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

59

Figure 8.7: Kaiser-window Design Equation

Recall that alpha is the desired stopband attenuation and delta-omega is the transitionregion width (in radians/sample). (Show your work.)

Exercise 8.2Write down the �lter length as calculated by Hypersignal. Does it agree (or come close to)the value predicted above?

9. Close LabVIEW and open LabVIEW Embedded Edition. Target the SPEEDY-33 and open the VI webuilt in the System Setup section of this Lab (lab3setup.vi).

10. Add two more Waveform Graphs on the Front Panel and label them as Time Domain�Filtered andFrequency Domain-Filtered.

11. Add to the DFD Filter VI (All Functions�Signal Processing�Filters) to the Block Diagram after theAdd function. Wire the output of the Add function to the DFD �lter. Wire the output of the DFD�lter to the Analog Output node. Wire the output of the DFD �lter to the Time Domain � Filteredterminal.

12. Make a copy of the Spectral Measurements Express VI. Wire the output of the Add function to thecopy of the Spectral Measurements. Then wire the output of the Power Spectrum to the FrequencyDomain � Filtered terminal.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 66: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

60 CHAPTER 8. DSP LABORATORY: FIR FILTER DESIGN

Figure 8.8

13. Double click on the DFD Filter VI and select the path to the Coe�cient File. As soon as you load the�le, you will see the magnitude, impulse and phase response graphs update.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 67: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

61

Figure 8.9

14. Save the VI. Start the CD Player and then Run the VI. You should here a heavily lowpass �lteredversion of your music through the headphones. You can also see the e�ect of the �ltering by lookingat the appropriate indicators.

15. Stop the VI and, without changing anything else, change the Sample Rate in the Analog Input nodeto 18000 Hz. Save and Run the VI and listen to the output now. When done, change the Sample Rateback to 8000 Hz. Save the VI.

Exercise 8.3What happens when the sampling frequency used to operate the �lter is changed from Fs =8000 Hz (the Fs used to design the �lter) to Fs = 16000 Hz.? Explain

16. Stop the VI and disconnect the Analog Input node and the Add function. Replace these objects withthe Simulate Signal Express VI (Functions�Embedded Signal Generator). Double click to bring upthe properties page and con�gure it to generate a 200 Hz sine wave with amplitude 10000. Set theframesize to 256. Make sure that the sampling frequency is 8000 Hz. Save the VI with a di�erentname. Run the VI and observe the �ltered output. Use the Time-Domain plot to carefully measurethe amplitude of the output signal.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 68: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

62 CHAPTER 8. DSP LABORATORY: FIR FILTER DESIGN

Figure 8.10

17. Repeat step 16 without changing the name of the �le for the following frequencies: 400 Hz, 600 Hz,800 Hz.

Exercise 8.4Complete the following table based on your measured data:

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 69: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

63

Figure 8.11: Table for collecting data

Exercise 8.5Does this �lter yield the gains that you expected at the frequencies above? Why or why not?Speci�cally comment on the gain at 400 Hz, 600 Hz and 800 Hz.

18. Set the Simulate Signal back to 200 Hz. Now run the VI and stop it. Because the 200 Hz is in thepassband of the �lter, the output of the �lter will look like the input, except for a time delay. Carefullymeasure and record the time (in milliseconds) of the �rst zero crossing in the input signal and thecorresponding zero crossing in the output signal.

Exercise 8.6Record the time delay (in milliseconds) between the input and output signal. Convert this toa sample delay (by multiplying time delay by Fs) and compare it to the theoretically expectedanswer. Discuss.

8.1.4 FIR Filter Bank � Graphic Equalizer

Now you are going to add two more FIR �lters that cover the rest of the frequency range DC � Fs/2 and thencombine these FIR �lters into a �lter bank that will allow you to selectively boost/attenuate the variousfrequency ranges. A �lter bank is nothing more than a parallel combination of di�erent �lters. This isbasically what a graphic equalizer does on a typical stereo system, except that many equalizers are analog�lters, rather than digital �lters.

1. Open LabVIEW (not Embedded Edition) and open the Filter Design VI built in Section II.2. Design a bandpass FIR �lter to meet the following speci�cations:

• Type: bandpass• Design Method: Kaiser Window• Stop Edge Frequency: 400Hz / 2000Hz• Passband Edge Frequency: 800Hz / 1600Hz• Passband ripple: 1 dB (doesn't matter because stopband specs will determine passband ripple)• Minimum stopband attenuation: 40 dB• Sampling Frequency : 8000 Hz

3. After entering the parameters, press OK. Run the VI and save the �lter coe�cients as BP-FIR800_1600.fds.

Exercise 8.7The �lter length for this BP �lter was the same as for the LP �lter. Why did this happen?

4. Design a highpass FIR �lter to meet the following speci�cations:

• Type: Highpass

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 70: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

64 CHAPTER 8. DSP LABORATORY: FIR FILTER DESIGN

• Design Method: Kaiser Window• Stopband Edge Frequency: 1600 Hz• Passband Edge Frequnecy: 2000 Hz• Passband ripple: 1 dB (doesn't matter because stopband specs will determine passband ripple)• Minimum stopband attenuation: 40dB• Sampling Frequency: 8000 Hz

5. Run the VI and save the coe�cient �le as HPFIR2000.fds

Exercise 8.8You should have noticed that all 3 �lters had (nearly) identical �lter lengths. For an FIR-based �lter bank, this is a very important feature to have. Why? Hint: Think about thephase responses of FIR �lters.

Exercise 8.9You should have noticed that the length of the highpass �lter was slightly di�erent than theother �lters. What is the reason for this? Hint: Think about the 4 basic types of FIR �lters(Type I � Type IV).

6. Open the lab3setup VI and change the �lter coe�cient's �le in the DFD �lter VI to the bandpass �lter�le. Save the VI with a di�erent name such as lab3�lters.vi. Run the VI and make sure it works �ne.

7. Change again the �lter �le for the highpass �lter �le. Do not change the name of the �le. Save it andrun it.

8. Once you have veri�ed that your 2 additional FIR �lters work, add two more DFD Filter VIs to theblock diagram and two Add functions.

9. Wire the output of the Add function that adds the Analog Input node to the two new DFD �lters.Con�gure the three DFD Filter VIs with the Lowpass, Highpass and Bandpass �lter �les.

10. Put three Multiply functions and wire the output of the �lters to them. Place three numeric controlsin the Front Panel and set them to 1.

11. Wire a numeric control to the other input of the Multiply functions. Do this for each of the DFD FilterVIs. With this we are going to control the gain for that �lter.

12. Wire the output of the Multiply functions to the Add functions to add the three multiplications orgain sets. Wire the output of the last Add to the Analog Output node and the signal input of theSpectral Measurements Express VI.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 71: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

65

Figure 8.12

13. The resulting con�guration is a 3-band �lter bank that covers frequencies in the range DC-4000 Hz.Note that the frequency ranges of these 3 �lters were selected so that the transition regions overlapperfectly (i.e. the edge of the passband of one �lter is the edge of the stopband of the prior �lter).This type of overlap yields the best frequency coverage and provides a nearly constant gain in eachtransition region. (i.e. As one �lter starts attenuating, the next �lter starts amplifying).

14. Start your CD. Save and Run the VI. You should hear the music basically un�ltered, since all frequenciesin the range 0-4000 Hz are passed with a gain of 1. Start playing with the individual Gains now toboost/attenuate the various frequency ranges by selecting gains <1 and >1. Don't select gains toolarge (greater than 3 or 4) or else you may start clipping the output signal. Call your TA over to verifythat you have completed this part of the lab.

note: When you are done with this lab, exit LabVIEW and LabVIEW Embedded Edition andlog o� the computer. Unplug the SPEEDY-33 board and turn o� the headphone volume booster.Turn in your completed worksheet to the lab TA.

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 72: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

66 INDEX

Index of Keywords and Terms

Keywords are listed by the section with that keyword (page numbers are in parentheses). Keywordsdo not necessarily appear in the text of the page. They are merely associated with that section. Ex.apples, � 1.1 (1) Terms are referenced by the page they appear on. Ex. apples, 1

6 6711, � 1(1), � 2(7), � 3(15), � 4(21), � 6(33),� 7(41), � 8(53)

D Digital, � 1(1), � 2(7), � 3(15), � 4(21), � 6(33),� 7(41), � 8(53)Digital Signal Processing, � 5(25)dsk, � 1(1), � 2(7), � 3(15), � 4(21), � 6(33),� 7(41), � 8(53)DSP, � 1(1), � 2(7), � 3(15), � 4(21), � 5(25),� 6(33), � 7(41), � 8(53)

F Filter Design, � 5(25)FIR Filter, � 5(25)Free, � 5(25)

I IIR Filter, � 5(25)

L labview, � 1(1), � 2(7), � 3(15), � 4(21),� 5(25), � 6(33), � 7(41), � 8(53)LabVIEW DSP, � 1(1), � 2(7), � 3(15),� 4(21), � 6(33), � 7(41), � 8(53)lv, � 1(1), � 2(7), � 3(15), � 4(21), � 6(33),

� 7(41), � 8(53)

P Processing, � 1(1), � 2(7), � 3(15), � 4(21),� 6(33), � 7(41), � 8(53)

S Signal, � 1(1), � 2(7), � 3(15), � 4(21), � 6(33),� 7(41), � 8(53)Signal Processing, � 5(25)SP, � 5(25)speedy, � 1(1), � 2(7), � 3(15), � 4(21), � 6(33),� 7(41), � 8(53)speedy 33, � 1(1), � 2(7), � 3(15), � 4(21),� 6(33), � 7(41), � 8(53)

T texas instruments, � 1(1), � 2(7), � 3(15),� 4(21), � 6(33), � 7(41), � 8(53)ti, � 1(1), � 2(7), � 3(15), � 4(21), � 6(33),� 7(41), � 8(53)tidsk, � 1(1), � 2(7), � 3(15), � 4(21), � 6(33),� 7(41), � 8(53)

U Utility, � 5(25)

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 73: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

ATTRIBUTIONS 67

Attributions

Collection: Fundamentals of Digital Signal Processing LabEdited by: Erik LutherURL: http://cnx.org/content/col10303/1.5/License: http://creativecommons.org/licenses/by/2.0/

Module: "DSP Laboratory: Introduction, Hardware and Software Setup"By: Erik LutherURL: http://cnx.org/content/m13036/1.2/Pages: 1-5Copyright: Erik LutherLicense: http://creativecommons.org/licenses/by/2.0/

Module: "DSP Laboratory: Analog to Digital and Digital to Analog Conversion"By: Erik LutherURL: http://cnx.org/content/m13035/1.1/Pages: 7-14Copyright: Erik LutherLicense: http://creativecommons.org/licenses/by/2.0/

Module: "DSP Laboratory: Time and Frequency Displays"By: Erik LutherURL: http://cnx.org/content/m13037/1.1/Pages: 15-20Copyright: Erik LutherLicense: http://creativecommons.org/licenses/by/2.0/

Module: "DSP Laboratory: Aliasing"By: Erik LutherURL: http://cnx.org/content/m13034/1.2/Pages: 21-23Copyright: Erik LutherLicense: http://creativecommons.org/licenses/by/2.0/

Module: "Interactive Digital Filter Design - Online Tool for IIR Filter and FIR Filter Design"By: Erik Luther, Jim CahowURL: http://cnx.org/content/m13115/1.10/Pages: 25-32Copyright: Erik Luther, Jim CahowLicense: http://creativecommons.org/licenses/by/2.0/

Module: "DSP Laboratory: IIR Notch Filter Design"By: Erik LutherURL: http://cnx.org/content/m13038/1.2/Pages: 33-39Copyright: Erik LutherLicense: http://creativecommons.org/licenses/by/2.0/

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 74: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

68 ATTRIBUTIONS

Module: "DSP Laboratory: IIR Filter Design via the Bilinear Transformation"By: Erik LutherURL: http://cnx.org/content/m13039/1.1/Pages: 41-52Copyright: Erik LutherLicense: http://creativecommons.org/licenses/by/2.0/

Module: "DSP Laboratory: FIR Filter Design"By: Erik LutherURL: http://cnx.org/content/m13040/1.1/Pages: 53-65Copyright: Erik LutherLicense: http://creativecommons.org/licenses/by/2.0/

Available for free at Connexions <http://cnx.org/content/col10303/1.5>

Page 75: Fundamentals of Digital Signal Processing Lab...5 Interactive Digital Filter Design - Online oTol for IIR Filter and FIR Filter ... input channel with a xed cuto frequency = 24 kHz

Fundamentals of Digital Signal Processing LabThe purpose of this lab is to familiarize students with the DSP development workstation in the signalprocessing lab by examining sampling, analysis, and reconstruction of continuous-time signals. Speci�cally,we will �rst look at sampling/reconstruction of continuous-time signals. We will then examine time- andfrequency-domain displays. Finally, we will examine the importance of sampling frequency and its e�ects onaliasing.

About ConnexionsSince 1999, Connexions has been pioneering a global system where anyone can create course materials andmake them fully accessible and easily reusable free of charge. We are a Web-based authoring, teaching andlearning environment open to anyone interested in education, including students, teachers, professors andlifelong learners. We connect ideas and facilitate educational communities.

Connexions's modular, interactive courses are in use worldwide by universities, community colleges, K-12schools, distance learners, and lifelong learners. Connexions materials are in many languages, includingEnglish, Spanish, Chinese, Japanese, Italian, Vietnamese, French, Portuguese, and Thai. Connexions is partof an exciting new information distribution system that allows for Print on Demand Books. Connexionshas partnered with innovative on-demand publisher QOOP to accelerate the delivery of printed coursematerials and textbooks into classrooms worldwide at lower prices than traditional academic publishers.