improving digital signal processing course with real time

18
AC 2010-979: IMPROVING DIGITAL SIGNAL PROCESSING COURSE WITH REAL TIME PROCESSING EXPERIENCES FOR ELECTRICAL AND COMPUTER ENGINEERING TECHNOLOGY STUDENTS Li Tan, Purdue University, North Central DR. LI TAN is currently with the College of Engineering and Technology at Purdue University North Central, Westville, Indiana. He received his Ph.D. degree in Electrical Engineering from the University of New Mexico in1992. Dr. Tan is a senior member IEEE. His principal technical areas include digital signal processing, adaptive signal processing, and digital communications. He has published a number of papers in these areas. He has authored and co-authored three textbooks: Digital Signal Processing: Fundamentals and Applications, Elsevier/Academic Press, 2007; Fundamentals of Analog and Digital Signal Processing, Second Edition, AuthorHouse, 2008, and Analog Signal Processing and Filter Design, Linus Publications, 2009. Jean Jiang, Purdue University, North Central Dr.JEAN JIANG is currently with the College of Engineering and Technology at Purdue University North Central, Westville, Indiana. She received her Ph.D. degree in Electrical Engineering from the University of New Mexico in 1992. Her principal technical areas are in digital signal processing, adaptive signal processing, and control systems. She has published a number of papers in these areas. She has co-authored two textbooks: Fundamentals of Analog and Digital Signal Processing, Second Edition, AuthorHouse, 2008, and Analog Signal Processing and Filter Design, Linus Publications, 2009. © American Society for Engineering Education, 2010 Page 15.693.1

Upload: dangphuc

Post on 04-Jan-2017

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Improving Digital Signal Processing Course With Real Time

AC 2010-979: IMPROVING DIGITAL SIGNAL PROCESSING COURSE WITHREAL TIME PROCESSING EXPERIENCES FOR ELECTRICAL ANDCOMPUTER ENGINEERING TECHNOLOGY STUDENTS

Li Tan, Purdue University, North CentralDR. LI TAN is currently with the College of Engineering and Technology at Purdue UniversityNorth Central, Westville, Indiana. He received his Ph.D. degree in Electrical Engineering fromthe University of New Mexico in1992. Dr. Tan is a senior member IEEE. His principal technicalareas include digital signal processing, adaptive signal processing, and digital communications.He has published a number of papers in these areas. He has authored and co-authored threetextbooks: Digital Signal Processing: Fundamentals and Applications, Elsevier/Academic Press,2007; Fundamentals of Analog and Digital Signal Processing, Second Edition, AuthorHouse,2008, and Analog Signal Processing and Filter Design, Linus Publications, 2009.

Jean Jiang, Purdue University, North CentralDr.JEAN JIANG is currently with the College of Engineering and Technology at PurdueUniversity North Central, Westville, Indiana. She received her Ph.D. degree in ElectricalEngineering from the University of New Mexico in 1992. Her principal technical areas are indigital signal processing, adaptive signal processing, and control systems. She has published anumber of papers in these areas. She has co-authored two textbooks: Fundamentals of Analog andDigital Signal Processing, Second Edition, AuthorHouse, 2008, and Analog Signal Processingand Filter Design, Linus Publications, 2009.

© American Society for Engineering Education, 2010

Page 15.693.1

Page 2: Improving Digital Signal Processing Course With Real Time

Improving Digital Signal Processing Course with Real -Time

Processing Experiences for Electrical and Computer Engineering

Technology Students

Abstract

In this paper, we present our pedagogies for teaching digital signal processing (DSP) with real-

time processing experiences. In the past, teaching the DSP course for electrical and computer

engineering technology (ECET) program was often a challenge, due to the heavy use of

mathematics in the course. Our technology students prefer visualization, computer-related

activities, and hands-on experiences in their learning environment. Now, with computer software

like MATLAB adopted as a necessary tool for analysis and simulations, students are motivated

in the DSP course and their learning efficiency has been enhanced greatly. Today, a DSP task

such as digital filter design using MATLAB can be completed in minutes. Hence, there is room

for course improvement; that is, the time saved could be allocated to practical real-time DSP to

further motivate and attract our hands-on technology students. With this consideration, we

enhance our DSP course by adding real-time DSP labs. Each developed lab requires both

MATLAB simulations and real-time DSP using a floating-point digital signal processor,

TX320TMS67C13 DSK. In addition, students are required to develop comprehensive real-time

DSP projects and demonstrate their working projects in class.

We will outline our course learning outcomes and DSP laboratories with both MATLAB

simulations and hands-on real-time DSP. Then, we will focus on describing real-time DSP

pedagogies for our laboratory implementations. We will also examine the course assessment

according to our collected data from course evaluation, student surveys and student course work,

and finally we will address improvement of the course based on our assessment.

I. Introduction

The application and use of digital signal processing (DSP) technology are widely found in

