13
Paper ID #5984 Teaching Speech and Audio Processing Implementations Using LabView Pro- gram and DAQ Boards Prof. Jean Jiang, Purdue University, North Central DR. JEAN JIANG is currently with the College of Engineering and Technology at Purdue University North Central in Westville, Indiana. Dr. Jiang has taught analog signal processing, digital signal pro- cessing, and control systems for a number of years. Dr. Jiang is a member of the Institute of Electronic and Electronic Engineers (IEEE). Her principal research 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: ”Digital Signal Processing: Fundamentals and Applications”, Second Edition, Elsevier, 2012 and ”Analog Signal Processing and Filter Design”, Linus Publications, 2009. Prof. 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 an IEEE senior member. His principal technical areas include digital signal processing, adaptive signal processing, active noise and vibration control, data compression and digital communications. He has published a number of papers in these areas. He has authored and co- authored two textbooks: Digital Signal Processing: Fundamentals and Applications, Elsevier/Academic Press, Second Edition, 2013; and Analog Signal Processing and Filter Design, Linus Publications, 2009. He has served as associate editors for the International Journal of Engineering Research and Innovation and the International Journal of Modern Engineering. c American Society for Engineering Education, 2013 Page 23.1150.1

TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

Embed Size (px)

Citation preview

Page 1: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

Paper ID #5984

Teaching Speech and Audio Processing Implementations Using LabView Pro-gram and DAQ Boards

Prof. Jean Jiang, Purdue University, North Central

DR. JEAN JIANG is currently with the College of Engineering and Technology at Purdue UniversityNorth Central in Westville, Indiana. Dr. Jiang has taught analog signal processing, digital signal pro-cessing, and control systems for a number of years. Dr. Jiang is a member of the Institute of Electronicand Electronic Engineers (IEEE). Her principal research areas are in digital signal processing, adaptivesignal processing, and control systems. She has published a number of papers in these areas. She has co-authored two textbooks: ”Digital Signal Processing: Fundamentals and Applications”, Second Edition,Elsevier, 2012 and ”Analog Signal Processing and Filter Design”, Linus Publications, 2009.

Prof. Li Tan, Purdue University, North Central

DR. LI TAN is currently with the College of Engineering and Technology at Purdue University NorthCentral, Westville, Indiana. He received his Ph.D. degree in Electrical Engineering from the Universityof New Mexico in1992. Dr. Tan is an IEEE senior member. His principal technical areas include digitalsignal processing, adaptive signal processing, active noise and vibration control, data compression anddigital communications. He has published a number of papers in these areas. He has authored and co-authored two textbooks: Digital Signal Processing: Fundamentals and Applications, Elsevier/AcademicPress, Second Edition, 2013; and Analog Signal Processing and Filter Design, Linus Publications, 2009.He has served as associate editors for the International Journal of Engineering Research and Innovationand the International Journal of Modern Engineering.

c©American Society for Engineering Education, 2013

Page 23.1150.1

Page 2: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

Teaching Speech and Audio Processing Implementations

Using LabView Program and DAQ Boards

Abstract

We present our new pedagogy for teaching speech and audio processing implementations using

LabView program and DAQ (Data Acquisition) board. In the Electrical and Computer

Engineering Technology (ECET) curriculum, the LabView program and DAQ board data

acquisition have been used as a popular platform for teaching a real-time DSP (digital signal

processing) course in the junior year. This course is the second signal processing course which is

offered in electrical and computer engineering technology (ECET) program according to the

current DSP industry trend and student interests in their career development. The course has a

significant component on real-time filtering applications. The pre-requisite includes student

working knowledge and skills of Laplace transform, Fourier series, Fourier transform, and

different types of analog active filter design. After completing the course, students not only

become familiar with MATLAB and LabView software development tools, but also gain the

real-time signal processing experience. They are able to design the low-pass and band-pass filters

and then program them using MATLAB and LabView software, and apply the software and

hardware interface for real speech applications. Comparing with the traditional DSP course

which mainly focus on heavy mathematical development in sampling and recovering, spectrum

analysis, FIR or IIR filter design with the limited computer simulations, our real-time speech

project allow students easily to understand how his/her own voice could be enhanced (by an

audio amplifier), digitized and collected (by a PCI-1200 DAQ board), displayed(by LabView

and spectrum analyzer), processed(by MATLAB and LabView software), and recovered (by an

active 2nd

-order lowpass filter). Therefore, in this paper, we first proposed a complete DSP

platform, which consists of an LM386 audio amplifier, an analog lowpass filter, a PCI-1200

