Vous êtes sur la page 1sur 9

Teaching Digital Signal Processing with MATLAB,Simulink and DSP Kits

A Practical, Cohesive, and Hands-On Approach

Siben Dasgupta
Associate Professor, Wentworth Institute of Technology

Abstract
This paper provides an introduction to Digital Signal Processing topics taught in the undergraduate
electronics /computer engineering programs at Wentworth Institute of Technology. This paper describes
how Wentworth Institute of Technology provides “hands on” experience with real signals by using a
“laboratory” based on MATLAB and SIMULINK running on PC’s. In addition, an innovative approach is
provided in this paper for integrating DSP course in to the graduate program at Heritage Engineering
College in Calcutta, India. The author introduced this approach during his sabbatical at Heritage
Engineering College by providing the opportunity to conduct hands on experiments with real signals and
hardware, using Texas Instruments (TI) C6713 evaluation boards, MATLAB and SIMULINK. DSP is
traditionally a highly mathematical subject, and the standard DSP textbooks contain a lot of mathematical
exposition. This is necessary for a profound understanding of the subject. The author believes that the
principles of DSP can best be learned through interaction in a laboratory setting, where students can
appreciate the concepts of DSP through real-time implementation of experiments and projects.

Introduction
In the past, Digital Signal Processing courses were taught mostly at the graduate level, and it was rare to
find them in undergraduate engineering and engineering technology curricula. However, in the past decade,
the elements of DSP design have been integrated into many under graduate engineering and engineering
technology programs. To obtain specific information about DSP courses taught in undergraduate
electronics/computer engineering technology programs in the US, the questionnaire was developed and
telephone survey was done to most of the members of the Engineering Technology Division of the
American Society for Engineering Education. Survey responses indicate only four year electrical /
electronics engineering technology programs offer DSP courses taught at their institution focus on DSP.
About half of the Institutions do not have any hardware lab for the course. Similar survey was done by the
author last fall during the sabbatical at Heritage Institute of Technology at Calcutta. Survey results indicate
that majority of the institutions do not have any hardware lab. One aspect is common for both in USA and
India is that the DSP courses are usually perceived by the students as too theoretical and mathematically
intensive. Many institutions indicated that much work is needed to setup good labs to motivate the students
to make DSP more tangible. In this paper the author describes a comprehensive-based DSP laboratory
course with the help of MATLAB, SIMULINK, and the Texas Instruments DSP kits with TI 6713
evaluation board. This paper describes how Wentworth Institute of Technology provides “hands on”
experience with real signals by using a “laboratory” based on MATLAB and SIMULINK running on PC’s.
In addition, an innovative approach is provided in this paper for integrating DSP course in to the graduate
program at Heritage Engineering College in Calcutta, India.

Digital Signal Processing at Wentworth Institute of Technology – Course Outline


The DSP course at Wentworth Institute of Technology is developed with an objective to help the students
to learn DSP’s and carry out a project in stages, through gradual steps, in subjects related with signal
processing which can be found in industry, such as digital filters, echo cancellation, audio equalizers,
modems, voice processing algorithms etc. DSP lecture series is organized to move from simple continuous
– time sinusoidal signals, to discrete time signals and systems, then back to continuous time, and finally,
the discrete and continuous are mixed together in filter design. We started the lecture series with a detailed
discussion of continuous time sinusoidal signals and their representation by complex exponentials. Second
series of lecture consists of introduction of Fourier series. In this section students are introduced to
spectrum analysis of mixed sinusoidal signals, AM signals, beat notes, and chirp signals. In the third series
of lecture, we introduced the concepts of sampling of sinusoidal signals along with sampling theorem. Up
to this point we have focused our attention on signals and their mathematical representations. In the next
series of lecture, we begin to emphasis basic filters. We have introduced FIR (finite impulse response)
systems or, as we will often refer to them as FIR filters. The key concept of frequency response along with
convolution is introduced in the next series of lecture and this concept is applied to FIR filters. We have
shown that the frequency response and impulse response are uniquely related. In the next lecture series we
introduced Z transforms, which brings polynomials and rational functions in to the analysis of linear time
discrete systems. The Z transforms methods introduced in this lecture series is for FIR filters and finite
length sequence in general. Next we have introduced new class of LTI systems called IIR filters. The Z
transforms of IIR filters along with frequency response are also introduced in this lecture series. At this
point, we returned to continuous time signals and systems and discussed the design of different types of
analog and digital filters. Also, we have shown how to use the transfer function of the DSP system equation
to determine its stability and other filter characteristics. One lecture series was devoted on Discrete Fourier
Series, Discrete Fourier Transform, linear convolution from circular convolution, Fast Fourier Transform,
effect of windowing on FFT. Last series of lecture covered several practical filter design considerations,
such as choosing an IIR or FIR filter and the effects on the system output of the number of ADC and DAC
bits use. We spent some time in the applications of digital signal processing such as: Speech Processing,
Speech analysis, speech coding, noise cancellation etc. MATLAB demonstrations with real life signals
were extensively used during the lecture which is unique to Wentworth for undergraduate program.