modern electronic products, industrial machinery, medical equipment, communication and

control systems, computer peripherals, and multimedia devices1-4

. This rapid advance in industry

has generated an increasing demand for engineering technology students with a knowledge and

working skills of DSP. Many engineering technology programs have offered a DSP course in

their undergraduate curricula, especially in the electrical and computer engineering technology

(ECET) curriculum. In addition, our ECET curriculum has advanced according to the industrial

need to offer elective courses that require a background of DSP and cover the topics of

biomedical instrumentations, DSP multimedia systems, and digital communications, and digital

control systems. Teaching the DSP course to our ECET students will also prepare them for their

elective courses in their senior year.

In the past, teaching the DSP course for the ECET program was often a challenge, due to the

heavy use of mathematics. Many of our ECET students prefer visualization, computer-related

activities, and hands-on experiences in their learning environment. Now, with computer software

Page 15.693.2

Page 3: Improving Digital Signal Processing Course With Real Time

such as MATLAB adopted as a necessary tool for analysis and simulations, students are

motivated in the DSP course and their learning efficiency has been greatly enhanced. MATLAB

has become a standard tool for teaching DSP5-8

. Today, with MATLAB, students can complete

their DSP design and analysis in minutes. Hence, there is room for the improvement; that is, the

time saved could be allocated to real-time DSP with practical applications to further motivate

and interest our hands-on technology students. To accommodate such a learning environment,

we have enhanced our DSP course by adding hands-on real-time DSP labs. Each developed lab

requires both MATLAB simulations and hands-on real-time DSP using a floating-point digital

signal processor2-4

, TX320TMS67C13 DSK (development starter kit). In addition, students are

required to develop comprehensive DSP projects and demonstrate their working projects in class.

In this paper, we will describe the DSP course prerequisites, and outline our course learning

outcomes and improved DSP laboratories with MATLAB simulations and hands-on real-time

DSP. Then, we will describe pedagogies for our laboratory implementations with an emphasis on

real-time DSP. Finally, we will examine the course assessment according to our collected data

from course evaluation, student surveys and student course work, and further address the

possible course improvement based on our assessment.

II. Course Outlines and Improved Laboratories

Our DSP course (ECET357) is offered at the junior level with a 16-week class schedule. The

course allocates a three-hour lecture and a three-hour lab each week. Prior to the DSP course, the

pre-requisite courses are: Introduction to Microcontrollers (ECET209), circuit analysis courses,

and Analog Network Signal Processing (ECET307). Figure 1 shows a flowchart for these

prerequisite courses and other DSP related courses.

Analog Network

Signal Procssing

(ECET307)

Digial Signal Processing

(ECET357)

Advanced DSP

(ECET499)

Biomedical

Instrumentation

Circuit Analysis

(ECET207)

(ECET257)

Microcontrollers

(ECET209)

Figure 1. Flowchart of DSP-related courses.

As shown in Figure 1, students in ECET209 gain a background on the processor architecture,

interface concepts, and basic C programming skills. The required skills of complex algebra and

the basics of circuit analysis are covered in our circuit analysis courses like the AC Circuit

Analysis (ECET207) and Power and RF Electronics (ECET257). Our Analog Network Signal

Processing (ECET307) course deals with very important fundamental subjects: the Laplace

transform, circuit analysis using Laplace transform, Fourier series, and filter design concepts.

Page 15.693.3

Page 4: Improving Digital Signal Processing Course With Real Time

These subjects taught in ECET307 are used extensively in our DSP course. In addition, after

successfully completing the DSP course, students can continue to pursue the advanced DSP

course (ECET499), in which students study adaptive filtering, waveform compression and

coding, multi-rate DSP, image and video processing, other advanced DSP applications, and the

biomedical instrumentation course.

A. Course Learning Outcomes

Our DSP course covers the following key topics: (1) signal sampling; (2) digital signals; (3)

discrete Fourier transform (DFT) and the use of fast Fourier transform (FFT), and signal

spectrum; (4) z-transform; (5) digital filter systems, filter frequency responses, and filter

realizations; (6) finite impulse response (FIR) filter design; (7) infinite impulse response (IIR)

filter design; and (8) DSP applications. These topics are covered through Chapters 1 to 8 in the

DSP textbook1. The course learning outcomes for satisfying the minimum requirement for the

course objectives are developed and summarized in Table 1. Note that in order to provide a

smooth transition from ECET307 to ECET357, a quick review of analog filter design is given at

the beginning of the DSP course.

Table 1. Course learning outcomes.

O1. Given the filter frequency domain specification, realize the analog active filter with

a selected circuit topology.

O2. Determine the appropriate sampling rate for digitizing analog signals, specifications

for the anti-aliasing filter before ADC channel, and the anti-image filter after the DAC

channel.

O3. Compute and analyze signal spectra using DFT/FFT algorithms.

