Asee peer logo

Real-time Real-life Oriented DSP Lab Modules

Download Paper |


2015 ASEE Annual Conference & Exposition


Seattle, Washington

Publication Date

June 14, 2015

Start Date

June 14, 2015

End Date

June 17, 2015





Conference Session

Software Applications in ET Programs

Tagged Division

Engineering Technology

Page Count


Page Numbers

26.1307.1 - 26.1307.17



Permanent URL

Download Count


Request a correction

Paper Authors


Isaiah I. Ryan Western Washington University

visit author page

Isaiah I. Ryan is currently a senior student in the Electronics Engineering Technology program at Western Washington University. His work focuses mainly on embedded system design, but he studies other topics as well such as digital signal processing. Isaiah enjoys applying theory from class and working together with his classmates to develop understanding of new material. Ultimately, he hopes to use his knowledge for the benefit of others.

visit author page


Aaron Cramer Western Washington University

visit author page

Aaron Cramer holds the position of Instruction and Classroom Support Technician for Western Washington University’s Electronics Engineering Technology/Electrical Engineering program. He earned his BS degree in Electronics Engineering Technology from Western in 2009. His prior industry experience includes Applications Engineer for Cypress Semiconductor and Production Technician for Bruker Elemental.

visit author page


Ying Lin Western Washington University

visit author page

Ying Lin has been with the faculty of Engineering and Design Department at Western Washington University since September 2010 after she taught for two years at SUNY, New Platz. She received her MS in Applied Statistics and Ph.D. in Electrical Engineering from Syracuse University, NY, respectively. Her teaching interests include first-year Intro to Electrical Engineering, and upper-division communication systems and digital Signal Processing courses. Her research areas focus on statistical signal processing for wireless sensor network applications and secure communications in wireless networks.

visit author page

Download Paper |