Advanced Digital Signal Processing – Graduate level course at Heritage Institute of


Technology at Calcutta, India.
Heritage Institute of Technology invited the author for one semester to establish their DSP program for the
Master’s Level. Like many schools in USA and India, Heritage did not have any hardware labs for DSP. In
addition, the experiments they used to use for DSP for undergraduate degree was not up to the US
standards because of the availability of MATLAB. During my sabbatical at Heritage, I established
hardware and software lab and the course structure for their B.Tech and M.Tech program. My own research
work over the past decade in applied DSP has inspired me to develop the master’s level coursework by
identifying practical issues for discussion and presentation to bridge the gap between theoretical concepts
and practical implementation, and by suggesting application examples, case studies, and problems. During
the first two weeks of M.Tech, I gave an overview of DSP with the subject matters I taught in the
undergraduate level at WIT. Later on I put lot of emphasis in the field of adaptive filtering which is an
important part of statistical Signal processing. Adaptive filters have found use in many and diverse fields
such as communications, control, radar, and sonar, and seismology, etc. I started with random variables and
stochastic processes. Then I discussed Wiener filters, Least mean square algorithm, least squares and
recursive least squares signal processing. Second series of lecture consists of multirate processing
techniques which allow data to be processed at more than one sampling rate and have made possible such
novel applications as single bit ADCs and DACs, oversampled digital filtering, which are exploited in a
number of modern digital systems, including for example familiar compact disc player. The materials in
this series have been extended to include polyphase DSP. More design examples and applications have
been integrated into the theory to illustrate both the principles and design issues in practical multirate
systems. Next series of lecture consists of spectrum estimation and analysis which are used to describe and
study signals in the frequency domain. An application of auto regressive spectrum estimation of evoked
response signals in electroencephalogram signals is used to illustrate this method.
In the last decade, tremendous progress has been made in DSP hardware, and this has led to the wide
availability of low cost digital signal processors. For successful application of DSP using these processors,
it is necessary to teach the DSP hardware and software architectures. In particular, I have discussed new
DSP architectures such as very long instruction word and super scalar, and new fixed and floating point
DSP processors (including Texas Instruments fixed point processors, Motorola fixed point processors, and
Analog devices Tiger SHARC). In the next lecture series, I discussed detailed analysis of finite word
length effects in modern fixed point DSP systems. In the last lecture series I discussed power spectral
estimation, estimation of spectra from finite duration observations of a signal, the periodogram, use of
DFT in power spectral estimation, non periodic methods of power spectral estimation, Bartlett, Welch and
Blackman, Turkey methods, comparison of performance of non periodic power spectral estimation
methods.
Laboratory Structure for the Under Graduate Class at Wentworth
From the beginning of designing the DSP course, we believed that ‘hands on’ experience with real signals
was crucial. This is provided by a ‘laboratory’ based on MATLAB running on PCs. In the laboratory
assignments, students gain direct reinforcement from hearing and seeing the effects of filtering operations
that they have implemented on sound and music signals. They synthesize music from sinusoids, and they
see that those same sinusoids are the basis for the data modems that they routinely used in the internet. We
also developed animation programs by Agilent VEE to demonstrate FIR and IIR filters. The most
challenging task the author faced is to coordinate a laboratory with the lecture to motivate the students.
Students need to have enough knowledge to begin and complete laboratory assignments but also need to
have lab assignments not lag so far behind the class topics. All my labs have three sections: Pre Lab, Lab,
and Post Lab. The purpose of the pre lab is to provide the students with some information to verify the
theory and the algorithms discussed in the lecture part of the course so that students can prepare for the lab
beforehand. The purpose of the Lab is to perform the laboratory experiments so that they can verify the
theory with the experiments. In the Post Lab, I generally provide the students with real life design questions
for specific practical experiments. My laboratory experiments ask the students to maintain a notebook
containing the results of the experiments and their interpretation.
In setting up the laboratory projects we used MATLAB, MATLAB Toolboxes, and SIMULINK.
MATLAB is an excellent tool for DSP education, enabling and easier transition for the student from theory
to practice. Although, now a days, all DSP courses use MATLAB exercises for illustrating the theory, we
think that hands on experiments using real signals are crucial for the basic understanding of material. A
typical hardware setup for the DSP lab is shown in Figure#1. In addition to MATLAB, we used
SIMULINK because SIMULINK with code composer studio (CCS) by Texas Instruments enables the
creation of sophisticated algorithms in an intuitive top level design. Simultaneously this approach, which is
used for the graduate level labs, gives the students the opportunity to apply real life signals in to the
hardware. We introduced SIMULINK in undergraduate labs so that students can easily integrate hardware
with SIMULINK real time workshop in their postgraduate research.
We managed to complete the following MATLAB ,SIMULINK and hardware based laboratories in a
thirteen week schedule. Most of the labs primarily focused on processing the audio signals, which are
familiar to students and allow them to develop an intuitive feel for their results. Following is a list of
exercises we developed for our undergraduate labs. Appendix A shows a sample of experiments providing
a detailed description of one typical experiment. The laboratory exercises have been tested at Wentworth
for about five years and have been well received by several students who have taken this course. I
introduced these labs at Heritage Institute of Technology to the undergraduate students while I was in
sabbatical last year. Most of the students at Heritage along with the Professors of DSP appreciated my
laboratories because the experiments deal with the real life problems.