O4. Analyze filter frequency response; perform digital filtering; verify the signal

spectral effects.

O5. Design FIR filters and implement them in real-time using the floating-point format.

O6. Design IIR filters and implement them in real-time using the floating-point format.

O7. Waveform generation using digital filter(s).

O8. Develop comprehensive real-time DSP project and demonstrate the implementation.

B. DSP Laboratories with MATLAB and TI TSM320C67C13 DSK

In order to fulfill our course learning outcomes, we have developed our labs using both

MATLAB and TMS320C6713 DSK. MATLAB is a very powerful tool for signal and system

analysis and simulations. It is adopted as a standard tool by industries and universities. For real-

time DSP, we have selected a TI TMS320C6713 floating-point processor instead of a fixed-point

DSP to avoid the implementation challenges, so that our students can easily implement their DSP

solutions using C. Considering the fact that the course is offered at junior level, students are

engaged to write MATLAB programs for simulations and simple C programs for real-time DSP.

Table 2 summarizes our labs using MATLAB and the TI DSP board as well as the mapped

learning outcome(s) for each lab.

Page 15.693.4

Page 5: Improving Digital Signal Processing Course With Real Time

Table 2. List of labs and their mapping to the course learning outcomes. Labs using MATALB Labs using TMS320C6713 DSK Outcomes in

Table 1

1a. Analog active filters 1b. Introduction to CCS environment (1)

2a. Signal sampling and

reconstruction

2b. Signal sampling using

TMS320C6713 DSK

(2)

3a. Digital filtering and spectral

effects

3b. Real time digital filter realizations (3), (4)

4a. FIR filter design with MATLAB 4b. FIR filter implementations (5)

5a. IIR filter design with MATLAB 5b. IIR filter implementations (6)

6a. Waveform generation using the

digital filter method

6b. Waveform generation using the

filter method

(7)

7. DSP project using TI TMS320C6713 DSK (8)

Note that the last part of DSP labs is a group course project. We require no more than 2 persons

per group for the project. The suggested course projects are given below:

a. Speech enhancement for hearing aids

b. Speech and audio equalizer

c. Digital crossover system

d. The 60 Hz hum eliminator or periodical interference cancellation

e. DTMF tone generation and detection

C. Laboratory Content

Our developed labs are divided into three parts: fundamentals (Labs 1-3), filter design and

implementations (Labs 4-6), and DSP applications (project). We focus on illustrating our

pedagogies for real time DSP laboratories.

Lab 1 is a review lab in which active analog filters are designed, constructed, and tested to meet

the frequency domain specifications. The lab establishes a background for students to study the

anti-aliasing and anti-image filter requirements used in a DSP system. In the second part of Lab

1, students begin to familiarize with TI TMS320C6713 DSK and CCS (code composer studio)

environment3, where they create a simple C program, build it, download the executable codes to

the TI DSK, and run the application.

Lab 2 helps students to understand the requirements for the sampling and reconstruction of

analog signals. A pre-built sample and hold circuit with anti-aliasing and anti-image filters using

MultiSim is given to students, so that they can examine the sampling principle, aliasing effect,

and signal reconstruction in the time domain, as well as the frequency domain. Once students

complete this experiment, they are ready to work with the TI DSK, which is set up as shown in

Figure 2. The first real-time DSP experience is to implement the simplest DSP equation

( ) ( )y n x n? given in Figure 3. Students need to verify the reconstructed output signal using a

sweeping frequency input from a signal generator at various sampling rates. The Nyquist limit at

each specified sampling rate is also examined. Notice that the sample C program shown in

Figure 3 only processes a signal from the left channel, and can be easily extended to process

signals from both left and right channels. Students are also required to keep all the hardware and

software set-up and verification procedures for their future real-time DSP labs.

Page 15.693.5

Page 6: Improving Digital Signal Processing Course With Real Time

TI TMS320C6713

DSP Board

Computer

Left Line In

Right Line In

Left Line Out

Right Line Out

Mic InputSignal

Generator

Oscilloscope

Speaker

Figure 2. Real time DSP laboratory setup.

Page 15.693.6

Page 7: Improving Digital Signal Processing Course With Real Time

float x[1]={0.0};

float y[1]={0.0}; interrupt void c_int11()

{

float lc; /*left channel input */

float rc; /*right channel input */

float lcnew; /*left channel output */

float rcnew; /*right channel output */

int i;

//Left channel and right channel inputs

AIC23_data.combo=input_sample();

lc=(float) (AIC23_data.channel[LEFT]);

rc= (float) (AIC23_data.channel[RIGHT]);

// Insert DSP algorithm below

x[0]=lc; /* Input from the left channel */

y[0]=x[0]; /* simplest DSP equation */

// End of the DSP algorithm

rcnew=y[0];

rcnew=y[0];

AIC23_data.channel[LEFT]=(short) lcnew;

AIC23_data.channel[RIGHT]=(short) rcnew;

output_sample(AIC23_data.combo);

}

