Ee 113 Book 2008

Embed Size (px)

Citation preview

  • 8/10/2019 Ee 113 Book 2008

    1/640

    DISCRETE-TIME

    PROCESSING AND FILTERING

    Ali H. Sayed

    Electrical Engineering DepartmentUniversity of California at Los Angeles

    c 2008 All rights reserved.

    These notes are only distributed to the students enrolled in the EE113

    course in the Electrical Engineering Department at UCLA.

    The notes cannot be reproduced or distributed without the explicit written consent from the author:A. H. Sayed, Electrical Engineering Department, UCLA, CA 90095, [email protected]

    The notes are complemented by an interactive website at http://www.ee.ucla.edu/ dsplab

    Please email typos and suggestions to [email protected].

  • 8/10/2019 Ee 113 Book 2008

    2/640

  • 8/10/2019 Ee 113 Book 2008

    3/640

    Contents

    1 Motivation 1

    1.1 Signals 11.2 Classication of Signals 31.3 Quantization 41.4 Sampling 6

    1.5 Signal Processing 71.6 Systems 91.7 DSP Technology 101.8 Applications 10

    1.8.1 Voiced and Unvoiced Speech 101.8.2 Estimation of DC Levels 12

    1.9 Problems 16

    2 Fundamental Sequences 21

    2.1 Complex Numbers 212.2 Basic Sequences 242.3 Polar Plots 292.4 Symmetry Relations 312.5 Energy and Power Sequences 352.6 Signal Transformations 372.7 Application: Savings Account 402.8 Problems 43

    3 Periodic Sequences 49

    3.1 Periodic Signals 493.2 Complex Exponential Sequences 53

    3.3 Angular Frequency 553.4 Eulers Relation 573.5 Relating Angular Frequencies and Periods 583.6 Application: Harmonics and Music Synthesis 613.7 Problems 65

    4 Discrete-Time Systems 71

    vii

  • 8/10/2019 Ee 113 Book 2008

    4/640

    viiiCONTENTS

    4.1 Systems 714.2 Classes of Systems 734.3 Relaxed Systems 764.4 Dynamic Systems 774.5 Time-Invariant Systems 784.6 Causal Systems 814.7 Stable Systems 824.8 Linear Systems 834.9 Constant-Coefcient Difference Equations 864.10 System Representations 874.11 Applications 90

    4.11.1 Multipath Communications 904.11.2 Financial Growth Model 924.11.3 Population Growth Models 95

    4.12 Problems 100

    5 Impulse Response Sequence 1055.1 Convolution Sum for LTI Systems 1055.2 Causality of LTI Systems 1105.3 BIBO Stability 1115.4 Series Cascade of LTI Systems 1135.5 Parallel Cascade of LTI Systems 1145.6 FIR and IIR Systems 1155.7 Inverse Problem 1175.8 Applications 119

    5.8.1 Multipath Channels 1195.8.2 Financial Growth Model 121

    5.9 Problems 123

    6 Linear Convolution 131

    6.1 Properties of the Convolution Sum 1316.1.1 Commutativity 1316.1.2 Distributivity 1326.1.3 Associativity 1336.1.4 Convolution with the Unit-Sample Sequence 135

    6.2 Evaluation of the Convolution Sum 1356.2.1 Analytical Method 136

    6.2.2 Graphical Method 1366.3 Applications 140

    6.3.1 Echo Cancellation 1406.3.2 Population Growth Management 144

    6.4 Problems 148

    7 Homogeneous Difference Equations 155

  • 8/10/2019 Ee 113 Book 2008

    5/640

    ixCONTENTS

    7.1 Homogenous Equations 1557.1.1 Distinct Roots 1577.1.2 Repeated Roots 1577.1.3 Complex Roots 1587.1.4 Solution Method 159

    7.2 Homogeneous Equations with Initial Conditions 1607.3 Impulse Response of LTI Systems 1637.4 Stability of Causal LTI Systems 1677.5 Impulse Responses of non-LTI Systems 1697.6 Complete Response of LTI Systems 1707.7 Applications 171

    7.7.1 Carbon Dating 1717.7.2 Rabbit Population and Fibonacci Numbers 173

    7.8 Problems 176

    8 Solving Difference Equations 181

    8.1 Particular Solution 1828.2 Characterizing All Solutions 1868.3 First Method for Finding Complete Solutions 1888.4 Zero-State Response 1898.5 Zero-Input Response 1918.6 Second Method for Finding Complete Solutions 1938.7 Transient and Steady-State Response 1948.8 Third Method for Finding Complete Solutions 1958.9 Applications 197

    8.9.1 Macroeconomics Model 1978.9.2 Cell Division in Biology 201

    8.10 Problems 205

    9 z-Transform 213

    9.1 Bilateral z-Transform 2139.2 Region of Convergence 214

    9.2.1 Finite-Duration Sequences 2159.2.2 Innite-Duration Sequences 216

    9.3 Exponential Sequences 2199.4 Properties of the z-Transform 223

    9.4.1 Linearity 223

    9.4.2 Time Shifts 2269.4.3 Exponential Modulation 2279.4.4 Time Reversal 2299.4.5 Linear Modulation 2309.4.6 Complex Conjugation 2319.4.7 Linear Convolution 233

    9.5 Evaluating Series 236

  • 8/10/2019 Ee 113 Book 2008

    6/640

    xCONTENTS

    9.6 Initial Value Theorem 2379.7 Upsampling and Downsampling 238

    9.7.1 Upsampling 2389.7.2 Downsampling 240

    9.8 Applications 2449.9 Problems 2449.A Convergence of Power Series 251

    10 Partial Fractions 255

    10.1 Rational Transforms 25510.2 Elementary Rational Fractions 25610.3 Partial Fractions Expansion 25910.4 Integral Inversion Formula 26410.5 Applications 26810.6 Problems 268

    11 Transfer Functions 273

    11.1 Transfer Functions of LTI Systems 27311.2 Eigenfunctions of LTI Systems 27311.3 Evaluation from Difference Equations 27511.4 Finding Output Sequences 27811.5 Finding Difference Equations 27811.6 Poles, Zeros, and Modes 28211.7 Realizable LTI Systems 28311.8 System Inversion 28411.9 Applications 286

    11.10 Problems 286

    12 Unilateral z-Transform 295

    12.1 z-Transform and Difference Equations 29512.2 Unilateral z-Transform 29612.3 Properties of the Unilateral z-Transform 299

    12.3.1 Linearity 30012.3.2 Time Shifts 30112.3.3 Exponential Modulation 30212.3.4 Linear Modulation 304

    12.3.5 Linear Convolution 30512.4 Initial and Final Value Theorems 30612.5 Solving Difference Equations 30812.6 Applications 30912.7 Problems 309

    13 Discrete-Time Fourier Transform 313

  • 8/10/2019 Ee 113 Book 2008

    7/640

    xiCONTENTS

    13.1 Denition of the DTFT 31313.2 Uniform Convergence 32013.3 Inverse DTFT 32513.4 Mean-Square Convergence 32813.5 Inverse DTFT by Partial Fractions 33313.6 Applications 33513.7 Problems 335

    14 Properties of the DTFT 343

    14.1 Periodicity of the DTFT 34314.2 Useful Properties 344

    14.2.1 Linearity 34514.2.2 Time Shifts 34914.2.3 Frequency Shifts 35114.2.4 Modulation 35214.2.5 Time Reversal 354

    14.2.6 inear Modulation 35714.2.7 Linear Convolution 35814.2.8 Multiplication in the Time Domain 36014.2.9 Conjugation 36514.2.10 Real Sequences 36714.2.11 Parsevals Relation 368

    14.3 Upsampling and Downsampling 37214.3.1 Upsampling 37214.3.2 Downsampling 374

    14.4 Applications 37714.5 Problems 378

    15 Frequency Response 385

    15.1 Frequency Content of a Sequence 38515.2 Frequency Response of an LTI System 38815.3 Linear Time-Invariant Systems 39815.4 Ideal Filters 40115.5 Realizable Filters 40515.6 Applications 40615.7 Problems 406

    16 Minimum and Linear Phase Systems 41516.1 Group Delay 41516.2 Linear Phase Characteristics 41816.3 Linear Phase FIR Filters 421

    16.3.1 Type-I FIR Filters 42216.3.2 Type-II FIR Filters 42416.3.3 Type-III FIR Filters 426

  • 8/10/2019 Ee 113 Book 2008

    8/640

    xiiCONTENTS

    16.3.4 Type-IV FIR Filters 42716.3.5 Location of Zeros 431

    16.4 All-Pass Systems 43316.4.1 First-Order All-Pass Sections 43516.4.2 Second-Order All-Pass Sections 43816.4.3 Higher-Order All-Pass Sections 439

    16.5 Minimum Phase Systems 44016.6 Fundamental Decomposition 442

    16.6.1 Minimum Group Delay Property 44416.6.2 Minimum Energy Delay Property 445

    16.7 Applications 44916.8 Problems 449

    17 Discrete Fourier Transform 457

    17.1 Motivation 45717.2 Relation to Original Sequence 462

    17.3 Discrete Fourier Transform 47117.4 Inverse DFT 47517.5 Vector Representation 47817.6 Applications 48017.7 Problems 481

    18 Properties of the DFT 487

    18.1 Periodicity of the DFT 48818.2 Useful Properties 489

    18.2.1 Linearity 48918.2.2 Circular Time Shifts 49318.2.3 Circular Frequency Shifts 50018.2.4 Modulation 50318.2.5 Circular Time Reversal 50518.2.6 Complex Conjugation in Time and Frequency 50818.2.7 Circular Convolution 51218.2.8 Multiplication in the Time Domain 52018.2.9 Parsevals Relation 523

    18.3 Applications 52518.4 Problems 525

    19 Computing Linear Convolutions 53119.1 Relating Linear and Circular Convolutions 53119.2 Computing Linear Convolutions via the DFT 53219.3 Block Convolution Methods 535

    19.3.1 Overlap-Add Convolution Method 53619.3.2 Overlap-Save Convolution Method 539

    19.4 Applications 545

  • 8/10/2019 Ee 113 Book 2008

    9/640

    xiiiCONTENTS

    19.5 Problems 545

    20 Fast Fourier Transform 549

    20.1 Computational Complexity 54920.2 Decimation-in-Time FFT 551

    20.3 Decimation-in-Frequency FFT 56020.4 Applications 56820.5 Problems 568

    21 Spectral Resolution 571

    21.1 Windowing 57121.2 Spectral Resolution of the DTFT 57821.3 Spectral Resolution of the DFT 58421.4 Applications 59021.5 Problems 590

    22 Sampling 591

    22.1 Sampling Process 59122.2 Fourier Transform 59322.3 Linear Convolution 60222.4 Linear Time-Invariant Systems 60822.5 Nyquist Rate for Baseband Signals 61122.6 Sampling of Bandpass Signals 623

    22.6.1 Complex-valued Bandpass Signals 62422.6.2 Real-valued Bandpass Signals 626

    22.7 Relation of Fourier Transform to the DTFT 63122.8 Relation of Fourier Transform to the DFT 63522.9 Spectral Resolution 63822.10 Applications 64022.11 Problems 640

    23 Discrete-Time Realizations 649

    23.1 Realizations of FIR Filters 65023.1.1 Direct or Tapped-Delay-Line Realizations 65023.1.2 Cascade Realizations 65223.1.3 Exploiting Symmetry 655

    23.2 Realizations of IIR or ARMA Filters 65823.2.1 Direct Realizations of AR Filters 65923.2.2 Type-I Direct Realizations of ARMA Filters 66023.2.3 Type-II Direct Realizations of ARMA Filters 66123.2.4 Cascade Realizations 66323.2.5 Parallel Realizations 667

    23.3 Transposed Realizations 669

  • 8/10/2019 Ee 113 Book 2008

    10/640

  • 8/10/2019 Ee 113 Book 2008

    11/640

    xvCONTENTS

    25.5 Problems 790

    26 Design of FIR Filters 799

    26.1 Practical Filter Specications 79926.2 Window Method 803

    26.2.1 Design Procedure 80526.2.2 Mainlobes and Sidelobes 80726.2.3 Kaiser Windows 815

    26.3 Equiripple Design Method 82426.3.1 Optimization Problem Formulation 82526.3.2 Relation to Polynomial Approximation Theory 82626.3.3 Design Procedure 83326.3.4 FIR Filters of Types II, III, and IV 839

    26.4 Applications 84026.5 Problems 840

    27 Design of Analog Filters 84327.1 Laplace Transform 84327.2 Transfer Functions 84627.3 Filter Specications 84927.4 Low-Pass Butterworth Filters 85127.5 Low-Pass Chebyshev Filters 857

    27.5.1 Type-I Chebyshev Filters 85827.5.2 Type-II Chebyshev Filters 868

    27.6 Low-Pass Elliptic Filters 87227.7 Frequency Transformations 876

    27.7.1 Design of High-Pass Filters 87627.7.2 Design of Band-Pass Filters 87827.7.3 Design of Band-Stop Filters 881

    27.8 Applications 88327.9 Problems 88427.A Convergence of Laplace Transform 886

    28 Design of IIR Filters 889

    28.1 Relating Laplace and z-Transforms 88928.2 Impulse Invariance Method 89228.3 Step Invariance Method 89928.4 Matched z-Transformation 90328.5 Bilinear Transformation Method 90728.6 Frequency Transformations 91328.7 Applications 92228.8 Problems 923

    29 Multirate Processing 929

  • 8/10/2019 Ee 113 Book 2008

    12/640

    xviCONTENTS

    29.1 Sampling Rate Conversion 92929.1.1 Increasing the Sampling Rate by an Integer Factor 92929.1.2 Decreasing the Sampling Rate by an Integer Factor 93429.1.3 Modifying the Sampling Rate by a Rational Factor 940

    29.2 Polyphase Realizations 94329.2.1 Polyphase Decomposition 94729.2.2 Polyphase Structures for Decimation and Interpolation 951

    29.3 Nyquist Filters 95629.3.1 Sample Preservation Property 95629.3.2 Polyphase Characterization 95729.3.3 Design Procedure 96029.3.4 Half-Band Filters 962

    29.4 Applications 96329.5 Problems 963

    30 Filter Banks 965

    30.1 Analysis Filter Bank 96530.1.1 Uniform Filter Banks 96630.1.2 DFT Analysis Filter Bank 977

    30.2 Synthesis Filter Bank 98430.2.1 Uniform Filter Bank 98430.2.2 DFT Synthesis Filter Bank 991

    30.3 Subband Processing 99430.4 Oversampled Filter Banks 99530.5 Perfect Reconstruction Filter Banks 1000

    30.5.1 Alias-Free Reconstruction Condition 100030.5.2 Perfect Reconstruction Condition 100230.5.3 Perfect Reconstruction with FIR Filters 100230.5.4 Quadrature Mirror Filter Banks 100330.5.5 Orthogonal Perfect Reconstruction Filter Banks 1009

    30.6 Applications 101630.7 Problems 1017

    31 Block Filtering 1021

    31.1 Block Processing 102131.2 Overlap-Save DFT-Based Block Filtering 102731.3 Overlap-Add DFT-Based Block Filtering 1037

    31.4 DCT-Based Block Filtering 103931.5 DHT-Based Block Filtering 104231.6 Applications 104731.7 Problems 1047

    32 Random Signals 1051

    32.1 Probability Density Functions 1051

  • 8/10/2019 Ee 113 Book 2008

    13/640

    xviiCONTENTS

    32.2 Mean and Variance 105432.3 Dependent Random Variables 105832.4 Complex-Valued Random Variables 106132.5 Random Vectors 106332.6 Properties of Covariance Matrices 1067

    32.6.1 Covariance Matrices are Hermitian 106732.6.2 Covariance Matrices are Non-Negative Denite 1073

    32.7 Random Processes 107732.8 Power Spectral Densities 1078

    32.8.1 iltering of Stationary Processes 108032.8.2 pectral Factorization 1083

    32.9 Applications 108632.10 Problems 1087

    33 Linear Estimation 1091

    33.1 Estimation Without Observations 109133.2 Using Correlated Observations 109333.3 Using Multiple Observations 109933.4 Design Examples 110333.5 Vector Estimation 110733.6 Applications 110933.7 Problems 111033.A Appendix: Complex Gradients 1114

    33.A.1 auchy-Riemann Conditions 111433.A.2 ector Arguments 1116

    34 Linear Prediction 1117

    34.1 Order-Update Estimation 111734.1.1 Useful Property: Linear Transformations 111734.1.2 Useful Property: Uncorrelated Components 111834.1.3 Useful Property: Uncorrelated Observations 111934.1.4 Main Decomposition Result 112034.1.5 Interpretation 1120

    34.2 Forward Prediction Problem 112134.3 Backward Prediction Problem 112734.4 Relating the Prediction Problems 1131

    34.5 Residual Recursions 113434.6 Levinson Algorithm 1140

    34.6.1 Polynomial Form 114134.6.2 Lattice Implementation 1142

    34.7 Triangular Factorization 114334.8 Applications 114534.9 Problems 1146

  • 8/10/2019 Ee 113 Book 2008

    14/640

    xviiiCONTENTS

    35 Wiener Filtering 1149

    35.1 Wiener Smoothing Problem 114935.2 Wiener Filtering Problem 115335.3 Levinson and Spectral Factorization 116435.4 Schur and Spectral Factorization 116535.5 Applications 116835.6 Problems 1168

    36 Kalman Filtering 1171

    36.1 Uncorrelated Observations 117136.2 Innovations Process 117436.3 State-Space Model 117636.4 Recursion for the State Estimator 117736.5 Computing the Gain Matrix 117836.6 Riccati Recursion 117936.7 Covariance Form 118036.8 Measurement and Time-Update Forms 118136.9 Modeling and Whitening Filters 118236.10 Relation to Wiener Filtering 118336.11 Applications 118636.12 Problems 1186

    37 Adaptive Filtering 1187

    37.1 Problem Formulation 118737.2 Steepest-Descent Method 118837.3 Stochastic Approximation 1193

    37.3.1 LMS Filter 119437.3.2 NLMS Filter 119537.3.3 Other LMS-Type Filters 119637.3.4 RLS Filter 1198

    37.4 Application: Adaptive Channel Estimation 120037.5 Application: Adaptive Channel Equalization 120237.6 Application: Decision-Feedback Equalization 120437.7 Ensemble-Average Learning Curves 120637.8 Mean-Square Performance 1209

    37.8.1 Data Model 121037.8.2 Energy Conservation Relation 121337.8.3 Performance of LMS 121537.8.4 Performance of NLMS 1217

    37.9 Applications 121837.10 Problems 1219

  • 8/10/2019 Ee 113 Book 2008

    15/640

    CHAPTER 1 Motivation

    In this initial chapter we explain what is meant by the title Discrete-Time Processing and Filtering. We rst explain what is meant by the term signal , and then move on to explainwhat discrete-time signals are. We also explain what signal processing entails and what ltering means.

    1.1 SIGNALS

    For our purposes, the term signal will refer to a function of one or more independentvariables. The independent variable can be time, frequency, space coordinates, distance,or some other variable of interest. In this book, we focus almost exclusively on functionsof a single variable and the independent variable will generally be either the time variableor the frequency variable.

    Example 1.1 (Moving cart)

    Let x(t) denote the horizontal distance of a moving cart at time t relative to a point of reference.Here the symbol

    trepresents the independent variable and the symbol

    xrepresents the signal. In this

    example, assuming that the cart starts moving at time 0, both t and x assume real values with t 0.

    x (t )

    referencepoint

    FIGURE 1.1 The horizontal distance of the cart at time t relative to a reference point is denotedby x(t).

    Discrete-Time Processing and Filtering, by Ali H. SayedCopyright c 2010 John Wiley & Sons, Inc.

    1

  • 8/10/2019 Ee 113 Book 2008

    16/640

    2

    CHAPTER 1MOTIVATION Example 1.2 (Two-dimensional image)

    Let x(m, ) denote a measure of the intensity or brightness of the (m, )-th pixel in an 8 8 two-dimensional image with a total of 64 pixels. Here the indices {m, } represent the independentvariables and the symbol x represents the signal. The index m refers to the row location of the pixel

    and the index denotes its column location. In this example, the variables {m, } assume integervalues in the range [0, 7], and it is assumed that the intensity variable x also assumes integer valuesas well, say in the range [0, 255].

    m

    0 1 2 3 4 5 6 701234567

    FIGURE 1.2 The intensity of the pixel at location (m, ) is denoted by x(m, ).

    Example 1.3 (Students in a course)

    Let x (n ) denote the number of students attending a particular course at successive years, n . Herethe symbol n represents the independent variable and it assumes integer values, whereas the symbolx denotes the signal and it also assumes integer values.

    x (n) (students)

    n (year)2010200920082007

    10

    20

    30

    40

    50

    FIGURE 1.3 The number of students attending a course during the years 2007 through 2010.

  • 8/10/2019 Ee 113 Book 2008

    17/640

    3SECTION 1.2

    CLASSIFICATIONOF SIGNALS

    Example 1.4 (Satellite orbiting the Earth)

    Let w(r ) denote the angular speed of a satellite in uniform circular motion around the Earth at aradial distance r from the center of the Earth. Here the symbol r represents the independent variableand it assumes positive real values, whereas the symbol w represents the signal and it also assumes

    positive real values.w(r )

    r

    Earth

    satellite

    FIGURE 1.4 The angular speed of a satellite orbiting the Earth in uniform circular motion.

    1.2 CLASSIFICATION OF SIGNALS

    Signals can be classied in many ways. For the purposes of the treatment in this book, weclassify signals into three broad categories.

    Continuous-Time Signals In this case the independent variable assumes continuous real values as in Examples 1.1and 1.4. We shall generally denote a continuous-time signal by x(t), with t denoting theindependent variable. An example of a continuous-time signal is the temperature variationin a room over a continuous period of time.

    Discrete-Time Signals In this case the independent variable assumes discrete (i.e., integer) values as in Examples

    1.2 and 1.3. We shall denote a discrete-time signal by x(n), with n denoting the indepen-dent variable. An example of a discrete-time signal is the average daily temperature in acity, where the independent variable species the day of interest (say, day 1, day 2, and soforth) and the signal corresponds to the average temperature on that day. We further notethat:

    1. A discrete-time signal is also called a sequence . In this context, the notation x(n)can be interpreted to refer to the nth term of the sequence. We shall employ bothterminologies, discrete-time signal and sequence, whenever convenient.

  • 8/10/2019 Ee 113 Book 2008

    18/640

    4

    CHAPTER 1MOTIVATION

    2. The value (also called amplitude ) of a discrete-time signal, x(n), at any particularn , is not restricted; the amplitude may assume integer values, real values, or evencomplex values.

    Digital Signals A digital signal is a sequence where the amplitude of its terms can belong to only a nitenumber of possibilities. In Example 1.2, we saw that the intensity of every pixel (m, ) inthe image was limited to integer values in the range [0, 255]. Therefore, the signal x(m, )in that example is a digital signal.

    1.3 QUANTIZATION

    Digital signals usually arise as the result of quantization . In quantization, a nite numberof bits is used to represent the amplitude of a signal. Assume, for instance, that 3 bits areavailable to describe the amplitude of a signal, x(n). This means that we have 8 amplitudepossibilities described by the choices

    000, 001, 010, 011 (used for nonnegative amplitudes)100, 101, 110, 111 (used for negative amplitudes)

    These eight choices are assigned as follows. Refer to Fig. 1.5 and assume the amplitudesof the signal x(n) occur within the continuous range [4 , 4] ; the horizontal axis in thegure represents the range of values that can be assumed by x(n). We divide the horizontalaxis into sub-intervalsof width each. Then, whenever the amplitude of x(n) falls withinthe interval [2 ,

    32 ) we represent it by the value , which is assigned the bits 001. In other

    words, we round the value of x to the nearest amplitude in the quantized domain. In thisway, all amplitudes in the range [2 ,

    32 ) in the signal domain, x(n), are mapped into the

    single amplitude in the quantized domain, xq(n). Likewise, whenever the amplitude of x(n) falls within the interval [

    2 ,

    2 ) we represent it by the value 0, which is assigned

    the bits 000, and so forth. This construction starts with a discrete-time signal x(n) andproduces an amplitude-discretized version of it, which we are denoting by xq(n). Theamplitudes of xq(n) in this example are limited to the values:

    {4 , 3 , 2 , , 0, , 2 , 3 }and we say that xq (n) is a digital signal.

  • 8/10/2019 Ee 113 Book 2008

    19/640

    5SECTION 1.3

    QUANTIZATION

    00

    010

    011

    2 3

    100

    101

    111

    110

    x

    x q

    2

    3

    2

    3

    4

    2 3

    4 000

    FIGURE 1.5 An example of 3-bit uniform quantization with rounding; the amplitudeof a discrete-

    time signal x(n ) is quantized resulting in a digital signal xq (n ).

    Example 1.5 (3-bit quantization)

    Consider the following three samples of a sequence x(n ) at time instants n = 0 , 1, 2:

    x(0) = 0 .2, x(1) = 0.4, x(2) = 0 .7The samples of x(n ) assume values within the interval [1, 1]. We want to quantize the samples of x(n ) using 3 bits, as described in Fig. 1.5. The quantization step is set to = 0 .25. We then ndthat

    x(0) lies within the interval

    2

    , 3

    2

    x(1) lies within the interval

    32

    ,52

    x(2) lies within the interval

    52

    , 7

    2

    Therefore, the corresponding quantized values and their bit representations would be

    xq (0) = 0 .25 (001)xq (1) = 0.50 (110)xq (2) = 0 .75 (011)

    It is worth noting that computers and digital signal processors operate on digital signals

    very effectively; digital signals are stored in computers and digital signal processors in theform of bits or bytes. In most of this book, we shall deal with discrete-time signals asopposed to digital signals. That is, the amplitude of each term in the sequence x(n) will

  • 8/10/2019 Ee 113 Book 2008

    20/640

    6

    CHAPTER 1MOTIVATION

    not be restricted; it will generally be bounded but not quantized. There are at least tworeasons for proceeding in this manner:

    1. First, discrete-time signals are more tractable to mathematical analysis than digitalsignals.

    2. Second, if we assume longenoughword-lengths, i.e., if we assume digital signal rep-resentations that employa sufcientnumber of bits to quantize the signal amplitudes,

    then the loss in performance and accuracy that results from the use of quantizationmay be assumed negligible.

    Nevertheless, in Chapter 25 we shall examine in some detail the effect of quantizationerrors on computations involving digital signals.

    1.4 SAMPLING

    How do sequences arise? In many cases, the data may already be available in discrete-timeform. For example, we may have available a table with entries that represent the yearlylevels of rainfall for the last 20 years in a city. In this case, we have a sequence with 20entries and each entry in the table corresponds to a term in the sequence. Likewise, we mayhave available a table indicating the number of students attending a course over a certainnumber of years see Table 1.1

    TABLE 1.1 Number of students attending a particular course over a 16 year period .

    Year Students Year Students

    2008 26 2000 262007 21 1999 202006 15 1998 232005 19 1997 172004 31 1996 22

    2003 27 1995 252002 19 1994 182001 18 1993 20

    More often, however, sequences arise from sampling continuous-time signals such asspeech signals, radar signals, and biological signals. If x(t) is a continuous-time signal,sampling it every T units of time (say, every T seconds or milliseconds) results in a se-quence, x(n), whose terms are given by the values of x(t) evaluated at the time instantst = nT , i.e.,

    x(n) = x(t)|t = nT = x(nT ) (1.1)

    In other words, only values of x(t) at time instants that are multiples of T are retained inthe sampling process and the other values of x(t) are ignored see Fig. 1.6. Usually, thecompact notation x(n) is used instead of x(nT ) to refer to the resulting sequence with theletter T dropped. Besides begin a compact representation of the sequence, the notationx(n) will also allow us to study properties of sequences independently of the samplingperiod T .

  • 8/10/2019 Ee 113 Book 2008

    21/640

    7SECTION 1.5

    SIGNALPROCESSING

    t

    x (t )

    T

    x (t )

    x (n )

    FIGURE 1.6 Sampling of a continuous-time signal x(t ) at multiples of the sampling period T togenerate a sequence x(n ).

    Remark. In general, the independent variable n in the notation x(n ) does not necessarily refer totime (for example, it may also refer to space or distance). Motivated by the sampling interpretation,we shall nevertheless often use the time connotation to describe x(n ). For example, when referringto the sample x(n ) we shall usually say the value of the sequence at time instant n .

    1.5 SIGNAL PROCESSING

    The term processing refers to the act of extracting information from a signal. For exam-ple, given a continuous-time signal x(t) that represents the temperature variation over aninterval of time T , we can extract information about the average temperature over thisinterval of time via integration as follows:

    x = 1 T T 0 x(t)dt (1.2)

    where the symbol x denotes the average temperature. This calculation amounts to evalu-ating the area under the temperature curve over the interval [0, T ] and dividing the resultby T see Fig. 1.7.

    Likewise, given a sequence x(n) that represents the yearly rainfall over the last 20 yearsin a city, we may extract information about the average annual rainfall as follows:

    x = 120

    19

    n =0x(n) (1.3)

    Observe that we are numbering the terms of the sequence x(n) in this example from 0 to19 and not from 1 to 20. It is common to use n = 0 as the origin of time when describingsequences and we shall adopt this convention in the book.

    Of course, we can perform more sophisticated processing on signals than simply evalu-ate their averages. For example, we can attempt to use the available data in order to predict

  • 8/10/2019 Ee 113 Book 2008

    22/640

    8

    CHAPTER 1MOTIVATION

    t T

    x(t)

    x = 1 T area

    FIGURE 1.7 Extracting the average temperature by evaluating the area under the curve.

    the level of rainfall two years ahead of time, or to estimate the number of students that willbe attending a particular course this year based on the attendance history over the previous5 years. In another example, if x(n) denotes a speech sequence that is corrupted by back-ground noise, we may want to process x(n) in order to remove the interfering noise andgenerate a clear speech signal, y(n). This is one example of ltering whereby a signal isprocessed to lter out undesired components or to transform the signal into another moredesirable form.

    Figure 1.8 illustrates another ltering example. The top plot (a) shows a sinusoidalsignal, which is subjected to additive interference by the random uctuations in part (b).The result is the disturbed signal in part (c); which is the sum of the signals in parts (a) and(b). A lter would then process the noisy signal in part (c) and attempt to recover the clearsinusoidal version (a) or a good approximation for it. Obviously, the processing or thealgorithms that are needed to perform prediction and ltering tasks are more involved thanthe processing that is involved in computing the signal averages mentioned in the earlierexamples.

  • 8/10/2019 Ee 113 Book 2008

    23/640

    9SECTION 1.6SYSTEMSsi nusoidal

    signal

    disturbance

    noisysignal

    (a)

    (b)

    (c)

    time

    amplitude

    FIGURE 1.8 Processing a noisy signal to remove (or reduce the effect of) the noise componentand recover the original sinusoidal signal.

    1.6 SYSTEMS

    The task of processing a signal in order to extract information from it is performed by asystem or lter . Systems operate on signals and transform an input signal into an outputsignal, as shown in Fig. 1.9.

    output signalsystem

    input signal

    FIGURE 1.9 A system processes an input signal and transforms it into an output signal.

    In this book we shall deal almost exclusively with discrete-time systems, namely, sys-tems whose input and output signals are sequences. Hence, we shall deal with the process-

    ing of discrete-time signals. The discipline that studies discrete-time signals and systems,as well as digital signals, is known as Discrete-Time Signal Processing. Sometimes it isalso called Digital Signal Processing (or DSP for short).

  • 8/10/2019 Ee 113 Book 2008

    24/640

    10

    CHAPTER 1MOTIVATION

    1.7 DSP TECHNOLOGY

    The relevance of discrete-time signal processing has been heightened by the enormoustechnological advances in, and the increasing reliance on, digital computers and digitalsignal processors since the 1970s. These advances have made it possible to deal efcientlywith sequences and digital data for the following reasons:

    1. Digital hardware is efcient in storing and processing digital information. In partic-ular, stored information can be moved from one location to another almost by theclick of a button, and the information can be processed at different locations and atdifferent times as dictated by user needs.

    2. Digital hardware is usually programmable and offers more exibility than analogimplementations. By modifying program codes we can use the same hardware toperform different processing tasks. Analog implementations for different tasks tendto be different and require elaborate testing and tuning.

    3. Analog hardware is sensitive to component accuracy, temperature variations, andthermal noise. Digital hardware is more reliable and more robust in this respect.

    Still, despite its advantages, DSP technology may not be ideal for all applications. Thereare situations where the signals exhibit rapid variations and require high sampling rates inorder to transformthem into sampled signals for discrete-time processing. The requirementof fast sampling rates generally translates into the requirement of digital hardware that iscapable of operating at high frequencies (or speeds), which in turn translates into costlierand more challenging implementations. Likewise, faster sampling rates tend to generatelarge amounts of data that may require signicant storage and processing time and power.Some of these challenging situations may be better handled by resorting to specializedanalog hardware, or even hybrid solutions combining analog and digital techniques. Thesealternative technologies are beyond the scope of this book.

    1.8 APPLICATIONS

    In this section, we illustrate one application of some of the concepts covered in the chapterin the context of some practical problems.

    1.8.1 Voiced and Unvoiced Speech

    We show rst how to use signal processing and the concept of the energy of a sequence inorder to classify speech into voiced and unvoiced frames. The processing we perform inthis example is relatively simple since it only involves segmenting a sequence into smallersequences and averaging the samples of each segment. Nevertheless, even simple process-ing tasks of this kind can reveal useful information about a signal and, in the application at

    hand, help us classify speech into voiced and unvoiced segments.Voiced and unvoiced speech are dened as follows. Speech is composed of phonemes,

    which are produced by the vocal cords and the vocal tract (which includes the mouth andthe lips) see Fig. 1.10. 1 Voiced signals are produced when the vocal cords vibrate duringthe pronunciation of a phoneme. Unvoiced signals, by contrast, do not entail the use of the vocal cords. For example, the only difference between the phonemes /s/ and /z/ or /f/

    1The source for this public domain image of the vocal apparatus is Wikimedia Commons.

  • 8/10/2019 Ee 113 Book 2008

    25/640

    11SECTION 1.8

    APPLICATIONS

    and /v/ is the vibration of the vocal cords. Also, voiced signals tend to be louder like thevowels /a/ , /e/ , /i/ , /u/ , /o/ . Unvoiced signals, on the other hand, tend to be more abrupt likethe stop consonants /p/ , /t/ , /k/ .

    FIGURE 1.10 A representation of the vocal tract.

    The classication of speech into voiced and unvoiced segments is accomplished bydividing a speech sequence into short frames and by computing the average power of eachframe. The speech in a particular frame is then declared to be voiced if its average powerexceeds a threshold level; otherwise it is declared to be unvoiced speech.

    We dene the power of a frame as follows. Assume each frame has N samples. Forexample, the rst frame is assumed to be the frame of index k = 0 and it consists of the

    samples:

    {x(0) , x(1) , x(2) , . . . , x(N 1)} (frame k = 0)

    Likewise, the frame of index k = 1 contains the samples

    {x(N ), x(N + 1) , x(N + 2) , . . . , x(2N 1)} (frame k = 1)

    and, more generally, the frame of index k contains the samples

    {x(kN ), x(kN + 1) , x(kN + 2) , . . . , x((k + 1) N 1)} (frame k) (1.4)The energy level of a frame is computed by evaluating the squared values of the samplesin the frame and adding these values together to yield:

    Energy of frame k = E k=

    (k+1) N 1

    n = kN

    x2 (n) (1.5)

  • 8/10/2019 Ee 113 Book 2008

    26/640

    12

    CHAPTER 1MOTIVATION

    If the energy is divided by the number of samples, N , then the result is taken as the averagepower of the frame:

    Average power of frame k = P k=

    1N

    (k+1) N 1

    n = kN

    x2(n) (1.6)

    It is this power level that we shall compare against the threshold level:

    P k threshold = voiced frame (1.7)P k < threshold = unvoiced frame (1.8)

    We divide the waveform of a speech signal into frames of duration 20ms each and com-pute the average power of each frame. This average power serves as an indication of theloudness of the frame. We therefore expect higher average power for voiced signals thanfor unvoiced signals. The top plot in Fig. 1.11 shows the amplitude values of 14000 sam-ples of a speech signal. In the gure, the amplitude of all samples lie within the interval[1, 1]. We set the threshold at 0.015 and show two other plots in the gure. The Themiddle plot shows only those frames of the original speech signal whose average powerexceeds the threshold level ( 29% of the frames had their power level above the threshold);the other frames are set to zero. The bottom plot shows the remaining frames of the origi-nal signal whose average power is lower than the threshold level ( 71% of the frames); theother frames are set to zero.

    Practice Questions:

    1. Each frame is 20ms long and consists of N = 175 samples. The speech signal used is 14000samples long. Into how many frames can the signal be divided? What is the duration of theentire speech signal in seconds? At what rate in samples/second was the original continuous-time speech signal sampled?

    2. The amplitudes of the speech samples lie within the interval [1, 1]. What is the largestaverage power we can expect for a frame? If the amplitudes of the samples in a particularframe lie within the interval [

    0.2, 0.2], what is the largest energy value we can expect for

    this frame?

    1.8.2 Estimation of DC Levels

    In a variety of situations, users have access to noisy measurements around some constantlevel. This situation can arise when different sources observe the same variable and reporttheir measurements. For example, in a laboratory experiment students may be measuringthe value of the same resistive component in a circuit. Due to measurement and numericalerrors, each student is likely to report a slightly different value for the resistance of thecomponent. We model this situation as follows. We denote the unknown resistance valueby R and the measurements reported by each student n by r (n). Then

    r (n) = R + ( n)

    where ( n) represents the perturbation that is present in the measurement of student n .Assuming a group of N students, we would end up with N such measurements, say, onefor each student:

    r (n) = R + ( n), n = 0 , . . . , N 1 (1.9)

  • 8/10/2019 Ee 113 Book 2008

    27/640

    13SECTION 1.8

    APPLICATIONS

    Unvoiced speech

    Voiced speech

    Original speech signal

    n (sample index)

    a m p

    l i t u d e

    a m p

    l i t u d e

    a m

    p l i t u d e

    FIGURE 1.11 The top plot shows the original speech signal. The middle plot shows the voicedframes whose average power exceeds the threshold. The bottom plot shows the unvoiced frames.The horizontal axis represents the sample index, n .

    where we are labeling the students from n = 0 up to n = N 1. The measurements r (n)can be interpreted as some random variations around the constant value, R . We assumethat the noise components {( n)}are likely to assume both positive and negative valuesacross all students so that the average value of the {( n)}across these measurements canbe assumed to be zero:

    1N

    N 1

    n =0( n) = 0 (1.10)

    Under this condition, if we now average the measurements {r (n)}in (1.9) we nd that

    R = 1N

    N 1

    n =0r (n) (1.11)

    In other words, the value of R is the average value of the sequence r (n). We refer to Ras the DC level of the sequence r (n). That is, we dene the DC level of a sequence asthe average value of its samples. In this way, condition (1.9) amounts to assuming that thenoise components have zero DC level. Of course, in practice, assumption (1.10) may nothold precisely and expression (1.11) would then provide an approximate estimate for Rrather than its exact value.

    Expression (1.11) provides one way to evaluate the DC level of a sequence, r (n). Thissolution method requires that we rst collect all measurements, {r (n)}, and then averagethem. If the time interval between consecutive measurements is long, the waiting time to

  • 8/10/2019 Ee 113 Book 2008

    28/640

    14

    CHAPTER 1MOTIVATION

    collect the data can be undesirable. To illustrate this fact, let us return to the same circuitslaboratory class and let us assume that the class holds daily sessions. Let us further assumethat we now would like to use all measurements collected by all student groups during theentire week in order to estimate R . To do so, we would need to wait until all laboratorysessions have concluded by the end of the week and only then estimate R by averagingacross all measurements. We wonder whether it is possible to develop a procedure thatwould allow us to estimate R on the y as data become available, and then improve uponthis estimate as more data are collected. The discussion that follows derives one suchprocedure. The purpose of the presentation is to show that it will often make sense tolook for alternative algorithms to achieve the same objective (that of computing R in thisexample). This is because different algorithms will usually exhibit different properties thatare more suitable to one scenario than another. In the current example, expression (1.11)provides a good solution if all data are available but is not convenient if we need to waituntil all the data becomes available. Let us examine an alternative that will lead to the sameresult but that can handle data as they become available.

    Recursive Computation Assume the rst group of students who meets on Monday reports its data by the end of theday. Their measurements can be readily averaged to provide an initial estimate for R, say,as

    R1 = 1N 1

    N 1 1

    n =0r (n)

    where we are assuming there are N 1 students in the rst group. We are also denoting theestimate from this rst set of data by R1 . In the absence of additional measurements, theabove calculation provides an initial estimate for R1 and it will serve as our estimate untilmore data become available.

    On Tuesday, the second group of students reports its measurements. We would now liketo determine the estimate of R that is based on both sets of data. Specically, assuming thesecond group has N 2 students, we are now interested in evaluating the following average:

    R1:2 = 1

    N 1 + N 2

    N 1 + N 2 1

    n =0r (n) (1.12)

    where we are averaging over the measurements from both groups. We are denoting theestimate from the rst two sets of data by R 1:2 ; we are also labeling the students in thesecond group from n = N 1 up to n = N 1 + N 2 1. Evaluating R1:2 as above requiresthat we re-use the data from the rst group of students. One wonders whether the initialcomputation of R1 can be useful here. To address this equation, let R2 denote the averagevalue that is based solely on the measurements from the second group of students:

    R2 = 1N 2

    N 1 + N 2 1

    n = N 1

    r (n)

    Using the denition (1.12) for R1:2 we note that

    (N 1 + N 2) R1:2 =N 1 1

    n =0r (n) +

    N 1 + N 2 1

    n = N 1

    r (n)

  • 8/10/2019 Ee 113 Book 2008

    29/640

    15SECTION 1.8

    APPLICATIONS

    Dividing both sides by the product N 1N 2 we get

    N 1 + N 2N 1N 2 R1:2 =

    1N 2

    1N 1

    N 1 1

    n =0r (n)

    R 1

    + 1N 1

    1N 2

    N 1 + N 2 1

    n = N 1

    r (n)

    R 2

    and we end up with a relation between R1,2 , R1 and R2 :

    R1:2 = N 1

    N 1 + N 2 R1 + N 2

    N 1 + N 2 R2 (1.13)

    This is a very interesting relation. It tells us that we can evaluate R1:2 , which is the averagebased on both sets of data, by combining the individual averages. The measurementsthemselves are not needed! This means that we could simply request that each group of students report only their average value and then we would combine these values as in(1.13) and obtain R1:2 . A similar argument will show that this result extends to includethe other student groups. For example, if R 1:3 is the average value that is based on themeasurements from student groups 1, 2, and 3, then

    R1:3 = N 1 + N 2

    N 1 + N 2 + N 3 R1:2 + N 3

    N 1 + N 2 + N 3 R3

    In this way, we only need to use the new average R3 (fromgroup 3) and combine it with theprevious aggregate average R1:2 . This construction is an example of a recursive processingalgorithm, where new data (in this case, R3) is combined with a previous output of thealgorithm (in this case, R1:2 ) to update the algorithm to a new output value, R1:3 . Moregenerally, for data from student groups 1 through k, we have

    R1:k =k 1=1 N k=1 N

    R1:k 1 + N k

    k=1 N

    Rk (1.14)

    Figures 1.12 and 1.13 illustrate an application of this procedure for the case of 5 studentsgroups with {12, 10, 11, 10, 9}students in each group. The value of the unknown quantityR was set at R = 20 and all measurements were subjected to additive Gaussian noise withzero-mean and unit variance. Figure 1.12 shows the variations of the measurements acrossall 52 students; the measurements are represented by the lled circles in the plot, which areconnected by line segments for convenience of visualization. Figure 1.13 shows two plots;one plot corresponds to the estimates of R that are reported by the individual groups (lledsquares), and the other plot corresponds to the estimates of R that are updated accordingto the recursive procedure (1.14) and are indicated by the lled circles in the plot.

    Practice Questions:

    1. Assume the pairs (Rk , N k ) assume the values (10 .8, 5), (10 .7, 8), and (11 .1, 7). EvaluateR 1:2 and R1:3 . What would be the estimate of the mean value of the entire set of data?

    2. For the same data in the previous part, evaluate R2:3 , which is the estimate of R that is basedon the measurements from groups 2 and 3.

    3. According to (1.14), which group of students is weighted more heavily in the determinationof R?

  • 8/10/2019 Ee 113 Book 2008

    30/640

    16

    CHAPTER 1MOTIVATION

    5 10 15 20 25 30 35 40 45 5017.5

    18

    18.5

    19

    19.5

    20

    20.5

    21

    21.5

    22

    22.5

    n (measurements)

    a m p

    l i t u

    d e

    nominalvalue of R

    noisymeasurements

    FIGURE 1.12 Noisy measurements by all 52 students. The measurements uctuate around thenominal value of R = 20 .

    1 2 3 4 519.6

    19.7

    19.8

    19.9

    20

    20.1

    20.2

    20.3

    20.4

    20.5

    k (student group)

    R ( e s t

    i m a

    t e )

    estimates byindividual groups

    cumulativerecursive estimate

    FIGURE 1.13 One line corresponds to the estimates of R that are reported by the 5 individualgroups, and the other line corresponds to the estimate of R that is updated according to the recursiveprocedure (1.14).

    1.9 PROBLEMS

    Problem 1.1 Consider the continuous-time signal x(t) = 0 .2t + 1 , where t is in seconds. Plot thesamples of the sequence x(n ) that are obtained by sampling x(t) at multiples of T = 1 second overthe interval t[0, 10].

  • 8/10/2019 Ee 113 Book 2008

    31/640

    17SECTION 1.9

    PROBLEMS

    Problem 1.2 Consider the continuous-time signal x (t ) = 0 .5sin

    2t + 3

    , where t is in sec-onds. Plot the samples of the sequence x(n ) that are obtained by sampling x (t) at multiples of T = 0 .25 second over the interval t [0, 3].

    Problem 1.3 Figure 1.14 shows the samples of a sequence, x (n ), over the interval 0 n 7.Plot the quantized version, xq (n ), according to the mapping of Fig. 1.5 and assuming = 1 / 4.Write down the resulting bit sequence.

    x (n)

    n

    1 / 4

    1 / 2

    3 / 4

    5 / 4

    01

    2

    3

    4

    5 6 7

    3 / 4

    1 / 2

    1 / 4

    FIGURE 1.14 Samples of a sequence x(n ) over 0 n 7 for Prob. 1.3.

    Problem 1.4 Repeat Prob. 1.3 assuming = 1 / 2. Determine the quantized version, x q (n ), andwrite down the corresponding bit sequence.

    Problem 1.5 Refer to the quantization procedure described in Fig. 1.5. Assume = 1 / 4. Deter-mine the samples xq (n ) that correspond to the following sequence of bits (assume the rst sampleoccurs at n = 0 ):

    001110011010010101110000100111

    How many samples are represented in this sequence of bits? How many bits would you need torepresent 1024 samples of x(n )?

    Problem 1.6 Refer again to the quantization procedure described in Fig. 1.5 and assume = 1 / 8.Determine the samples xq (n ) that correspond to the following sequence of bits (assume the rstsample occurs at n = 0 ):

    001100110101101111100011110101001000001

    How many samples are represented in this sequence of bits? How many bits would you need torepresent 2048 samples of x(n )?

    Problem 1.7 Consider the scenario of Prob. 1.5. If it takes 1 microsecond to transmit one byte of data from location A to location B , how long will it take to transfer the bits representing 1048576samples of x(n )? Recall that one byte of data consists of 8 bits.

    Problem 1.8 Consider the scenario of Prob. 1.7. Assume it took approximately 2.1 seconds totransmit an amount of data from location A to location B . Approximately, how many samples of x(n ) were transmitted during this operation?

  • 8/10/2019 Ee 113 Book 2008

    32/640

    18

    CHAPTER 1MOTIVATION

    Problem 1.9 A speech signal x(t) is recorded for 15 seconds. In one implementation, the signalis sampled at the rate of 8000 samples per second. If each sample is digitized to 8 bits, what is thesize of the recorded data in bytes? How would your answer change if the sampling rate is raised to20000 samples per second?

    Problem 1.10 A speech signal x(t) is sampled at the rate of 8000 samples per second and digitizedto 8 bits per sample. If a record of size 10MB (mega-bytes) is generated, what is roughly the time

    duration of the recorded signal?Problem 1.11 Consider the sequences

    x(n ) =

    12

    n , 0 n 30, otherwise

    and

    y(n ) =

    14

    n 1 , 0 n 50, otherwise

    (a) Plot the samples of x(n ).

    (b) Plot the samples of y(n ).

    (c) Plot the samples of the sequence z (n ) = x (n )y(n ), which are obtained from the point-wiseproduct of the samples of x(n ) and y(n ) .

    (d) Refer to Fig. 1.5 and assume = 1 / 4. Write the bit sequence for the samples of z (n ) over0 n 7.

    Problem 1.12 Consider the sequences

    x(n ) =

    12

    n 2 , 0 n 40, otherwise

    and

    y(n ) =

    14

    n +1 , 0 n 30, otherwise

    (a) Plot the samples of x(n ).(b) Plot the samples of y(n ).

    (c) Plot the samples of the sequence z (n ) = x(n ) + 2 y(n ).

    (d) Refer to Fig. 1.5 and assume = 1 / 4. Write the bit sequence for the samples of z (n ) over0 n 6.

    Problem 1.13 The energy of a real-valued sequence is dened as the sum of the squares of itssamples:

    E x=

    n = x2 (n )

    What is the energy of the sequences x(n ), y(n ) , and z (n ) dened in Prob. 1.11.

    Problem 1.14 What is the energy of the sequences x(n ), y(n ), and z (n ) dened in Prob. 1.12.

    Problem 1.15 Refer to the 88 image represented by Fig. 1.2. The intensity of its pixels are listedin table below: The image is processed as follows. A 2 2 mask or lter moves across the imagefrom left to right one column at a time, and from top to bottom one row at a time. The mask replacesthe value of the image pixel located at the left-most top corner of the mask by the weighted averageof the pixels covered by the mask; the weights are the values included in the 22 mask: The averageis rounded to the closest integer in the range [0, 255]. Find the pixel values of the image that resultsfrom this processing.

  • 8/10/2019 Ee 113 Book 2008

    33/640

  • 8/10/2019 Ee 113 Book 2008

    34/640

  • 8/10/2019 Ee 113 Book 2008

    35/640

    CHAPTER 2 Fundamental Sequences

    C omplex numbers play a critical role in characterizing discrete-time signals and sys-tems. For example, it will be seen in later chapters that complex numbers are neededto describe the frequency content of a sequence and the frequency response of a system.Complex numbers are also needed to describe some basic sequences in the time domain.Accordingly, this chapter provides a brief review of complex numbers and explains howthey are useful in describing some important sequences, such as the complex exponential

    sequence.

    2.1 COMPLEX NUMBERS

    Every complex number has the form

    z = a + jb (2.1)

    where a and b are real numbers and

    j = 1 (2.2)

    In other words, j 2 = 1. The number a is called the real part of z and the number b iscalled the imaginary part of z. We sometimes writea = Re (z), b = Im (z) (2.3)

    where the notation Re () and Im () refers to the real and imaginary components of theirargument.Every complex number z can be expressed in an alternative form known as the po-

    lar form in terms of the magnitude of the number and its phase. Specically, z can beexpressed as

    z = ej , (2.4)where denotes the magnitude of z; it is a nonnegative real number that is computed asfollows:

    = a2 + b2 (2.5)and denotes the phase of z and is measured in radians. The phase can always bechosen to lie within the interval [, ]; its value should be determined from the scalars{a, b}with care as follows. First, we determine the angle

    2

    , 2

    Discrete-Time Processing and Filtering, by Ali H. SayedCopyright c 2010 John Wiley & Sons, Inc.

    21

  • 8/10/2019 Ee 113 Book 2008

    36/640

    22

    CHAPTER 2FUNDAMENTALSEQUENCES

    whose arctan is given by

    = arctanba

    (2.6)

    Then we may need to adjust by adding to it dependingon which quadrant the numberz belongsto in the complexplane see Fig. 2.1. Thephase is obtained from accordingto the following rule:

    =, if z in quadrants I or IV, i.e., if Re (z) > 0

    , if z in quadrant III, i.e., if Re (z) < 0 and Im (z) < 0 + , if z in quadrant II, i.e., if Re (z) < 0 and Im (z) > 0(2.7)

    The correction to (i.e., the addition of ) is chosen in such a way that the resultingphase will always lie within the interval [, ]. It is customary to express the phase of a complex number using the arctan notation (2.6); it is to be understood, however, from theabove discussion, that the actual phase should be selected according to (2.7).

    III

    III IV

    Re

    Im

    =

    = = +

    =

    FIGURE 2.1 Division of the complex plane into four quadrants I, II, III, and IV.

    Sometimes, the polar representation (2.4) of z is alternatively expressed as

    z = |z| ej z (2.8)

    where |z| is used to denote the amplitude of z and z is used to denote its phase seeFig. 2.2. Moreover, the letter e denotes the number whose natural logarithm is equal to 1:ln e = 1 (2.9)

    Example 2.1 (Polar form)

    Consider the two complex numbers

    z 1 = 1 + j and z 2 = 1 j

  • 8/10/2019 Ee 113 Book 2008

    37/640

    23SECTION 2.1COMPLEXNUMBERS

    Re

    Im

    a

    bz

    |z |

    z

    FIGURE 2.2 Standard and polar form representations of a complex number z .

    Both complex numbers have the same magnitude, = 2, and lead to the same phase angle = arctan(1) = / 4

    However, z 1 and z 2 are distinct numbers: z 1 lies in quadrant I while z 2 lies in quadrant III seeFig. 2.3. The correct phase angle for z 2 is therefore

    = 4 =

    34

    so thatz 1 = 2 ej 4 and z 2 = 2 ej 3 4

    Re

    Im

    z1 = 1 + j

    z2 = 1 j

    1

    1

    1

    1

    FIGURE 2.3 Location of z 1 = 1 + j and z 2 = 1 j in the complex plane.

    Complex Conjugation The complex conjugate of a complex number z, as in (2.1), is denoted by z and is denedas

    z = a jb (2.10)

  • 8/10/2019 Ee 113 Book 2008

    38/640

    24

    CHAPTER 2FUNDAMENTALSEQUENCES

    In other words, the imaginary part of z is negated. It is clear that both z and z have thesame magnitude. However, the phase of z is the opposite of the phase of z. Specically,if the polar form of z is given by (2.4) or (2.8), then

    z = e j , (2.11)or

    z = |z| e j z (2.12)

    2.2 BASIC SEQUENCES

    There are a handful of sequences that arise frequently in the study of discrete-time signalsand systems. We collect these sequences in the current section and comment on some of their properties. Several of the sequences are so common (like the unit-sample sequenceand the unit-step sequence) that they have their own standard notation.

    Unit-sample sequence. The unit-sample sequence is denoted by (n) and is denedas follows:

    (n) = 1 n = 00 n = 0

    (2.13)

    In other words, the sequence is zero everywhere except at time n = 0 when it is equal toone. The unit-sample sequence is often referred to more simply as the impulse sequence.

    Unit-step sequence. The unit-step sequence is denoted by u(n) and is dened as fol-lows:

    u(n) = 1 n 00 n < 0 (2.14)In other words, the sequence is equal to one for all nonnegative time instants. Note that itis related to the unit-sample sequence in the following manner:

    (n) = u(n) u(n 1) and u(n) =n

    k=0

    (k) (2.15)

    The unit-step sequence is often referred to more simply as the step sequence. Fig. 2.4plots the terms of the unit-sample and unit-step sequences over the interval 3 n 6.

    Real exponential sequence. The real exponential sequence is dened as follows:

    x(n) = A n (2.16)

    where both A and are real.

  • 8/10/2019 Ee 113 Book 2008

    39/640

    25SECTION 2.2

    BASICSEQUENCES1

    n

    (n )

    u(n)

    1

    n

    0 1 2 3 4 5 6

    0 1 2 3 4 5 6

    3

    2

    1

    3 2 1

    FIGURE 2.4 The top plot shows the terms of the unit-sample sequence, (n ), over the interval

    3 n 6, while the bottom plot shows the terms of the unit-step sequence, u(n ), over the sameinterval of time.

    Example 2.2 (Decaying exponential sequence)

    Figure 2.5 plots the terms of two real exponential sequences over the interval 5 n 10 for twochoices of that are less than one in magnitude. In one case, is positive and equal to 0.8 so that

    x(n ) = (0 .8)n

    while in the other case is negative and equal to 0.8 and, hence,x(n ) = ( 0.8)n

    It is immediate to realize that when is less than one in magnitude, the samples of the exponentialsequence grow in magnitude for n < 0 (negative time) and decay in magnitude for n 0 (positivetime). It is also seen that when < 0, the samples of the exponential sequence alternate betweenpositive and negative values.

  • 8/10/2019 Ee 113 Book 2008

    40/640

  • 8/10/2019 Ee 113 Book 2008

    41/640

    27SECTION 2.2

    BASICSEQUENCES

    Sinusoidal sequences. The sinusoidal sequences are dened by the expressions:

    x(n) = A sin(on + o) (2.17)

    orx(n) = A cos(on + o) (2.18)

    for some real-valued quantities {A, o, o}. The variable A is called the amplitude of thesinusoidal signal and the variable o is the phase of the signal. As we are going to see inSec. 3.3, the variable o denotes the angular frequency of the sinusoidal signal.

    Example 2.4 (Two sinusoidal plots)

    Figure 2.6 plots the terms of two sinusoidal sequences over the interval 10 n 10 using A = 1 .In one case, o = / 5 and o = 0 so thatx(n ) = sin

    n5

    while in the other case o = / 5 and o = / 3 so that

    x(n ) = sin n

    5 +

    3

    10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 01

    0.5

    0

    0.5

    1

    n

    x(n)=sin( n/5)

    10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 01

    0.5

    0

    0.5

    1

    n

    x(n)=sin( n/5 + /3)

    FIGURE 2.6 The top plot shows the terms of the sinusoidal sequence x (n ) = sin( n/ 5) overthe interval 10 n 10, while the bottom plot shows the terms of the sinusoidal sequencex(n ) = sin( n5 + 3 ) over the same interval of time.

    Complex exponential sequence. This sequence plays a fundamental role in the studyof discrete-time signals and systems. The general form of a complex exponential sequence

  • 8/10/2019 Ee 113 Book 2008

    42/640

    28

    CHAPTER 2FUNDAMENTALSEQUENCES

    isx(n) = A n (2.19)

    where is now a complex number and A is either real- or complex-valued. Assume, forgenerality, that both A and are complex-valued and introduce their polar representations:

    A =

    |A

    |ej o , =

    |

    |ej o , o , o

    [

    , ]

    Then the expression for x(n) can be re-written in the equivalent form

    x(n) = |A| | |n ej (o n + o ) (2.20)

    which is the general form for a complex exponential sequence. An important special caseis the sequence

    x(n) = ej o n (2.21)

    which corresponds to the choices A = 1 and = ej o .

    Example 2.5 (Magnitude and phase plots)

    Figure 2.7 shows the magnitude and phase plots of the complex exponential sequence that corre-sponds to the choices A = ej/ 2 and = 0 .5ej/ 3 , i.e.,

    x(n ) =

    12

    n

    ej (n

    3 +2 )

    over the interval 5 n 5. Observe that we are now using two plots to illustrate the sequence:one for the magnitude of the samples and the other for their phases. This is because the samplesin this example assume complex values as opposed to real values (as was the case with the earlier

    examples).

    One-sided sequences. The unit-step sequence u(n) introducedin (2.14) plays a usefulrole in dening one-sided sequences. Consider, for example, the exponential sequence

    x(n) = (0 .5)n

    This sequence is dened for all values of n since the samples of x(n) exist for nonnegativevalues of n as well as for negative values of n, as was illustrated earlier in Tables 2.1and 2.2. On the other hand, the new sequence

    x(n) = (0 .5)n u(n)

    with the unit-step sequence multiplying from the right-hand side, is again a real exponen-tial sequence but one that has nonzero values only for n 0; the samples of the sequenceare now zero for all n < 0 because u(n) is zero for n < 0. This example illustrates a usefulproperty of the unit-step sequence u(n), namely, it allows us to dene one-sidedsequences.

  • 8/10/2019 Ee 113 Book 2008

    43/640

    29SECTION 2.3

    POLARPLOTS

    5 4 3 2 1 0 1 2 3 4 50

    10

    20

    30

    n

    Magntiude plot

    5 4 3 2 1 0 1 2 3 4 54

    2

    0

    2

    4

    6

    8

    n

    r a d i a n s

    Phase plot

    FIGURE 2.7 The top plot shows the magnitude and the bottom plot shows the phase of the termsof the exponential sequence x(n ) = (0 .5)n ej (n

    3 +2 ) over the interval 5 n 5.

    Example 2.6 (One-sided exponential sequence)

    We reconsider the two-sided exponential sequences from Example. 2.2, and employ the unit-stepsequence to transform them into one-sided sequences, say, as

    y(n ) = (0 .8)n u(n ) and y(n ) = ( 0.8)n u(n )Figure 2.8 plots these sequences over the same interval of time, 5 n 10, as in Fig. 2.5.Observe how the samples over negative time are all zero now.

    2.3 POLAR PLOTS

    It is clear that providing graphical illustrations of sequences that assume real-values isgenerally straightforward. Nevertheless, illustrating complex-valued sequences is moredemanding. For example, in Fig. 2.7 we had to resort to two separate plots: one for themagnitude of the samples and the other for the phase of the same samples.

    Another convenient way to plot complex exponential sequences is by means of a polarplot, which is a plot of the location of the samples over the complex plane. The polar plotis best illustrated through an example. Consider the one-sided sequence

    x(n) = ej 4 n u(n)

    The rst 8 terms of the sequence, corresponding to the time instants n = 0 , 1, . . . , 7, aregiven by

    1, ej4 , ej

    2 , ej

    3 4 , 1, ej

    5 4 , ej

    3 2 , ej

    7 4

    All 8 terms are complex numbers with unit magnitude and, hence, they all lie on a circleof unit radius in the complex plane. Moreover, the terms are / 4 radians apart on the unit

  • 8/10/2019 Ee 113 Book 2008

    44/640

    30

    CHAPTER 2FUNDAMENTALSEQUENCES

    5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 100

    1

    2

    3

    n

    y(n)=(0.8) nu(n)

    5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10

    2

    0

    2

    n

    y(n)=(0.8) nu(n)

    FIGURE 2.8 The top plot shows the terms of the one-sided exponential sequence y(n ) =(0.8)n u(n ) over the interval 5 n 10, while the bottom plot shows the terms of the one-sided exponential sequence y(n ) = ( 0.8)n u(n ) over the same interval of time. These plots shouldbe compared with the ones shown in Fig. 2.5 for the two-sided versions of these sequences.

    circle; their phases increase from 0 to / 4 to / 2 and so forth. Thus, as illustrated inFig. 2.9, if we draw the samples in the complex plane, they will all lie on the unit circleand they will be / 4 radians apart from each other. The curved arrow in Fig. 2.9 is used toindicate that the terms of the sequence cover the circle in a counter-clockwise direction.

    n = 0

    n = 1

    n = 2

    n = 3

    n = 4

    n = 5

    n = 6

    n = 7

    Re

    Im

    4

    1

    FIGURE 2.9 A polar plot of the rst 8 samples of the sequence x(n ) = ej4 n u(n ).

  • 8/10/2019 Ee 113 Book 2008

    45/640

  • 8/10/2019 Ee 113 Book 2008

    46/640

    32

    CHAPTER 2FUNDAMENTALSEQUENCES

    That is, the sequence x(n) is symmetric about the vertical axis.

    Odd sequences. A real-valued sequence, x(n), is said to be odd if its samples satisfythe following relation

    x(n) =

    x(

    n) for all n (odd sequence ) (2.23)

    That is, the sequence x(n) is symmetric about the origin of the cartesian plane.

    Decomposition. Every real-valued sequence, x(n), can be decomposed into the sum of an even component and an odd component, say as

    x(n) = xe (n) + xo (n) (2.24)

    where xe (n) is an even sequence that denotes the even part of x(n), and xo(n) is an oddsequence that denotes the odd part of x(n). We can determine expressions for xe (n) andxo(n) in terms of x(n) by rst using (2.24) to write

    x(n) = xe (n) + xo(n)= xe (n) xo(n)

    so that

    xe (n) = 12

    [x(n) + x(n)] (2.25)

    and

    xo (n) = 12

    [x(n) x(n)] (2.26)

    Example 2.8 (Even and odd sequences)

    The sequencex(n ) = sin

    n3

    is odd while the sequence

    x(n ) = cos

    n3

    is even in view of the properties sin() = sin( ) and cos() = cos( ) for any . Figure 2.11plots the two sequences over the interval 5 n 5.Now consider the sequence

    x(n ) = (0 .5)n u(n )

    This sequence is neither odd nor even. However, we can decompose it as the sum of even and oddsequences as follows:

    x(n ) = xe (n ) + xo (n )

  • 8/10/2019 Ee 113 Book 2008

    47/640

    33SECTION 2.4

    SYMMETRYRELATIONS

    5 0 5

    0.5

    0

    0.5

    n

    x(n)=sin( n/3)

    5 0 51

    0.5

    0

    0.5

    1

    n

    x(n)=cos( n/3)

    FIGURE 2.11 The top plot shows the odd sequence x (n ) = sin( n/ 3) while the bottom plotshows the even sequence x (n ) = cos( n/ 3). The dotted line in the top gure going through theorigin is meant to illustrate the symmetry of the odd sequence around the origin n = 0 . Bothsequences are shown over the interval 5 n 5.

    where

    x e (n ) = 1

    2 [x(n ) + x(n )]

    = 12

    (0.5)n u(n ) + (0 .5)n u(n )

    =

    (0.5)|n |+1 , n = 01, n = 0

    xo (n ) = 1

    2 [x(n ) x(n )]

    = 12

    (0.5)n u(n ) (0.5)n u(n )

    =

    (0.5)n +1 , n > 00, n = 0

    (0.5)n +1 , n < 0Figure 2.12 plots the resulting even and odd sequences of x(n ) over 10 n 10.

    Conjugate symmetric sequences. A complex-valued sequence, x(n), is said to beconjugate symmetric if its samples satisfy the following relation

    x(n) = x(n) for all n (conjugate symmetric sequence ) (2.27)

    That is, if we conjugate the entries of the sequence and reect the conjugated sequencearound the vertical axis, we arrive back at x(n). If we express x(n) in terms of its real and

  • 8/10/2019 Ee 113 Book 2008

    48/640

    34

    CHAPTER 2FUNDAMENTALSEQUENCES

    10 5 0 5 100

    0.25

    0.5

    0.75

    1

    xe(n)

    n

    10 5 0 5 100.25

    0.15

    0.05

    0.05

    0.15

    0.25

    xo(n)

    n

    FIGURE 2.12 The top plot shows the even component of the exponential sequence x(n ) =(0.5)n u(n ), while the bottom part shows the odd component of the same sequence. Note that whilex(n ) is one-sided and its samples are nonzero over n 0, the odd and even sequences, x e (n ) andxo (n ), have nonzero samples over all n . The plots show the samples over 10 n 10 only.

    imaginary parts, sayx(n) = xR (n) + jx I (n) (2.28)

    where xR (n) and xI (n) are both real-valued, then

    x(n) = xR (n) jx I (n)so that the conjugate symmetry property (2.27) translates into

    xR (n) = xR (n) and xI (n) = xI (n) (2.29)That is, the real part of x(n) should be an even sequence and the imaginary part of x(n)should be an odd sequence. In addition, if we introduce the polar representation of x(n),say

    x(n) = (n) ej (n ) , (n) = |xR (n)|2 + |xI (n)|2thenx(n) = (n) e j ( n )

    and it again follows from the conjugate symmetry property (2.27) that we must have

    (n) = (

    n) and (n) =

    (

    n) (2.30)

    That is, the magnitude sequence should be even and the phase sequence should be odd.

    Example 2.9 (Conjugate symmetric sequence)

    The sequencex(n ) = cos

    n3

    + j sin n

    3

  • 8/10/2019 Ee 113 Book 2008

    49/640

    35SECTION 2.5

    ENERGY ANDPOWER

    SEQUENCES

    is conjugate symmetric since

    x(n ) = cos

    (n )3

    j sin

    (n )3

    = cos

    n3

    j sin

    n3

    = cos n

    3

    + j sin n

    3

    = x(n )

    2.5 ENERGY AND POWER SEQUENCES

    Energy sequences. The energy of a sequence x(n) is dened by

    E x=

    n = |x(n)|2 (2.31)

    where the notation | |denotes the magnitude of its argument. When x(n) is real-valued,the notation |x(n)| refers to the absolute value of the sample x(n). On the other hand,when x(n) is complex-valued, the notation |x(n)| refers to the magnitude of x(n). Thus,the energy of a sequence is given by the sum of the squared magnitude of all its samples.When E x < , we say that the sequence is an energy sequence. In other words, energysequences have nite energy.

    Example 2.10 (Step and exponential sequences)

    The step sequence, x(n ) = u(n ), is not an energy sequence since

    n = |u(n )|

    2 =

    n =0

    1 On the other hand, the exponential sequence

    x(n ) =

    12

    n

    u(n )

    is an energy sequence since

    n = |x(n )

    |2 =

    n =0

    1

    4

    n

    = 11 1/ 4

    = 43

    < In the second calculation, we used the fact that the values {(1/ 4)n , n 0} are the terms of ageometric series with ratio 1/ 4 see Example 2.11 below.

  • 8/10/2019 Ee 113 Book 2008

    50/640

    36

    CHAPTER 2FUNDAMENTALSEQUENCES

    Example 2.11 (Geometric series)

    Consider the sequencex(n ) = ar n u(n )

    where a and r are real. The successive samples of the sequence are given by

    {a, ar, ar 2 , ar 3 , ar 4 , ar 5 , . . .}Note that the rst term is a and all successive terms are obtained by multiplying the preceding termby the factor r . In this way, there is a constant ratio r between the successive terms of the sequence.We say that x (n ) represents a geometric sequence with ratio r and initial term a . For such sequences,there is a closed-form expression for the sum of its terms, namely,

    N

    n =0

    ar n = a(1 + r + r 2 + r 3 + . . . + r N ) = a

    1 r N +11 r

    To establish the result, we let S N denote the sum of the rst N + 1 terms:

    S N = a(1 + r + r 2 + r 3 + . . . + r N )

    Then, multiplying S N by r gives

    rS N = a(r + r 2 + r 3 + . . . + r N +1 )

    so thatS N rS N = a(1 r N +1 )

    and, consequently,

    S N = a

    1 r N +11 r

    (sum of rst N + 1 terms) (2.32)

    The above result holds for all nite values of N regardless of the value of r ; in particular, if r = 1 ,then S N = ( N + 1) a . Now assume |r | < 1 and let S denote the geometric series

    S = a(1 + r + r 2 + r 3 + . . . ) = limN

    S N

    Then, since |r | < 1, it follows that r N +1 converges to zero in the expression for S N as N .Consequently, the series converges toS = a

    1 r (series ) (2.33)

    Power sequences. The average power of a sequence x(n) is dened by

    P x

    = limN

    1

    2N + 1

    N

    n = N |x(n)

    |2 (2.34)

    That is, we compute the energy of the sequence x(n) over the symmetric interval N n N , normalize the result by the number of terms in this interval, which is 2N + 1 , andthen evaluate the limit as the size of the interval increases indenitely. When P x < ,we say that the sequence is a power sequence. In other words, power sequences have nitepower.

  • 8/10/2019 Ee 113 Book 2008

    51/640

    37SECTION 2.6

    SIGNALTRANSFORMATIONS

    Example 2.12 (Step sequence)

    Although the step sequence, x(n ) = u(n ), is not an energy sequence it is nevertheless a powersequence since, for any N ,

    12N + 1

    N

    n = N |u(n )|

    2 = 12N + 1

    N

    n =0

    1 = N + 12N + 1

    so that the limit, as N , is P x = 1 / 2.

    2.6 SIGNAL TRANSFORMATIONS

    Sequences often appear in transformed versions and it is useful to become acquaintedwith the following common signal transformations, which are illustrated in Fig. 2.13 for asequence x(n) whose samples are zero outside the indicated interval 5 n 5. If x(n)is a given sequence, then:

    1. x(n) corresponds to a sequence that is obtained from x(n) by reecting it aboutthe vertical axis; this operation is also known as time-reversal.2. x(n 1) corresponds to a sequence that is obtained from x(n) by shifting it by onesample to the right .3. x(n + 1) corresponds to a sequence that is obtained from x(n) by shifting it by one

    sample to the left .

    4. x(n + 1) corresponds to a sequence that is obtained from x(n) by rst reectingx(n) about the vertical axis and then shifting it to the right by one sample; this isnot the same as shifting rst to the right and then reecting about the vertical axis.

    5. x(n 1) corresponds to a sequence that is obtained from x(n) by rst reectingit about the vertical axis and then shifting it to the left by sample. Again, this is notthe same as shifting rst to the left and then reecting about the vertical axis.

    More generally, consider a sequence x(n) and dene a new sequence y(n) that is obtainedfrom x(n) as follows:

    y(n) = x(an + b) (2.35)

    for some integer values a and b. The ve signal transformations listed above correspond toparticular choices of a and b. For arbitrary integers a and b, this is how we can obtain theplot of y(n) from the plot of x(n). Introduce the variable

    m = an + b (2.36)

    Theny(n) = x(m) (2.37)

    Specically, the following facts hold:

    1. The value of y(n) at n = 0 is the value of the sequence x(m) at time m = b:

    y(0) = x(b)

    That is, we set n = 0 in an + b and arrive at the argument m = b for x(m).

  • 8/10/2019 Ee 113 Book 2008

    52/640

    38

    CHAPTER 2FUNDAMENTALSEQUENCES

    -5 -4 -3 -2 -1 0 1 2 3 4 50

    0.5

    1

    -5 -4 -3 -2 -1 0 1 2 3 4 50

    0.5

    1

    -5 -4 -3 -2 -1 0 1 2 3 4 50

    0.5

    1

    -5 -4 -3 -2 -1 0 1 2 3 4 50

    0.5

    1

    -5 -4 -3 -2 -1 0 1 2 3 4 50

    0.5

    1

    -5 -4 -3 -2 -1 0 1 2 3 4 50

    0.5

    1

    n

    x(n)

    x(-n)

    x(n-1)

    x(n+1)

    x(-n+1)

    x(-n-1)

    FIGURE 2.13 Plots of various signal transformations of the sequence x(n ) = (3 / 4)n u(n ) overthe interval 5 n 5.

    2. The value of y(n) at n = 1 is the value of the sequence x(m) at time m = a + b:

    y(1) = x(a + b)

    That is, we set n = 1 in an + b and arrive at the argument m = a + b for x(m).3. The value of y(n) at n = 1 is the value of the sequence x(m) at time m = a + b:

    y(1) = x(a + b)That is, we set n = 1 in an + b and arrive at the argument m = a + b for x(m).

    4. And so forth.

  • 8/10/2019 Ee 113 Book 2008

    53/640

    39SECTION 2.6

    SIGNALTRANSFORMATIONS

    In more formal terms, we can describe the procedure for generating the plot of y(n) fromthe plot of x(n) as follows:

    1. We draw the n axis.

    2. We dene a new variable m = an + b and draw a new axis mapping the values of nto the values of m . We also determine the orientation of this new m axis.

    3. We plot x(m) versus m . This is the same plot as x(n) versus n except that it is doneon the m axis.

    4. We replace the horizontal and vertical axes in the m domain by the horizontal andvertical axes in the n domain. We only keep the samples that are dened for valid ntime instants.

    We illustrate the construction by means of an example.

    Example 2.13 (Plotting a transformed sequence)

    Consider the sequence x (n ) shown in the top plot of Fig. 2.14. It consists of 6 nonzero samplesbetween n = 1 and n = 4 . We wish to plot the sequence that results from transforming x(n ) asfollows:

    y(n ) = x(2n + 3)The rst step is to draw the horizontal m axis that relates to the original n axis via

    m = 2n + 3The m axis is shown in the middle plot. Note that its orientation is reversed relative to the directionof n . The top and middle plots also show how the values of n correspond to the values of m . Forexample, n = 0 is mapped to m = 3 , n = 1 is mapped to m = 1 , n = 1 is mapped to m = 5 ,and so forth.

    The middle plot shows the same sequence x (m ) against the m axis; it is exactly the same se-quence as the original x(n ) except that now the samples are plotted against the m axis. Finally, thebottom plot shows y(n ) versus n . All we are doing here is replace the m axis from the middle plotby the n axis and keep the samples from the middle plot that correspond to valid values of n . Thusnote, for example, that the samples of x (m ) that occur at m = 4 , 2, 0 do not map to samples of y(n ) since these values of m do not correspond to valid integer values of n in the transformationm = 2n + 3 . Therefore, only 3 of the original samples of x (n ) are kept in y(n ); these are thesamples marked with circles around their endpoints. The other samples are removed.

  • 8/10/2019 Ee 113 Book 2008

    54/640

    40

    CHAPTER 2FUNDAMENTALSEQUENCES

    1

    1 2 3

    4

    0

    1

    2

    1

    n

    5m

    1 12

    3 40

    y (n ) n

    x (m ) m

    x (n ) n

    n

    m = 2n + 3

    01234

    2 3 4 5

    1

    FIGURE 2.14 The top plot shows a sequence x(n ). The middle plot shows a new horizontal axism that is related to the axis n via the transformation m =

    2n + 3 . The same sequence x(m ) is

    plotted against the new m axis; observe how the orientation of the axis m is reversed relative to thatof the n axis. The bottom plot shows the sequence y(n ) = x(2n + 3) . Observe that y(n ) retainsonly 3 of the original samples of x(n ); these are marked with circles around their endpoints.

    2.7 APPLICATION: SAVINGS ACCOUNT

    In this section, we illustrate one application of some of the concepts covered in the chapterin the context of a practical problem. Specically, we show how a one-sided exponentialsequence, and transformations thereof, arise in the context of a bank savings account.

    Thus, assume a client opens a savings account with an initial deposit of US$1000. Thetime at which the account was created is selected to be the origin of time, say, as n = 0 .Let y(n) denote the amount of funds in the account at a the beginning of a generic year n.Then, obviously,

    y(0) = US$1000 and y(n) = 0 for all n < 0

    where n < 0 covers the period prior to the creation of the account. Assume further that thereturn rate on the account is 5% per year. Then the amount of funds that will be present at

  • 8/10/2019 Ee 113 Book 2008

    55/640

    41SECTION 2.7

    APPLICATION

    the start of year n = 1 will be:

    y(1) = y(0) (1 + 0 .05) = 1 .05 1000 = US$1050Likewise, the amount of funds that will be present at the start of year n = 2 will be

    y(2) = y(1) (1 + 0 .05) = x(0) (1 + 0 .05)2 = US$1102.50More generally, the amount of funds that will be present at the start of a generic year n willbe

    y(n) = y(0) (1.05)n = 1000 (1.05)n , n 0If we incorporate the fact that y(n) is zero for negative time, we arrive at the expression

    y(n) = 1000 (1.05)n u(n) (2.38)which describes a one-sided exponential sequence. In general, for an initial deposit valueof D at time n = 0 , and assuming an annual return rate of %, the amount of funds thatwill be available at the start of year n would be

    y(n) = D 1 + 100

    n

    u(n) (2.39)Figure 2.15 depicts graphically the evolution of funds in a savings account. 2

    FIGURE 2.15 A depiction to illustrate the growth of funds in a savings account.

    Continuing with our example (2.38), let us now consider the sequence z(n) = y(n 1).It is obtained fromshifting the samples of y(n) by oneunit of time to the right. What wouldthe interpretation of the samples of z(n) be in the context of the savings account? To seethe relation, we write down the rst few samples of the sequences y(n) and z(n):It is clear from the data in the table that the value of z(n), at the start of year n , can beinterpreted as corresponding to the amount of funds that would be present in the account

    2Source of this placeholder image is istockphoto.com.

  • 8/10/2019 Ee 113 Book 2008

    56/640

  • 8/10/2019 Ee 113 Book 2008

    57/640

    43SECTION 2.8

    PROBLEMS

    2.8 PROBLEMS

    Problem 2.1 Consider the complex numbers

    z 1 = 12 j

    32

    , z 2 = 32

    + j 12

    Find the polar representations of the numbers: z 1 , z 2 , z 1 z 2 , z 1 /z 2 , z 21 z 2 , and |z 1 |

    3

    z 2 .Problem 2.2 Consider the complex numbers

    z 1 = 14

    + j 34

    , z 2 = 34 j

    14

    Find the polar representations of the numbers: z 1 , z 2 , z 1 z 2 , z 21 /z 2 , z 1 z 32 , and |z 1 |z 2 .Problem 2.3 Which of the following identities is incorrect?

    (a) (3n 6) = (3n + 6) .(b) (n ) = (5n ).

    (c) (5n 1) = (4n + 3) .(d) (5n 1) = (5(n 1)) .

    Problem 2.4 Which of the following identities is correct?

    (a) 2 (3n ) = 2 (n ).(b) (2n 2) = (n + 1) .(c) (5n + 10) = (2n 4).(d) (5n ) = ( 1)n (n ).

    Problem 2.5 Plot in polar coordinates the terms of the sequence x (n ) = 2

    4 j 24

    nu(n ).

    What is the energy and average power of this sequence?

    Problem 2.6 Plot in polar coordinates the terms of the sequence x (n ) =

    22 + j

    22

    2n

    u(n ).What is the energy and average power of this sequence?

    Problem 2.7 Let

    x(n ) =

    12

    n

    ej

    3

    n +4

    12

    + j 32

    and denote its polar representation by x(n ) = (n )ej ( n ) , where both and are functions of n .

    (a) Determine (n ) and (n ).

    (b) Determine the even and odd parts of (n ).

    (c) Determine the even and odd parts of (n ).

    Problem 2.8 Letx(n ) =

    14

    n 2e

    j

    6

    n 3

    3

    2 j12

    and denote its polar representation by x(n ) = (n )ej ( n ) .

    (a) Determine (n ) and (n ).

    (b) Determine the even and odd parts of (n ).

    (c) Determine the even and odd parts of (n ).

  • 8/10/2019 Ee 113 Book 2008

    58/640

    44

    CHAPTER 2FUNDAMENTALSEQUENCES

    Problem 2.9 Express the complex exponential sequence

    x(n ) = (1 j ) 3

    2 + j 1

    2

    n

    in polar form and plot its terms at the time instants n = 1, 0, 1.Problem 2.10 Express the complex exponential sequence

    x(n ) =

    12

    + j 12

    2

    3

    2 j12

    2n

    in polar form and plot its terms at the time instants n = 1, 0, 1.Problem 2.11 Find the odd and even components of the sequence x (n ) = (0.5)n u(n 1).Plot x(n ) and nd its energy as well.Problem 2.12 Find the odd and even components of the sequence x(n ) = (1/ 4)n 1 u(n + 2) .Plot x(n ) and nd its energy as well.Problem 2.13 Let x(n ) =

    13

    |n | sin

    7 n

    . Is x2 (n ) even?

    Problem 2.14 Let x(n ) =

    13

    n 2 sin

    5 n

    . Is x3 (n ) odd?

    Problem 2.15 Consider the sequence

    x(n ) =

    13

    n

    u(n 1) +

    12

    n 1u(n 2)

    (a) Find its energy and average power.

    (b) Let y(n ) = x(2n 3). For what values of n is y(n ) zero?Problem 2.16 Consider the sequence

    x(n ) =

    1 +

    1

    2

    n 1

    u(n

    2)

    (a) Find its energy and average power.

    (b) Let y(n ) = x(2n + 3) . For what values of n is y(n ) zero?(c) Find the energy of x(2n ) .

    Problem 2.17 Give