1. Harmonic Content exploration:


Students must know how to use oscilloscope for frequency analysis of real life signals.
This experiment is written for HP 54600 series Digital Oscilloscope with FFT plug-in.

2. Signals in MATLAB
• Discrete Signals, Sampling Signals, Aliasing, Signal Visualization, Sound effect of
Signals, Signal Processing Tool (SPTool); Importing a Signal, Periodic and Non periodic
Signals, Modeling Noise, adding Noise to a Signal, Resampling

3. Spectral Analysis
• Statistical Signal Processing, Discrete Fourier Transform, Fast Fourier Transform,
Spectral Analysis with FFT, Power Spectral Density estimation,

• Discrete Fourier Transform, Fast Fourier Transform, Spectral Analysis with FFT, Time
varying spectra, Spectogram of Chirp Signal, Wavelets
4. Linear Time Independent System (LTI)
• LTI System Representation, The Z transform, Generate pole and zero plot using the filter
coefficients, Transfer Fuction of LTI system, The Z transform, Generate pole and zero
plot using the filter coefficients, Transfer Fuction of LTI system, Introduction to
Filtering, Filter Vissualization Tool (FDA Tool), Impoert a Filter into SPTOOL

5. IIR Filter Design


• IIR Filter Types: Butterworth, Chebyshev (Type1 and Type 2), Epiliptic, Bessel, Filter
Design and analysis with SPTOOL and FDA Tool

6. FIR Filter Design


• FIR design methods, FIR Filter Types, windowing, Standard Band filters, Multiband FIR
Design, Raised Cosine Filters, Frequency Domain Filtering

7. Digital Filter Implementation


• Simulation of FIR Filters, Simulation of IIR filters, DFT computation

8. Analysis of Finite Word- Length Effects


• Generation and Quantization of Binary Numbers, Low Sensitivity Digital Filters, Limit
Cycles