Figure 3. Simplest DSP program for verifying input and output.

In Lab 3a, the transfer functions of the designed digital filters are given. Using MATLAB,

students are required to study the given filters in terms of the following items:

(1) Pole-zero plots;

(2) Difference equations;

(3) Frequency responses;

(4) Filtering generated sinusoidal signals, comparing input and output waveforms in the

time domain, and comparing input and output spectra in the frequency domain;

(5) Filtering a given speech data, comparing speech input and output waveforms in the

time domain, and comparing speech input and output spectra in the frequency domain;

(6) Examining sound effects by listening to the filter input and output signals.

Figure 4 demonstrates a part of the MATLAB simulations in Lab 3a. The simulations include

obtaining the amplitude and phase frequency responses for the given lowpass filter (Figure 4a),

comparing the original speech and filtered speech with the lowpass filter in the time domain

(Figure 4b), and comparing the spectra of the original speech and filtered speech in the frequency

domain (Figure 4c).

Page 15.693.7

Page 8: Improving Digital Signal Processing Course With Real Time

0 500 1000 1500 2000 2500 3000 3500 4000-800

-600

-400

-200

0

Frequency (Hertz)

Pha

se

(d

eg

ree

s)

0 500 1000 1500 2000 2500 3000 3500 4000-150

-100

-50

0

50

Frequency (Hertz)

Ma

gnitud

e R

esp

onse

(d

B)

0 0.5 1 1.5 2

x 104

-2

-1

0

1

2x 10

4

Sample number

Filtered speech

0 0.5 1 1.5 2

x 104

-2

-1

0

1

2x 10

4 Original speech

a. Frequency responses. b. Original speech and filtered speech.

0 500 1000 1500 2000 2500 3000 3500 40000

50

100

Sample number

Filtered speech

0 500 1000 1500 2000 2500 3000 3500 40000

50

100Original speech

c. Amplitude spectra of the original speech and filtered speech.

Figure 4. Spectral effect of lowpass filtering.

Once students understand and finish the MATLAB portion, a real-time implementation of the

digital filter follows. Students will write a standard C program for their DSK platform using the

obtained difference equation. As an illustrative example, a simple C program is created in Figure

5 to implement a finite impulse response (FIR) filter with its transfer function given by

1 2 3 4 5 6( ) 0.1009 0.1514 0.1871 0.2000 0.1871 0.1514 0.1009H z z z z z z z/ / / / / /? − − − − − −

In real-time DSP, students feed the DSK line-in with a test input signal from a signal generator,

and compare the input and output waveforms using an oscilloscope. Students can also

experience the sound effects caused by the digital filter by listening to a speaker with an input

sensed from a microphone or from the signal generator.

Page 15.693.8

Page 9: Improving Digital Signal Processing Course With Real Time

float x[7]={0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};

float b[7]={0.1009, 0.1514, 0.1871, 0.2000, 0.1871, 0.1514, 0.1009};

float y[1]={0.0};

interrupt void c_int11()

{

float lc; /*left channel input */

float rc; /*right channel input */

float lcnew; /*left channel output */

float rcnew; /*right channel output */

int i;

//Left channel and right channel inputs

AIC23_data.combo=input_sample();

lc=(float) (AIC23_data.channel[LEFT]);

rc= (float) (AIC23_data.channel[RIGHT]);

// Insert DSP algorithm below for(i=6; i>0; i--) /* Update the input buffer x[3] */

{ x[i]=x[i-1]; }

x[0]= (float) lc; /* Input from the left channel */

y[0]=0;

for(i=0; i<7; i++)

{ y[0]=y[0]+b[i]*x[i]; } /* FIR filtering */

// End of the DSP algorithm rcnew=y[0];

rcnew=y[0];

AIC23_data.channel[LEFT]=(short) lcnew;

AIC23_data.channel[RIGHT]=(short) rcnew;

output_sample(AIC23_data.combo);

}

Figure 5. Example of an FIR filter implementation.

A similar procedure is repeated for the given infinite impulse response (IIR) filter for both

MATLAB and real-time DSP portions. For real-time DSP, Figure 6 describes a standard sample

C program for implementing an IIR filter with its transfer function given by

2

1 2

0.0730 0.0730( )

1 0.7117 0.8541

zH z

z z

/

/ /

/?

− −

This hands-on real-time digital filtering lab stimulates students while learning DSP, since it is

demonstrated that analog filters that students have designed can be easily and flexibly replaced

by the digital filters implemented using simple C programs in a digital signal processor. The lab

also raises student curiosity and interest on how these magic numbers (filter coefficients) work

for digital filtering. Naturally, Lab 3 serves as a vehicle, leading to the digital filter design.

Page 15.693.9

Page 10: Improving Digital Signal Processing Course With Real Time

float x[3]={0.0, 0.0, 0.0};