DAQ board interface circuit, and a DSP software to perform the real-time data processing. Using

the proposed DSP platform, we present our instructional techniques for digital filter

implementations in which an FIR lowpass filter and an IIR bandpass filter were designed and

tested for real time processing. The student survey results show that the adoption of LabView

and DAQ boards to teach DSP and digital filter design is a learning effective tool.

I. Introduction

Digital signal processing (DSP) technology and its advancements have continuously impacted

the disciplines of electrical, computer, and biomedical engineering technology programs. This is

due to the fact that DSP technology plays a key role in many current applications of electronics,

which include digital telephones, cellular phones, digital satellites, digital TV’s, ECG analyzers,

digital X-rays, and medical image systems in the areas of communications, instrumentation, and

biomedical signal processing. There are many DSP related products such as digital voice

recorders, CD/DVD players, MP3 players, digital cameras, internet audios, and images and

videos. A quick review of the current jobs advertised in technical magazines and on the internet

web sites further reveals a demand for individuals with a refined DSP knowledge. Hence, the

Page 23.1150.2

Page 3: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

qualified engineering technologists capable of operating, maintaining, repairing, evaluating, and

helping to specify and design DSP-based products have significant competency for their

employment.

To prepare engineering technology students for such an industrial trend, many undergraduate

programs in engineering technology not only offer a course to cover the fundamentals of signal

processing, but also provide a second DSP course in which real-time applications and

corresponding advanced topics such as speech signal processing, adaptive filtering, and digital

image1,2,3,5

are introduced.

In our engineering technology program, the second signal processing course is designed for

junior students starting to experience the real-time signal processing applications and get

interested in DSP real applications, such as the innovative real-time speech processing project

covered in this paper. Our complete real speech processing system including design and testing

greatly motivates students and allows students to understand how his/her own voice could be

enhanced (by an audio amplifier), digitized and collected (by a PCI-1200 DAQ board),

displayed(by LabView and spectrum analyzer), processed(by MATLAB and LabView software),

and recovered (by an active 2nd

-order lowpass filter in the last stage), while the traditional DSP

teaching only focus on heavy mathematical development in signal sampling and recovering,

spectrum analysis, FIR or IIR filter design with the limited computer simulations. The course

prerequisite assumes that the students have already acquired working skills of the Laplace

transform, the Fourier analysis, and analog filters from the first signal processing course. The

technology students in this course will continue to explore advanced techniques such as real-time

digital filter implementations and adaptive filtering. While offering a broad coverage of topics

and the real-time DSP system application, this course could be beneficial to all electrical

technology students.

Since teaching advanced DSP topics within the engineering technology program has the

requirement of being at a hands-on and engineering technology level, adopting the traditional

teaching approaches and using textbooks dealing with complicated mathematics and theories

used in the four-year engineering program may not be appropriate. Hence, in this paper, we will

present our innovative pedagogies and experiences from teaching the subjects of advanced DSP

in the engineering technology curricula.

The paper is organized as follows. We will explain the course prerequisites and describe our

class content first, and then we will introduce real-time signal processing hands-on project using

a DAQ (Data Acquisition) board and simulation tools such as MATLAB and MultiSIM. We will

also present the course assessment and outcome, which include how the students apply their

gained DSP knowledge to their capstone senior projects. Finally, we will address possible

improvement of the course content and associated laboratories.

II. Course Prerequisite Requirements

In this section, we will explain the course pre-requisites, which can be divided into three

categories, as described below.

A. Digital Signal Processing Course Requirement

Page 23.1150.3

Page 4: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

The first signal processing course covering the key topics of analog signal processing, such as

common analog functions, Laplace transform, Fourier series, Fourier transform, and different

types of analog active filter design. Students in the DSP course apply these established skills for

designing, implementing, and verifying various applications such as the digital crossover audio

systems, speech signal processing, and so on. Specifically, the skills of the digital FIR filter

design and signal spectral analysis are necessary for low-pass and band-pass filter designs and

verifications in the area of speech processing. Furthermore, a grasp of concepts and principles of

the first signal processing course indicates the gained knowledge of the analog signal processing

(ASP) course, in which three major topics, the Laplace transform, Fourier analysis, and analog

filters, are covered. For example, the Laplace transform and Laplace transfer function serve for

the analog filter design and digital IIR filter design, while the Fourier analysis supports for

spectral analysis and digital FIR filter design with window functions. Hence, the prerequisite of

the first signal processing course implies the ASP course.

B. Math Requirement

While satisfying the prerequisite of the signal processing course, students are gaining maturity in

the comprehension and application of math including basic calculus, and proficiency in using

