IEEE 1999 IEEE. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works must be obtained from the IEEE.

Return to Table of Contents


Learning Signal Processing Using Interactive Notebooks

Richard Shiavi, Ph.D.

Biomedical Engineering, Vanderbilt University

Nashville, Tennessee 37235


Abstract - Signal processing is now being used in many disciplines of engineering because of the omnipresence of desktop computers and sophisticated application environments. Many concepts involved in signal processing are difficult to learn because: they are embedded in discrete mathematics and not easy to visualize; and the background in which to embed the learning is lacking. This usually leads to erroneous implementation of a technique and difficulty in finding relevance of the material. In order to address these issues and teach techniques such as frequency analysis and signal modeling, a series of interactive notebooks have been developed. These notebooks are written in the integrated environment of Microsoft Word and MATLAB. Each notebook presents a principle and demonstrates its implementation via script in MATLAB. The student is then asked to exercise other aspects of the principle interactively by making simple changes in the MATLAB script. The student then receives immediate feedback concerning what is happening and can relate theoretical concepts to real effects upon a signal. He is finally required to implement the learned procedure on a signal from a database of actual measurements. Signals measured from real-world applications are used as much as possible. Students enjoy learning in this environment because it helps them visualize immediately the results of the mathematical manipulations and enables them to explore interactively.


I. Introduction

Signal processing is now being used in many in many phases of engineering and it has become an essential component in the curricula for electrical and computer engineering [1]. The omnipresence of desktop computers and sophisticated application environments have made it possible for almost anyone to implement the techniques. In addition, the lowered cost of laptop computers is now making it feasible to use them in any classroom. The recognition of these facts have prompted NSF to support a database of information that is accessible via the WWW [2]. However, many concepts involved in signal processing are difficult to learn because they are embedded in discrete mathematics and not easy to visualize for many students. This inability to map an equation into a visual concept poses a great impediment to understanding the various techniques. A recent (1994) National Science Foundation Panel (NSF) on "Signal Processing and the National Information Infrastructure" has found that although interactive teaching and learning modalities have developed very rapidly for simple textual data, there is a great need to develop interactive teaching modalities in signal processing. Several environments have been proposed. They range from using JAVA with a web browser to developing the entire set of exercises in C++ to using MATHCAD [3,4,5]. However, none of these environments are easily changeable by the instructor [2].

A second factor in adding a degree of difficulty to learning is that the students lack a foundation in which to embed their learning – that is, time series analysis is not anything one learns serendipitously and their knowledge of "real-world" signals is sketchy at best. This reality was the motivation for the author, R. Shiavi, to write a textbook which not only presents the results of mathematical operations in as graphical manner as possible but also provides a background on a variety of real world applications and incorporates actual recorded data into examples and exercises [6]. A third factor is that the students must also learn a computing environment in which to implement the techniques. Thus there needs to be developed a learning environment whereby the students can:

visualize the results of mathematical operations and interact with them;
have the material produce an understandable background and experiential base in which they can embed the material;
learn a computing environment, in this case MATLAB, in an experiential and "just-in-time" mode.

II. Solution

In order to address these issues and teach techniques such as frequency analysis and signal modeling, a series of interactive notebooks have been developed. These notebooks are written in the integrated environment of Microsoft Word and The Mathworks MATLAB. Each notebook  reviews a conceptual principle and its relevant mathematics, such as the summation of sinusoids to produce a periodic function and the corresponding Fourier series equations. Then it demonstrates the implementation of the equations via script in MATLAB. The demonstration is embedded in an engineering application when feasible. The student is then asked to exercise other aspects of the principle interactively by making simple changes in the MATLAB script. The student receives immediate feedback concerning the implementation. This feedback provides a connectivity between the theoretical concepts and the actual effects upon a signal. He is finally required to implement the learned procedure on a signal from a data base of measurements.

A. Example

In studying the calculation of the frequency content of deterministic signals, one must use the discrete Fourier transform (DFT). The theoretical equations are derived, then applied to a few simple examples, and the results are presented. The notebook also shows the MATLAB script used to do the analysis. Shown below are the script and the result of the application of the DFT to a truncated "sinc function".

clear; close all; format compact; whitebg('w')
syms t
f0 = 0.5; %Hz
ft = 'sin(2*pi*0.5*t)/(2*pi*0.5*t)'; % SINC FUNCTION
% an indeterminate value exists at the peak of the waveform
figure (1)
subplot(1,2,1); ezplot(ft,[-5 5])
xlabel('TIME, seconds'); ylabel('AMPLITUDE');
title('SINC FUNCTION')
FT = zeros(201,1); FT(51:151) = ones(101,1);
fsp = 0.01; f = (-100:100)*fsp;
subplot(1,2,2); plot(f,FT);
xlabel('FREQUENCY,Hz'); ylabel('MAGNITUDE');
title('FOURIER TRANSFORM')
axis([-1.5 1.5 0 1.5]); grid