float b[3]={0.0730, 0.0, 0.0730};

float a[3]={1, 0.7117, 0.8541};

float y[3]={0.0, 0.0, 0.0};

interrupt void c_int11()

{

float lc; /*left channel input */

float rc; /*right channel input */

float lcnew; /*left channel output */

float rcnew; /*right channel output */

int i;

//Left channel and right channel inputs

AIC23_data.combo=input_sample();

lc=(float) (AIC23_data.channel[LEFT]);

rc= (float) (AIC23_data.channel[RIGHT]);

// Insert DSP algorithm below

for(i=2; i>0; i--) /* Update the input buffer */

{ x[i]=x[i-1]; }

x[0]= lc; /* Input from the left channel */

for (i=2;i>0;i--) /* Update the output buffer */

{ y[i]=y[i-1]; }

y[0]=b[0]*x[0]+b[1]*x[1]+b[2]*x[2]-a[1]*y[1]-a[2]*y[2];

// End of the DSP algorithm

rcnew=y[0];

rcnew=y[0];

AIC23_data.channel[LEFT]=(short) lcnew;

AIC23_data.channel[RIGHT]=(short) rcnew;

output_sample(AIC23_data.combo);

}

Figure 6. Example of IIR filtering using the direct form I.

In Labs 4-5, for a given frequency domain specification, students will conduct their filter design

and verify the filter specification requirement using MATLAB. The window method and optimal

design method for FIR filter design are required, whereas for IIR filter design, students are

required to master the bilinear transform method and pole-zero placement method1. Once a

digital filter is designed and its frequency responses are verified via MATLAB, the designed

filter will be implemented in real time using either a direct form I (see Figures 5 and 6) or a

direct form II, as shown in Figure 7. As we can see, Lab 5 also introduces to the students an

alternative to implement an IIR filter in a direct form II, which is widely used in many fixed-

point DSP. This topic will be studied in our advanced DSP course in detail. Applying the same

verification procedure depicted in Lab 3, students will evaluate the filter performance using the

signal generator and oscilloscope. These two labs foster students with a sophisticated DSP design

and implementation level. With a well-established foundation, students will begin to develop

their own real-time DSP projects.

Page 15.693.10

Page 11: Improving Digital Signal Processing Course With Real Time

float x[1]={0.0};

float b[3]={0.0730, 0.0, 0.0730};

float a[3]={1, 0.7117, 0.8541};

float w[3]={0.0, 0.0, 0.0};

float y[1]={0.0};

interrupt void c_int11()

{

float lc; /*left channel input */

float rc; /*right channel input */

float lcnew; /*left channel output */

float rcnew; /*right channel output */

int i;

//Left channel and right channel inputs

AIC23_data.combo=input_sample();

lc=(float) (AIC23_data.channel[LEFT]);

rc= (float) (AIC23_data.channel[RIGHT]);

// Insert DSP algorithm below

for(i=2; i>0; i--) /* Update the state signal buffer */

{ w[i]=w[i-1]; }

x[0]= lc; /* Input from the left channel */

w[0]=x[0]-a[1]*w[1]-a[2]*w[2];

y[0]=w[0]*x[0]+w[1]*x[1]+w[2]*x[2];

// End of the DSP algorithm

rcnew=y[0];

rcnew=y[0];

AIC23_data.channel[LEFT]=(short) lcnew;

AIC23_data.channel[RIGHT]=(short) rcnew;

output_sample(AIC23_data.combo);

}

Figure 7. IIR filter implementation in the direct form II.

In Lab 6, students will learn how to generate a single tone and a dual-tone multi-frequency

(DTMF) tone (used in the telephone industry) using a filter method1. Figure 8 describes a block

diagram of the DTMF tone generation and detection for digit “7”. As shown in Figure 8b, a

DTMF tone is produced by a sum of the outputs from two parallel digital oscillators, both with

the same impulse function as an input. Each digital oscillation filter is designed using its

specified frequency given in Figure 8a. Students will learn how to design digital oscillators,

simulate, and verify the generated single tone and DTMF tone in MATLAB. With a full

understanding of the principles, students will then implement the obtained digital oscillators in

real time. As an illustrative example, an implementation in C as shown in Figure 9 is created to

generate a 1-kHz tone at a sampling rate of 8 kHz using the following designed digital oscillator:

1

1 2

0.707107( )

1 1.414214

zH z

z z

/

/ /?

/ −

Page 15.693.11

Page 12: Improving Digital Signal Processing Course With Real Time

1 2 3

4 5 6

7 8 9

* 0 #

1209 Hz 1336 Hz 1477 Hz

697 Hz

770 Hz

852 Hz

941 Hz

H zz

z zL

L

L

( )sin

cos?

/ −

Ψ

Ψ2 2 1

H zz

z zH

H

H

( )sin

cos?

/ −

Ψ

Ψ2 2 1