Real-time Real-life Oriented DSP Lab ModulesAbstract:In this paper, we present a sequence of engaging lab exercises that implement real-time real-life signal/dataacquisition, analysis, and processing using MatLab, LabView, and NI myDAQ. Examples of these signalsinclude real-time human voice and music signals. These lab modules are designed to enhance the existinglab components in the digital signal processing curriculum in an Electronic Engineering Technology (EET)program. The lab topics cover fundamentals of digital signal processing (DSP) such as real-time dataacquisition, sampling, time-domain and frequency-domain analysis, and digital filtering. Noise analysis andremoval examples have been also introduced in the lab modules. Moreover, advanced DSP techniques suchas speech recognition has been incorporated in the labs to implement a voice-controlled DSP application aswell.Besides serving the EET curriculum, the labs developed in this work can be used as effective outreach tools.For instance, we have adopted these labs as demos to groups of 5th graders of an annual Compass to Campusprogram in our institution to promote engineering and technology to young minds. We believe that thesenewly developed engaging lab demos will help to further attract and spark young students’ interests inengineering and technology. I. IntroductionDigital signal processing (DSP), an important field in Electrical engineering, embraces a broadspectrum of applications, ranging from speech encoding, synthesis, and recognition, imageprocessing, wireless communication systems, radar and sonar systems, control systems, to name afew. Most modern electronic gadgets use some DSP techniques. For instance, the “SURI” functionin iphone 4 uses DSP-based speech recognition algorithms. High quality headphones employsDSP-based noise cancelation techniques as well.DSP has become an integral part of Electronic Engineering Technology (EET) and ElectricalEngineering curricula at higher institutions worldwide. To fulfill a successful DSP curriculum, itis critical to complement lectures with well-designed hands-on laboratory exercises. It has beenwidely acknowledged that hands-on experiences improve teaching and learning efficiency andreinforce students’ comprehension of abstract topics [Feisel and Rosa 2005].Motivations and Objectives:Our existing MatLab-based DSP lab exercises, similar to many other DSP curriculum in otherinstitutions [Sanjit Mitra], uses non-real-time signals that are either pre-recorded or generated inMatLab. Recently, there has been an increasing need of introducing real-time data acquisition andmeasurements and processing into the curriculum. According to a recent senior student survey,interest in this area of study has greatly increased. Members of the EET program Industry AdvisoryBoard from local industry have suggested this area to be considered in our curriculum as well.To meet such need, in this work, our goal is to develop a series of fun and engaging hands-on DSPlaboratory exercises that embrace real-time real-life signal processing. The signals adopted in thenewly developed labs are real-time and real-life signals, such as human voice or music signalsinput from a microphone.We strive to relate the DSP theories to real-life examples and make better connections betweentheory and practice. Specifically, these laboratory exercises facilitate students to achieve thefollowing outcomes, but not limited to:  Enhancing students’ understanding of DSP fundamentals;  Connecting theories learned in class to practice;  Accumulating hands-on skills in practicing and implementing commonly used DSP algorithms and techniques;  Getting familiar with popular software and hardware tools adopted in the DSP field.The key topics covered in these labs include DSP fundamentals such as period sampling, time-domain analysis, frequency domain (spectrum) analysis, digital filtering, and noise analysis andremoval. Moreover, some advanced DSP techniques such as speech recognition are alsoincorporated into the lab exercises. Details of these topics will be presented in later sections.Tools Adopted:A number of software and hardware tools have been selected in developing these hands-on labs.The software tools include MatLab and LabView, respectively. We also incorporate MatLab withLabView to accomplish some lab exercise tasks.MatLab, a powerful computing and simulation tool, has been widely used in DSP labs and projects(e.g., [Sanjit Mitra] and [James McClellan]). It serves well as a simulation tool for DSP algorithms.In this project, we have used MatLab for multiple tasks:  To design filters and simulate the filter response.  To realize math script within a LabView VI program.On the other hand, LabView, a popular platform used in industry for real-time measurement andtesting applications, is a suitable tool to accomplish real-time signal acquisition, analysis, andprocessing tasks. Due to these features, we have adopted LabView as the major software platformin developing these lab exercises. Other benefits of using LabView include that students getexposed to such a useful tool and have opportunities to build up their experience and skills whichprepare them for their future career in this area.In addition, the major hardware components used in these lab modules are data acquisition unitssuch as NI myDAQ and a microphone. II: Summary of Developed Laboratory ModulesIn this work, we have developed two main LabView-based lab modules and each consists of anumber of tasks or a sequence of lab exercises. We have also used a NI myDAQ for real-timedata acquisition and digital output control.The key topics covered in these lab modules are summarized in Table 1.Table 1: Summary of Lab Module Topics Lab Module Topics (Tools used) Real-time input signal generation (LabView/NI DAQ/function generator) Signal time-domain analysis (LabView) Lab Module #1 Signal frequency-domain analysis (LabView) Noise analysis and removal through digital filtering (LabView) Digital filter design and simulation (MatLab) Sound recording and replay (LabView) Various sound effect such as echo (MatLab and LabView) Speech recognition (Microsoft windows API, LabView, and a microphone) Lab Module #2 Voiced-controlled fan system (LabView, NI DAQ, a microphone, a MOSFET, and a mini-fan)In the following sections, we present detailed lab objectives, tasks, and lab results. III: Lab Module #1This module focuses on fundamental topics in DSP.Lab objectives and pedagogical goals:This lab module aims to provide students hands-on opportunities to: o Practicing time-domain and frequency-domain analysis of a real-time signal; o Conducting frequency spectrum analysis; o Acquaint with noise analysis; o Designing and applying digital filters to remove noise component; o Implementing common audio processing techniques such as generating echo effects.It consists of several lab exercises, as presented below.1: Time-domain analysis and frequency-domain analysis of a single tone signalLab Tasks: o Input a real-time sine signal into LabView. This input can be either a sine signal generated from a physical function generator that connects to LabView through a DAQ or a sine signal created by the corresponding LabView palette. o Provide the time-domain plot and frequency spectrum plot, respectively. Analyze the time- domain and the frequency spectrum.Lab results:Figure 1 shows the snapshots of the two plots for a sine signal with frequency of 1k. As clearlydemonstrated from the spectrum graph, the signal indeed is a 1k Hz sine signal given that it hasone peak at 1000 Hz.Figure 1: snapshot of the time-domain plot and frequency spectrum plot for A1.The corresponding LabView GUI snapshot is provided in Figure 2.Figure 2: snapshot of the LabView GUI block diagram for A1 with the selected input method as“function generator from a LabView palette”.2: Time-domain analysis and frequency-domain analysis of human voice/musicLab Tasks: o The input can be either human voice or a piece of music taken from a microphone that connects to the PC running LabView. o Provide the time-domain plot and frequency spectrum plot, respectively. Analyze what major frequency components are included in the input signal.Lab results:Figure 3 shows the snapshots of the two plots for a clip of human voice. As predicted, it isdifficult to tell the frequency information from the time-domain plot, however, from thefrequency spectrum plot, it is clear that human voice typically consists of lower frequencycomponents. This is consistent with theory.Specifically, for this particular user, the major components are below or around 500 Hz.Figure 3: snapshot of the time-domain plot and frequency-spectrum plot of human voice.Figure 4 shows the LabView GUI block diagram with the selected input method as“Microphone”.3: Noise analysis and removal through digital filteringLab Tasks: o Create the desired (wanted) signal. It can be from any of aforementioned input sources such as either human voice or a piece of music taken from a microphone or a sine tone from a function generator. o Create the noise signal which is a single tone signal. It can be generated from a physical function generator or from a LabView palette. o Mix the desired signal with the noise signal. o Plot the time-domain plot and frequency-spectrum plot, respectively. o Analyze the frequency components of the mixed signal and design a digital filter to remove the noise. o Display the filter frequency response. o Apply the filter and provide the recovered signal time-domain plot and frequency spectrum plot. o Analyze the quality of the recovered signal after filtering.Lab results:Figure 5 shows the snapshots of the time-domain and frequency spectrum plot for the mixturesignal of human voice and the noise signal of a 1k Hz.As predicted, from the time-domain analysis, it is difficult to tell the frequency information anddifferentiate between the desired signal and the noise signal in the time-domain plot, however,useful information may be obtained through conducting the frequency-domain analysis.In this particular example, it appears that the 1k hz noise is dominant with a large peak on thespectrum plot. Again the human voice occupies mostly the lower frequency range (blow 500Hz). Such difference provides a good mechanism for possible noise removal. Figure 5: time-domain plot and frequency-spectrum of the mixture of human voice and a 1k Hz single tone noise signal.To remove the noise signal, a notch filter centered at 1k Hz can be applied to the mixture signal.In this project, we have used MatLab to design and simulate the digital filter. The correspondingfrequency response is shown in Figure 6.Figure 6: the frequency response of a notched filter with notched frequency of 1k Hz.The recovered signal after the notched filter is applied is shown in Figure 7. Clearly, the 1k Hznoise signal has been successfully removed as shown from the spectrum plot in Figure 7. Thesound quality is comparable to the original sound signal and is thus acceptable as well.Figure 7: snapshot of the time-domain plot and frequency spectrum of the recovered signal afterfiltering.Figure 8 shows the snapshot of the complete LabView GUI block diagram for the noise and filteroperations described above.Figure 8: snapshot of the LabView GUI block diagram for noise removal4: Audio signal processing in LabViewLab Tasks: o Create a sound recorder function. The input can be any of the input methods. Save the recorded sound to a file. o Implement the sound replay function. o Create an echo effect. The input signal can be from any of the three input methods. o Create a higher pitch doubling effect.Lab results:Figure 8 also shows the snapshots of these two functions realized in LabView.The echo effect has been created according the block diagram depicted in Figure 9.Figure 9: block diagram of an echo systemThe complete LabView vi program structure for lab module #1 is shown in Figure 10.Figure 10: complete LabView vi program structure for lab module #1. III. Lab Module #2This module focuses on practical DSP applications. Specifically, it implements a voice-controlledfan system which uses speech recognition and LabView digital output control through a NI DAQunit. Software tools include LabView and Microsoft windows functions. Major hardwarecomponents adopted are NI DAQ, a mini-fan, a microphone, a MOSFET, and a breadboard.Lab objectives and pedagogical goals:This lab module aims to provide students hands-on opportunities to: o Practicing common DSP techniques such as speech recognition algorithms in real-time applications; o Implementing a DSP-driven fan control system through voice commands; o Getting familiar with using NI DAQ and LabView for real-time system control.This lab module consists of several lab exercises, as described below.1: Speech recognition algorithm in LabViewLab Tasks: o Implement a speech recognition algorithm in LabView. This algorithm is taken from a Microsoft windows API function and is linked into LabView. o Test the speech algorithm.Lab results:Figure 11 shows the LabView vi program structure for speech recognition.Figure 11: LabView vi program structure for speech recognition.2: Voice-controlled fan systemLab Tasks: o Use voice commands to drive a digital output to the NI DAQ to operate or to stop a fan.Lab results:When a user speaks “fan”, the fan will start to operate; it will stop working when a user speaks“stop”. Testing results from a group of students who took the “digital communications” course inspring 2014 have indicated that the correct recognition rate is high and the system works asdesigned.The actual LabView vi program structure for the voice-controlled fan system is depicted in Figure11. Figure 12 demonstrates the physical system component connections.Figure 12: a photo of component connections for the voice-controlled fan system. IV. Assessment ResultsThis section provides assessment results to demonstrate the effectiveness of these lab modules.The assessment data include lab results, students’ survey, and feedback from the 2014 “compassto campus” outreach program participants in our institution.As presented in preceding sections (Section III and Section IV), the corresponding lab results areconsistent with the theory and effectively demonstrate the DSP principles in various topics.Some student survey results will be available upon the completion of a Digital Signal Processingcourse by the end of fall 2014.In addition, feedback and comments from participants (5th graders) of a forthcoming outreachevent (“compass to campus” on October 21st, 2014) will be provided in the final submission of thismanuscript. VI: ConclusionIn this work, we have successfully developed a number of hands-on laboratory exercises for digitalsignal processing curriculum using LabView, Matlab, Windows API function, and data acquisitionunits. These labs offer students opportunities to practice DSP fundamentals with real-time real-lifeDSP applications in speech/audio/music. The resulting labs are practically fun and educationallyengaging.In addition to the academic impact, the labs developed in this work will also benefit an outreacheffort to inspire interests from younger students (e.g., 5th graders who participate in the annualcompass to campus program in our institution) in Engineering and STEM education. These labswill also serve as demos to showcase Engineering and Technology to prospective students, visitors,and guests.Moreover, the lab modules, the software, and hardware employed to complete this project can beadapted to future laboratory and project developments in other areas such as Instrumentation,Digital Communications, and Digital Control Systems curricula.References:[Feisel and Rosa 2005]: Feisel, L. D., and Rosa, A. J., “The Role of the Laboratory inUndergraduate Engineering Education.” Journal of Engineering Education 94(1): 121-130, 2005.[Sanjit Mitra]: Sanjit Mitra, “Digital Signal Processing, a Computer-Based Approach”, ISBN:0072865466.[James McClellan]: James McClellan and et al, “DSP First: A Multimedia Approach”, 1stedition, ISBN: 0132431718.

Ryan, I. I., & Cramer, A., & Lin, Y. (2015, June), Real-time Real-life Oriented DSP Lab Modules Paper presented at 2015 ASEE Annual Conference & Exposition, Seattle, Washington. 10.18260/p.24644

ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2015 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015