modern digital signal processing - amazon s3 frequency domain analysis ofa digital fater 85 ... and...

391

Upload: trinhxuyen

Post on 14-Apr-2018

216 views

Category:

Documents


4 download

TRANSCRIPT

  • CONTENTS

    II

    II

    II

    CHAPTER 1Fundamentals of Signals and Systems

    1.1 Signals

    1.2 Systems 17

    1.3 fourier Analysis of Discrete Time Signals 42

    1.A Fourier Analysis of Continuous Time Signal~ 55

    CHAPTER 2Discrete Time Processing of Continuous Time Signals

    2. 1 Introduction 83

    2.2 Structure of a Digital Filter 84

    2.3 Frequency Domain Analysis ofa Digital Fater 85

    2. -4 Quantization Errors 92

    2.5 Prediction-Based Sampling Methods:Sigma and Sigma-Deba Modulation 98

    CHAPTER 3Fourier Analysis of Discrete Time Signals

    3.1 Introduction 107

    3.2 Discrete Time Fourier Transform (DTFT) 107

    3.3 Discrete Fourier Transform (DFT) 111

    3.4 The DFT as an Estimate of the DTFT 117

    3.5 DFT for Spectral Estimation 123

    1

    83

    107

    v

  • II

    II

    II

    VI

    3.6 OFT for Convolefion 130

    3.6 OFT/OCT for Compression 134

    3.7 The Fast Fourier Transform {FFT) 140

    CHAPTER 4Digital Filters

    4.1 Introduction 151

    4.2 Ideal Versus Nonideal Filters 152

    4.3 Finite Impulse Response (FIR) Filters 157

    4.4 In6nite Impulse Response (I1R) Filters 172

    CHAPTER 5Digital Filters Implementation

    5.1 tntroduction 199

    5.2 Elementary Operations 199

    5.3 State Space Realization of Digital Filters 203

    5.4 Robust Implementation of Digital Filters 213

    5.5 Robust Implementation ofEquiripple FIR Filters 227

    CHAPTER 6Mul~rate Digital Signal Processing: Fundamentals

    6.1 Introduc~on 234

    6.2 Statement of the Problem and Definitions 235

    6.3 Analysis of Downsampling and Upsampling 238

    6.4 Sampling Rate Conversion by a Rational Foetor 250

    151

    199

    234

  • II

    6.5 Multistage Implementation of Digital Filters 253

    6.6 Efficient Implementation of Multirate Systems 256

    6.7 Apptkation of Mu~tirate DSP: DigitaHo~Analog

    Conversion 260

    6.8 Sampling Frequency and Quantization Error 264

    CHAPTER 7DFT Filter Banks and Transmultiplexers

    7.1 Introduction 270

    7.2 DFT Filter Banks 272

    7.3 Maximally Decimated OFT Filter Banksand Transmultiptexers 279

    7.4 Transmultiplexers 284

    7.5 Application of Transmultiplexers to DigitalCommunications Modutation 291

    CHAPTER 8Maximolly Decimated Filter Banks

    8.1 Introduction 302

    8.2 Vector Spaces 303

    8.3 Two-Channel Perfect Reconstruction Conditions 311

    8.4 Design of Perfect Reconstruction Filter Banks

    with Real Coefficients 320

    8.5 lattice Implementation of Orthonormot Filter Banks 328

    8.6 Application to an Audio Signal 333

    270

    302

    VII

  • CHAPTER 9II Time Frequency Expansion: An Introduction 337

    9.1 Introduction 337

    9.2 The Short Time Fourier Transform (5TFT) 3AO

    9.3 The Gabor Transform (GT) 345

    9.A The Wavelet Transform 351

    9.5 Recursive Multiresolution Decomposition 360

    A PPEN Dl XES . 372

    ~NDEX 375

    VlIl

  • PREFACE

    Digital signal processing (DSP) isa very exciting area. It appeals to the mathematician, theengineer, the musician. the Internet enthusiast, the communication expert, and many oth-ers. Combined with the right software-today widely available for the price ofa textbook-digital signal processing allows us to experiment with sounds, images. and video. Eventypical high school students who hate mathematics might rethink theirposition if they areexposed to the subject in the right way. Simple compact discs (CDs), for example, alreadya mature technology, contain much of the sophistication of a number ofwell-defined math-ematical problems, from filtering (digital and analog) to multi rate to sigma delta modula-tion, not to mention error correction, which unfortunately we do not have the time toaddress in a signal processing textbook. The cell phone as well, whether 2,2.5.or 3G, hasFFT, digital filters. and multirate filters as building blocks, The Internet user should alsoappreciate that signal representation techniques such as the discrete cosine transform(DCT) and the wavelet transform (WT) allow the downloading of favorite music files orfavorite pictures in a reasonable amount of time. even on a relatively slow telephonemodem. with a minimum of distortion. And we are just at the beginning:

    The trend in education today (both at the graduate andundergraduate levels) is mov-ing from young students in theirearly LO middle twenties to an adult, moremature popula-tion interested in lifelong learning. I have witnessed this trend during my two decades ofteaching graduate andundergraduate courses in signals andsystems andresearch in digitalsignal processing (DSP) andcontrol systems, especially at the Naval Postgraduate School,which has given meexperience with high-level adult education. For example, the studentsat the Naval Postgraduate School are nor the typical students usually found at a standardgraduate school. Their age group (thirties and up), family status (most of them marriedwith children). andacademic background (outof school fora number of years) make theman audience that just a few years ago was very atypical. The school has been serving sucha diverse clientele for the pasthalf-century.

    Selecting a textbook for a course has to be looked upon from these perspectives:diverse applications and diverse student population. The material presented should besound and rigorous, yet motivating for both the young student with a fresh mind and themore mature student rich in lifeexperiences. Fundamentally, of course, the student needsto understand the basics of signals andsystems and the more advanced concepts of digitalsignal processing. Atthe graduate level, a student needs to acquire all the fundamentals notonly to be able to follow the developments of the technology but alsoto be able to use alltheavailable software tools while remaining well aware of tile capabilities andlimitations.

    This is exactly the problem I face ill selecting a textbook for each of the courses Iteach, in particular the graduate course in digital signal processing. Most of the textbooksavailable in the market today are good to excellent in mathematical rigorandcompletenessbut only fair to poor in student motivation. Some are the other way around, in the sensethat they score well in examples of applications but poor in mathematical completeness.

    My goal in writing this book is to present digital signaJ processing material that iswell suited to today's student population and that can be effectively used in a universityclassroom or as a basis for self-study, Of the nine chapters in this textbook, including the

    IX

  • x Preface

    background material in Chapter I, a regular one-quarter course (33 to40 hours of lectures)would cover up to multirate and DFT filter banks in Chapter 7. The last two chapters (8and 9), covering quadrature mirror filters and an introduction to time frequency, wouldserve as additional reading for the motivated student. Great effort hasbeen devoted to pre-senting the material ina logical sequence so that the student canappreciate bow things log-ically develop. Also, most of thearguments presented areproved, notjust stated.

    Chapter 1 is a review of signals and systems. It presents results in discrete timefirstand then extends to continuous time. Discrete Fourier series and transform are intro-duced in the discrete timedomain, followed by the Fourier series and transform for con-tinuous time signals. This chapter will also be accessible on the Web page for the book(http://engineeringlbrookscolc.comlcristi) as a guided self-study for the student whoneeds to review the fundamentals before tackling the course. In my experience, return-ing students out of school for a few years need some guidance during theirtransition tothe academic environment.

    Chapter 2 addresses the problem of processing a continuous time signal by means ofdiscrete time processing, The general structure of a digital filter is analyzed to make surethe student understands how to make continuous time and discrete time signals and sys-tems coexist. Also, some description (mean and variance) of the quantization error is in-troduced together with modem digitization techniques such as delta and sigma deltamodulations.

    Chapter 3 introduces the discrete time Fourier transform (DTFf) and the discrete/fastFourier transform (DFT and FFf). Although both aredefined in Chapter I, in this chapterthe application of the DFf and FFf as tools for spectral analysis, numerical convolution,and data compression. in terms of the discrete cosine transform (OCT), are presented indepth. Particular attention is devoted to understanding the convergence (and nonconver-gence in many cases) of the Off to the DTFT and to understanding the OCT in terms ofinformation content and entropy. Finally, the fundamentals of the fast Fourier transform(FFT) are presented, with only the radix-2 approach given in detail.

    Chapter 4 is dedicated to digital and analog filter design, bothfinite impulse response(FIR) and infinite impulse response (IIR). The material is relatively standard and is pur-posely notexhaustive. Thechapter presents two fundamental techniques for FIR filter design(window-based. including Kaiser window and equiripple), two techniques for analog-to-digital mapping of filters (Euler and bilinear), and two analog filter design approaches(Butterworth and Chebyshev). The goal is to present the most common approaches and tomake the student aware of the theory and limitations behind each technique. Also, trans-formations by individual mapping of zeros and polesare introduced as a practical way ofcomputing the desired transfer functions.

    Following the analysis of filters inChapter 4, issues of implementation areintroducedin Chapter 5, starting with the state space equations, with particular attention given to de-composition into lower-order systems and decoupling by eigenvector/eigenvalue decom-position. Lattice filters for both FIR and IIR filters are introduced, with emphasis onunderstanding the relation between reflection coefficients and stability. Finally, a particu-larly robust technique to implement equiripple filters is introduced. Again, the chapterpoints out that a number of othertechniques for filter implementation are available in theliterature where the interested student canfind them.

    Acomplete change of gearbegins with Chapter 6, which presents the fundamentals ofmultirate digital signal processing. The effects on the frequency spectrum of up- and

  • Preface XI

    downsampling are shown, beginning with simple examples using complex exponentials andproceeding [0 more complex general results. Therole of the simple introductory examples istogive the student abetter understanding of thegeneral concept, beyond thememorizationof a "formula." Applications to efficient filter implementation and digital resampling ofsignals, such as in the CO player, conclude the chapter.

    A particular class of filter banks, the OFf filter banks, is presented in Chapter 7, to-gether with their dual, the transmultiplexers. These filters very efficiently solve the prob-lem of decomposing a signal in its own instantaneous frequency components. leading tothe short time Fourier transform (STFf) and Gabor transform (GT), addressed in Chapter9. The transmultiplexer is particularly interesting in digital communications, and tech-niques such as time division multiple access (TOMA), frequency division multiple access(FDMA), and multicarrier (Me) modulation are introduced as particular cases of the moregeneral transmultiplexer, In particular, multicarrier modulation (also called orthogonal fre-quency multiplexing orOFDM) is presented separately as a technique at thebasis of DSL,for high-speed data transfer on standard telephone lines.

    InChapter 8 the goal is to extend filter bankdecomposition (analysis) and reconstruc-tion (synthesis) inan efficient way in terms of data rate. Inotherwords, while decompos-ing the signal intoa number of components, we want to make sure thatwe do not increasetheoverall data rate, thus making the technique attractive for efficient data representationandcompression. By applying very basic vector space results (not more sophisticated thanthe inner product and the concept of orthogonality), conditions are derived on the transferfunctions of the filters, and classes of filters such as Daubechies and biorthogonal are de-rived from basicprinciples. This is the basis of thematerial in Chapter 9, the final chapter,where a number of time frequency techniques are introduced, again from basic principlesof vector spaces and inner products. Particular attention is devoted to the distinction be-tween continuous and discrete decompositions of continuous time signals, leading to theshort timeFourier transform (STFf) and the Gabor transform (GT), on the one hand, andthe continuous wavelet transform (eWT) and the wavelet transform (WT) on the otherhand. This chapter attempts to present the material as a continuous logical sequence ofsteps motivated by the search for complete orthogonality and perfect reconstruction whilecoping with the time/frequency uncertainty principle.

    Each chapter concludes with a number of problems, some of them involving com-puter work. The problems are divided into the specific areas covered in the chapter, anda number of them involve material covered in previous chapters. The intent is to makesure thatstudents understand the continuity of thematerial presented. A solutions manualand an instructor's manual including PowerPoint slides are available upon request toqualified customers.

    I will welcome suggestions and constructive criticisms at the e-mail address listed onthe book's Web page.

    Roberto Cristi

  • xu

    ACKNOWLEDGEMENTS

    Theroots of thisbook go backa few decades to my early days at the Universita' di Padovaand the University of Massachussetts at Amherst, where I was fortunate enough to havesuch great teachers as Gianfranco Canolaro, Lewis E. Franks, Jack K. Wolf, the lateRichard Monopoli, and the late Howard Elliott, Theirenthusiasm andclear, wen-explainedarguments have always been a model. not only in my teaching and research, but also inmany aspects of my personal life.

    I am especially thankful to my colleagues at the Naval Postgraduate School, includingRalph Hippenstiel (currently with theUniversity of Texas), Monique Fargues, Murali Tum-mala, and Charles W. Therrien. I am particularly grateful to Ralph for carefully reading themanuscript in its earlystages, and for a number of suggestions anddiscussions, My friendand colleague Mike Matthews ofMission Research has been an important partof thisbook,through hours of conversations at the "French Cafe" on topics ranging from signal pro-cessing to our children.

    The students at theNaval Postgraduate School have always given me the motivation to dosomething better. Theirinterest, professionalism, andenthusiasm have beenan incentive tobecome a better teacher, and were especially appreciated during theups and downs of the lastseveral years. I am also thankful to thechairman of theElectrical and Computer EngineeringDepartment, John Powers, and the past chairmen, Jeff Knorr, Mike Morgan, and HerschelLoomis, formaking our department an enjoyable place to be.

    I cannot close thissection without thanking my parents, Anna and thelate lvanoe Cristi, fortheircontinuous loving support throughout my life. Finally, l amextremely grateful to mywife Karla andmy dearest daughter Robena fortheir patience and endurance, and forthejoythey give meevery day. If I could write poetry, this whole book would be about them!

  • CHAPTER 1

    Fundamentals of Signalsand Systems

    111 .1SignalsGeneral Definitions and ClassificationsWe all have an ideaof what a signal is. When driving. for example. thedriver in front ofus "signals" a left or right turn, or that thecar is goingto stop. If we analyze this simpledaily situation. we see immediately that there is a person (the driverin front) who wantsto tell us something (the car is turning left) and does sobya "signal," which in this caseis optical (the left taillight) andevolving in time (blinking on and off). The signal is per-ceived by oureyesandprocessed by thebrain. Asignal also is what is recorded by a seis-mograph during an earthquake. and signals are the brain waves recorded by an electro-encephalogram or a "lie detector."

    If we analyze a number of daily situations, we could come up with numerous exam-plesofa variety of signals: optical, acoustic (speech), magnetic (tape recorder), andso on.Although in most of these situations the signal evolves over time, likethe directional sig-nal, or an acoustic signal, this is not always the case. Forexample, picture conveys infor-mation bya display ofcolors andintensity levels that donotchange overtime but rather inthe space defined by the primed page.

    In many applications, a signal has to be converted from one fonn to another. For ex-ample, a tape recorder converts an acoustic signal first into anelectric signal andthen intoa magnetic signal on the tape. Similarly, a radioconverts an electromagnetic signal (radiowaves) intoanelectric signal andthen into an acoustic signal wecan hear.

    There ate so many examples of signals of various kinds thatwe needa "common lan-guage" to deal with all of these signals and the information we extract from them. Thecommon language lies in a branch of applied mathematics calledsignal processing. Theword signal is intended to capture all theinstances of applications, scientific or not, andes-tablishes a framework that is independent of the physical nature of the signal involved.This leads to a more abstract mathematical definition of a signal, which is viewed as afunction, x(t), of the independent variable t. representing theevolution of a physical phe-nomenon. Although the independent variable t in general is a scalar, it can also have morethan one dimension andindicate a point ina two-dimensional (orhigher) space. Very gen-erally. in most of the signal processing literature you will likely be exposed to threeclasses of signals:

    1

  • 2 CHAPTER 1 Fundamentals of Signals and Systems

    1. ID signals x(t),with t indicating "tirne.t'This is the case, for example, when x(t) repre-sents a voltage evolving in time.

    2. 2D signals x(Sl> S2), with SI' 52 indicating a point in a two-dimensional space. Atypicalapplication is the light intensity level ofa still image at any given pointSI' 52 within agiven reference frame.

    3. 3Dsignals x(SI> S2' r), with SI' S2 indicating a pointin a two-dimensional space and r in-dicating time. This class of signals represents a time sequence of still images that wecalla video,

    This book will address one-dimensional (ID) signals, functions of one independent vari-able t. which in general represents time. However, the techniques developed are generalenough that they can be extended to multidimensional signals (such as still pictures andvideos), which willbe the subject of a subsequent book.

    Example 1.1HI I ,

    Theelectric signal at the output of a microphone. measured as a function of time, is a 10signal, as shown in Figure 1.1.

    x(t)

    r'lure 1.1 A 10 audio ~ignal

    The goal of signal processing is to extract information about a phenomenon from 0b-servations. Theobservations come in the fonn of signals we eitherrecord onan appropri-ate medium (such as a tape recorder) or process in real time as we take measurements.Today, most processing isperformed by digital computers, which are excellent in perform-ing sequences of operations. In this case. a signal has to be converted into a sequence ofnumbers that can be processed sequentially by the machine. Therefore, whether weprocess a 10 time signal (audio, for example) or a 2Dsignal (a picture, for example), wehave to convert the signal into a sequence of numbers-s-in general, by sampling.

    This leads to theconcept of 1D discrete time signals, .x:[n], in general defined as

    x[n] = x(n~)

    withthevariable n being aninteger index andT, representing a sampling interval. Figure 1.2shows the process of sampling aID discrete time signal. Therefore, the first distinction tobe made is between analog (orcontinuous time) signals, x(t), and digital (ordiscrete time)signals, x[n].

  • 1.1 Signals 3

    x(t) xlnl

    .., .

    " .

    --' -

    ..,

    +-t---\--------J"\:-----j~ t (sec)

    Figure 1.2 Sampling ofa continuous time signal

    LP

    CD

    Figure '.3 Analog LP versus digital CD

    A way to visualize the distinction is by comparing a vinyl LP (long-playing record)and a CD (compact disc) . As shown in Figure 1.3, the vinyl LP has the trace of an analogsignal "engraved" on its surface. In fact, ifyou are one of the rare ownersof a recordplayer,youcan hear the sound right at the needle as it follows the tracks on the record. As a con-sequence, you also hear all the dust collected by the record, as a "frying" noise. On theother hand.the information 1S encoded digitally 011 a CD, so densely packed thatyoucan-not see it, not even with a magnifier.

    Elementary SignalsWhenever wetry 10 attach numerical quantities to a phenomenon, weneed a reference frame.When we learned how to count, our fingers became our own reference frame: when welearned how to write numbers, the powers of ]0 became the reference frame. Ifwefind our-

  • 4 CHAPTER 1 Fundamentals ofSignals andSystems

    8(n] l)[n - k]

    o k

    Figure 1,4 Art impul~ o[n] and a shifted impulse 8[" - k]

    selves in a situation where there is noreference frame-in the middle of the desert oroceanwithout instruments, or among people speaking a totally foreign language-we are lost!

    In signal processing we have the same problem: We need an appropriate referenceframe so that wecanplace the signals weare trying to analyze. Because wedeal with sig-nals, any reference frame of interest has tobe made up of signals with well-known proper-ties that reflect the kind of information we want to extract. For example, if we hear amusical note and want to determine which note it is in the scale, we need to compare itwith sinusoidal signals (i.e. "tones") at allfrequencies todetermine which frequency is theclosest to the note.

    What follows aresome of the elementary discrete timesignals thatwillform the basisof the analysis developed in the restof this book.

    Discrete Time Unit ImpulseTheunit impulse 8[n] is the most "elementary" signal, andit provides the simplest expan-sion. It is defined as

    ifn = 0,

    otherwise

    andis plotted inFigure 1.4, together with a general shifted version, 8[n - k]. Any discretetime signal can be expanded into the superposition of elementary shifted impulses~ eachone representing each of the samples. This is expressed as

    x[n] ~ ~ x[k)li[n - k]." -a;

    where eachtermx(k]a[n - k] in thesummation expresses the nthsample of the sequence.

    Example 1.2.. ,.)

    The sequence shown in Figure 1.5 canbe expanded as

    x[n] = 1.56[n + 2] - 1.06[n + I] + l.U[n] - 0.56[n - 1] + 0.5t5[n - 2] + J.6t5[n - 3J

  • 1.1 Signals

    X[llJ

    1.51.2

    - \.0

    Figure 1.5 Example of a sequence

    1.6

    i

    5

    The significance of this expansion is the fact that any signal. nomatter how complicated, isdecomposed into elementary pulses properly scaled inamplitude and shifted intime.

    Continuous Time Unit Impulse: The Dirac Function

    In continuous time wehave tobe a bilmore careful. Aunit impulse 8{t) isdefined asa func-tion that is zero for all t "* 0, and yet its integral is nonzero. In particular.olr) is such that

    15(1 ) = 0 forall I "* 0

    r ""o(t )dt =0 r+8(t)dt ~ 1- 00 0-

    (see Figure 1.6). It canbe viewed as the limit ofa sequence ofa rectangular signal ofwidthT and height liT as T~ O. Its significance is the fact that for any signal x(t) ,continuous atlime I, wecan write

    f+", (It r fO ot-

  • 6 CHAPTER 1 Fundamentals of Signals and SY$tems

    Therightmost integral inthe expression is easily derived by changing the integration variable.Comparing to the equivalent ex.pression indiscrete time, which werecall here forconvenience,

    p;

    x[n):;; ~ x[k]~[n - k]t~-'"

    wecansee thatinboth cases we expand a signal (continuous time or discrete time) in termsof a sequence of unit impulses.

    Sinusoidal Signals

    As we will see in the section on Fourier analysis, sinusoidal signals areoneof the buildingblocks of more general signals. Forexample, an audio signal is made upof vibrations-ofthe vocal cords for humans and animals orof stringsor standingwaves for musical instru-ments. When we stand next to a car playing rock music at full blast, we feel thevibrationsdeep inside ourown bodies.

    Acontinuous time sinusoidal signal isdefined as

    x(t) == Acos(Oot + a)

    with A being amplitude. If the independent variable t denotes lime, and is measured in sec-onds. then 00 indicates theangular frequency inradians per second and a the phase inradians.Thecosine, like all trigonomebic functions, does notchange when theargument is shifted hymultiples of27T, so we can see the periodicity ofthesinusoidal signal from theexpression

    x(r) = Acos(flot + a + 21T) ;;;; Acos(flo(t + 1() + a) == x(t + To)

    where To ;;;; 21t'100 is the period in seconds (if t is in seconds). Amplitude and period areshown in Figure 1.7. Forexample, a sinusoid with angular frequency no = 20007T has aperiod

    21TTo:;;:;' -- == 10-) sec == I msec

    200C17r

    x(t)

    T(}

    Figure 1.7 Sinusoidal signal showing amplitude A andperiod To

  • 1.1 Signals 7

    Theinverse of the period. Po = 1/1;" is the frequency, and it represents the number of rep-etitions per second, In this example, the sinusoid has a period To := I msec, and thereforeits frequency is Fo := 1000 Hz, where the unit hertz is defined as Hz = sec-I. Thedefini-tion and relationship of frequency and period forms thebasis formuch of thediscussion inthis book and is summarized here for convenience:

    Angular frequency:

    Period:

    Frequency:

    Example 1.3

    27Tflu = 271Po = ~ rad/sec

    To

    I 21TTo ;= - ;;;: - sec

    F'o floJ flo

    F() 0;= .- =' ~ Hz := sec"To 211'

    Asinusoid with frequency F(J = 250 kllz has a period

    Tf> =' (J._) X 10-3 sec := 4 X 10-6 sec := 4/Lsec250

    Adiscrete time sinusoid isobtained by sampling a continuous time sinusoid with sam-pling interval T,. as

    x[n] =' x{n~) = Acos(~Tsn + a)Bydefining thedigital frequency, Wo = nol~, wecanwrite thesampled sinusoid as

    ,

    x(l)

    Figu... 1.8 At.Omp(ed sinusoid

    ..'. . 1 , .

    I

    .', . . . ' .,.,

    "

  • 8 CHAPTER 1 Fundamentals of Signals and Systems

    As we can see from the definition, the digital frequency 000:: 0 01$ ::: 21rFo1$ :::(rad/sec) X sec has no dimensions. In order to see the meaning of the digital fre-quency, define the sampling frequency F$ ::: tITs. which represents the number of sam-plestaken every second, and write it as

    I~ JIn other words, roo is a relative frequency with respect to the sampling frequency.

    Example 1.4A sinusoid with frequency Fo := 2 kHz is sampled every 1', = 0.1 msec = 10-

    4 sec. Thenthe sampling frequency isF, = I(t Hz = 10kHz, and the digital frequency ofthe sinusoid is

    Fo 2000 21T000 ::: 21T- ::: 27T = - radr, IOltOO 5

    Complex ExponentialsAllbough we represent signals in terms of sinusoidal signals (read, "vibrations"), trigonometricfunctions do not lend themselves to easy manipulation. Fortunately, a sinusoid can be ex-panded in terms ofcomplex exponentials, which, in contrast, exhibit very convenient mathe-matical properties. Inparticular, recall Euler's formula:

    coslo) == !(ej" + e- }u)2

    sin(a) == ;j (e)O' - e-}Q)for any angle t:t. SUbstituting for the appropriate time-varying angle, both continuous timeanddiscrete timesinusoidal signals can therefore be expressed in tenusof complex expo-nential signals, as in the following:

  • 1.1 SIgnals 9

    The reason the exponential form of the signal is more attractive In general than the sinu-soidal signal form. is that a number of significan; operaticns performed on signals becomejust algebraic manipulations incomplex exponentials. For example,

    a. Differenriation andintegration: Take any signal x(t) andcompute itsderivative or itsintegral with respect to time. asYJ(t) ;;;;;; dldtx(t) or y,(t) ==0 Jx(t) dt. In general, bothYd(t) and Yl(t) have expressions different from x(t), unless x(c) is an exponential, inwhich casedifferentiation andintegration arc just the algebraic operations of multipli-cation anddivision:

    }' (r) = ~ x(t) = d e/btFi "" (j'27TF. )eJ21TFol == (J'2rrF )x(t)d dt dt 0 Q

    )1(t) ~ fx(t) dt = feJ2f1fJ dt = (-,_1_)e/2:rr f ol = (-,_l_)x(t)}21TFo J 21/'Fo

    b. Time shift: Similarly. take any sequence x[n1andshift it in time as Yln] :=;: x[n ~ LJ.with Lbeing an integer. Again, if x[ n] is anexponential signal (andonly inthis case).then the shifted sequence isobtained justby multiplication:

    In more technical words, we say that thecomplex exponential signal is aneigenftmcrion ofdifferential, integral, and time shift operators. This means that (only in the case of expo-nentials) these operations are just algebraic manipulations. With all other signals we arenot so lucky' This fact is thebasis of most (but not all) of the transform techniques (Fou-rier, Laplace, Z-, and all their rclarives). which will be introduced as tools for analyzingsignals. systems, and their interactions.

    Analog and Digital Frequencies

    A complex exponential signal. whether in continuous time or in discrete time, is com-pletely determined by its amplitude, A, phase, 0', and frequency, which can be FI) Hz (orno rad/sec) in continuous time or (1.10 rad in discrete time,as in the following expressions:

    x(r) = AeJ"ej!L~1 "" Ae}ll'eI2lTF~j

    xln] = Aej"ejUJO~As we have suggested several times. the complex exponential is the actual buildingblock of most signal analysis tools (the reference frame we talked about at the begin-ningof the section), so it is convenient torepresent the complex exponential in termsofits three parameters (amplitude, phase, and frequency), In particular. let us representgraphically the complex exponential as twoplots (amplitude and phase) as functions of

  • 10 CHAPTER 1 Fundamentals ofSignals and Systems

    Mnnitude A

    --~--~-+-~.I...---~- FFo

    ---------t----""-----+ FFo

    Figure 1.9 Frequency domain representation ofa complex exponential signal

    frequency (Fa or !lo ill the continuous time case, or lUo in the discrete time case), asshown in Figure 1.9.

    When thesignal is the superposition (i.e., sum) of twoor more complex exponentialsof different amplitudes and phases. we just add them in the plot and place them appropri-ately in frequency. $0, for example, a sinusoidal signal

    is represented by two complex exponentials with frequencies Foand - Forespectively, asshown in Figure 1.10. Notice theappearance of thenegative frequency ~Fowhich corre-sponds to the complex exponential with the same amplitude and opposite phase.

    Similarly, for the discrete time case, a discrete time sinusoid

    Muojtude

    A2

    Ii2

    Fo-Fa-----'---t---....I...----+ F (Hz)

    a-r,

    Fa

    Fig..... 1.10 Frequency domain representa~on of a sinusoidal signal

  • 1.1 Signals 11

    is represented by the two plots of magnitude and phase. as inFigure 1.11. Again. it is rep-resented by two frequencies. W oand -W(j. with the same amplitude and opposite phase. Inboth the continuous time and discrete time domains, wecancall this graphical representa-tion the frequency domain representation of the signal. Although at this point wecan un-derstand it only for signals explicitly made of complex: exponentials and sinusoids, wecanseethat itrepresents thecontribution of each frequency to the total signal. So, given a com-plex exponential, or a sinusoidal signal, whether x(t) in continuous time orx[n) in discretetime, wehave seen that we candetermine itsown frequency domain representation.

    Now thequestion: Is there a one-to-one correspondence between each complex expo-nential signal x(t) or x[n1and the frequency representation? This is important because ifthis is true, then there if, no ambiguity in going from the time domain to the frequency do-main. But if this is not true, we have to be aware of possible ambiguities. Another way ofposing thisquestion is asking whether we can find two sinusoids thathave different fre-quencies and yetbe identical in time.

    In continuous time the answer to this question is yes: There is a one-to-one corre-spondence between complex exponentials in time and their frequency representation.Any lWO complex exponentials Xt(t) = eJ21rFII and X2(t) ::: eJ2frF2f with different fre-quencies FI '* Fb are twodifferent signals in the time domain. In discrete time, it is notso. The two sequences xt[n] ::: e'?" and x2[n) = ejw,n, with WI =W2 + k27r, and kbeing any integer. are indistinguishable in the time domain. In fact, when this is thecase,we can write

    since both k and n are integers. andtherefore e1k21r1l ::::: 1.Similar arguments apply for sinusoidal sequences. If two sequences, x.tn] =

    Acos(wln + Ctl) and x2[n] = ACOS(W2f1 + (2). have frequencies and phases related byoneof the tworelationships

    W2 == WI + k21r.W2 = -WI + k21T,

    Maaoitude

    A

    2A2

    ___----'L.......-_-+-_----"' W (rad)

    -Wij

    Phase

    a

    -a

    Figure 1.11 Frequency domain representofion of a sinusoidal sequence

  • 12 CHAPTER 1 Fundamentals ofSignals and Systems

    " .. .. .. ., .. .x[n] 0 , . 0 , , ,.. I ... . . ..,. n. , I , , , . , . . . , 0.. ..Figure 1.12 Ambiguity between discrete time and Frequency domoins

    o. .. " .' .. ,0 . , . . .. o .. , . , I .12[11]

    . , ,xlln] . I . , , ,0 . , , . . , 0 I I I 'I< * i I I . ., . , . .0 , . I , , . 0t ., , . , . 0. .., .. .. ..Figure 1.13 OnefO-one correspondence of di$Crete time and frequency domainl when

    -1f < W S +1T

    with k an integer, then the two sinusoidal sequences have the same samples. The first casefollows from the same argument presented for the complex exponentials. The second caseholds because

    x2[nl:::::; Acos( -Win + k21T - Q'I) :: Acos(W[fI - k27T + ( 1) = x,rnl, for allnAs illustrated inFigure 1.12, sinusoids with frequencies as shown correspond tothe sametime domain sequence x[n].

    This shows thatwedo notneed all the digital frequencies. -00 < w < +(Xl, to repre-senta discrete timesignal. Infact, if we limit thedigital frequency w within aninterval oflength 2'JT-say, for example, -71' < W -s +"~then there is a one-fa-one correspon-dence between discrete time complex exponential signals and their frequency representa-tion. Rather than go through a tedious demonstration, you can easily verify that for eachfrequency w in the interval (-1r. +11']. the corresponding "aliases" (i.e., the frequenciesthatyield thesame discrete time sequence) arealloutside the interval (-1f, +11"] itself. Asa consequence, two frequencies Wl *- WI within the interval -11", +17" yield two differentsinusoidal sequences, asshown in Figure 1.13.

    Example 1.5Consider a sinusoid with frequency fOO '= 0.21r. Then thealiases are at frequencies

    Wo + k2n- ~ (0.2 + 2k}71' = ... , ~ 1.817",2,2",...

    -wo + k21T = (-0.2 + 2k)17 = ... -2.217, 1.8,", ...

  • 1.1 Signals 13

    where wehave shown explicitly the alias frequencies for k ..". - I and k ~ + 1. As we cansee in this example aH aliased frequencies are either smaller than - 7r or larger than +tr ,since -- 1r < Wo < +17' .

    Correspondence between frequencies and signals canbe summarized as:

    Continuous time signals:

    Discrete time signals:

    - ';'.C < F < +00 ~ eJ2tt f"1-7T < W 5: +1T ~ e J"m

    A First View of the Sampling Theorem

    A key issue in digital signal processing is sampling. Most physical signals we observeare incontinuous timebut we process them in discrete time.The process of going fromcontinuous time to discrete time is called sampling, and it is performed by simple elec-tronic components, as shown in Figure 1.14. In the process of sampling in time, we cre-ate a numerical sequence xLI!] :::::: x(nT,), where x(t) is the continuous time signal wewant to sample.

    Because in this process we inevitably lose a part of thesignal (thewhole signal with-in each sampling interval nT

    J< t < (n + l)T~), the question arises as to whether wecan

    recover the lost information. The answer, somewhat surprisingly, is yes, we can recoverthe whole signal from its samples, provided we sample "fast enough." Thesampling theo-rem, which we arcgoing to address later in the chapter, tells us what "fastenough" means.The importance of this ispretty clear. Just think of the CDplayer, where the audio signal isnumerically recorded on the CD and has to be reconstructed with absolute clarity and fi-delity by the player. And, as wean know, the CDplayer does reconstruct the original con-tinuous time signal we can all hear from the speakers.

    .t(l)

    F' 1.1

    .,,--- --- ....,'",

    I(\ ,

    ... ... --------

    Sampling in a DSP board

    011 111010101 1010101 III1001001 10011100101001001

    01 lIllOIOOI I... /

  • 14 CHAPTER 1 Fundcmentcls of Signals and Systems

    In this section. we address the sampling of a complex exponential or a sinusoid anddetermine conditions on the sampling frequency thatmake possible the reconstruction ofthe original continuous time sinusoid. In a later section. we address the problem of sam-pling for general signals. In particular, recall the sampled sinusoidal signal as

    x(r) = Acos(21J'Fot + a) -l' Sample -l' x[n] = Acos(won + a)

    where thefrequency Foand the digital frequency Wo arerelated asWo = 21T(FoIFs). with F,being the sampling frequency in hertz or in samples persecond. We therefore have a map-ping in the frequency domain, between the analog frequency Foand the digital frequencyWoo Now. from the frequency woo can we reconstruct the analog frequency Fo? If the an-swer isyes. it means that wecanfully reconstruct theoriginal signal x(t) (a sinusoid in thiscase) from its samples x(rr1without losing any information at all.

    Along the lines ofwhat we saidabout digital frequencies. a complex exponential withdigital frequency Wo =21fFr/Fs in the time domain is indistinguishable from any othercomplex exponential with frequency lI)o + k21t = 2w(Fo +kFs)1Fs' Therefore, as shownin Figure 1.15~ all analog frequencies Fo+ kFs with k being an integer, map intothesamedigital frequency woo All thefrequencies Fo + kFJ fork -+ O. are called aliases. So. in gen-eral, there is ambiguity, and we cannot distinguish the right frequency Fofrom its ownaliases.

    However, if we choose a sufficiently large sampling frequency, as F, > 21 FoI, then allaliases are outside theinterval (-F/2) < F ~ +(/2). Asa consequence, we canstate thatthere isaone-to-one correspondence between an analog frequency (- Fl2) < Fa ~ +(F/2)and the corresponding digital frequency Wo = 21r(Fr/FJ in the interval -1r < Wo < +1T.But if thefrequency Fois larger than F/2 (i.e., IFoI > F)2). then after sampling weseeone

    +2

    Fo

    II

    --/

    I W+1T

    Figure 1.15 Afrequency Foin the intefval - F/l < Fa < F,I2 and its aliases mapped totheSCIme digital hquenc.y 610

  • 1.1 Signals

    F, - Fo

    1

    I

    15

    NNMl "F

    F;; Fo2

    I+1r

    figure 1.16 A frequency Fo> F,/2 mapped into its alios

    ofthe aliases and the signal cannot be recovered. as shown inFigure 1.16. This issummarizedbythe following:

    ~ ~ ~-- < Fo ::::; +- -s To discree time-e -Tr < lUo = 2Tr- ~ +1T2 2 ~. . F, woF, F,

    -1f < Wo $ +1T .... To contmuous time ~ ~- < Fo = -- :s; +-2 21T 2

    The consequence of this is the sampling theorem, which will be stated more formallyina later section. A continuous time signal x(r) that is bandlimited with bandwidth FB (i.e.,it contains only frequencies within the interval - FB < F < FB) canbefully reconstructedfrom its sampled sequence x[n] = x(nJ:) provided the sampling frequency F$ = 1I~ issuch that r, > 2FB

    Example 1.6Consider the continuous time signal

    x(t) = 3cos(IOOO1Tt - OJ1T) - 2cos(l5ClO1Tt + 0.61T) + 5cos(25001Tt + 0.211)

    How fast do we have to sample it so that we do not lose information? We just look at thefrequency content of the signal. In this case, there are three frequency components, with

    n I = I0007r, ill = 15001r, fl3 "'=' 25001T

  • 16 CHAPTER 1 FundClmentols of Signals and Systems

    all in radians persecond. Then the frequencies are at F == O./2'1r, which yields

    Fl = 500 Hz, F2 ~ 750 Hz, F3 = 1250 HzThe frequency spectrum interms ofmagnitude is shown inFigure 1.17. Recall that be-

    cause each sinusoid is the sum of two complex exponentials, wehave negative and positivefrequencies. Themaximum frequency present. which wecallthe bandwidth of the signal, isat FB ~ 1250 Hz, = 1.25 kHz~ therefore, wehave tosample ata sampling frequency of

    r, > 2 X FB = 2500 Hz = 2.5 kHz

    2.5

    1.0

    1.5

    Amplitude

    1.5

    2.5

    1.0

    - 1.25 - 1.0 -0.5 0.5

    Figure 1.17 Frequency spectrum ofExample 1.6

    1.0 1.25

    In other words, we need more than 2500 samples per second if wedo notwant to lose in-formation aboutthesignal.

    Example 1.7Inmany applications wehave information about the frequency spectrum ofa signal. Forex-ample. a speech signal of telephone quality (what wehear on the phone) has a bandwidth ofabout FB = 3 kHz. Figure 1.18 shows the frequency spectrum of a typical speech signal oftelephone quality; it does notcontain frequencies above the bandwidth of 3 kHz. Therefore.if wesample with F, > 2 X 3000 :;;;;; 6000 Hz, which is to say at least 6000 times a second,the information is not lost.

    ~,"--- --+ ~_...:>

  • 1.2 Systems

    Example 1.8

    17

    Similarly, as in Example 1.7. for a CD-quality signal, we need to use all thefrequenciesup to Fn = 22 kHz. Therefore, digital music is recorded at a sampling frequency ofF, > 2 x 22,000 Hz = 44kHz, and the standards are F, = 44.1 kHz for compact discs(CDs) and F, ~ 48 kHz fordigital audio tapes (OATs).

    III .2 Systems

    General Definitions and Classifications

    Asystem transforms an input signal x into anoutput signal y, The relationship ofcause andeffect between an input signal (thecause) and anoutput signal (the effect) defines a system(see Figure 1.19). In this book we will be focusing on discrete time systems, where theinput signal is a discrete time sequence x~n] and the output signal is a discrete time se-quence yIn]. Very similar considerations apply to signals defined in continuous time. andan extensive literature exists on the subject.

    x[n] y[n]..

    Figure 1.19 Adi~rete time system

    Example 1.9Letx{n] be the total amount of money you deposit in hebank where you keep your moneyand withdraw during the nth month. Let yIn} be the balance at the end of the nth month,and letp be the yearly interest rate inpercent. Then the bank constitutes a system thattakesyour money x[n) as input and gives you a balance y[n]as output. This system can be de-scribed by the recursion

    pyIn] = y(n - 1]+ ~~-y[n - I J + x[n]

    12 X 100with p/(l2 X 1(0) being the monthly interest rate (an approximate value for illustrationpurposes only).

    Example , .1 0In many applications we want to filter out noise from a signal. We will study techniquesdesigning filters later, but if we do not know anything about signal processing. the firstthing wetryis some sort of averaging, tosmooth the signal and attenuate the disturbances.

  • 18 CHAPTER 1 Fundamentals of Signals and Systems

    .r s ]~

    {s ~~

    Figure 1.20 linearity property

    Forexample, if we average over 10points, wecanrelate the input and output signals asI

    y[n] = -(x[n] + x[n - I] + ... + xin - 9])10

    This difference equation describes the operation of the system and the relationship be-tween the input signal x[n] and the output signal y[n].

    In this section, to streamline the notation, we indicate the input and the output se-quences of a system S as follows:

    x[n] ~ S~ y[n]

    Systems are classified according toa number of properties.

    1. Linearity: Consider a system Sandany two input-output pairs:

    xl[n] -to S""'" YI[n]

    xz[n] ~ S ----. Y2[n]

    Then the system is linear if and only if for any two constants at. a2 we can write

    Q1xj[n] + Q2xZ[n] ~ S~ a\Ylln] + Q2Yz[n]

    This is shown in Figure 1.20. Inother words. the output is the superposition of thecor-responding outputs.

    Example 1.11Consider the system Sdefined by the input-output relation

    y[n] ~ x[n] + x(n - 1]

    Is thesystem linear?

  • 1.2 Systems 19

    In order to answer this question. letxl(n] and x;'.[n] be two distinct inputs, and Yt[n].Y2[n] bethe respective outputs; that is,

    x,ln] ~ S~ Yl[n]

    x2[n] ----) S~ yAn]

    Then an input x[n] == lllxj[n] + a2x2[n] yields an output

    y[n] == (ajxl[n] + a2x2[nj) + ({~ IXI[n ~ Il + u2x2[n - 1J)which can be rearranged as

    y[n] = G1(xj[n] + XI [n - 1J) + Ql(x2[n] +x2[n - 1])

    The terms within the parentheses are the output signals Yl [n] andIn], and therefore wecan say that

    which shows superposition. Therefore, thegiven system is linear.

    Example 1.12Consider the system defined by the input-output relation

    y[n] = 2(xlnW

    Then, applying superposition. consider theinput

    x[n] = aloX 1[n) + a2X2 [n]

    The respective output becomes

    After performing simple algebra, we can say that, in general,

    y[n1 * aI2(xj[nj)2 + Q22(x2[n)) 2where the terms on the right-hand side represent the outputs due to xj[n] and x2[nl, re-spectively. Because superposition does not hold, thissystem is nonlinear.

    2. Time lnvariance: LetS be a system with an input-outputpair

    x[n] -+ S~ y[n]

    The system is time invariant if andonly if

    x[n - L}~ S~ y[n - L]

    In other words, the system is time invariant because its characteristic does not changewith time. As a consequence, if we shift the input signal by an amount L, theoutput isalso shifted by the same amount L. This is shown in Figure 1.21.

  • 20 CHAPTER 1 Fundamentals of Signals and Systems

    dL....-----..fo TimeIIII

    S rYin ~D1 ---1-\-----'d Time* D

    ~ Tnn' *1 1'---_s_PII

    ~T;m,*DI1Figure 1.21 Time invoriance

    Example 1.13..

    Consider the system S defined by the input-output relation

    y[n] = x[n] + x[n - 1]

    Is the system timeinvariant? Consider any input x[n] and theoutputy[n]; that is,

    x[n] -t S~ y[n]

    Now consider the same input, delayed byL, and let Yoln] be the respective output. definedas

    yo[n] = x[n - L] + x[n - L - 1]

    Now thequestion iswhether yo[n] ~ y[n - Ll From thepreceding expression it is easy todetermine that it does, andtherefore

    x[n - Lj ~ S~ y[n - L]

    forall inputsignals x[n]. Consequently, the system is timeinvariant.

    Example 1.14Consider the system S defined by the input-output relation

    y[n] = 2nx[n]

    To determine whether the system is time invariant, consider any input x[n]andtherespec-tive response y[n]' If the input now is shifted in time, the output becomes

    yo[n] = 2nx[n - L]

    We immediately seethat this output is different from the shifted output y[n - L]given by

    y[n - L] = 2(n - L)x[n - L]Therefore. thesystem is not time invariant (i.e., it is time varying).

  • 1.2 Systems 21

    Bounded output

    .. 1~.. .....__ .-r ...sx[nl 1L-__f YIn)

    Bounded input

    mu'%Jll... 4 ~A AJ~--~-~:-: ---f-!'-'l

    Figure 1.22 Sounded Input/Bounded Output (BlBO) stability

    3. Bounded InputIBounded Output (BI80' Stability: A system is BmO stable if and onlyif whenever the input signal is bounded as Ix(nll -s A for all n, the output is alsobounded as jy[nJI ~ B for all n. This has to be true for all inputsignals. If this is vio-lated by an input-output pair, the system is notstable. Thisis shown in Figure 1.22.

    Example 1.15T

    Consider the system defined by

    y[n] = x[n] + x[n - 1]

    Is the system BIBO stable? We have to check. LetXln] be aninput that is bounded as

    Ix[n]1 :5 A for all n

    Thenthe output signal y[n) is bounded as

    ly[n]1 ~ ~x(n]1 + Ix[n - 1JI :5 2Awhere we use the fact that lx[n] + x[n - 1][ ~ 1x[n]1 + Ix[n - 1]1. Therefore, for thissystem a bounded input yields a bounded output, andthus thesystem is BmO stable.

    Example 1.16Consider the system y[11] = nx[n]. We can see that the bounded input x[n] = 1 for all nyields the output y[n) ;;:; n for all n. Clearly, thisoutput is not bounded, because it goes toinfinity as n --'Jo 00; therefore, the system is not stable,

    4. Causality: A system is causal if theoutput y[nl at any time is independent on anyvaluex[n + m]of the input signal, with m > O. In otherwords, in a causal system the effectfollows thecause, as in Figure 1.23.

    -vv *1.\ s I y[nJ -~.Figure 1.23 Cousol $)'Stem

  • 22 CHAPTER 1 Fundamentals ofSignals and Systems

    Example 1.17Consider the system defined by the input-output relation y[n] =:; 2x[n - 1]. This systemis causal because theoutput y[n) at any time ndepends onpast values of the input signalonly. Therefore, the system iscausal.

    Example 1.18Consider the system defined by the input-output relation y[n] = 2x[n + 1J + x(n ~ 1].This system is noncausal because the output y[nJat any time n depends on some futurevalue of the input signal.

    Linear Time Invariant Systems: ConvolutionA particular class of systems that wewill be dealing with most is thatof linear time invari-ant (LTI) systems. Recalling thedefinitions of these properties, to this class ofsystems wecanapply superposition (from the linearity property) and thecharacteristic ofnotchangingwith time (time invariance property).

    Unlike all othersystems, LTI systems canbe fully characterized by a setof particularresponses. In fact, recall that any signal x[n] can be expanded by superpositioning of im-pulses as,

    x[n] = 2: x[k]8[n - k]k= -00

    Now let h[n1be the response of thesystem due toan impulse; that is,8[n) --+ S..-+o h[n]

    Because the system is time invariant. the response to a shifted input is a shifted output; inthis case.

    5[n - k] -+ S ....... h[n - k]

    Now, due to the fact that thesystem is linear, weapply superposition:+~ +~

    x[n] = ~ x[k]5 [n - k] --+ S -7 y[n] = ~ x[k]h[n - k111"'-"" ~--~

    The rightmost operation is called convolution, denoted as

    +~

    y[n] = h[n] *x[n] = 2: x[k]h[n - k]*''''' -00

    where the impulse response h[n) is defined asa[n] -7 S --+ hfn).

  • 1.2 Sy!ltem:so

    Example 1.19

    23

    Let x[n] = urn]. a unit step. be the input of an LTI system with impulse responseh~n] = O.S'lu[n]. Then the corresponding output y[n] is computed by theconvolution

    y[n) = 2: u[k] X O.81l - ku[n - k]k= -"

    Now, for each value of fl, consider thesequence u[k]u[n - k], as shown in Figure 1.24. Ifn < O. then u[k]u[n - k) = aforan n, because foreach value of theindex k either u[k] oru[n - k] will be zero. Butifn ~ 0, then u[k]u[n - k] ~ 1for 0 :=; k ~ n, andtheconvo-lution becomes

    " ~ 1 - a8"+ Iy[n] = 2:0.8n - 1: ;;:: 2:0.8* = . == 5 - 4 X 0.811 for n~ 0

    k=-O k=U 1 - 0.8

    u[k]

    -~-~---.+-~-~----+k

    uln - kl

    -----t----'-------kn

    Figure 1.24 v[k] and ufn - k] for n~ 0

    Because the response )'[n] = 0 for n < 0, wecan write theresponse foran n to bey[n] :;;;; (5 - 4 X O.811 )u[n]

    AU the information of an LTl system is in its impulse response h[n1~ also the stabilityof the system can be deduced from h[n]. In particular wecart say that

    An LTI system with impulse response h[n] is BIBO stable if andonlyif 2: lh(nJI < (XIn

    In fact, Jet us assume that the input signal x[n] is bounded as x[n] < A for all indexes n.

  • 24 CHAPTER 1 Fundcmentals of Signals and Systems

    Then we can write

    ]y[nJl s ~ Ihlk}llx[n - k)l ~ L !h[k)]Ak k

    andtherefore theoutput y[n] is always bounded if L Ih[n] Iisbounded.Inthenext section we see a general technique forcomputing the output ofan L11 system.

    The z-TransformDefinitionOne of the most general and convenient ways ofcomputing the output of an LTI system isby the z-transform. The convolution operation we sawin the previous section can becomequite involved andcomputationally very cumbersome. By using the z-transform, as withmany transform techniques, we shift the problem to a different domain (the transform do-main), in which the solution in general is computed by algebraic operations (straightfor-ward multiplications and divisions). Like crossing a river, we can either swim straightacross to the other side or we can walk to the bridge (the transform domain), cross thebridge (solve theproblem in the transform domain). and walk to the pointwewant toreachon the other side (goback. to the time domain).

    Given a signal x[n1wedefine thez-transform as

    zEROC

    with ROC denoting theregion of convergence.

    Example 1.20Let x[n} = a"u[n]. We call this a causal sequence because it is nonzero only for n~ O.Then,

    Izl> la\

    Theregion of convergence (ROC), defined as IzI > Ia[, isdetermined by the fact thatthegeometric series converges when the argument has magnitude smaller than 1. In this case,we have convergence when laz-'1 < 1,which implies Izi > lal

    Example 1.21 -Letx[n] = a"u[ -n - I]. We call this ananticausal sequence since it is notequal to zeroonlyfor n < 0. Its z-iransform becomes

    +~ -I

    X{z) = L a"u( -n - 1]Z-II == L a",-".,=-::fI JI---CIO

    = (~a-Ilzn) - 1 = -~. [z] < lal~ Z a

  • 1.2 Systems 25

    Notice inthetwoexamples that the two sequences havealmost the same z-transform (apartfrom a minus sign) and that they can be distinguished by their regions of convergence.This is shown in Figure 1.25.

    Causal Sequence: +'.. """ .... Radius = 10\III

    z ja\

    z-a

    Anti&ausal Sequence: -4-...~ .. ,. ..Radius > laj,,,I,

    Figure 1.25 z-trol'lslorms of causal ond onticousal sequences

    Example 1.22Let x[nJ= O.SInI. Then, as with any other sequences, we can write x[nJas the sum of thecausal and anticausal components:

    x[n] = o.g-nu[-n - I] + O.8J1u[n]

    Therefore, the z-transform is the sum of the z-transforms of the causal and the anticausalparts.

    From the preceding examples, with a -":= 0.8 for thecausal part anda =0.8- 1 = 1.25for the anticausal parts, weobtain

    l ZX(z) = - +

    z - 1.25 z ~ 0.80.8 < lzl < 1,25

    where the ROC is the intersection of the two ROCs for the causal part 1zl > 0.8 and fortheanticausal part Izl < 1.25. They intersect because both z-transforms have to convergein the ROC.

    If the intersection of the various ROCs is empty, then thez-transform does notexist.

  • 26 CHAPTER 1 Fundamentals ofSignals and Systems

    .tIn] =a~1

    +'# ,# "" nFigure 1.26 Geoeral sequence

    Example 1.23

    Radiu =: 1(/\.--.r--.

    Radius = IIlal'"

    Letx(n] = I for all n. We canbreak it into causal and anticausal parts:

    x[n1= u[ - n - I} + u[n]

    ul-n - 1] ulTlI

    ----~-~-+--~----_ ,r

    Figure 1.27 xl,,] "" , as the sum ofcallsol and cniicousol steps

    Then. thez-transfonn 1Sdetermined:

    x(z) = ( __z ) + (~)z - l z-l

    Butthe first term (anticausal) converges only in [z] < I, and the second term (causal) con-verges for Izl > 1.There are no points in common between the two ROCs and thereforethe z-transform ofx[n1"" 1does not exist!

    Example 1.24Using the same arguments. you can verify that the complex exponential sequencesx[n] = eJOJr{l and therefore the sinusoidal sequences x[n] ~ cos(ldon) do not have az-transform.

  • ),2 Systems 27

    Properties

    In this section we list the properties of the z-transforrn. To avoid repetition, we win con-sider a number of discrete time signals xI [n], x2{n], ... with z-transforms Xl (Z), X2(Z), ...existing in nonempty regions ofconvergence ROCl , ROC2..

    Linearity.'

    Proof. Directly from the linearity of the sum. In fact,

    TIme shift:

    Proof. Again. from thedefinition

    toe I ~ t'"

    Z{xln - Ln = L x[n - L]z- == L x[m]z-(mt l.) ~ ('L L x[n] z-rs=-x

    after thechange of variable n - L~ m.

    Z{hln] *x[nn= H(z)X(z)Convolution:I..---- JProof. From the definition of theconvolution

    z{ Lh[k]xln - k1} = Lh[k]Z{x[n ~ kl} == Lh[k)z-tX(z) = H(z)X(z:)1 k 1

    because only x[n - k] is a function of the time index. n. The step Z{x[n - k]} --+ Z--:IX(Z)comes from the time shift property. The last step is a direct consequence of the definition ofthe z-transform ofh[n 1,

    Multiplication bya complex exponential: Z{x[n]eJ'lJ"I} == X(e-1ll'oz)

    Proof. Again, from the definition

    Z{x[n]eJ",.n} --' Lx[n]ej"'unz n = Lx[n}(e-jW~z)-1l = X(e-jWoz)11 ~

  • 21 CHAPTER 1 fundamentals of Signals and Systems

    dZ{m[n]} = -z dz X(z)Multiplication by n:

    I....-- JProof. Applying the definition

    d d-X(z) ~ ~x[n]-z~" ~ ~x[n](_nz-n-i) = -Z-l ~nx[nJz-nd: II dz II n

    andrearranging terms show the property.

    The Inverse z-TransformBy the inverse z-transform wereturn from the transfonn X(z) and the related ROC to thetime domain sequence x[n]. There are two main ways ofdetennining theinverse z-transform;(l) by thedirect inversion formula, which isanalytically attractive butseldom used in prac-tice, and (2) by tables and partial fraction expansion, which are nonnally used in standardproblems.

    Direct Inversion Formu14. First let us start by observing that the ROC is of the fonnPL < Izl < P2' with Ph P2 expressing lower and upper bounds of the magnitude [z]. Inview of this, thedefinition of thez-transform canbe stated as

    Z{x[n]} = X(z) ~ Lx[nk". PI < Izi < P2/I

    The limits Pi and P2 canrange anywhere from zero to infinity. Although the mathematicalexpression for X(z) can exist almost everywhere, it has the meaning of a z-transform onlywithin theregion of convergence.

    Example 1.25Take the z-transform ofa step:

    zZ{u[n]} = X(z) ;;;;~z - I

    [z] > I

    Although theexpression z/(z - 1) exists everywhere in thecomplex plane except for thepoint z = I, it hasthe meaning of the z-transform for thesequence x[n] = u[n] only forzin the ROC; that is, for IzI > 1. Elsewhere it does not mean anything; it is just anothermathematical expression.

    Consequently, any operation onX(z) andany inversion formula have tooperate with-in theROC.

    Now observe a particular integral that is the basis of theinversion fonnula:

    {

    eirm - e -jfrIl

    I"HI' . = 0 if n*'O

    eJ""'dw = jn-11" 21T if n = 0

  • 1.2 System~ 29

    Let us go backto theexpression for the z-transform andchoose a p > 0 within meROC~that is, PI < P < P2-and compute theintegral:

    1 J+11' - - I J+ IT~ X(peJW)plle'Wlldw = - '2:x[k]pn-leJw(lI-k) dw2~ _~ 2~ _~ *

    = '2:xlkJtf-k(_l_fheJwln - k)dW)k 21T -11'

    Because the rightmost expression is always zero for k "* n and I for k = n, we can statethe inverse z-transform formula:

    PI < ItI < pz

    Example 1.26Let x(z) :- zI(z - 2) with region of convergence Izi < 2. To determine its inverse z-transform x[n1~ IZ{X(z)} using direct integration, first choose p 0:: I, within me ROC,and compute the integral:

    If""" Iw 1f-.-.,,- 1( +00 )xrn] := - ~W_2eJW" dw = - eJ~l +"L - '2: (2-~e}w)k" do:21T _'IT e 27T ~1l" 2 k=O

    where the term 1I(2-1eJw - I) is expanded as a geometric series. Rearranging terms, weobtain

    xlnl := - f2 ~(h 0(_1J+'I'I'e~(1 H+n}dW)k=O 211 -'If

    where the term in parentheses is I when the exponent I + k + n -; 0 and is zero other-wise. After simple algebra. this yields

    x[n] = {-2 ft ifn ~ ~l,o otherwise

    Jabks and Partial Fraction Expansion. In most cases of interest in digital signalprocessing, thefunctions X(z} thatrepresent z-transforms arerational functions andhaveapolynomial numerator and denominator. For example

    ()N(z) (z - Zj)(z - 1.1) ... (z - ZM)

    X Z := -- := K--:.-----'---~-------=-D(z) (z - PI)(Z - P2) ... (z - PN)

    where z., i = 1... , M, andPJ

    , j = I, ... , N, are mezeros and thepoles ofthe z-transform,Now, from the preceding examples andthe tables, we know that a termof the fonnz/(z - a)

  • 30 CHAPTER 1 Fundamentals of Signals and Systems

    comes either from thecausal sequence anu[n] or the anticausal sequence -a/lu[ - n - 1]1 ac-cording tothe ROC. Therefore, wewant toexpand theexpression X(z) interms ofitspoles:

    Z l ZX(z) = C~- + C-- + .,. + CN- -I Z ~ PI 2Z ~ P2 z - PN

    where C1, Cz . , eN are constants-s-in general, complex. We have assumed that there areno repeated poles-that is, all poles have multiplicity 1. Thegeneral caseis slightly morecomplicated and it willbe given later in the general fonnula.

    Does theexpansion always exist? From the righthand side of the preceding expression,we can see that if we take the limit z ---+ 00, then each term zl(z - p) ----+ 1 andX(z) -+ Cj + C2 + ... + CN'TIlls means that the expression X(z) is finite atZ -7 00, andtherefore thedegree Mofthe numerator cannot exceed the degree Nof thedenominator.

    The constants CI , ... , CN are computed by theexpression

    X(z) ICi ;;;:. -(z - pJZ z;p,

    when the pole has multiplicity I. The reason for this is very simple. Substituting the ex-pression X(z) in theexpression forC; we obtain

    X(z) I 1 I-(z - Pi) := C,--(z - Pi) + ... + Ci + .,.z "~p, Z - PI r~p,where the constant C, will appear by itself because the tenusz - PI and lJ(z ~ p) cancelout. All otherterms are zero when Z = Pi' andtherefore the only term surviving is C;

    After thepartial fraction expansion ofX{z), wedetermine theinverse z-transform x[n]from eachtenn of thesummation. According to the ROC, for each one we have to choosethecausal or the anticausal time sequence.

    Example 1.27Iss

    Let

    3z2 - 1X(z) = (z - I)(z - 2)' 1 < Izi < 2

    We want to determine its inverse z-transform x[ n]. By PFE wecan write

    X(z) 3z2 - 1 Co Cj C2-::::; =-+--+--Z z(z - t)(z - 2) z Z - 1 z - 2

    with

  • 1.2 Systemr.

    Therefore

    X(z) = -0.5 ~ 2.0- .~, + 5.5 _z_z-I z-2

    31

    When we compute the inverse z-transform, we have to consider that each term of theform z/(z - a) could yield a causal sequence a"u[n] or an anticausal sequence-a"ul~n ~ I]. We decide on which one to choose from the ROC. In the example, wherethe ROC is in the interval I < IzI < 2,the two terms z/(z - I) andzI(z - 2) yield causalandanticausal sequences, respectively, and therefore

    x[n1== -O.58[n] - 2.0ul"] - 5.5 X 2ltul

  • 32 CHAPTER 1 Fundamentals ofSignals endSystems

    Example 1.28Let anLTI system have impulse response h[n] = O.S1Jr1 andinput x[n] = u[n]. Then,

    H(z) = Z{O.5-"ut-n -In +Z{0.5"u[n]} = - 1:~ 2 + z _zO.5-1.5z

    ~ (z - o.s)(z ~ 2r 0.5 < Izi < 2

    X(z) = Z{u[nJ} = _z_, Izi > 1z- 1

    Therefore,

    -1.5z2Y(z) = H(z)X(z) = (z _ O.5)(.z _ 1Hz _ 2)' 1 < Izl < 2

    By partial fraction expansion,

    Y(z) = 3z ~ 1 - z _z0.5 - 2z ~ 2' 1 < Iz] < 2

    And finally, theoutput signal

    y[n] = 3u[n] - 0.5"u[n] + 2"+ lu[ -n - 1)

    When the LTI system is given in terms of a linear difference equation as in(2)above,then we can apply the z-transform toboth sides of theequation and obtain

    (l + allz- I + ... + urrz-N)Y(:z) = (bo + b1z-1 + ... + bNz-N)X(z)

    where we applied the time shift property to both input .t[n1and output y[n]. Therefore. therelationship between X(d and Y(z) becomes

    Y(z) = H(z)X(z)

    where

    ( )_ bo +biZ-I + ... + bNz-N = bal + blzN- 1 + ... +btf

    Hz- I N Yl1 +alll - + ... + aNl- z" +alJ

    , - + ... + aNThe function H(z) iscalled the transfu function of the tTl system.

    Notice that thelinear difference equation expresses a causal relationship; theoutput atany time ndoes not depend onfuture values of the input x[n].Therefore, the ROC of thetransfer function H(z) istheROC for a causal sequence.

    In order to determine the ROC. we have to determine the roots of the denominatorpolynomials (i,e., thepoles of the system):

    H(z) = N(z)(z - P.)(z - Pz) .,. (z - PN)

    Let PI = max,{ Ipil}~ that is, the largest magnitude of thepoles. Then we can saythat thetransfer function fora linear difference equation is given as follows:

  • 1.2 Systems

    The transfer function H(z) of the linear difference equation,

    y[n] + aly[n - 1]+ ... + aNy[n - N]= boX(n] + b1x[n - I J + ... + b,vr[n - N]

    is given by

    ()boz" + b,ZN-I + ... + bNH z =--------zit + a(JzN-1 + ... + aN

    N(z)~---------'----~-~-

    (z - pJ(z - P2)" (z ~ PN)'

    Leta causal system be defined by the linear difference equation,

    y[n] - y[n - 1]+ O.5y[n - 2) = 3x[n] - 2x[n - \1withtransfer function

    3 2., 3lZ - '"'I~H(z) = z - _z = Ll..__1..

    2- Z + 0.5 (z - Pl)(Z - P2)

    33

    Thepoles PI' P2 aregiven by

    P = _1_ei trf4 and p == _l_e -1'u/4I 2.5' 2 2'1,5

    and therefore the maximum magnitude isp ~ 1120,5 and the region of convergence is

    120.5 < Izi

    To conclude this section, we candetermine a relation between thestability of the systemand theROC of its transfer function. Recall thatanLTI system isBIRO stable provided that

    LIMn]1 < 00It

    If the transfer function H(z) of the system is such that the unit circle (i.e. the region withIII = 1) iswithin theROC, than the stability condition is satisfied. Therefore, wecansay that

    An LTI system withtransfer function

    H(z), Pt < Izl < P2is BIBO stable if and only ifPI < I < P'l' That is to say, the unitcircle belongs tothe ROC.

  • 34 CHAPTER 1 fundornentols of Signals and Systems

    Response to Complex Exponentials and Frequency ResponseNot all signals of interest have a z-transform, In particular, for a complex exponentialsignal x[n] = eJlJJo" the z-transform does not exist, because the z-transforms of the re-spective causal and anticausal partsconverge in different nonoverlapping regions of thez-plane,

    Fortunately for this class of signals the response is very simple, and it can be com-puted without thehelp of thez-transform. If the input sequence is a complex exponential-that is,x[n] = e1fAl,)fl-tben the output sequence is detennined by convolution:

    y[.] ~ h[.]*x[.] - :t:hlk]~*-'I ~ ( :P[k]e-'.,o).,1....

    The term between brackets is the transfer function H(z) evaluated at z = eilli(;. This valueexists only if the unitcircle is inthe ROC-that is to say if the system is BIBO stable. Thiscan be summarized as follows:

    For a BIBO-stable LTI system H, with transfer function H(z),

    xIn] = ej%'1 --+ H -t y(n] = H(e)"'o)ej"'lll

    In other words, the complex exponential is an eigenfunction of a linear time invariant sys-tem, because the response is identical to the input, just multiplied by a scaling factor(called the eigenvalue).

    When the system isBlBO stable, the function

    H(w) = H(z)lz'"e!" ~ ~h(nle-J-PI

    is called the frequency response of the system. Notice that the frequency response is peri-odic with period 211' since

    H(w + 21T) = ~h[n]e-jlJJ/le -j211"11 ;::: ~h[n]e -ftwr ~ H(oJ)" R

    for allto, because e .}21r /l = I for alln.Therefore, because H(w) repeats itself periodically,all the infonnation is contained in oneperiod-in general chosen as -7r ::::; fJJ < +17. Thevalues at any otherfrequencies arejust repetitions of these values.

    Notice that this is in complete agreement with what we said about the digital fre-quency w, which is defined in the interval -1r S co < +17 in orderto avoid ambiguitiesbetween timedomain and frequency domain representation.

    Example 1.30Consider thecausal system withtransfer function

    ( )2z - 0.5

    Hz ""~--~Z2 - Z + 0.5

  • 1.2 Sy~'em~

    and Jet the input be

    35

    x[n] = ejU21Tn

    We want todetermine the output signal y[n]. First notice that the system is stable. becauseit is causal and it has all poles inside the unit circle. Therefore, the unit circle IzI = 1 iswithin the region of convergence.

    The response, therefore, is given by

    y[n] = H(z)lz=lll..ejO.21rn

    where

    Therefore, the output signal is

    y[n] :=: 4.466eft(l21'Tn 0.76(3)

    Example 1.31Suppose in the same system the input is a sinusoid:

    x[n] e;:; 10 coslO.27m - 0.511")

    andwe want to determine thecorresponding output yI n]. The cosine term canbe written asthe superposition of two complex exponentials, andthe system is linear and time invariant,sowe can write

    y[n] = 44.66 cOs(O.21Tn ~ 0.51T - 0.7603)

    The frequency response H(w) of a linear lime invariant system is very important; itgiyes a "picture" of how each frequency istreated by thesystem. Aswehave mentioned sev-eral times (this will beexplained more carefully in the sections on Fourier representation ofsignals), all signals of interest can be represented in the frequency domain in terms of a su-perposition ofsignals. Also, the disturbances wewant toeliminate arerepresented interms ofthefrequency spectrum they occupy_ One of the reasons wedesign digital filters (interms oflinear time invariant systems) is to eliminate, or at least attenuate, disturbances, and in thenext section we will bediscussing some simple techniques based onpoles and zeros,

    Summary: linear Difference Equations in the Time, Z-,and Frequency Domains

    In the previous sections we have seen several analysis tools for linear time invariant sys-tems-in particular, systems described by linear difference equations. We have seen

    a. Time domain representation.

    y[n] + Qly[n - 1] + ... + QNy[n - N] = boX[n] + ... + b,.,.x[n - N]

    in terms of time recursion (Figure 1.28).

  • 36 CHAPTER 1 fundamentals ofSignals and Systems

    b. z-domam representation,

    ()bot." + btZ'~-1 + ... + b,. (z - ZI) ... (z - ZM)

    H Z := = KC....:.--:.:...--.:......-----=:~l + 0IZN-1 + ... + aN (z - PI) ... (z - PN)

    interms of zeros z, poles Pi' andgain K (Figure 1.29).c. frequency domain representation,

    H(Cd) = H(z)ll=~ -TT < W S + 1rin terms ofmagnitude H(w) and phase LH(w) (Figure 1.30),

    These are three different ways ofrepresenting the same system. They are all equivalent, inthe sense that if we know (say) the z-domam representation, then we can detennine both

    x[n] y(nJ..

    yIn] ;;:: -aly[n - I) - ... +bQx[nl + .. ,Figure 1.28 Time dornoin representation

    Figure 1.29 z-cIomain representation

    o

    LH(w)

    F\g... 1.30 Frequency domain representation

  • 1.2 Systems: 37

    frequency andtime domain andso on.In fact, wecan seethat the time domain representa-tion and the z-domain representation can be determined from each other by inspection.Let's look at anexample.

    Example 1.32Consider a system with the linear difference equation

    y[n] = y[n - 11 - O.5y(n - 21 + 3x[n] - 2x[n - IJThen the transfer function is determined by inspection as

    3 ~ 2.;:-1 Z2 - (213)zH{z) - - 3---

    - I - z" +O.5z-2 - Z2 - Z + 0.5

    which yields zeros at ZI = ~. Z2 = O. andpoles at PI = 0.5(1 + j), PI = 0.5(1 - j).

    Of particular interest is the relation between the z-domain andthe frequency domainrepresentations. which leads to some simple tools for thedesign of linearfilters. In partic-ular, it is notdifficult to see the relationship between the pole-zero representation and thefrequency response H(w) of the system.

    Starting with the relation between the two domains.

    H(w) = H(z)I"=t:-""

    weseethat the frequency response of the system (assumed tobe BIBO stable) is the setofvalues of the transfer function on the unit circle. In particular. if wetakeanypoint qon theunit circle, we can see how poles and zeros influence the value of the transfer function.Following Figure 1.31, wecan seethatgiyen any frequency w andthecorresponding point

    :w1,,,,

    IH(w)I= IKI Iq ~ zlllq ~

  • 31 CHAPTER 1 fundamentals of Signals and System,

    z = ~ftj on the unit circle, the magnitude and thephase of the frequency response can bedetermined:

    M N

    LH(w) = LK + ~L(Z - Zi) - ~L(Z - Pi)k~l k~l

    As a consequence. we can see three cases of interest.

    1. Zero onthe unit circle. If(say) the zero 'I ison the unit circle, then z, = ej lJl1 Therefore,H(WI) ;: H(zl) ~ 0

    and thefrequency response is zero atw = {JJ I. This is shown in Figure 1.32; notice howthe phase of the frequency response has a discontinuity of 1goo atw = WI.

    Figure 1.32 Zero on the unit circle

    lH(w)1

    I

    A, w,,,,

    LH(w} : WI,

    0,,tt,I

    Figure 1.33 pote dose to the unit circle

  • 1.2 Systems 39

    2. Pole close to the unit circle. When a pole is close to the unit circle(never ontheunit cir-clebecause of stability issuesj-s-say, PL = pe1W, with p close to I-then the frequencyresponse has a large value at w = WI' because Ie'" - PI I is small when w = W I' Thisis shown in Figure 1.33.

    3. Pole-zero pair. If weplace a zero on the unitcircle (say. ZI = eJw,) and a pole close tothezero, inside the unit circle (say, PI = peiw,), then the frequency response H(w) iszero at w = WI' but the effect of the zero is almost cancelled by the pole when wmoves away from WI- In fact, as wecanseefrom Figure 1.34, the twovectors eiw - ZI(the vector q -

  • 40 CHAPTER 1 Fundcmentals ofSignals and Systems

    ~DiSturbance

    --+----+~----- ....... F(kHz)o 1.5 6

    Fi8U~ 1.35 Frequency spectrum of the signal in the example

    x[n] = s[n] + w[n), which canbe easily detennined from the material in the rest of thischapter.

    Notice two facts:

    "1. The signal bas a frequency spectrum concentrated within the interval 0 to 6 kHz, sothere is no aliasing after sampling.

    2. The disturbance is at frequency Fo = 1.5 kHz.

    Now the goal is to design and implement a simple filter that rejects the disturbancewithout affecting the signal excessively. We willfollow these steps:

    Step 1: Freqrunc} domain IJUCifkations. We need to reject the signal at the frequencyof the disturbance. Ideally, we would like to have the following frequency response:

    ( ) = {O if w = WooH CI) 1 otherwisewhere (00 = 27f(FoIF,) = ",/4 radians, the digital frequency of the disturbance. Recallthatthe digital frequency is a relative frequency, and therefore hasnodimensions.

    SUp 2: DeterrniM poles aJUI zeros. We need to place two zeros on the unit circleZl = ejelo ~ efrr/4 and t2 = e-A = e-j wI4 Now we have to choose the poles. We couldchoose PI ;::;; P2 = O. and this would yield the transfer function

    (z - z )(z - z )H(z) = K I 2 2 = K(l - 1.4142z-1 + Z-2)

    Z

  • 1.2 Systems 41

    4

    3

    IH(w)1 2

    1

    00 0.5 1.5 2 2.5 3

    150 r------.----...-----.----,.------.----,--,

    32.521.50.5

    - 50 l.-__........... .L..-__--L- J-__---'- .............

    o

    100

    o

    LH(w) 50

    Figure 1.36 Frequency response with all poles at zero

    If we choose. say. K = 1. the frequency response is shown in Figure 1.36. As we can see,it rejects the desired frequencies. as expected. but greatly distorts the signal.

    A better choice would be to select the poles close to the zeros, within the unit circle,for stability. For example, let the poles bePI = peifJJj; and P2 = pe-j fllo With p = 0.95. forexample. we obtain the transfer function

    H(z) = K (z - ZI)(Z - zz) = 0.9543 7. 2 - 1.4142z + 1(z - PL)(Z - P2) 7.2 - 13435

  • 42 CHAPTER 1 Fundamentals of Signals end Systems

    2 I I f I I I

    1.5

    IH(w)[ 1

    ,~0.5 -0 I J I

    0 0.5 1.5 2 2.5 3

    100I I I 1 I

    50 ;"'-LH(w) 0

    \-SO-100 ~

    I I I I

    0 O.S 1.5 2 2.5 3

    Figure 1.37 Frequency response with poles dose to the unit circ~

    ~(F)l

    ---+---~~~~-- ....... F(kHz)o

    Figure 1.31 Frequency spednJm of ~hered signal

    6

    111.3 Fourier Analysis of Discrete Time Signals

    Periodic SignalsIn this section wedefine a class of discrete time signals called periodic signals. There aretworeasons why these signals are important:

    1. Anumber of signals in nature exhibit periodic repetitions. Think: of any vibration. oceanwaves, seismic waves, or electromagnetic waves.

  • 1.3 Fourier Analysis of Discrete Iirne Signals

    x(n]

    Figure 1.39 Aperiodic sequence

    43

    2. It is pretty easy to believe thatperiodic signals are made of (periodic) sinusoids of dif-ferent frequencies. which is thegoal ofFourier analysis inthe restof thischapter.

    Definition. A discrete time signal x[n] is periodic if andonly if there exists a positiveinteger N > 0 suchthat

    x[n + N] = x(n] for all nIn other words. a periodic signal keeps repeating itselffor all values of the index n, from-00 to +-.:0. The smallest positive integer N is called the period of the signal, Figure 1.39shows a periodic sequence with period N =6.

    Example 1.33Asinusoidal signal of tne form

    x[n] = ACOS(2win + a)

    with k, L integers. is periodic. If k and L are mutually prime (i,e. they do nothave anycommon factor), then the period is N = L.

    In fact, the period N = L satisfies the relationship

    xLn +N] = AC0s(21Ti(n + N) +a) = ACOS(2'l1in + a + 2'7Tk) = x[n)for all values of n.

    Example 1.34Asinusoidal signal ofthe form

  • CHAPTER 1 Fundamer1tals of Signals ond Systems

    is notperiodic. In fact, if it were, the period N would be such that

    x[n + N} ~ Aco{in+ a + iN)and it would satisfy the relation

    for some integer m. Butthe constant 7T is irrational, in the sense that it cannot be expressedas the ratio oftwo integers. This implies that aninteger period does not exist, and thereforethe signal is notperiodic.

    Example 1.35The signal

    x[n] = 5 cos(0.3?Tn - 0.51T)

    is periodic with period N == 20, since

    3 k0.3," = 21J'- = 217'-

    20 L

    Expansion of Periodic Signals: The Discrete Fourier Series (DFS)Now the problem we want to solve is how to determine a "reference frame" for discretetime periodic signals. Inother words, the issue is todetennine a set of elementary periodicsignals thatserve as the basis of any other periodic signal.

    Avery attractive candidate is the set ofcomplex exponentials

    el[n] = ei,t(21fJN),r, k ::;;;;; 01

    ,N - 1

    with N the period. Thereasons weconsider these signals ascandidate basis signals arethefollowing:

    a. They are complex exponentials. We have seen that complex exponentials are eigen-functions of linear time invariant systems, and theoutput is easily detennined by thefrequency response.

    b. They areallperiodic with period N. In fact. e.ln + N) = e)k(21fiNXn+N) = ei :(,2'1r lN)r. =ei[n] for all n.

    c. These signals are allvonhogonal'' toeach other, in the sense that

    ~+N-l N-I

    ~ e;rn]e,Jn] = ~e;[n]em(n] = 0 ifk =/; m11"'''0 ~"'O

    for any index RO.

  • 1.3 Fourier Analysis of Discrete Time Signals 45

    The importance of the last expression will be clear shortly. butfirst let us seewhy thelaststatement is true. First notice that because all signals are periodic with period N, thesum-mation can start at any index. no, as long as it is taken over one period. In fact, let no < O.for example, and take any periodic sequence f[n] ~ f[ n+ N}. Then,

    " 0+ N- ! -I lI o+N- j "o+N-1 N-l N-I

    L f[n) = ~f[1! + N] + 2: f[nJ = ~ f[n) + L f[n) = ~f[n]1I~"" n="ll n~O n=-O ""'IJo+N ""'0

    This isshown in Figure 1.40.From the expression of et[n] we canwrite

    ifm *kifm =k

    where we applied the standard result ofthe geometric series

    .'V-I {l-d' ifa "* 1Lf =0 1 - a11=0 N if a = 1

    Now consider any periodic signal x[n] with period N, and expand it in terms of theseN complex. exponentials:

    tv-I

    x[n] = LUkt'k[n}t=o

    The N coefficients au, al . ,aN -I can be computed from the orthogonality of the com-plex exponentials:

    ~e;lnJx[n] ~ ~e;[n](%a.em[nJ) ~ %a.(%e;[nJemlnl) ~ Na,

    where the last expression comes from the orthogonality property. In the summation, onlythe term with m = k is nonzero, and all others arezero. Therefore. thecoefficients ak aredetermined as

    l "o,N-lak = - L e:lnlx[n] fork = 0, I, ... ,N - 1

    N n=/Io

    N f[n] N.. --+ I; -: ,-. , . ... , . ' . , , " , , . , , , ,

    " , ~ ". , .. , .. ,, . , , I , . , . . , .. ,. . , , , , , . , , . , , , , , , ~ , , ,, 1 I , , I , , ., . , . , , , , I, , , , , , . I , . ., , , , . . , ,, , , , , , , , . , . ." . " I , " " ':

    a hSumhere Sumhere

    Figure 1.40 Sum over a period

    n

  • 46 CHAPTER 1 Fundamentals of Signals aod Systems

    for anyinitial index 1lij. This expression. and theexpansion itself,

    N-I

    x(nl = ~a~l[nl,1:-0

    define theexpansion ofa discrete time periodic signal in terms of complex erponentials,However. for traditional reasons, it is customary to usex[k) = Nal and defme the discreteFourier series expansion ofa periodic sequence x[n] with period N as

    /IQ+N-!

    x["] = DFS{x[n]} ='" ~ x[n]e-JI(2..,N)ft, k = ko. . . I ko+ N - I

    I kgHI-1x[n] = IDFS{x[k]} = - ~ x[k}ell(211/N)r. -00 < n < +00

    N l=~

    where DFS and IOFS stand fordiscrete Fourier series and inverse discrete Fourier series,respectively. The initial points no and ko are arbitrary, due to the periodicity ofboth the se..quences x[n] and Xl"], as you can verify yourself.

    Example 1.36Suppose we have a periodic signal with period N = 10, defined over one period as

    x[n] == {l itO < n s: 4o ifSsn:s9

    This signal. called a square wave for obvious reasons, is shown in Figure 1.41. The dis-crete Fourier series (DFS) is therefore computed as

    9

    x[i] = ~.t[n]e-jl{'II'/s)e for k =0.1... ,911=0

    Substituting for thesignal. weobtain

    ..X[k] = ~e -Jl(../~).. fork = O. 1, ... 9

    Il-Q

    4 9

    Figure 1AI SCllnpIed square wave (N - 10)

  • 1.3 Fourier Anolysis of Discrete Time Signals 47

    This expansion means that the square wave x[n] shown in Figure 1.41 can be written interms ofcomplex exponentials as

    x[n] = 110(5.00 + (3.23e-j0 41r)e ! trI5),. + (1.23e-jO217)e /3(17/5)n + ei frl1

    + (1.23eJl)2w)e -J3(wf5)n + (3.23ej(l4tr)e -;(""'5")

    where weusedthe fact that ej 7(wI5),r ;;:;; e -j3l.wI5)n and ei9(lI'ls),. = e -ft'lffSlII.

    When wewant to determine the output of anLTI system, thisexpansion is particular-ly attractive. Consider anLTI system H and recall that a complex exponential input yieldsa complex exponential output:

    x[n] = eJ"'~ --..t H -lo y[71) = H( Wo )ei'""ll

    Therefore, for a periodic input x[n] with period N. the output y[n] is going to be periodicwiththe same period N, andit is determined by the DFS tobe

    The DFS expansion ofthe output signal is given by

    Y[k} = DFS{y[n]} = ~k2; )X[k] for k = O... , N - 1y[n] =IDFS{Y(k]}

    Example 1.37Consider the linear time invariant system defined bydifference equation

    y[n] = O.8y(n - 1] + O.2x[n]

    Thetransfer function H(z) is detennined by inspection to be

    ( )O.2z

    H" =--.. l - 0.8

    andconsequently thefrequency response is

    ()O.:U;...

    Hw ;;:;; -,--eJ"J - 0,8

    If the input sequence x[n] is the square wave shown in Figure 1.41, with DFS shown inFigure 1.42, then the output sequence yfn1is periodic with the same period N = 10 andhas DFS coefficients Y(k] given by

    (

    O.2ei'\;(lI'IS) )xIY[k] = DFS{y[n]} = l( IS) k] fork = 0,1, .... 9

    eJ 'II' - 0.8

  • 41 CHAPTER 1 Fundamentals of Signals and Systems

    IXtkJ!

    ~ 5.00

    3.23 3.23

    1.23~

    1.00 1.23I

    023456789

    LX[k}

    0.47l"

    O.21r

    -O.21T

    -o.4'1r

    Figure 1.42 Discrete Fourier series [Of5) of a square wave (magnitude and phose)

    The coefficients X[k] are shown inFigure 1.42. By taking the inverse DFS. we can deter-mine one period of theoutput sequence y[n J. as shown in Figure 1.43.

    Expansion of Finite length Signals:The Discrete Fourier Transform (OFT)Inallpractical applications; the datawe analyze has finite length. Inother words. we col-lect a data set x[n], with n = 0, ... ,N - 1, and we want to determine the frequenciespresent in thedata set. Thedatasequence x[n] generally is stored in memory (orona diskor tape or otherstorage device) ready tobe analyzed.

  • 1.3 fourier Analysis of Discrete Time Signals 49

    vln]

    n9

    4

    I

    ,T

    0.4

    0.6

    0.8

    02o

    Figure 1.43 One period ofthe output signal

    Because the data has finite length, and we assume the beginning of the index is atn -= 0 (it does not haveto be this way, but it is convenient'), we can look at the sequencex[0J. x[ I], .. , ,x[N - 1) as one periodof a periodic sequence with period N. Therefore,we can expand it in discrete Fourier series as we did in the previous section. Inthis setting,the expansion is identical to the DFS, but il takes the name of discrete Fourier transform(DFf), It is defined as

    N-l

    X[k] = DFf{x[n]} = Lx[n}e- j (21TIN)bt,11"'0

    1N-Ix[n} = IDFf{xLkJ} = - LX[k1e +J..2ff/N1kn,

    N t~o

    k = 0, ... , N - 1

    n = 0, ... ,N - I

    The meaning of this fact is that any finite sequence x[n] of length N can be expanded interms of complex exponentials ejllNl with frequencies w = 0,2'1rIN, .. , , k2rrlN, ... ,(N - 1)27T'1N.

    Example 1.38

    Consider the finite-length signalx[n] shown in Figure 1.44. Comparing it withthe peri-odic signal in Figure t.41 in theprevious section, we see thatit is one period of a periodicsignal. Therefore. the DFT of this signal is the same as the DFS of the periodic signalshown in Figure 1.42.

  • so CHAPTER 1 Fundamentals of Signals and Systems

    xl")

    Figure 1.44 Finite-~thsignal xln)

    4 9

    The discrete Fourier transform (OFT) is the only one inthe Fourier family that iscom-putable numerically, and it is available inany respectable signal processing software pack-age. although computed by itsefficient implementation, the fast Fourier transform (FfT).Both DFf and FFf will be presented indetail inChapter 1

    To make some sense of a Off plot, we mention oneproperty of the DFf here:

    Ifx[n] is REAL for all n =" 0, ... ,N - 1,and x[k] :: DFT{x[n]}.THEN

    X[N - k] == X*[k], for all k = O... N - 1

    This means that fer real signals, the magnitude lX[kJI is symmetric around the middlepointNl2.

    Expansion of General Signals: The Discrete Time Fourier Transfonn (Om)DefirUtiDa. Finally, we want to expand a general. nonperiodic, infinite-length sequencein tenns of complex exponentials.

    Anynonperiodic sequence x[n], -!XI < n < +00, canbe seen asa periodic sequencewith infinite period. Inother words, we can look at the infinite sequence x[n] as the limitofperiodic sequences XN[n], each one wil:h period N:

    limN-t+",xf/[n] = .Iln]

    Forconvenience, in each sequence xN[n] consider the period - (NI2) < n s (NI2), withproper rounding foreven or odd values ofN.

    From the discrete Fourier series (DFS), we can write1N~I

    xN[n] == IDFS{XN[k]} = - ~X....[k]ejt(2'11"fN)nN t-'ofin - L

    XN[k] == DFS{XN[k]} ""= :L xN[nle-jl:{2"'/~,,"'-Nfl

    Notice thatwe canwrite the DFS sequence XN(k] as samples of the continuous functionXN(w):

    sa-:XN(Cll) == L x[n]e-jom

    n~-NI1

    XN[k] '= XN(w)lfII "' .t211'fN

  • 1.3 Fourier Analysis of Discrete Time Signals

    Now, from theIDFS,letus take N --+ 00 toobtain

    I N-Ix[n] """ limN~hXN[nl = -limN-H'"2,[XN(ktlw )ej k!lOlll]6.w

    21T ''''0

    51

    where Aw :;;;;; 2'ffIN. Recalling Rieman integration. the limit is going to converge to anintegral:

    +'"

    II=-\

    These two expressions define the expansion of the discrete time signal x[n] in terms ofcomplex exponentials el-. Notice thatX(w) is periodic with period 21T, since

    +oc

    X{w + 211") = ~ .t[nje-JILtlle-j21r1l = X(lc)11::'-1:':

    and therefore wecanshift the limits of integration by1T and write the definition of the dis-crete time Fourier transform (DTFT) and i