φ ( )n−

DTMF Tones

7

Ψ L sf? ∂2 852ρ /

ΨH sf? ∂2 1209ρ /

y n7 ( )

a. b.

Figure 8. DTMF tone specifications and DTMF tone generator for the digit “7”.

float x[2]={6000, 0.0}; /*initialize the impulse input */

float b[2]={0.0, 0.707107};

float a[3]={1.0, 1.414214 1.0};

float y[3]={0.0};

interrupt void c_int11()

{ float lc; /*left channel input */

float rc; /*right channel input */

float lcnew; /*left channel output */

float rcnew; /*right channel output */

int i;

//Left channel and right channel inputs

AIC23_data.combo=input_sample();

lc=(float) (AIC23_data.channel[LEFT]);

rc= (float) (AIC23_data.channel[RIGHT]);

// Insert DSP algorithm below

y[0]=b[0]*x[0]+b[1]*x[1]+b[2]*x[2]-a[1]*y[1]-a[2]*y[2];

for(i=2; i>0; i--) /* Update the input buffer with zero input */

{ x[i]=x[i-1]; }

x[0]= 0;

for (i=2;i>0;i--) /* Update the output buffer */

{ y[i]=y[i-1]; }

// End of the DSP algorithm

rcnew=y[0];

rcnew=y[0];

AIC23_data.channel[LEFT]=(short) lcnew;

AIC23_data.channel[RIGHT]=(short) rcnew;

output_sample(AIC23_data.combo);

}

Figure 9. Single tone generation (1 kHz at the sampling rate of 8 kHz).

Notice that the first element in the input array x[2] is initialized to 6000 as shown in Figure 9,

and then it will be updated to zero each time to create an impulse function with the amplitude of

6000 internally. As a result, the filter output produces a 1 kHz tone. Based on the success of

Page 15.693.12

Page 13: Improving Digital Signal Processing Course With Real Time

implementing the single tone generation, students can then continue to finish the implementation

of DTMF tone generation.

Next, students are required to apply the filter method to generate different waveforms, such as

the rectangular and triangular waveforms. Using the same principle of tone generation and the

Fourier series expansion, a set of parallel filters are designed to produce the fundamental and

harmonic signals for the specified waveform using an impulse function. The sum of all the

digital oscillator outputs generates a designed waveform. Similarly, students will enter the real-

time DSP after finishing their MATLAB simulations.

Finally, a course project is to be developed. We cover basic concepts for each project1 in

lectures. Students are divided into groups (two persons per group) to develop their selected DSP

projects and generate their design reports. At the end of semester, the students in each group are

required to demonstrate their working projects to the class so that they can learn from each other.

During the project developing phase, students could obtain advice from their instructor. Then

they can apply their gained DSP knowledge and skills to creatively develop their real-time DSP

solutions. Here, we describe several successful course projects. Figure 10 shows a digital

crossover system, which is a popular project that students like to choose. It requires two TI DSP

boards. Using the designed digital lowpass filter, one TI DSK produces low frequency

components to drive a woofer. Meanwhile, implementing the designed digital highpass filter on

the other TI DSK generates high frequency components to drive a tweeter. As an extension, a

sophisticated crossover system with multi-bands can be developed.

TI TMS320C6713DSP Board

Lowpass filter

Line In

Line In

Line Out

Line Out

TI TMS320C6713

DSP BoardHighpass filter

Audio

Tweeter

Woofer

Figure 10. Digital crossover system using TI TMS320C6713 DSKs.

Another interesting project is the periodic interference cancellation (periodic noise cancellation)

as shown in Figure 11, where two DSP boards are used as well. The first DSK takes the audio

signal as an input, and adds it with periodic noise (sinusoids) generated internally using the filter

method described in Lab 6. Hence, the audio output from the first TI DSK is corrupted by the

periodic interferences. Students can then examine the spectrum of the corrupted audio signal and

determine the filter design requirement. Upon completion of the filter design in MATLAB, a

real-time DSP implementation using the cascaded notch filters is conducted in the second TI

DSK. Finally, a clean audio is produced at the second TI DSK output.

Page 15.693.13

Page 14: Improving Digital Signal Processing Course With Real Time

TI TMS320C6713

DSP Boardadded with outputs of

digital oscillators

Line In

Line In

Line Out

Line Out

TI TMS320C6713

DSP BoardNotch filters

Audio

Clean audio sentto the speaker

Audio plus

periodicalinterferences

Figure 11. Periodical interference cancellation.

The DTMF tone detection, the most challenging and interesting course project, is depicted in

Figure 12. The first TI DSK is responsible for generating the specified DTMF tone, which is a

part of Lab 6. The second TI DSK performs detection using the Goertzel algorithm (GA)1.

Students who choose this project will study and research the GA filters and detection scheme as

described in Figure 12b. After a detection scheme is successfully implemented, the detected digit