Laboratory Structure for the Graduate Class at Heritage Institute of Technology


Most of DSP laboratory experiments in USA for the undergraduate level use MATLAB illustrating the
theory. I think hands on experience using real time hardware and utilization of SIMULINK is crucial for
the postgraduate and postgraduate research for DSP. Since undergraduate program at Heritage did not have
any DSP labs, I introduced Wentworth lab experiments in to the under graduate program. Both students and
professors of Heritage appreciated my labs very much for the undergraduate level. For the graduate level at
Heritage, the author introduced Simulink, real time workshop and Texas Instrument C6713 with code
composer studio (CCS).The reason that the author has chosen this approach, is the use of SIMULINK
which enables the creation of sophisticated algorithm in an intuitive model based design. Also, this gives
the students the opportunity to conduct hands on experiments with TI 6713 with CCS and real time
workshop with minimum C programming. The author puts lot of emphasis on statistical signal processing
with adaptive filters. At the end of the semester, students completed one real life DSP project with utilized
MATLAB, Simulink and /or TI 6713. Following is a list of experiments and equipment used for DSP post
graduate labs.

1. Simulink for Signal Processing


• Introduction to Simulink, Signal Analysis, Analyzing ECG Signal, Frame based system
and model based system, Convert model to frames
2. Filtering
• Filtering basics, Identifying the signal and noise, working with fixed point data type,
automating the Simulation using script file, Filter design block and FDA Tool, Filter
realization Wizard, Visualizing Output.
3. Multirate Systems
• Discrete solvers, Resampling, creating subsystems, aliasing and anti aliasing filters.
• Case study: Digital Audio Rate Converter

4. Signal Driven Systems


• Virtual versus non virtual subsystems, Block sorted order, modeling signal driven
systems, Modeling condition driven systems, Modeling event driven systems
5. Incorporating External code
• Learn how to incorporate MATLAB code into a Simulink model, Identify ways to bring
C code into a Simulink model

6. Adaptive Filtering
• Random Variables and Stchastic Processes, Wiener Filters, Newton and steepest descent
method, least mean square algorithim

7. Real Time signal Processing by TI C6713 and Code Composer studio


Digital signal processors, such as TMS320 family of processors, are used in a wide range of
applications, such as in communications, control, speech processing, and so on. These devices are
also used in the university classroom, where they provide an economical way to introduce real-
time signal processing (DSP) to the student.

• Introduction to Code Composer Studio as an integrated development environment, Creating


projects, writing and compiling programs for the C6713 DSK, Real-time FIR and IIR filtering,
Real-time FIR and IIR filtering, The fast Fourier transform (FFT), adaptive filtering, code
optimization.
• Code optimization

8. Projects for Digital Signal Processing

• Build your own Speech Recognition System, Speech Recognition in hostile


environments, Spoken Language Modeling and Understanding, Music Synthesis and
Recognition, Pitch and Format estimation of English Speech, Lossless Compression of
Text Data, speech or music.

Appendix A and B show a portion of sample exercises for undergraduate and graduate level laboratory
exercises.

Conclusions
In the past, Digital Signal (DSP) and its applications to digital filter design courses were taught mostly in
graduate level engineering programs. However, over the years, the elements of Digital Signal Processing
along with digital filter design have been integrated into numerous undergraduate engineering and
engineering technology curriculum. This paper gives an overview of DSP curriculum for undergraduate
and graduate programs. As can be seen from the paper, we believed that ‘hands on’ experience with real
signals was crucial to motivate the students. This is provided by a laboratory based on MATLAB,
Simulink, Texas Instrument DSP hardware and real time workshop. For under graduate, we used MATLAB
running on PC. For the graduate level we used Simulink, Texas Instrument DSP starter kits, real time
workshop, and code composer studio.