The student is made to observe that the resultant calculation is not what is expected and sees explicitly the error called "leakage error".

Using the script available above the student is then asked to show the effects of signal length, zero padding, and sampling interval on the DFT and its leakage error. Thus the student not only learns these effects which are hard to learn directly from the mathematics but also becomes more comfortable using MATLAB.

Next, the student is introduced to the concept of "windows" and observes that "windowing" can improve the resultant DFT. He is then asked to apply other windows and see which one seems to produce the best magnitude spectrum. Finally the student is given a signal like this vibration signal shown below with its unimproved DFT. He is then asked to apply a procedure that will produce the best possible DFT.

B. Topics And Sample Files

Notebooks have been developed to treat the following topics; polynomial modeling, frequency analysis of deterministic signals, first and second order properties of random signals, signal modeling using autoregression, and spectral analysis of random signals using the periodogram and autoregressive models. As specific examples of functioning notebooks, two accompany this article. One is entitled "freqcomp.doc" and deals with the concepts of harmonic modeling of periodic waveforms and spectra. It utilizes both the computational functions and symbolic functions of MATLAB. The other notebook is entitled "sigcor.doc" and deals with correlation as a property of random signals and the definition of correlation functions. It requires the signal file "emg2s.dat" and the function file "nacf.m". As reminders: to download a file, click on the file name with the right mouse button and choose item 'save link as'; to use these notebooks, one must have the Notebook toolbox installed, store the files in a folder within the MATLAB path, and open the *.doc files in Microsoft Word.

III. EVALUATION AND FEEDBACK

These notebooks were used in two offerings of a senior elective course in signal processing for students in electrical and biomedical engineering. Thirty students were enrolled each time. As part of the course evaluation procedure the students were given a questionnaire at the end of the semester that asked them to state the strong and weak point of the course. A partial summary of the responses follow.

Another aspect is the specific learning preference style of the student. Students styles tend to be either verbal or visual, group or solitary, inductive or deductive, etc. Refer to Felder for a description of various learning styles [7]. For the last offering of the course, another questionnaire was administered to determine if there was a relationship between learning styles and usage of the notebooks and other course materials. They were asked specifically their learning style preferences and these questions about the course.

Sixty-four percent of the student perceived themselves as deductive learners, 50% as group learners and 86% as visual learners. This is not surprising since even among engineering students there are a variety of learning styles [7]. There was no correlation among these learning preferences. The only predominant response to the questions was that 72% of the students stated that the interactive environment helped them learn the concepts better than a purely mathematical approach would. There was no correlation between this remark and any learning style. Thus the notebooks were beneficial to students with a cross-section of learning styles and are a valuable addition to the other teaching/learning modalities used for teaching signal processing.


References

[1] Special Issue on Digital Signal Processing Undergraduate Education. IEEE Trans Educ: vol. 39, number 2, 1996.

[2] G. Orsay and D. Etter, "Collaborative SP Education – Using the Internet and MATLAB," IEEE Signal Processing Magazine, pp. 23-32, November, 1995.

[3] S. Wood, "A New Approach to Interactive Tutorial Software for Engineering Education," IEEE Trans Educ, vol. 39 pp. 399-408, 1996.

[4] J. Shanner, J. Hamaker, and J. Piconne, "Visualization of Signal Processing Concepts," International Conference on Acoustics, Speech and Signal Processing, Seattle, Washington, May 12-15, 1998.

[5] R. Harger, "Teaching in a computer Classroom with a Hyperlinked, Interactive Book," IEEE Trans Educ, vol. 39, pp. 327-335, 1996.

[6] R. Shiavi, Introduction to Statistical Signal Processing, Irwin Press, Boston, 1991. (Second Edition – Prentice-Hall, 1998)

[7] R. Felder, "Matters of Style," ASEE PRISM, pp. 18-23, December, 1996.


Author Contact Information

Richard Shiavi, Ph.D.
Professor of Biomedical Engineering
Vanderbilt University
Box 1554BNashville, TN 37235
phone: 615-322-3598
FAX: 615-343-7919
e-mail: richard.shiavi@vanderbilt.edu


Author Biography

Richard Shiavi received his BE degree in Electrical Engineering from Villanova University in 1965 and MS and Ph.D. degrees in Biomedical Engineering from Drexel University in 1969 and 1972 respectively.Since 1972, Dr. Shiavi has been actively engaged in teaching and research at Vanderbilt University and is Professor of Biomedical Engineering and Professor of Electrical Engineering. His main professional interests are in signal processing and engineering education and main research interests are in bioelectric signal processing and signal measurement. Research publications appear in the literature and congress proceedings of biomedical engineering and biomechanics. He has written a textbook entitled "Introduction to Applied Statistical Signal Analysis" and has been one of the main developers for a Web based course for first year engineering students entitled "Introduction to Computing in Engineering".

Return to Table of Contents