dialed on the telephone pad will be displayed in the host computer. This idea could be fostered to

develop an acoustic modem in which information created at the first DSP board can be

transmitted via an acoustic channel to the second DSP board for display.

TI TMS320C6713

DSP Board

DTMF tone generation

Display

decoded digit

information

Line Out

TI TMS320C6713

DSP Board

DTMF detection

using GA filters

Line Out

a. DTMF tone generation and detection using TI TMS320C6713 DSKs.

GA filter

GA filter

GA filter

GA filter

GA filter

GA filter

GA filter

y n7 ( )

DTMF Tone

detector

Threshould

log ic

log ic

log ic

log ic

log ic

log ic

log ic

logic

7

1

0

0

0

1

0

0

detector

detector

detector

detector

detector

detector

b. DTMF tone detection for digit “7”.

Figure 12. DTMF tone generation and detection.

Page 15.693.14

Page 15: Improving Digital Signal Processing Course With Real Time

D. Laboratory Teaching Pedagogies

Ideally, a three-hour lab section each week is required to complete both MATLAB simulations

and real-time DSP labs. However, to emphasize the use of laboratory time for real DSP, we

encourage each student to complete the MATLAB portion at home or outside of the lab section,

and demonstrate his/her work to the instructor before the real-time lab section begins. Hence,

students could have more time to experience their hands-on real-time DSP. Furthermore,

finishing the MALAB portion also allows students to gain a good understanding of the required

subjects before entering their second real-time DSP portion.

III. Course Outcome Assessment

The assessment presented here with a total of 16 student responses is based on our collected data

from teaching the DSP course in spring 2009 and fall 2009. At the end of each semester, we

conducted a student self-assessment. A student survey was given before the final exam to ask

each student to evaluate his/her achievement for each course learning outcome listed in Table 1.

Students were asked to make the following five (5) choices: understand well, understand,

somewhat understand, somewhat confused, and confused. For statistical purposes, the five

choices were assigned the scores of 5, 4, 3, 2, 1, respectively. The average rating scores for all

the course learning outcomes are listed on the second row in Table 3.

Table 3. Student survey and instructor assessment. Outcomes O1 O2 O3 O4 O5 O6 O7 O8

Student Survey 4.8 4.6 4.6 4.6 4.2 4.6 4.8 4.8

Instructor assessment 4.9 4.8 4.0 4.4 4.5 4.6 4.7 4.7

To ensure the quality of instruction, we also conducted an assessment based on the final exams

and laboratory projects. To do so, we designed a final exam in which course learning outcomes 1

to 7 (listed in Table 1) were covered by all the problems. Outcome 8 (DSP applications) was

assessed based on the student’s projects. We then computed the average points from all the class

members for the problem(s) corresponding to a specific course learning outcome. The instructor

average rating score for a scale from 1 to 5 was obtained by dividing the average points by the

designated points for that problem(s) and then multiplying the result by 5. As an example, to

work on outcome 6 (O6: IIR filter design), which is covered by one of the problems (see Table

4) in the final exam, we found the class average points from all the students for this problem as

18.4 points. Next, we calculated the instructor average rating score as follows: (18.4/20)*5=4.6,

which is listed below O6 on the third row in Table 3. As we mentioned before, grading the

student’s projects yielded the instructor average rating score for outcome 8 (O8). The instructor

average rating scores for assessing the rest of course learning outcomes are included in Table 3.

The average rating scores from both the student survey and the instructor assessment can serve

as a reference for the faculty to improve the course. For example, any course learning outcome

achieving an average rating score below 3.5 will raise a concern and require an action plan to fix

the issue.

Page 15.693.15

Page 16: Improving Digital Signal Processing Course With Real Time

Table 4. The example problem in the final exam. Problem 7 Design a first-order high-pass IIR digital Butterworth filter with a

cut-off frequency of 500 Hz at a sampling rate of 8 kHz using the bilinear

transformation method.

a. Determine the transfer function: H(z).

b. Determine the difference equation: y(n).

c. Make a pole-zero plot on the z-plane and determine the stability of the

DSP system.

d. Draw the realization block diagram using the direct-forms I and II.

(20 points)

0

1

2

3

4

5

6

O1 O2 O3 O4 O5 O6 O7 O8

Student

Instructor

Figure 13. Comparisons of the student survey and instructor assessment.

Figure 13 displays a comparison between the student survey and instructor assessment. From

Figure 13, we can observe that

(1) The rating scores from the student survey and the ones from the instructor were

consistent. The rating for course leaning outcome 3 (O3) had a bigger gap, in which the score

from instructor rating was lower than the one from the student survey by 0.6. This discrepancy

came from the fact that students understood the topics of DFT and signal spectra, but made

mistakes in their tests due to complex algebra operations. This is an area that requires

improvement.

(2) There was a similar trend from both evaluations, that is, outcomes 3 and 4 received a