algebra. A firm grasp of calculus concepts is also beneficial in understanding the advanced

course materials such as the employment of the derivative operation or difference equations.

Since the calculus course is a prerequisite for the first DSP course or the combined ASP and DSP

course, it is not necessary that we list it as an additional prerequisite.

C. Software Requirement

To design, analyze, and simulate the DSP algorithms, MATLAB programming is required; this

requirement was enforced in the previous signal processing course. In addition, MultiSIM will be

used to verify different filter design.

As a summary, the DSP course needs the prerequisites as listed below:

1. Analog signal processing

2. MATLAB programming and MultiSIM simulation.

III. Course Content and the Associated Real-Time Project

We have divided the course content into two portions. First, the DSP fundamentals were covered,

such as the sampling theorem, the z-transform and z-transfer functions, the discrete Fourier

Transform, FFT algorithm, signal spectrum analysis, filter frequency responses, and filter

implementations using the direct-form I and direct-form II, and so on. The second portion

introduced FIR design and IIR design with an emphasis on real-time digital filter implementation

and applications. We focus on the real-time DSP speech project in this paper.

The course was taught in 16 weeks with 3 lecture hours and 3 laboratory hours per week. The

textbook selected was “Digital Signal Processing: Fundamentals and Applications.” published by

Elsevier, 2007 1. The textbook presents course materials at an appropriate math level, uses an

ample amount of simplified and clearly worked examples, adopts MATLAB programs to

Page 23.1150.4

Page 5: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

demonstrate simulations, and provides application examples to motivate students. Simplification

of real-time DSP implementations to the engineering technology level is a plus.

To minimize the time for learning different simulation tools, we simply selected MATLAB,

which was familiarized by students when they took the first signal processing course as a major

simulation and design tool. However, other simulation tools were also welcomed when time was

permitted.

The PCI-1200 DAQ board and LabView were chosen as a platform for teaching real-time signal

processing. Students had gained their working knowledge after completing their project. We

requested the students to design an FIR low-pass filter and an IIR band-pass filter using

MATLAB and then applied the results to LabView programs to process his/her own audio signal

sampled from a microphone. Meanwhile, the original speech spectrum and the processed speech

spectrum were obtained and displayed by LabView for comparison.

Real-Time Digital System Implementations

A. We first introduce a tutorial to verify the data acquisition in the system to establish the

students’ working knowledge.

Figure 1 Real-time DSP Laboratory Setup.

The laboratory setup is shown in Figure 1 so that the students can verify the sampling and

recovering process, and gain control of the analog-to-digital conversion (ADC) input and digital-

to-analog conversion (DAC) output via DAQ card.

B. Design and construct a signal conditioning circuit (an audio amplifier using LM386 with the

gain of 200) and put it into the audio system using a microphone as the input, as shown in Figure

2.

Page 23.1150.5

Page 6: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

Figure 2 Test of Audio Amplifier.

C. Design and construct a second-order lowpass Sallen and Key Filter with a cut-off frequency

of 3,200 Hz and connect it into the audio system, as shown in Figure 3.

Figure 3 Test of the Low-pass Filter.

D. FIR filter design and implementation

First, design a lowpass FIR filter using the Hamming window design method by MATLAB.

Then apply the filter coefficients from MATLAB for a digital filter created in LabView. The

filter has 15 taps, a cut-off frequency of 800 Hz, and a sampling rate of 8,000 Hz. This lowpass

FIR filter can effectively remove the high-frequency background noise.

Page 23.1150.6

Page 7: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

Figure 4a Frequency Responses of the Lowpass FIR Filter by MATLAB.

Page 23.1150.7

Page 8: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

Figure 4b. Lowpass Filter Implementation by LabView.

E. IIR filter design and implementation

First, create a band pass IIR filter using the bilinear-transform method. This is a second order

Butterworth filter that passes frequencies between 1,200 Hz and 1,600 Hz. A sampling rate of

8,000 Hz is used.

Then apply the filter coefficients from MATLAB for a digital filter created in LabView.

Page 23.1150.8

Page 9: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

Figure 5a. Frequency Responses of the Band-pass Filter by MATLAB.

Figure 5b. Band-pass Filter Implementation by LabView.

F. The complete system

Finally, a complete audio system shown in Figure 6 is established and the snapshot of its

hardware realization is shown in Figure 7.

Page 23.1150.9

Page 10: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

Figure 6. The Overall Speech Processing System.

To determine the functionality of the project, allow the speech input from a microphone and

output to a speaker. Then test the program by inputting signals at various frequencies. Next, try