References
1. MATLAB for Signal Processing – Math Works Inc.
2. SIMULINKfor Signal Processing - Math Works Inc.
3. Chassing R – Laboratory Experiments Using C and TMS6713 , Digital Signal Processing , John
Wiley
4. S.K.Mitra – Digital Signal Processing – A Computer Based Approach- Mcgraw Hill
5. M.A. Yoder, J.H. McClellan and R.W.Schafer – Signal Processing First- Prentice Hall
6. Emmnuel C Ifeachor, Barry W. Jervis – Digital Signal Processing – Prentice Hall
7. V.K. Ingle and J.G. Prokais, Digital Signal Processing using MATLAB – Bookware Companion
Series
8. Texas Instruments Inc – DSP Starter Kits and Code Composer Studio.

Biography:

Siben Dasgupta is a professor of electromechanical engineering. He holds in Post Masters Degree in


Electrical Engineering from Northeastern University. In addition, he holds in Masters Degree in Operations
Research from Northeastern University. He has more than 26 years of industrial experience in power and
control systems related to nuclear power plant. His present research interests are in the field of Digital
Signal Processing, Control Systems, and Digital Communications.
Contact: Department of Electronics and Mechanical, Wentworth Institute of Technology, Boston, MA
02115. Email: dasguptas@wit.edu. Tel.: (617) 989-4119

Figure #1
APPENDIX –A
Some samples for DSP Lab for Undergraduate Program

1, Matlab for Sound


fsamp=8000; dt=1/fsamp; dur=1.0;tt=0:dt:dur;xx=sin(2*pi*2000*tt); sound(xx,fsamp)

2. Generation of Chirp Signal

f s = 8000; t = 0:1/f s :2;y = chirp (t,200,2,800);sound(y,f s )

3. Aliasing a Chirp Signal:


f 1 = 200 Hz; f 2 = 2200 Hz;T = 10 second; f s = 8000Hz ; y = chirp(t,f 1 , T,f 2 ); sound(y,f s ); where t =
1/f s
5. FIR Filters
b=[1/3,1/3,1/3]; % filter coefficients;w=0:(pi/100):pi;H=freqz(b,1,w); subplot(2,1,1);
plot(w,abs(H));grid on;subplot(2,1,2);plot(w,angle(H)); grid on

6. Creation of Music by MATLAB – Copy this to your MATLAB workspace to listen to the
music.
a=sin(2*pi*440*(0:0.000125:0.5));c=sin(2*pi*261.62*(0:0.000125:0.5));d=sin(2*pi*293.6*(0:0.0
00125:0.5));
e=sin(2*pi*329.62*(0:0.000125:0.5));f=sin(2*pi*349.22*(0:0.000125:0.5));g=sin(2*pi*391.99*(0
:0.000125:0.5));b=sin(2*pi*493.88*(0:0.000125:0.5));cc=sin(2*pi*523.25*(0:0.000125:0.5));cs=s
in(2*pi*554.37*(0:0.000125:0.5));fs=sin(2*pi*739.99*(0:0.000125:0.5));bl=sin(2*pi*246.94*(0:0
.000125:0.5));al=sin(2*pi*220*(0:0.000125:0.5));gl=sin(2*pi*195.99*(0:0.000125:0.5));dd=sin(2
*pi*587.32*(0:0.000125:0.5));ee=sin(2*pi*659.25*(0:0.000125:0.5));dc=1+sin(2*pi*0*(0:0.0001
25:0.5));fss=1/.000125;l1=[c,bl,bl,c,e,e,d,c,c,d,e,e,c,c,c];l2=[e,g,g,a,a,a,cc,cc,cc];l3=[a,g,g,e,c,c,d,c
,c,d,e,e];l4=[gl,gl,gl,al,bl,c,d,c,c,c,c,c];l5=[dc,g,g,g,e,e,e,c,c,d,d,d,c,d,e,g,e,e,c,e,g,a,a,a,cc,cc,cc,a,g
,g,e,c,c,d,c,c,d,e,e,gl,gl,gl,al,bl,c,d,c];s=2*[l1,l2,l3,l4,l5,dc,l1,l2,l3,l4];
sound(s,fss)

4. SPTOOL
Name used within SPTool
Filter coefficients Sampling frequency Import as filter
6. Spetral Analysis (FFT

APPENDIX B

Some samples for DSP Lab for Graduate Program

1. FIR Filter by Simulink

2. DSP Board
3. Basic Adaptive Filters

Vous aimerez peut-être aussi