relatively low score when compared to the others. This seems common, since these two learning

outcomes (covering the topics of DFT, signal spectrum, and digital filtering, and filter frequency

responses) are considered to be the difficult topics in the DSP course. Overall, students had

achieved their course learning objectives.

We also conducted another student survey regarding our real-time DSP labs. A set of questions

related to real-time DSP experiences were given to the students for evaluation and are listed in

Page 15.693.16

Page 17: Improving Digital Signal Processing Course With Real Time

Table 5. We used the following five (5) choices for the students to evaluate these questions:

strongly agree, agree, somewhat agree, disagree, and strongly disagree. The corresponding rating

scores were assigned as 5, 4, 3, 2, and 1. Questions 7 and 8 are not applicable.

Table 5. Survey questions for real-time DSP labs.

Q1. Do you feel you can significantly grasp concepts of digital signal

processing by working on real-time DSP coding?

Q2. I am excited to work on real-time DSP coding labs and projects?

Q3. Do you feel that real-time DSP coding is absolutely necessary for this

course?

Q4. Does real-time DSP coding improve your problem solving ability?

Q5. Do you want more real-time DSP coding labs and projects for this course?

Q6. Do you want to learn more on DSP subjects and applications if possible in

future?

Q7. Do you feel this course can help you for other course(s)? Please list the

course(s):

Q8. Please give some suggestions for improving this course:

Table 6. Student survey for real-time DSP labs. Question No. Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8

Student Survey 4.0 4.4 4.8 4.6 4.4 4.5 N/A N/A

The average rating scores shown in Table 6 indicated what follows.

(1) Students strongly agreed that the DSP course should have real-time DSP labs, which

improved their problem solving ability.

(2) Most of the students remained excited about the course, since the hands-on real-time

laboratories motivated them.

(3) Students were eager to do more real-time DSP and learn more DSP related subjects.

In fact, more than 60 % of the current students chose to continue the advanced DSP course5 as

their elective course in their senior year.

(4) The rating score for grasping DSP concepts from real-time DSP labs was relative low

compared to the others. This fact indicated that students had not only learnt DSP concepts from

real-time DSP labs but also from class lectures, homework assignments, and MATLAB

simulations.

V. Course Improvement

Based on our experiences in teaching the improved DSP course with real-time DSP, we felt that

the course contains well-established topics, with suitable lectures and laboratories. In addition to

MATLAB based labs, the time for adding real-time DSP labs is manageable. Students can

choose to complete their MATLAB portions outside the formal lab section to gain additional

time for their real-time DSP labs. We also felt that one particular prerequisite course, Analog

Page 15.693.17

Page 18: Improving Digital Signal Processing Course With Real Time

Network Signal Processing (ECET307), provides students a key for their success in the DSP

course. Hence, we plan to strengthen knowledge of topics such as the Fourier series, analog filter

design and signal instrumentation8 in this prerequisite course. We would also like to encourage

students to develop more comprehensive and challenging projects. When funding for lab

equipment is available, we could add more TI DSKs in our laboratory to accommodate an

increasing enrollment for this DSP course in the future.

VI. Conclusion

We have enhanced our DSP course to include both MTALAB and real-time DSP laboratories.

From our course assessment, we have found that adding hands-on real-time DSP labs with

practical applications can motivate students to achieve the course learning objectives and

increase the student level of interest in DSP. The improved DSP course presented here prepares

students with a solid and hands-on DSP background so that they are able to pursue advanced

DSP and other DSP related courses in their senior year. In addition, students can apply their

acquired DSP knowledge and skills in their senior design projects.

Bibliography

1. L. Tan, Digital Signal Processing: Fundamentals and Applications, Elsevier/Academic Press, 2007.

2. N. Kehtaranavaz, and B., Simsek, C6x-Based Digital Signal Processing, Prentice Hall, Upper Saddle River,

New Jersey 07458, 2000.

3. Texas Instruments, TMS320C6x CPU and Instruction Set Reference Guide, Literature ID# SPRU 189C, Texas

Instruments, Dallas, Texas, 1998.

4. Texas Instruments, Code Composer Studio: Getting Started Guide, Texas Instruments, Dallas, Texas, 2001.

5. L. Tan, J. Jiang, “Teaching Advanced Digital Signal Processing with Multimedia Applications in Engineering

Technology Programs,” ASEE Annual Conference, June 2009.

6. H. Wu and S. Kuo, “Teaching Challenge in Hands-on DSP Experiments for Night-School Students,” EURASIP

Journal on Advances in Signal Processing, vol. 2008, Article ID 570896, June 2008

7. C. Wicks, “Lessons learned: Teaching Real-Time Signal Processing,” IEEE Signal Processing Magazine, pp.

181-185, November 2009.

8. L. Tan, J. Jiang, Analog Signal Processing and Filter Design, Linus Publications, 2009.

Page 15.693.18