speech through each filter: the low-pass filter cut off the high-end frequencies, making voices

sound muffled; while the band-pass filter made speech samples sound watered down by only

passing a small range of frequencies.

Page 23.1150.10

Page 11: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

Figure 7. Snapshot of the Hardware Realization.

In summary, students were asked used the MATLAB tool to perform filter design, digital

filtering, and spectral analysis of the input and output signals to examine the filtering effects.

Students can also compare the calculated spectrum of the original speech to that of the filtered

speech. Meanwhile, the students examined the filtered speech by listening to the processed sound

and comparing it to his/her original voice.

IV. Course Outcome and Assessment

Upon the completion of the course, a survey was conducted to ask each student to evaluate his or

her achievement. Table 1 indicates survey results collected from the previous three semesters for

a total number of 40 students. Note that the rating scale in Table 1 was based on the percentage

of the overall students.

Table I. Student Survey for Achievements.

Rating Scale Level of

understanding

Excitements Textbook

4 - excellent 80% 85% 90%

3 - good 15% 15% 10%

2 - fair 5% 0% 0%

1 -unsatisfactory 0% 0% 0%

Most of the students remained excited about the course, since the hands-on real-time laboratories

had motivated them. The textbook also helped a great deal to develop concepts using the worked

numerical examples and MATLAB simulation examples. Table 2 summarized the DSP project

evaluation.

Page 23.1150.11

Page 12: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

Table II. Evaluations of DSP Project.

Rating Scale Project

Performance

4 - excellent 75%

3 - good 25%

2 - fair 0.0%

1 - unsatisfactory 0.0%

As shown in Table 2, 75% of students gave an “excellent” rating during the evaluation while the

remaining percentage obtained a “good” rating. The evaluation data shows promising results in

which students continue to apply their gained DSP knowledge to their career development. It is

very encouraging to teach the advanced DSP course in the engineering technology program.

After learning DSP courses, the technology students were able to apply their newly gained

knowledge and skills to their senior projects and our real-time DSP labs served as good

preparation and practice for senior projects. In our campus, senior students are required to

present and demonstrate their senior projects in the senior project fair, in which those projects

were evaluated by the engineering technology faculty members and other senior students.

V. Future Improvement

Based on our experiences from teaching DSP courses, we felt that in Portion 1, all the

lectures containing well-established topics including the digital spectrum, the FIR and IIR filter

implementations and developed laboratories are suitable. Even though the topics of DFT, FFT,

bilinear transform method and optimum design seemed challenging to our technology students

due to the demand of their math proficiency to understand certain subjects, we still have

successfully delivered the course materials with an emphasis on principles and hands-on

applications instead of theoretical development. On the other side, based on the DSP industrial

trend, we could improve the course by introducing additional topics such as adaptive filtering,

subband coding and wavelet coding (as well as its applications). To improve our lab, we should

make use of the lab equipment fund to adopt more advanced DSP platforms with multi-channel

ADCs and DACs, so that many practical real-time DSP laboratory projects can be developed.

VI. Conclusions

It has been a continuous demand in the industry for engineering technology students to

possess a working knowledge of the advanced and real-time DSP techniques. The traditional

treatment of teaching those subjects using the profound mathematics is not appropriate. However,

with the mathematical simplification equipped with numerical examples, MATLAB simulations,

and real-time laboratories, the technology students are able to grasp concepts effectively and

apply their gained DSP knowledge to their careers and future technical practice.

Page 23.1150.12

Page 13: TeachingSpeechandAudioProcessingImplementationsUsingLabVie ......... Digital Signal Processing: Fundamentals and Applications , ... Prof. Li Tan, Purdue University ... Digital Signal

VII. Bibliography

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

Press, 2008.

2. L. Tan and J. Jiang, A Simple DSP Laboratory Project for Teaching Real-Time Signal Sampling Rate

Conversions, the Interface Technology Journal, Vol. 9, No. 1, Fall 2008.

3. W. Gan, S. Kuo, “Teaching DSP Software Development: From Design to Fixed-Point implementations,” IEEE

Trans. on Education, vol. 49, issue, 1, pp. 122-131, February 2006.

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

Technology Programs,” ASEE Annual Conference, June 2009.

5. Ifeachor, Emmanuel and Jervis, Barrie. Digital Signal Processing, A Practical Approach, Prentice-Hall

Publishing, 2002.

6. de Vegte, Joyce Van. Fundamentals of Digital Signal Processing, Prentice-Hall Publishing, 2002.

7. J. Essick, LabVIEW for Scientists and Engineers, Oxford University Press, 2009.

Page 23.1150.13