Table Of ContentDigital Signal Processing
Digital Signal Processing
Fundamentals and Applications
Third Edition
Lizhe Tan
Jean Jiang
AcademicPressisanimprintofElsevier
125LondonWall,LondonEC2Y5AS,UnitedKingdom
525BStreet,Suite1650,SanDiego,CA92101,UnitedStates
50HampshireStreet,5thFloor,Cambridge,MA02139,UnitedStates
TheBoulevard,LangfordLane,Kidlington,OxfordOX51GB,UnitedKingdom
#2019ElsevierInc.Allrightsreserved.
Nopartofthispublicationmaybereproducedortransmittedinanyformorbyanymeans,electronicormechanical,including
photocopying,recording,oranyinformationstorageandretrievalsystem,withoutpermissioninwritingfromthepublisher.
Detailsonhowtoseekpermission,furtherinformationaboutthePublisher’spermissionspoliciesandourarrangements
withorganizationssuchastheCopyrightClearanceCenterandtheCopyrightLicensingAgency,canbefoundatour
website:www.elsevier.com/permissions.
ThisbookandtheindividualcontributionscontainedinitareprotectedundercopyrightbythePublisher(otherthanas
maybenotedherein).
Notices
Knowledgeandbestpracticeinthisfieldareconstantlychanging.Asnewresearchandexperiencebroadenour
understanding,changesinresearchmethods,professionalpractices,ormedicaltreatmentmaybecomenecessary.
Practitionersandresearchersmustalwaysrelyontheirownexperienceandknowledgeinevaluatingandusingany
information,methods,compounds,orexperimentsdescribedherein.Inusingsuchinformationormethodstheyshouldbe
mindfuloftheirownsafetyandthesafetyofothers,includingpartiesforwhomtheyhaveaprofessionalresponsibility.
Tothefullestextentofthelaw,neitherthePublishernortheauthors,contributors,oreditors,
assumeanyliabilityforanyinjuryand/ordamagetopersonsorpropertyasamatterofproducts
liability,negligenceorotherwise,orfromanyuseoroperationofanymethods,products,
instructions,orideascontainedinthematerialherein.
LibraryofCongressCataloging-in-PublicationData
AcatalogrecordforthisbookisavailablefromtheLibraryofCongress
BritishLibraryCataloguing-in-PublicationData
AcataloguerecordforthisbookisavailablefromtheBritishLibrary
ISBN:978-0-12-815071-9
ForinformationonallAcademicPresspublications
visitourwebsiteathttps://www.elsevier.com/books-and-journals
Publisher:KateyBirtcher
AcquisitionEditor:SteveMerken
EditorialProjectManager:JenniferPierce/SusanIkeda
ProductionProjectManager:SruthiSatheesh
CoverDesigner:MarkRogers
TypesetbySPiGlobal,India
Preface
Technology such as microprocessors, microcontrollers, and digital signal processors have become
soadvancedthattheyhavehadadramaticimpactonthedisciplinesofelectronicsengineering,com-
puterengineering,andbiomedicalengineering.Engineersandtechnologistsneedtobecomefamiliar
withdigitalsignalsandsystemsandbasicdigitalsignalprocessing(DSP)techniques.Theobjectiveof
thisbookistointroducestudentstothefundamentalprinciplesofthesesubjectsandtoprovideawork-
ing knowledgesuch thatthey can applyDSP intheir engineering careers.
ThisbookcanbeusedinanintroductoryDSPcourseatthejuniororseniorlevelinundergraduate
electrical, computer, and biomedical engineering programs. The book is also useful as a reference
to the undergraduate engineeringstudents, science students, andpracticing engineers.
The material has been tested for the DSP course in a signal processing sequence at Purdue
UniversityNorthwestinIndiana.Withthebackgroundestablishedfromthisbook,studentswillbewell
preparedtomoveforwardtotakeothersenior-levelcoursesthatdealwithdigitalsignalsandsystems
for communicationsand control.
Thetextbook consistsof 14chapters, organized asfollows:
(cid:129) Chapter 1 introduces concepts of DSP and presents a general DSP block diagram. Application
examplesare included.
(cid:129) Chapter2coversthesamplingtheoremdescribedintimedomainandfrequencydomainandalso
covers signal reconstruction. Some practical considerations for designing analog anti-aliasing
lowpass filters and anti-image lowpass filters are included. The chapter ends with a section
dealing with analog-to-digital conversion (ADC) and digital-to-analog conversion (DAC), as
well as signal quantization and encoding.
(cid:129) Chapter3introducesdigitalsignals,lineartime-invariantsystemconcepts,differenceequations,and
digital convolutions.
(cid:129) Chapter 4 introduces the discrete Fourier transform (DFT) and digital signal spectral calculations
using the DFT. Methods for applying the DFT to estimate the spectra of various signals,
including speech, seismic signals, electrocardiography data, and vibration signals, are
demonstrated. The chapter ends with a section dedicated to illustrating fast Fourier transform
(FFT) algorithms.
(cid:129) Chapter 5 is devoted tothe z-transform and difference equations.
(cid:129) Chapter 6 covers digital filtering using difference equations, transfer functions, system stability,
digital filter frequency response, and implementation methods such as direct-form I and direct-
formII.
(cid:129) Chapter 7 deals with various methods of finite impulse response (FIR) filter design, including the
Fourier transform method for calculating FIR filter coefficients, window method, frequency
sampling design, and optimal design. This chapter also includes applications using FIR filters for
noise reduction and digital crossover system design.
(cid:129) Chapter 8 covers various methods of infinite impulse response (IIR) filter design, including the
bilinear transformation (BLT) design, impulse invariant design, and pole-zero placement design.
Applications using IIR filters include the audio equalizer design, biomedical signal enhancement,
dual-tone multifrequency (DTMF) tone generation, and detectionwith the Goertzel algorithm.
xiii
xiv Preface
(cid:129) Chapter 9 covers adaptive filters, least mean squares (LMS) algorithm, and recursive least
squares (RLS) algorithm with applications such as noise cancellation, system modeling, line
enhancement, cancellation of periodic interferences, echo cancellation, and 60-Hz interference
cancellation inbiomedicalsignals.
(cid:129) Chapter 10 is devoted to speech quantization and compression, including pulse code modulation
(PCM) coding, μ-law compression, adaptive differential pulse code modulation (ADPCM)
coding, windowed modified discrete cosine transform (W-MDCT) coding, and MPEG audio
format,specifically MP3 (MPEG-1,layer3).
(cid:129) Chapter11deals withtopics pertainingtomultirateDSPandapplications, aswellasprinciplesof
oversampling ADC, such as sigma-delta modulation. Undersampling for bandpass signals is also
examined.
(cid:129) Chapter 12 introduces a subband coding system and its implementation. Perfect reconstruction
conditions for a two-band system are derived. Subband coding with an application of data
compression is demonstrated. Furthermore, the chapter covers the discrete wavelet transform
(DWT) with applications tosignal coding and denoising.
(cid:129) Chapter13coversimageenhancementusinghistogramequalizationandfilteringmethods,including
edge detection. The chapter also explores pseudo-color image generation and detection, two-
dimensional spectra, JPEG compression using DCT, image coding using the DWT, and the
mixing of two images to create a video sequence. Finally, motion compensation of the video
sequence is explored,whichis a keyelement of video compression used inMPEG.
(cid:129) Finally, Chapter 14 introduces DSP architectures, software and hardware, and fixed-point and
floating-point implementations of digital filters. The advanced real-time implementation
examples of adaptive filtering, signal quantization and coding, and sampling rate conversion are
included.
MATLABprogramsarelistedwhenevertheyarepossible.Therefore,aMATLABtutorialshouldbe
given tostudents who are new tothe MATLABenvironment.
(cid:129) Appendix Aservesas aMATLAB tutorial.
(cid:129) Appendix B reviews key fundamentals of analog signal processing. Topics include Fourier series,
Fourier transform, Laplace transform,and analog system basics.
(cid:129) Appendixes C, D, and E overview Butterworth and Chebyshev filters, sinusoidal steady-state
responses in digital filters, and derivation of the FIR filter design equation via the frequency
sampling method, respectively.
(cid:129) Appendix F details the derivations ofwavelet analysis andsynthesisequations.
(cid:129) Appendix Gbriefly covers areview of the discrete-time randomsignals.
(cid:129) Appendix Hoffers general useful mathematical formulas.
In this third edition, MATLAB projects dealing with the practical applications are included in
Chapters2, 4, 6–12.In addition, the advanced problems are added toChapters2–10.
Instructor support, including solutions, can be found at http://textbooks.elsevier.com. MATLAB
programs and exercises for students, plus real-time C programs can be found at https://www.
elsevier.com/books/digital-signal-processing/tan/978-0-12-815071-9.
Preface xv
ThankstoallthefacultyandstaffatPurdueUniversityNorthwest,Indianafortheirencouragement
and support. We are also indebted to all former students in our DSP classes at the Purdue
University Northwestfor their feedback over the years, which helped refine this edition.
SpecialthanksgotoSteveMerken(SeniorAcquisitionsEditor),JenniferPierceandSusanIkeda
(Editorial Project Manager), Sruthi Satheesh (Project Manager) and team members at Elsevier
Science Publishing for their encouragement and guidance indeveloping the third edition.
The book has benefited from many constructive comments and suggestions from the following
reviewers and anonymous reviewers. The authors take this opportunity to thank them for their
significant contributions. These include the reviewers for the third edition:
ProfessorHaroldBroberg,IndianaUniversityPurdueUniversity-FortWayne,IN;ProfessorMeh-
metCelenk,OhioUniversity;ProfessorJamesR.Marcus,UniversityofNewHaven,Connecticut;Pro-
fessor Sudarshan R. Nelatury, Pennsylvania State University, Erie, PA; Professor Siripong Potisuk,
The Citadel, the Military College of South Carolina, SC; the reviewers for the second edition:
Professor Oktay Alkin, Southern Illinois University, Edwardsville; Professor Rabah Aoufi, DeVry
University-Irving, TX; Dr. Janko Calic, University of Surrey, UK; Professor Erik Cheever, Swarth-
more College; Professor Samir Chettri, University of Maryland Baltimore County; Professor
Nurgun Erdol, Florida Atlantic University; Professor Richard L. Henderson, DeVry University,
KansasCity,MO;ProfessorJeongHeeKim,SanJoseStateUniversity;ProfessorSudarshanR.Nela-
tury,PennStateUniversity,Erie,PA;ProfessorJavadShakib,DeVryUniversity,Pomona,California;
Dr.ir.HerbertWormeerster,UniversityofTwente,TheNetherlands;ProfessorYongpengZhang,Prai-
rieViewA&MUniversity;andthereviewersforthefirstedition:ProfessorMateoAboy,OregonIn-
stitute of Technology; Professor Jean Andrian, Florida International University; Professor Rabah
Aoufi,DeVryUniversity;ProfessorLarryBland,JohnBrownUniversity;ProfessorPhillipL.DeLeon,
New Mexico State University; Professor Mohammed Feknous, New Jersey Institute of Technology;
ProfessorRichardL.Henderson,DeVryUniversity;ProfessorLingHou,St.CloudStateUniversity;
ProfessorRobertC.(Rob)Maher,MontanaStateUniversity;ProfessorAbdulmagidOmar,DeVryUni-
versity; Professor Ravi P. Ramachandran, Rowan University; Professor William (Bill) Routt, Wake
Technical Community College; Professor Samuel D. Stearns, University of New Mexico; Professor
LesThede,OhioNorthernUniversity;ProfessorIgorTsukerman,UniversityofAkron;ProfessorVijay
Vaidyanathan,University ofNorth Texas; Professor DavidWaldo, OklahomaChristianUniversity.
Finally, we thank readers who report correctionsand provide feedback tous.
Lizhe Tan, Jean Jiang
CHAPTER
1
INTRODUCTION TO DIGITAL
SIGNAL PROCESSING
CHAPTER OUTLINE
1.1 BasicConceptsofDigitalSignalProcessing ......................................................................................1
1.2 BasicDigitalSignalProcessingExamplesinBlockDiagrams..............................................................2
1.2.1 DigitalFiltering ...........................................................................................................3
1.2.2 SignalFrequency(Spectrum)Analysis ...........................................................................4
1.3 OverviewofTypicalDigitalSignalProcessinginReal-WorldApplications ...........................................5
1.3.1 DigitalCrossoverAudioSystem .....................................................................................5
1.3.2 InterferenceCancellationinElectrocardiography ............................................................6
1.3.3 SpeechCodingandCompression ..................................................................................6
1.3.4 Compact-DiscRecordingSystem ...................................................................................7
1.3.5 VibrationSignatureAnalysisforDefectedGearTooth ......................................................9
1.3.6 DigitalImageEnhancement ........................................................................................10
1.4 DigitalSignalProcessingApplications ...........................................................................................12
1.5 Summary ......................................................................................................................................12
1.1 BASIC CONCEPTS OF DIGITAL SIGNAL PROCESSING
Digitalsignalprocessing(DSP)technologyanditsadvancementshavedramaticallyimpactedourmod-
ern society everywhere. Without DSP, we would nothave digital/Internet audio orvideo;digitalre-
cording; CD, DVD, MP3 players, iPhone, and iPad; digital cameras; digital and cellular telephones;
digitalsatellite and TV;orwire andwirelessnetworks.Medical instruments would belessefficient.
Itwouldbeimpossibletoprovideprecisediagnosesiftherewerenodigitalelectrocardiography(ECG),
or digital radiography and other medical imaging modalities. We would also live in many different
ways, since we would not be equipped with voice recognition systems, speech synthesis systems,
andimageandvideoeditingsystems.WithoutDSP,scientists,engineers,andtechnologistswouldhave
no powerfultools toanalyze and visualize data and perform their design, andso on.
TheconceptofDSPisillustratedbythesimplifiedblockdiagraminFig.1.1,whichconsistsofan
analogfilter,ananalog-to-digitalconversion(ADC)unit,adigitalsignal(DS)processor,adigital-to-
analogconversion (DAC) unit,and a reconstruction (anti-image) filter.
1
DigitalSignalProcessing.https://doi.org/10.1016/B978-0-12-815071-9.00001-4
#2019ElsevierInc.Allrightsreserved.
2 CHAPTER 1 INTRODUCTION TO DIGITAL SIGNAL PROCESSING
Analog Band-limited Digital Processed Output Analog
input signal signal digital signal signal output
Analog DS Reconstruction
ADC DAC
filter processor filter
FIG.1.1
Adigitalsignalprocessingscheme.
Asshowninthediagram,theanaloginputsignal,whichiscontinuousintimeandamplitude,is
generally encountered in our real life. Examples of such analog signals include current, voltage,
temperature,pressure,andlightintensity.Usuallyatransducer(sensor)isusedtoconvertthenone-
lectricalsignaltotheanalogelectricalsignal(voltage).Thisanalogsignalisfedtoananalogfilter,
which is applied to limit the frequency range of analog signals prior to the sampling process. The
purpose of filtering is to significantly attenuate aliasing distortion, which will be explained in
Chapter2.Theband-limitedsignalattheoutputoftheanalogfilteristhensampledandconverted
viatheADCunitintothedigitalsignal,whichisdiscretebothintimeandinamplitude.Thedigital
signalprocessorthenacceptsthedigitalsignalandprocessesthedigitaldataaccordingtoDSPrules
suchaslowpass, highpass,andbandpass digitalfiltering,orotheralgorithmsfordifferentapplica-
tions.Notethatthedigitalsignalprocessorunitisaspecialtypeofadigitalcomputerandcanbea
general-purpose digital computer, a microprocessor, or an advanced microcontroller; furthermore,
DSP rules can be implemented using software in general.
With the digital signal processor and corresponding software, a processed digital output signal
isgenerated.Thissignalbehavesinamannerbasedonthespecificalgorithmused.Thenextblock
in Fig. 1.1, the DAC unit, converts the processed digital signal to an analog output signal. As
shown,thesignaliscontinuousintimeanddiscreteinamplitude(usuallyasample-and-holdsignal,
to be discussed in Chapter 2). The final block in Fig. 1.1 is designated as a function to smooth the
DACoutputvoltagelevelsbacktotheanalogsignalviaareconstruction(anti-image)filterforthe
real-world applications.
Ingeneral,analogsignalprocessingdoesnotrequiresoftware,algorithm,ADC,andDAC.Thepro-
cessing reliesentirely on the electrical and electronic devices suchas resistors, capacitors, transistors,
operationalamplifiers,andintegratedcircuits(ICs).
DSPsystems,onthe otherhand,usesoftware,digitalprocessing,andalgorithms;therefore,they
havemoreflexibility,lessnoiseinterference,andnosignaldistortioninvariousapplications.However,
asshowninFig.1.1,DSPsystemsstillrequireminimumanalogprocessingsuchastheanti-aliasingand
reconstructionfilters,whicharemustsforconvertingreal-worldinformationtodigitalformandback
again toreal-worldinformation.
Note that there are many real-world DSP applications that do not require DAC, such as the data
acquisition and digital information display, speech recognition, data encoding, and so on. Similarly,
DSPapplicationsthatneednoADCincludeCDplayers,text-to-speechsynthesis,anddigitaltonegen-
erators,among others. We will review some ofthem inthe following sections.
1.2 BASIC DIGITAL SIGNAL PROCESSING EXAMPLES IN BLOCK DIAGRAMS
We first look at digital noise filtering andsignal frequency analysis,usingblock diagrams.
1.2 BASIC DIGITAL SIGNAL PROCESSING EXAMPLES IN BLOCK DIAGRAMS 3
1.2.1 DIGITAL FILTERING
LetusconsiderthesituationshowninFig.1.2,depictingadigitizednoisysignalobtainedfromdig-
itizinganalogvoltages(sensoroutput)containingusefullow-frequencysignalandnoisethatoccupyall
ofthefrequencyrange.AfterADC,thedigitizednoisysignalx(n),wherenisthesamplenumber,can
be enhancedusingdigitalfiltering.
Sinceourusefulsignalcontainslow-frequencycomponents,thehigh-frequencycomponentsabove
the cutoff frequency of our useful signal are considered as noise, which can be removed by using a
digitallowpassfilter.WesetuptheDSPblockinFig.1.2tooperateasasimpledigitallowpassfilter.
Afterprocessingthedigitizednoisysignalx(n),thedigitallowpassfilterproducesacleandigitalsignal
y(n).Wecanapplythecleanedsignaly(n)toanotherDSPalgorithmforadifferentapplicationorcon-
vert it toanalog signal via DAC and the reconstruction filter.
Thedigitizednoisysignalandcleandigitalsignal,respectively,areplottedinFig.1.3,wherethetop
plot shows the digitized noisy signal, while the bottom plot demonstrates the clean digital signal
obtained by applying the digitallowpass filter. Typical applications of noise filtering include acqui-
sition of clean digital audio and biomedical signal and enhancement of speech recording and others
(Embree, 1995;Rabinerand Schafer, 1978; Webster, 2009).
x(n) DSP y(n)
Digital filtering
Digitized noisy input Clean digital signal
FIG.1.2
Thesimpledigitalfilteringblock.
Noisy signal
2
1
e
d
u
plit 0
m
A
−1
−2
0 0.005 0.01 0.015 0.02 0.025 0.03
2
1
e
d
u
plit 0
m
A
−1
−2
0 0.005 0.01 0.015 0.02 0.025 0.03
Time (s)
FIG.1.3
(Top)Digitizednoisysignal.(Bottom)Cleandigitalsignalusingthedigitallowpassfilter.