641 Pages

113_1_DSP EE113 2010 (cropped)

Course: EE 113, Fall 2011
School: UCLA
Rating:
 
 
 
 
 

Word Count: 169644

Document Preview

AND DISCRETE-TIME PROCESSING FILTERING Ali H. Sayed Electrical Engineering Department University 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...

Register Now

Unformatted Document Excerpt

Coursehero >> California >> UCLA >> EE 113

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
AND DISCRETE-TIME PROCESSING FILTERING Ali H. Sayed Electrical Engineering Department University 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, sayed@ee.ucla.edu The notes are complemented by an interactive website at http://www.ee.ucla.edu/dsplab Please email typos and suggestions to sayed@ee.ucla.edu. Contents 1 Motivation 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2 Signals Classication of Signals Quantization Sampling Signal Processing Systems DSP Technology Applications 1.8.1 Voiced and Unvoiced Speech 1.8.2 Estimation of DC Levels Problems 1 1 3 4 6 7 9 10 10 10 12 16 21 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 3 Fundamental Sequences 21 24 29 31 35 37 40 43 Complex Numbers Basic Sequences Polar Plots Symmetry Relations Energy and Power Sequences Signal Transformations Application: Savings Account Problems 49 3.1 3.2 3.3 3.4 3.5 3.6 3.7 4 Periodic Sequences 49 53 55 57 58 61 65 Periodic Signals Complex Exponential Sequences Angular Frequency Eulers Relation Relating Angular Frequencies and Periods Application: Harmonics and Music Synthesis Problems Discrete-Time Systems 71 vii viii 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 CONTENTS 4.12 5 Systems Classes of Systems Relaxed Systems Dynamic Systems Time-Invariant Systems Causal Systems Stable Systems Linear Systems Constant-Coefcient Difference Equations System Representations Applications 4.11.1 Multipath Communications 4.11.2 Financial Growth Model 4.11.3 Population Growth Models Problems 71 73 76 77 78 81 82 83 86 87 90 90 92 95 100 Impulse Response Sequence 105 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 105 110 111 113 114 115 117 119 119 121 123 5.9 6 Convolution Sum for LTI Systems Causality of LTI Systems BIBO Stability Series Cascade of LTI Systems Parallel Cascade of LTI Systems FIR and IIR Systems Inverse Problem Applications 5.8.1 Multipath Channels 5.8.2 Financial Growth Model Problems Linear Convolution 131 6.1 131 131 132 133 135 135 136 136 140 140 144 148 6.2 6.3 6.4 7 Properties of the Convolution Sum 6.1.1 Commutativity 6.1.2 Distributivity 6.1.3 Associativity 6.1.4 Convolution with the Unit-Sample Sequence Evaluation of the Convolution Sum 6.2.1 Analytical Method 6.2.2 Graphical Method Applications 6.3.1 Echo Cancellation 6.3.2 Population Growth Management Problems Homogeneous Difference Equations 155 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 8 Homogenous Equations 7.1.1 Distinct Roots 7.1.2 Repeated Roots 7.1.3 Complex Roots 7.1.4 Solution Method Homogeneous Equations with Initial Conditions Impulse Response of LTI Systems Stability of Causal LTI Systems Impulse Responses of non-LTI Systems Complete Response of LTI Systems Applications 7.7.1 Carbon Dating 7.7.2 Rabbit Population and Fibonacci Numbers Problems 155 157 157 158 159 160 163 167 169 170 171 171 173 176 Solving Difference Equations 181 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 182 186 188 189 191 193 194 195 197 197 201 205 8.10 9 Particular Solution Characterizing All Solutions First Method for Finding Complete Solutions Zero-State Response Zero-Input Response Second Method for Finding Complete Solutions Transient and Steady-State Response Third Method for Finding Complete Solutions Applications 8.9.1 Macroeconomics Model 8.9.2 Cell Division in Biology Problems z-Transform 213 9.1 9.2 213 214 215 216 219 223 223 226 227 229 230 231 233 236 9.3 9.4 9.5 Bilateral z-Transform Region of Convergence 9.2.1 Finite-Duration Sequences 9.2.2 Innite-Duration Sequences Exponential Sequences Properties of the z-Transform 9.4.1 Linearity 9.4.2 Time Shifts 9.4.3 Exponential Modulation 9.4.4 Time Reversal 9.4.5 Linear Modulation 9.4.6 Complex Conjugation 9.4.7 Linear Convolution Evaluating Series ix CONTENTS x 9.6 9.7 CONTENTS 9.8 9.9 9.A 10 Initial Value Theorem Upsampling and Downsampling 9.7.1 Upsampling 9.7.2 Downsampling Applications Problems Convergence of Power Series 237 238 238 240 244 244 251 255 10.1 10.2 10.3 10.4 10.5 10.6 11 Partial Fractions 255 256 259 264 268 268 Rational Transforms Elementary Rational Fractions Partial Fractions Expansion Integral Inversion Formula Applications Problems 273 11.1 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.10 12 Transfer Functions 273 273 275 278 278 282 283 284 286 286 Transfer Functions of LTI Systems Eigenfunctions of LTI Systems Evaluation from Difference Equations Finding Output Sequences Finding Difference Equations Poles, Zeros, and Modes Realizable LTI Systems System Inversion Applications Problems Unilateral z-Transform 295 12.1 12.2 12.3 295 296 299 300 301 302 304 305 306 308 309 309 12.4 12.5 12.6 12.7 13 z-Transform and Difference Equations Unilateral z-Transform Properties of the Unilateral z-Transform 12.3.1 Linearity 12.3.2 Time Shifts 12.3.3 Exponential Modulation 12.3.4 Linear Modulation 12.3.5 Linear Convolution Initial and Final Value Theorems Solving Difference Equations Applications Problems Discrete-Time Fourier Transform 313 13.1 13.2 13.3 13.4 13.5 13.6 13.7 14 Denition of the DTFT Uniform Convergence Inverse DTFT Mean-Square Convergence Inverse DTFT by Partial Fractions Applications Problems 313 320 325 328 333 335 335 Properties of the DTFT 343 14.1 14.2 343 344 345 349 351 352 354 357 358 360 365 367 368 372 372 374 377 378 14.3 14.4 14.5 15 Periodicity of the DTFT Useful Properties 14.2.1 Linearity 14.2.2 Time Shifts 14.2.3 Frequency Shifts 14.2.4 Modulation 14.2.5 Time Reversal 14.2.6 inear Modulation 14.2.7 Linear Convolution 14.2.8 Multiplication in the Time Domain 14.2.9 Conjugation 14.2.10 Real Sequences 14.2.11 Parsevals Relation Upsampling and Downsampling 14.3.1 Upsampling 14.3.2 Downsampling Applications Problems 385 15.1 15.2 15.3 15.4 15.5 15.6 15.7 16 Frequency Response 385 388 398 401 405 406 406 Frequency Content of a Sequence Frequency Response of an LTI System Linear Time-Invariant Systems Ideal Filters Realizable Filters Applications Problems Minimum and Linear Phase Systems 415 16.1 16.2 16.3 415 418 421 422 424 426 Group Delay Linear Phase Characteristics Linear Phase FIR Filters 16.3.1 Type-I FIR Filters 16.3.2 Type-II FIR Filters 16.3.3 Type-III FIR Filters xi CONTENTS xii CONTENTS 16.4 16.5 16.6 16.7 16.8 17 16.3.4 Type-IV FIR Filters 16.3.5 Location of Zeros All-Pass Systems 16.4.1 First-Order All-Pass Sections 16.4.2 Second-Order All-Pass Sections 16.4.3 Higher-Order All-Pass Sections Minimum Phase Systems Fundamental Decomposition 16.6.1 Minimum Group Delay Property 16.6.2 Minimum Energy Delay Property Applications Problems 427 431 433 435 438 439 440 442 444 445 449 449 457 17.1 17.2 17.3 17.4 17.5 17.6 17.7 18 Discrete Fourier Transform 457 462 471 475 478 480 481 Motivation Relation to Original Sequence Discrete Fourier Transform Inverse DFT Vector Representation Applications Problems Properties of the DFT 487 18.1 18.2 488 489 489 493 500 503 505 508 512 520 523 525 525 18.3 18.4 19 Periodicity of the DFT Useful Properties 18.2.1 Linearity 18.2.2 Circular Time Shifts 18.2.3 Circular Frequency Shifts 18.2.4 Modulation 18.2.5 Circular Time Reversal 18.2.6 Complex Conjugation in Time and Frequency 18.2.7 Circular Convolution 18.2.8 Multiplication in the Time Domain 18.2.9 Parsevals Relation Applications Problems Computing Linear Convolutions 531 19.1 19.2 19.3 531 532 535 536 539 545 19.4 Relating Linear and Circular Convolutions Computing Linear Convolutions via the DFT Block Convolution Methods 19.3.1 Overlap-Add Convolution Method 19.3.2 Overlap-Save Convolution Method Applications 19.5 Problems 545 xiii CONTENTS 20 549 20.1 20.2 20.3 20.4 20.5 21 Fast Fourier Transform 549 551 560 568 568 Computational Complexity Decimation-in-Time FFT Decimation-in-Frequency FFT Applications Problems 571 21.1 21.2 21.3 21.4 21.5 22 Spectral Resolution 571 578 584 590 590 Windowing Spectral Resolution of the DTFT Spectral Resolution of the DFT Applications Problems 591 22.1 22.2 22.3 22.4 22.5 22.6 Sampling Process Fourier Transform Linear Convolution Linear Time-Invariant Systems Nyquist Rate for Baseband Signals Sampling of Bandpass Signals 22.6.1 Complex-valued Bandpass Signals 22.6.2 Real-valued Bandpass Signals 22.7 Relation of Fourier Transform to the DTFT 22.8 Relation of Fourier Transform to the DFT 22.9 Spectral Resolution 22.10 Applications 22.11 Problems 23 Sampling 591 593 602 608 611 623 624 626 631 635 638 640 640 Discrete-Time Realizations 649 23.1 650 650 652 655 658 659 660 661 663 667 669 23.2 23.3 Realizations of FIR Filters 23.1.1 Direct or Tapped-Delay-Line Realizations 23.1.2 Cascade Realizations 23.1.3 Exploiting Symmetry Realizations of IIR or ARMA Filters 23.2.1 Direct Realizations of AR Filters 23.2.2 Type-I Direct Realizations of ARMA Filters 23.2.3 Type-II Direct Realizations of ARMA Filters 23.2.4 Cascade Realizations 23.2.5 Parallel Realizations Transposed Realizations xiv 23.4 23.5 23.6 23.7 CONTENTS 24 Masons Rule State-Space Realizations Applications Problems 672 675 687 687 Lattice Realizations 693 24.1 24.2 693 695 696 700 702 707 713 714 714 718 720 723 727 731 733 737 740 740 743 24.3 24.4 24.5 24.6 24.7 24.8 24.9 24.A 25 Motivation Composite Cascades 24.2.1 Linear Fractional Transformations 24.2.2 Mapping Properties of All-Pass Sections 24.2.3 Stability Properties 24.2.4 Inverse Transformation 24.2.5 Listing of Mapping Properties Lattice Realization of All-Pass Filters 24.3.1 Lattice Sections 24.3.2 Schur-Cohn Stability Test 24.3.3 Schur Algorithm 24.3.4 Levinson Algorithm Lattice Realization of AR Filters Lattice Realization of MA Filters Lattice Realization of ARMA Filters Summary of Lattice Realizations Applications Problems Appendix: Maximum Modulus Principle Quantization Effects 745 25.1 745 745 751 753 753 756 757 757 759 763 767 769 775 779 782 786 789 25.2 25.3 25.4 Binary Representations 25.1.1 Fixed-Point Representations 25.1.2 Floating-Point Representations Quantization Errors 25.2.1 Rounding and Truncation 25.2.2 Overow and Underow Finite Word-Length Effects 25.3.1 Effect on Processing and Filtering 25.3.2 Limit Cycles 25.3.3 Effect on Frequency Response 25.3.4 Effect on FIR Implementations 25.3.5 Propagation of Quantization Noise 25.3.6 Roundoff Noise Analysis 25.3.7 Pairing and Ordering of Sections 25.3.8 Scaling of Signals 25.3.9 Orthogonal Filters Applications 25.5 790 Design of FIR Filters 799 26.1 26.2 26 Problems 799 803 805 807 815 824 825 826 833 839 840 840 26.3 26.4 26.5 27 Practical Filter Specications Window Method 26.2.1 Design Procedure 26.2.2 Mainlobes and Sidelobes 26.2.3 Kaiser Windows Equiripple Design Method 26.3.1 Optimization Problem Formulation 26.3.2 Relation to Polynomial Approximation Theory 26.3.3 Design Procedure 26.3.4 FIR Filters of Types II, III, and IV Applications Problems Design of Analog Filters 843 27.1 27.2 27.3 27.4 27.5 843 846 849 851 857 858 868 872 876 876 878 881 883 884 886 27.6 27.7 27.8 27.9 27.A 28 Laplace Transform Transfer Functions Filter Specications Low-Pass Butterworth Filters Low-Pass Chebyshev Filters 27.5.1 Type-I Chebyshev Filters 27.5.2 Type-II Chebyshev Filters Low-Pass Elliptic Filters Frequency Transformations 27.7.1 Design of High-Pass Filters 27.7.2 Design of Band-Pass Filters 27.7.3 Design of Band-Stop Filters Applications Problems Convergence of Laplace Transform 889 28.1 28.2 28.3 28.4 28.5 28.6 28.7 28.8 29 Design of IIR Filters 889 892 899 903 907 913 922 923 Relating Laplace and z-Transforms Impulse Invariance Method Step Invariance Method Matched z-Transformation Bilinear Transformation Method Frequency Transformations Applications Problems Multirate Processing 929 xv CONTENTS xvi 29.1 CONTENTS 29.2 29.3 29.4 29.5 30 Sampling Rate Conversion 29.1.1 Increasing the Sampling Rate by an Integer Factor 29.1.2 Decreasing the Sampling Rate by an Integer Factor 29.1.3 Modifying the Sampling Rate by a Rational Factor Polyphase Realizations 29.2.1 Polyphase Decomposition 29.2.2 Polyphase Structures for Decimation and Interpolation Nyquist Filters 29.3.1 Sample Preservation Property 29.3.2 Polyphase Characterization 29.3.3 Design Procedure 29.3.4 Half-Band Filters Applications Problems 929 929 934 940 943 947 951 956 956 957 960 962 963 963 Filter Banks 965 30.1 965 966 977 984 984 991 994 995 1000 1000 1002 1002 1003 1009 1016 1017 30.2 30.3 30.4 30.5 30.6 30.7 31 Block Filtering 31.1 31.2 31.3 31.4 31.5 31.6 31.7 32 Analysis Filter Bank 30.1.1 Uniform Filter Banks 30.1.2 DFT Analysis Filter Bank Synthesis Filter Bank 30.2.1 Uniform Filter Bank 30.2.2 DFT Synthesis Filter Bank Subband Processing Oversampled Filter Banks Perfect Reconstruction Filter Banks 30.5.1 Alias-Free Reconstruction Condition 30.5.2 Perfect Reconstruction Condition 30.5.3 Perfect Reconstruction with FIR Filters 30.5.4 Quadrature Mirror Filter Banks 30.5.5 Orthogonal Perfect Reconstruction Filter Banks Applications Problems Block Processing Overlap-Save DFT-Based Block Filtering Overlap-Add DFT-Based Block Filtering DCT-Based Block Filtering DHT-Based Block Filtering Applications Problems Random Signals 32.1 Probability Density Functions 1021 1021 1027 1037 1039 1042 1047 1047 1051 1051 32.2 32.3 32.4 32.5 32.6 Mean and Variance Dependent Random Variables Complex-Valued Random Variables Random Vectors Properties of Covariance Matrices 32.6.1 Covariance Matrices are Hermitian 32.6.2 Covariance Matrices are Non-Negative Denite 32.7 Random Processes 32.8 Power Spectral Densities 32.8.1 iltering of Stationary Processes 32.8.2 pectral Factorization 32.9 Applications 32.10 Problems 33 Linear Estimation 33.1 33.2 33.3 33.4 33.5 33.6 33.7 33.A 34 Estimation Without Observations Using Correlated Observations Using Multiple Observations Design Examples Vector Estimation Applications Problems Appendix: Complex Gradients 33.A.1 auchy-Riemann Conditions 33.A.2 ector Arguments Linear Prediction 34.1 34.2 34.3 34.4 34.5 34.6 34.7 34.8 34.9 Order-Update Estimation 34.1.1 Useful Property: Linear Transformations 34.1.2 Useful Property: Uncorrelated Components 34.1.3 Useful Property: Uncorrelated Observations 34.1.4 Main Decomposition Result 34.1.5 Interpretation Forward Prediction Problem Backward Prediction Problem Relating the Prediction Problems Residual Recursions Levinson Algorithm 34.6.1 Polynomial Form 34.6.2 Lattice Implementation Triangular Factorization Applications Problems 1054 1058 1061 1063 1067 1067 1073 1077 1078 1080 1083 1086 1087 1091 1091 1093 1099 1103 1107 1109 1110 1114 1114 1116 1117 1117 1117 1118 1119 1120 1120 1121 1127 1131 1134 1140 1141 1142 1143 1145 1146 xvii CONTENTS xviii 35 Wiener Filtering 1149 CONTENTS 35.1 35.2 35.3 35.4 35.5 35.6 36 Kalman Filtering 36.1 36.2 36.3 36.4 36.5 36.6 36.7 36.8 36.9 36.10 36.11 36.12 37 Wiener Smoothing Problem Wiener Filtering Problem Levinson and Spectral Factorization Schur and Spectral Factorization Applications Problems Uncorrelated Observations Innovations Process State-Space Model Recursion for the State Estimator Computing the Gain Matrix Riccati Recursion Covariance Form Measurement and Time-Update Forms Modeling and Whitening Filters Relation to Wiener Filtering Applications Problems Adaptive Filtering 37.1 37.2 37.3 Problem Formulation Steepest-Descent Method Stochastic Approximation 37.3.1 LMS Filter 37.3.2 NLMS Filter 37.3.3 Other LMS-Type Filters 37.3.4 RLS Filter 37.4 Application: Adaptive Channel Estimation 37.5 Application: Adaptive Channel Equalization 37.6 Application: Decision-Feedback Equalization 37.7 Ensemble-Average Learning Curves 37.8 Mean-Square Performance 37.8.1 Data Model 37.8.2 Energy Conservation Relation 37.8.3 Performance of LMS 37.8.4 Performance of NLMS 37.9 Applications 37.10 Problems 1149 1153 1164 1165 1168 1168 1171 1171 1174 1176 1177 1178 1179 1180 1181 1182 1183 1186 1186 1187 1187 1188 1193 1194 1195 1196 1198 1200 1202 1204 1206 1209 1210 1213 1215 1217 1218 1219 CHAP T E R 1 Motivation Iinltethriisngin. iWael chrsatpetexrpwaeinewphlaatiniswmheaat nist bmyeathnet bteyrmhesitgitnlalDaisncdrethtee-nTimoevPerooncetsosienxgpaanid ti x t e m F l , ln what 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 independent variables. The independent variable can be time, frequency, space coordinates, distance, or some other variable of interest. In this book, we focus almost exclusively on functions of a single variable and the independent variable will generally be either the time variable or 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 t represents the independent variable and the symbol x represents the signal. In this example, assuming that the cart starts moving at time 0, both t and x assume real values with t 0. reference point x(t) FIGURE 1.1 by x(t). The horizontal distance of the cart at time t relative to a reference point is denoted 1 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 2 CHAPTER 1 MOTIVATION 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 twodimensional image with a total of 64 pixels. Here the indices {m, } represent the independent variables 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 integer values in the range [0, 7], and it is assumed that the intensity variable x also assumes integer values as well, say in the range [0, 255]. 01234567 0 1 2 3 4 5 6 7 m 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. Here the symbol n represents the independent variable and it assumes integer values, whereas the symbol x denotes the signal and it also assumes integer values. x(n) (students) 50 40 30 20 10 2007 FIGURE 1.3 2008 2009 2010 n (year) The number of students attending a course during the years 2007 through 2010. 3 SECTION 1.2 Example 1.4 (Satellite orbiting the Earth) CLASSIFICATION OF SIGNALS Let w(r ) denote the angular speed of a satellite in uniform circular motion around the Earth at a radial distance r from the center of the Earth. Here the symbol r represents the independent variable and it assumes positive real values, whereas the symbol w represents the signal and it also assumes positive real values. w (r ) satellite r Earth 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, we classify signals into three broad categories. Continuous-Time Signals In this case the independent variable assumes continuous real values as in Examples 1.1 and 1.4. We shall generally denote a continuous-time signal by x(t), with t denoting the independent variable. An example of a continuous-time signal is the temperature variation in 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 independent variable. An example of a discrete-time signal is the average daily temperature in a city, where the independent variable species the day of interest (say, day 1, day 2, and so forth) and the signal corresponds to the average temperature on that day. We further note that: 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 both terminologies, discrete-time signal and sequence, whenever convenient. 4 CHAPTER 1 MOTIVATION 2. The value (also called amplitude) of a discrete-time signal, x(n), at any particular n, is not restricted; the amplitude may assume integer values, real values, or even complex values. Digital Signals A digital signal is a sequence where the amplitude of its terms can belong to only a nite number of possibilities. In Example 1.2, we saw that the intensity of every pixel (m, ) in the 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 number of bits is used to represent the amplitude of a signal. Assume, for instance, that 3 bits are available to describe the amplitude of a signal, x(n). This means that we have 8 amplitude possibilities 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 amplitudes of the signal x(n) occur within the continuous range [4, 4]; the horizontal axis in the gure represents the range of values that can be assumed by x(n). We divide the horizontal axis into sub-intervals of width each. Then, whenever the amplitude of x(n) falls within the interval [ , 3 ) we represent it by the value , which is assigned the bits 001. In other 2 2 words, we round the value of x to the nearest amplitude in the quantized domain. In this way, all amplitudes in the range [ , 3 ) in the signal domain, x(n), are mapped into the 2 2 single amplitude in the quantized domain, xq (n). Likewise, whenever the amplitude of x(n) falls within the interval [ , ) we represent it by the value 0, which is assigned 22 the bits 000, and so forth. This construction starts with a discrete-time signal x(n) and produces an amplitude-discretized version of it, which we are denoting by xq (n). The amplitudes 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. 5 SECTION 1.3 QUANTIZATION xq 01 1 3 0 10 2 001 4 3 2 111 11 0 0 00 2 3 x 2 101 3 100 4 FIGURE 1.5 An example of 3-bit uniform quantization with rounding; the amplitude of a discretetime 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.7 The 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 nd that x(0) lies within the interval 3 , 22 x(1) lies within the interval x(2) lies within the interval 5 7 , 2 2 3 5 , 2 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 the form of bits or bytes. In most of this book, we shall deal with discrete-time signals as opposed to digital signals. That is, the amplitude of each term in the sequence x(n) will 6 CHAPTER 1 MOTIVATION not be restricted; it will generally be bounded but not quantized. There are at least two reasons for proceeding in this manner: 1. First, discrete-time signals are more tractable to mathematical analysis than digital signals. 2. Second, if we assume long enough word-lengths, i.e., if we assume digital signal representations that employ a sufcient number of bits to quantize the signal amplitudes, then the loss in performance and accuracy that results from the use of quantization may be assumed negligible. Nevertheless, in Chapter 25 we shall examine in some detail the effect of quantization errors on computations involving digital signals. 1.4 SAMPLING How do sequences arise? In many cases, the data may already be available in discrete-time form. For example, we may have available a table with entries that represent the yearly levels of rainfall for the last 20 years in a city. In this case, we have a sequence with 20 entries and each entry in the table corresponds to a term in the sequence. Likewise, we may have available a table indicating the number of students attending a course over a certain number 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 2007 2006 2005 2004 2003 2002 2001 26 21 15 19 31 27 19 18 2000 1999 1998 1997 1996 1995 1994 1993 26 20 23 17 22 25 18 20 More often, however, sequences arise from sampling continuous-time signals such as speech 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 sequence, x(n), whose terms are given by the values of x(t) evaluated at the time instants t = 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 in the sampling process and the other values of x(t) are ignored see Fig. 1.6. Usually, the compact notation x(n) is used instead of x(nT ) to refer to the resulting sequence with the letter T dropped. Besides begin a compact representation of the sequence, the notation x(n) will also allow us to study properties of sequences independently of the sampling period T . 7 SECTION 1.5 x( t ) SIGNAL PROCESSING x(n) x( t ) t T FIGURE 1.6 Sampling of a continuous-time signal x(t) at multiples of the sampling period T to generate a sequence x(n). Remark. In general, the independent variable n in the notation x(n) does not necessarily refer to time (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 referring to 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 example, given a continuous-time signal x(t) that represents the temperature variation over an interval of time T , we can extract information about the average temperature over this interval of time via integration as follows: x= 1 T T x(t)dt (1.2) 0 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 result by T see Fig. 1.7. Likewise, given a sequence x(n) that represents the yearly rainfall over the last 20 years in a city, we may extract information about the average annual rainfall as follows: 19 x= 1 x(n) 20 n=0 (1.3) Observe that we are numbering the terms of the sequence x(n) in this example from 0 to 19 and not from 1 to 20. It is common to use n = 0 as the origin of time when describing sequences and we shall adopt this convention in the book. Of course, we can perform more sophisticated processing on signals than simply evaluate their averages. For example, we can attempt to use the available data in order to predict 8 CHAPTER 1 x(t) MOTIVATION x= 1 T area T FIGURE 1.7 t 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 will be attending a particular course this year based on the attendance history over the previous 5 years. In another example, if x(n) denotes a speech sequence that is corrupted by background noise, we may want to process x(n) in order to remove the interfering noise and generate a clear speech signal, y (n). This is one example of ltering whereby a signal is processed to lter out undesired components or to transform the signal into another more desirable form. Figure 1.8 illustrates another ltering example. The top plot (a) shows a sinusoidal signal, 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 clear sinusoidal version (a) or a good approximation for it. Obviously, the processing or the algorithms that are needed to perform prediction and ltering tasks are more involved than the processing that is involved in computing the signal averages mentioned in the earlier examples. 9 amplitude SECTION 1.6 sinusoidal signal SYSTEMS (a) disturbance (b) noisy signal (c) time FIGURE 1.8 Processing a noisy signal to remove (or reduce the effect of) the noise component and recover the original sinusoidal signal. 1.6 SYSTEMS The task of processing a signal in order to extract information from it is performed by a system or lter. Systems operate on signals and transform an input signal into an output signal, as shown in Fig. 1.9. output signal input signal system 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, systems whose input and output signals are sequences. Hence, we shall deal with the processing 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 is also called Digital Signal Processing (or DSP for short). 10 1.7 DSP TECHNOLOGY CHAPTER 1 MOTIVATION The relevance of discrete-time signal processing has been heightened by the enormous technological advances in, and the increasing reliance on, digital computers and digital signal processors since the 1970s. These advances have made it possible to deal efciently with sequences and digital data for the following reasons: 1. Digital hardware is efcient in storing and processing digital information. In particular, stored information can be moved from one location to another almost by the click of a button, and the information can be processed at different locations and at different times as dictated by user needs. 2. Digital hardware is usually programmable and offers more exibility than analog implementations. By modifying program codes we can use the same hardware to perform different processing tasks. Analog implementations for different tasks tend to be different and require elaborate testing and tuning. 3. Analog hardware is sensitive to component accuracy, temperature variations, and thermal 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. There are situations where the signals exhibit rapid variations and require high sampling rates in order to transform them into sampled signals for discrete-time processing. The requirement of fast sampling rates generally translates into the requirement of digital hardware that is capable of operating at high frequencies (or speeds), which in turn translates into costlier and more challenging implementations. Likewise, faster sampling rates tend to generate large 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 specialized analog hardware, or even hybrid solutions combining analog and digital techniques. These alternative 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 chapter in 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 in order to classify speech into voiced and unvoiced frames. The processing we perform in this example is relatively simple since it only involves segmenting a sequence into smaller sequences and averaging the samples of each segment. Nevertheless, even simple processing 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 and the lips) see Fig. 1.10.1 Voiced signals are produced when the vocal cords vibrate during the 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/ 1 The source for this public domain image of the vocal apparatus is Wikimedia Commons. and /v/ is the vibration of the vocal cords. Also, voiced signals tend to be louder like the vowels /a/, /e/, /i/, /u/, /o/. Unvoiced signals, on the other hand, tend to be more abrupt like the 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 by dividing a speech sequence into short frames and by computing the average power of each frame. The speech in a particular frame is then declared to be voiced if its average power exceeds 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. For example, 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 samples in the frame and adding these values together to yield: (k+1)N 1 Energy of frame k = Ek = x2 (n) n=kN (1.5) 11 SECTION 1.8 APPLICATIONS 12 CHAPTER 1 MOTIVATION If the energy is divided by the number of samples, N , then the result is taken as the average power of the frame: Average power of frame k = Pk 1 = N (k+1)N 1 x2 (n) (1.6) n=kN It is this power level that we shall compare against the threshold level: Pk Pk threshold = voiced frame < threshold = unvoiced frame (1.7) (1.8) We divide the waveform of a speech signal into frames of duration 20ms each and compute the average power of each frame. This average power serves as an indication of the loudness of the frame. We therefore expect higher average power for voiced signals than for unvoiced signals. The top plot in Fig. 1.11 shows the amplitude values of 14000 samples 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 The middle plot shows only those frames of the original speech signal whose average power exceeds 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 original signal whose average power is lower than the threshold level (71% of the frames); the other frames are set to zero. Practice Questions: 1. Each frame is 20ms long and consists of N = 175 samples. The speech signal used is 14000 samples long. Into how many frames can the signal be divided? What is the duration of the entire speech signal in seconds? At what rate in samples/second was the original continuoustime speech signal sampled? 2. The amplitudes of the speech samples lie within the interval [1, 1]. What is the largest average power we can expect for a frame? If the amplitudes of the samples in a particular frame 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 constant level. This situation can arise when different sources observe the same variable and report their measurements. For example, in a laboratory experiment students may be measuring the value of the same resistive component in a circuit. Due to measurement and numerical errors, each student is likely to report a slightly different value for the resistance of the component. We model this situation as follows. We denote the unknown resistance value by 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, one for each student: r(n) = R + (n), n = 0, . . . , N 1 (1.9) 13 Original speech signal SECTION 1.8 amplitude APPLICATIONS amplitude Voiced speech amplitude Unvoiced speech n (sample index) FIGURE 1.11 The top plot shows the original speech signal. The middle plot shows the voiced frames 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 assume that the noise components {(n)} are likely to assume both positive and negative values across all students so that the average value of the {(n)} across these measurements can be assumed to be zero: N 1 1 (n) = 0 (1.10) N n=0 Under this condition, if we now average the measurements {r(n)} in (1.9) we nd that R= 1 N 1 r(n) N n=0 (1.11) In other words, the value of R is the average value of the sequence r(n). We refer to R as the DC level of the sequence r(n). That is, we dene the DC level of a sequence as the average value of its samples. In this way, condition (1.9) amounts to assuming that the noise components have zero DC level. Of course, in practice, assumption (1.10) may not hold precisely and expression (1.11) would then provide an approximate estimate for R rather than its exact value. Expression (1.11) provides one way to evaluate the DC level of a sequence, r(n). This solution method requires that we rst collect all measurements, {r(n)}, and then average them. If the time interval between consecutive measurements is long, the waiting time to 14 CHAPTER 1 MOTIVATION collect the data can be undesirable. To illustrate this fact, let us return to the same circuits laboratory class and let us assume that the class holds daily sessions. Let us further assume that we now would like to use all measurements collected by all student groups during the entire week in order to estimate R. To do so, we would need to wait until all laboratory sessions have concluded by the end of the week and only then estimate R by averaging across all measurements. We wonder whether it is possible to develop a procedure that would allow us to estimate R on the y as data become available, and then improve upon this estimate as more data are collected. The discussion that follows derives one such procedure. The purpose of the presentation is to show that it will often make sense to look for alternative algorithms to achieve the same objective (that of computing R in this example). This is because different algorithms will usually exhibit different properties that are 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 wait until all the data becomes available. Let us examine an alternative that will lead to the same result 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 the day. Their measurements can be readily averaged to provide an initial estimate for R, say, as R1 = 1 N1 N 1 1 r(n) n=0 where we are assuming there are N1 students in the rst group. We are also denoting the estimate from this rst set of data by R1 . In the absence of additional measurements, the above calculation provides an initial estimate for R1 and it will serve as our estimate until more data become available. On Tuesday, the second group of students reports its measurements. We would now like to determine the estimate of R that is based on both sets of data. Specically, assuming the second group has N2 students, we are now interested in evaluating the following average: R1:2 = 1 N1 + N2 N 1 +N 2 1 r(n) (1.12) n=0 where we are averaging over the measurements from both groups. We are denoting the estimate from the rst two sets of data by R1:2 ; we are also labeling the students in the second group from n = N1 up to n = N1 + N2 1. Evaluating R1:2 as above requires that we re-use the data from the rst group of students. One wonders whether the initial computation of R1 can be useful here. To address this equation, let R2 denote the average value that is based solely on the measurements from the second group of students: R2 = 1 N2 N 1 +N 2 1 r(n) n=N1 Using the denition (1.12) for R1:2 we note that N 1 1 (N1 + N2 ) R1:2 = N 1 +N 2 1 r(n) + n=0 r(n) n=N1 15 Dividing both sides by the product N1 N2 we get SECTION 1.8 N1 + N2 1 R1:2 = N1 N2 N2 1 N1 N 1 1 r(n) + n=0 1 N1 1 N2 APPLICATIONS N 1 +N 2 1 R1 r(n) n=N1 R2 and we end up with a relation between R1,2 , R1 and R2 : R1:2 = N1 N1 + N2 R1 + N2 N1 + N2 R2 (1.13) This is a very interesting relation. It tells us that we can evaluate R1:2 , which is the average based on both sets of data, by combining the individual averages. The measurements themselves 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 include the other student groups. For example, if R1:3 is the average value that is based on the measurements from student groups 1, 2, and 3, then R1:3 = N1 + N2 N1 + N2 + N3 R1:2 + N3 N1 + N2 + N3 R3 In this way, we only need to use the new average R3 (from group 3) and combine it with the previous aggregate average R1:2 . This construction is an example of a recursive processing algorithm, where new data (in this case, R3 ) is combined with a previous output of the algorithm (in this case, R1:2 ) to update the algorithm to a new output value, R1:3 . More generally, for data from student groups 1 through k , we have R1:k = k 1 =1 N k =1 N R1:k1 + Nk k =1 N Rk (1.14) Figures 1.12 and 1.13 illustrate an application of this procedure for the case of 5 students groups with {12, 10, 11, 10, 9} students in each group. The value of the unknown quantity R was set at R = 20 and all measurements were subjected to additive Gaussian noise with zero-mean and unit variance. Figure 1.12 shows the variations of the measurements across all 52 students; the measurements are represented by the lled circles in the plot, which are connected 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 (lled squares), and the other plot corresponds to the estimates of R that are updated according to the recursive procedure (1.14) and are indicated by the lled circles in the plot. Practice Questions: 1. Assume the pairs (Rk , Nk ) assume the values (10.8, 5), (10.7, 8), and (11.1, 7). Evaluate R1: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 based on the measurements from groups 2 and 3. 3. According to (1.14), which group of students is weighted more heavily in the determination of R? 16 22.5 CHAPTER 1 MOTIVATION nominal value of R noisy measurements 22 21.5 amplitude 21 20.5 20 19.5 19 18.5 18 17.5 5 10 15 20 25 30 35 n (measurements) 40 45 50 FIGURE 1.12 Noisy measurements by all 52 students. The measurements uctuate around the nominal value of R = 20. 20.5 20.4 20.3 cumulative recursive estimate R (estimate) 20.2 20.1 20 19.9 estimates by individual groups 19.8 19.7 19.6 1 2 3 k (student group) 4 5 FIGURE 1.13 One line corresponds to the estimates of R that are reported by the 5 individual groups, and the other line corresponds to the estimate of R that is updated according to the recursive procedure (1.14). 1.9 PROBLEMS Problem 1.1 Consider the continuous-time signal x(t) = 0.2t + 1, where t is in seconds. Plot the samples of the sequence x(n) that are obtained by sampling x(t) at multiples of T = 1 second over the interval t [0, 10]. Problem 1.2 Consider the continuous-time signal x(t) = 0.5 sin 2t + , where t is in sec3 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) 5/4 1 3/4 1/2 1/4 2 0 1 4 3 5 6 7 n 1/4 1/2 3/ 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, xq (n), and write down the corresponding bit sequence. Problem 1.5 Refer to the quantization procedure described in Fig. 1.5. Assume = 1/4. Determine the samples xq (n) that correspond to the following sequence of bits (assume the rst sample occurs at n = 0): 001110011010010101110000100111 How many samples are represented in this sequence of bits? How many bits would you need to represent 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 rst sample occurs at n = 0): 001100110101101111100011110101001000001 How many samples are represented in this sequence of bits? How many bits would you need to represent 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 1048576 samples 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 to transmit an amount of data from location A to location B . Approximately, how many samples of x(n) were transmitted during this operation? 17 SECTION 1.9 PROBLEMS 18 CHAPTER 1 MOTIVATION Problem 1.9 A speech signal x(t) is recorded for 15 seconds. In one implementation, the signal is sampled at the rate of 8000 samples per second. If each sample is digitized to 8 bits, what is the size of the recorded data in bytes? How would your answer change if the sampling rate is raised to 20000 samples per second? Problem 1.10 A speech signal x(t) is sampled at the rate of 8000 samples per second and digitized to 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 1n 2 x(n) = and y (n) = , 0n3 otherwise 0, 1 n1 4 , 0, 0n5 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-wise product 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) over 0 n 7. Problem 1.12 Consider the sequences x(n) = 1 n2 2 1 n+1 and y (n) = , 0n4 otherwise , 0n3 otherwise 0, 4 0, (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) + 2y (n). (d) Refer to Fig. 1.5 and assume = 1/4. Write the bit sequence for the samples of z (n) over 0 n 6. Problem 1.13 The energy of a real-valued sequence is dened as the sum of the squares of its samples: Ex = x2 (n) 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 8 8 image represented by Fig. 1.2. The intensity of its pixels are listed in table below: The image is processed as follows. A 2 2 mask or lter moves across the image from left to right one column at a time, and from top to bottom one row at a time. The mask replaces the value of the image pixel located at the left-most top corner of the mask by the weighted average of the pixels covered by the mask; the weights are the values included in the 2 2 mask: The average is rounded to the closest integer in the range [0, 255]. Find the pixel values of the image that results from this processing. 12 112 212 92 62 73 121 93 111 21 191 14 234 93 15 0 200 67 134 93 59 39 89 123 51 151 67 178 255 0 12 185 78 178 84 21 137 93 56 87 1 1/4 1/2 -1 -1 1/2 159 69 172 87 93 25 16 112 89 90 23 61 112 97 116 216 145 123 45 59 12 137 181 231 1/4 1 Problem 1.16 Repeat Prob. 1.15 for the alternative mask Problem 1.17 Consider a discrete-time signal, x(n), dened over the interval n 0. At each time n, let x(n) denote the average value of the samples x(k) from time k = 0 up to time k = n, i.e., x(n) = 1 n+1 n x (k ) k=0 This is an example of one processing algorithm; it acts on the data and generates x(n). We would like to motivate an alternative processing algorithm that operates on the data in a recursive manner to generate the same x(n). Show that x(n) satises the recursion: x(n) = n 1 x(n 1) + x(n) n+1 n+1 with initial condition x(0) = x(0). Note that the above algorithm is in terms of the previous value x(n 1) and the most recent term in the sequence, x(n). In this way, the second procedure for evaluating the mean of the sequence does not need to save all prior data; the history of the prior data is incorporated into x(n 1) and only the most recent sample, x(n), is needed along with x(n 1) to evaluate x(n). Problem 1.18 Consider the following samples of x(n): x(0) = 1, x(1) = 0.5, x(2) = 0.4, x(3) = 1.0, x(4) = 0.8, x(5) = 0.75 Compute the corresponding samples of x(n) using the two procedures described in Prob. 1.17. Problem 1.19 Consider a discrete-time signal whose samples at the time instants n = 0, 1, 2, 3, 4, 5, 6 are given by x(0) = a, x(1) = b, x(2) = c, x(3) =?, x(4) = e, x(5) = f, x(6) = g where the sample at time n = 3 is missing. Suggest one by which you would process the available samples of x(n) to come up with an estimate for the missing sample. Problem 1.20 Consider Prob. 1.19. Suggest at least two other ways by which you would process the available samples of x(n) to come up with an estimate for the missing sample. 19 SECTION 1.9 PROBLEMS CHAPTER 2 Fundamental Sequences Complex numbers play a critical role in characterizing discrete-time signals and systems. For example, it will be seen in later chapters that complex numbers are needed to 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 how they 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) 1 (2.2) where a and b are real numbers and j= In other words, j 2 = 1. The number a is called the real part of z and the number b is called the imaginary part of z . We sometimes write a = Re(z ), b = Im(z ) (2.3) where the notation Re() and Im() refers to the real and imaginary components of their argument. Every complex number z can be expressed in an alternative form known as the polar form in terms of the magnitude of the number and its phase. Specically, z can be expressed as z = ej , (2.4) where denotes the magnitude of z ; it is a nonnegative real number that is computed as follows: = a2 + b 2 (2.5) and denotes the phase of z and is measured in radians. The phase can always be chosen to lie within the interval [, ]; its value should be determined from the scalars {a, b} with care as follows. First, we determine the angle , 22 21 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 22 whose arctan is given by CHAPTER 2 b a = arctan FUNDAMENTAL SEQUENCES (2.6) Then we may need to adjust by adding to it depending on which quadrant the number z belongs to in the complex plane see Fig. 2.1. The phase is obtained from according to 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 resulting phase 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 the above discussion, that the actual phase should be selected according to (2.7). Im II I =+ = Re III IV = = 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 see Fig. 2.2. Moreover, the letter e denotes the number whose natural logarithm is equal to 1: ln e = 1 Example 2.1 (Polar form) Consider the two complex numbers z1 = 1 + j and z2 = 1 j (2.9) 23 SECTION 2.1 Im COMPLEX NUMBERS z b |z | z Re a 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, z1 and z2 are distinct numbers: z1 lies in quadrant I while z2 lies in quadrant III see Fig. 2.3. The correct phase angle for z2 is therefore = so that z1 = 2 ej 4 3 = 4 4 and z2 = 2 e j 3 4 Im z1 = 1 + j 1 1 z2 = 1 j 1 Re 1 FIGURE 2.3 Location of z1 = 1 + j and z2 = 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 dened as z = a jb (2.10) 24 CHAPTER 2 FUNDAMENTAL SEQUENCES In other words, the imaginary part of z is negated. It is clear that both z and z have the same 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 = ej , (2.11) z = |z | ej z (2.12) or 2.2 BASIC SEQUENCES There are a handful of sequences that arise frequently in the study of discrete-time signals and 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 sequence and the unit-step sequence) that they have their own standard notation. Unit-sample sequence. The unit-sample sequence is denoted by (n) and is dened as follows: 1 n=0 (n) = (2.13) 0 n=0 In other words, the sequence is zero everywhere except at time n = 0 when it is equal to one. 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 follows: 1 n0 u(n) = (2.14) 0 n<0 In other words, the sequence is equal to one for all nonnegative time instants. Note that it is related to the unit-sample sequence in the following manner: n (n) = u(n) u(n 1) and (k ) u(n) = (2.15) k=0 The unit-step sequence is often referred to more simply as the step sequence. Fig. 2.4 plots 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) = An where both A and are real. (2.16) 25 (n) SECTION 2.2 BASIC SEQUENCES 1 3 2 1 0 1 2 3 4 5 6 n 2 3 4 5 6 n u(n) 1 3 2 1 0 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 same interval 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 two choices 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 exponential sequence grow in magnitude for n < 0 (negative time) and decay in magnitude for n 0 (positive time). It is also seen that when < 0, the samples of the exponential sequence alternate between positive and negative values. 26 x(n)=(0.8)n CHAPTER 2 3 FUNDAMENTAL SEQUENCES 2 1 0 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 4 5 6 7 8 9 10 n n x(n)=(0.8) 2 1 0 1 2 5 4 3 2 1 0 1 2 3 n FIGURE 2.5 The top plot shows the terms of the real exponential sequence (0.8)n over the interval 5 n 10, while the bottom plot shows the terms of the real exponential sequence (0.8)n over the same interval of time. Example 2.3 (Two-sided exponential sequence) Consider the case A = 1 and = 1/2. Then x(n) = 1 2 n Tables 2.1 and 2.2 list the samples of this sequence for both cases of positive and negative values of n. It is seen in Table 2.1 that the samples of x(n) decay for positive n and in Table 2.2 that the samples of x(n) grow for negative n. TABLE 2.1 Samples x(n) = (0.5)n over the interval 0 n 10. n x(n) 0 1 2 3 4 5 6 7 8 9 10 1 1/2 1/4 1/8 1/16 1/32 1/64 1/128 1/256 1/512 1/1024 TABLE 2.2 Samples of x(n) = (0.5)n over the interval 10 n 1. n x(n) -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 2 4 8 16 32 64 128 256 512 1024 27 Sinusoidal sequences. The sinusoidal sequences are dened by the expressions: SECTION 2.2 x(n) = A sin(o n + o ) ( 2 .1 7 ) x(n) = A cos(o n + o ) ( 2 .1 8 ) or for some real-valued quantities {A, o , o }. The variable A is called the amplitude of the sinusoidal signal and the variable o is the phase of the signal. As we are going to see in Sec. 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 that n 5 x(n) = sin while in the other case o = /5 and o = /3 so that n + 5 3 x(n) = sin x(n)=sin( n/5) 1 0.5 0 0.5 1 10 9 8 7 6 5 4 3 2 1 0123 n x(n)=sin( n/5 +/3) 4 5 6 7 8 9 10 4 5 6 7 8 9 10 1 0.5 0 0.5 1 10 9 8 7 6 5 4 3 2 1 0 n 1 2 3 FIGURE 2.6 The top plot shows the terms of the sinusoidal sequence x(n) = sin( n/5) over the interval 10 n 10, while the bottom plot shows the terms of the sinusoidal sequence n x(n) = sin( 5 + ) over the same interval of time. 3 Complex exponential sequence. This sequence plays a fundamental role in the study of discrete-time signals and systems. The general form of a complex exponential sequence BASIC SEQUENCES 28 is x(n) = An CHAPTER 2 FUNDAMENTAL SEQUENCES (2.19) where is now a complex number and A is either real- or complex-valued. Assume, for generality, that both A and are complex-valued and introduce their polar representations: A = |A|ejo , = ||ejo , 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 case is the sequence x(n) = ejo n (2.21) which corresponds to the choices A = 1 and = ejo . Example 2.5 (Magnitude and phase plots) Figure 2.7 shows the magnitude and phase plots of the complex exponential sequence that corresponds to the choices A = ej/2 and = 0.5ej/3 , i.e., x(n) = 1 2 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 samples in 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) introduced in (2.14) plays a useful role 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 nonnegative values of n as well as for negative values of n, as was illustrated earlier in Tables 2.1 and 2.2. On the other hand, the new sequence n x(n) = (0.5) u(n) with the unit-step sequence multiplying from the right-hand side, is again a real exponential sequence but one that has nonzero values only for n 0; the samples of the sequence are now zero for all n < 0 because u(n) is zero for n < 0. This example illustrates a useful property of the unit-step sequence u(n), namely, it allows us to dene one-sided sequences. 29 Magntiude plot SECTION 2.3 30 POLAR PLOTS 20 10 0 5 4 3 2 1 4 3 2 1 0 1 n Phase plot 2 3 4 5 2 3 4 5 8 radians 6 4 2 0 2 4 5 0 n 1 FIGURE 2.7 The top plot shows the magnitude and the bottom plot shows the phase of the terms n of the exponential sequence x(n) = (0.5)n ej ( 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-step sequence to transform them into one-sided sequences, say, as y (n) = (0.8)n u(n) y (n) = (0.8)n u(n) and 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 is generally straightforward. Nevertheless, illustrating complex-valued sequences is more demanding. For example, in Fig. 2.7 we had to resort to two separate plots: one for the magnitude 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 polar plot, which is a plot of the location of the samples over the complex plane. The polar plot is 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, are given by 3 5 3 7 1 , ej 4 , ej 2 , ej 4 , 1 , ej 4 , ej 2 , ej 4 All 8 terms are complex numbers with unit magnitude and, hence, they all lie on a circle of unit radius in the complex plane. Moreover, the terms are /4 radians apart on the unit 30 CHAPTER 2 FUNDAMENTAL SEQUENCES n y(n)=(0.8) u(n) 3 2 1 0 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 5 6 7 8 9 10 n n y(n)=(0.8) u(n) 2 0 2 5 4 3 2 1 0 1 2 3 4 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 onesided exponential sequence y (n) = (0.8)n u(n) over the same interval of time. These plots should be 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 in Fig. 2.9, if we draw the samples in the complex plane, they will all lie on the unit circle and they will be /4 radians apart from each other. The curved arrow in Fig. 2.9 is used to indicate that the terms of the sequence cover the circle in a counter-clockwise direction. Im n=2 n=1 n=3 n=4 4 n=5 n=0 1 Re n=7 n=6 FIGURE 2.9 A polar plot of the rst 8 samples of the sequence x(n) = ej 4 n u(n). 31 SECTION 2.4 Example 2.7 (Decaying complex exponential) SYMMETRY RELATIONS Figure 2.10 shows the rst four terms of a second sequence, which is dened by x(n) = 1 2 n ej 4 n u(n) This is an interesting sequence and its four terms are given by 1, 1 j 1 j 1 j 34 e 4, e 2, e 2 4 8 Observe now that the amplitudes of the successive samples decay by a factor of 1/2 each time, moving from 1 to 1/2 to 1/4 and so forth. Thus the samples lie on circles of radii 1, 1/2, 1/4, and so on, although they continue to be /4 radians apart from each other. The numbers {0, 1, 2, 3} in the gure refer to the sample times n = 0, 1, 2, 3. Im 4 n=1 n=2 n=0 n=3 1 4 FIGURE 2.10 1 2 1 Re A polar plot of the rst 4 samples of the sequence x(n) = 1 n 2 ej 4 n u(n). 2.4 SYMMETRY RELATIONS We shall often encounter sequences that exhibit certain symmetry properties such as even and odd symmetries. Even sequences. A real-valued sequence, x(n), is said to be even if its samples satisfy the following relation x(n) = x(n) for all n (even sequence) ( 2 .2 2 ) 32 That is, the sequence x(n) is symmetric about the vertical axis. CHAPTER 2 FUNDAMENTAL SEQUENCES Odd sequences. A real-valued sequence, x(n), is said to be odd if its samples satisfy the 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 odd sequence that denotes the odd part of x(n). We can determine expressions for xe (n) and xo (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) = 1 [x(n) + x(n)] 2 (2.25) xo (n) = 1 [x(n) x(n)] 2 (2.26) and Example 2.8 (Even and odd sequences) The sequence x(n) = sin n 3 is odd while the sequence n 3 is even in view of the properties sin() = sin() and cos() = cos() for any . Figure 2.11 plots the two sequences over the interval 5 n 5. Now consider the sequence x(n) = (0.5)n u(n) x(n) = cos This sequence is neither odd nor even. However, we can decompose it as the sum of even and odd sequences as follows: x(n) = xe (n) + xo (n) 33 x(n)=sin( n/3) SECTION 2.4 SYMMETRY RELATIONS 0.5 0 0.5 5 0 n x(n)=cos( n/3) 5 0 n 5 1 0.5 0 0.5 1 5 FIGURE 2.11 The top plot shows the odd sequence x(n) = sin(n/3) while the bottom plot shows the even sequence x(n) = cos(n/3). The dotted line in the top gure going through the origin is meant to illustrate the symmetry of the odd sequence around the origin n = 0. Both sequences are shown over the interval 5 n 5. where xe (n) = = 1 [x(n) + x(n)] 2 1 (0.5)n u(n) + (0.5)n u(n) 2 (0.5)|n|+1 , 1, = xo (n) = = n=0 n=0 1 [x(n) x(n)] 2 1 (0.5)n u(n) (0.5)n u(n) 2 = (0.5)n+1 , 0, (0.5)n+1 , n>0 n=0 n<0 Figure 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 be conjugate 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 sequence around the vertical axis, we arrive back at x(n). If we express x(n) in terms of its real and 34 x (n) e CHAPTER 2 1 FUNDAMENTAL SEQUENCES 0.75 0.5 0.25 0 10 5 0 n xo(n) 5 10 5 0 n 5 10 0.25 0.15 0.05 0.05 0.15 0.25 10 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 while x(n) is one-sided and its samples are nonzero over n 0, the odd and even sequences, xe (n) and xo (n), have nonzero samples over all n. The plots show the samples over 10 n 10 only. imaginary parts, say x(n) = xR (n) + jxI (n) (2.28) where xR (n) and xI (n) are both real-valued, then x (n) = xR (n) jxI (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)|2 then x (n) = (n) ej(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 sequence x(n) = cos n 3 + j sin n 3 35 is conjugate symmetric since SECTION 2.5 x (n) = = = = (n) (n) j sin 3 3 n n cos j sin 3 3 n n cos + j sin 3 3 x(n) ENERGY AND POWER SEQUENCES cos 2.5 ENERGY AND POWER SEQUENCES Energy sequences. The energy of a sequence x(n) is dened by Ex = 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 Ex < , we say that the sequence is an energy sequence. In other words, energy sequences 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) = 1 2 |x(n)|2 = n u(n) is an energy sequence since n= n=0 = = 1 4 n 1 1 1/4 4 < 3 In the second calculation, we used the fact that the values {(1/4)n , n 0} are the terms of a geometric series with ratio 1/4 see Example 2.11 below. 36 Example 2.11 (Geometric series) CHAPTER 2 FUNDAMENTAL SEQUENCES Consider the sequence x(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 term by 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 +1 1r To establish the result, we let SN denote the sum of the rst N + 1 terms: SN = a(1 + r + r 2 + r 3 + . . . + r N ) Then, multiplying SN by r gives rSN = a(r + r 2 + r 3 + . . . + r N +1 ) so that SN rSN = a(1 r N +1 ) and, consequently, SN = a 1 r N +1 1r (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 SN = (N + 1)a. Now assume |r | < 1 and let S denote the geometric series S = a(1 + r + r 2 + r 3 + . . .) = lim SN N Then, since |r | < 1, it follows that r N +1 converges to zero in the expression for SN as N . Consequently, the series converges to S= a 1r (series) (2.33) Power sequences. The average power of a sequence x(n) is dened by Px = lim N N 1 |x(n)|2 2N + 1 n=N (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, and then evaluate the limit as the size of the interval increases indenitely. When Px < , we say that the sequence is a power sequence. In other words, power sequences have nite power. 37 Example 2.12 (Step sequence) SECTION 2.6 Although the step sequence, x(n) = u(n), is not an energy sequence it is nevertheless a power sequence since, for any N , 1 2N + 1 N n=N |u(n)|2 = 1 2N + 1 N 1= n=0 N +1 2N + 1 so that the limit, as N , is Px = 1/2. 2.6 SIGNAL TRANSFORMATIONS Sequences often appear in transformed versions and it is useful to become acquainted with the following common signal transformations, which are illustrated in Fig. 2.13 for a sequence 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 about the 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 one sample 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 reecting x(n) about the vertical axis and then shifting it to the right by one sample; this is not 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 reecting it about the vertical axis and then shifting it to the left by sample. Again, this is not the 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 obtained from 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 to particular choices of a and b. For arbitrary integers a and b, this is how we can obtain the plot of y (n) from the plot of x(n). Introduce the variable m = an + b (2.36) y (n) = x(m) (2.37) Then 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). SIGNAL TRANSFORMATIONS 38 CHAPTER 2 1 FUNDAMENTAL SEQUENCES x(n) 0.5 0 -5 -4 -3 -2 -1 0 1 2 3 4 5 1 x(-n) 0.5 0 -5 -4 -3 -2 -1 0 1 2 3 4 5 1 x(n-1) 0.5 0 -5 -4 -3 -2 -1 0 1 2 3 4 5 1 x(n+1) 0.5 0 -5 -4 -3 -2 -1 0 1 2 3 4 5 1 x(-n+1) 0.5 0 -5 -4 -3 -2 -1 0 1 2 3 4 5 1 x(-n-1) 0.5 0 -5 -4 -3 -2 -1 0 n 1 2 3 4 5 FIGURE 2.13 Plots of various signal transformations of the sequence x(n) = (3/4)n u(n) over the 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. In more formal terms, we can describe the procedure for generating the plot of y (n) from the 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 n to 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 done on the m axis. 4. We replace the horizontal and vertical axes in the m domain by the horizontal and vertical axes in the n domain. We only keep the samples that are dened for valid n time 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 samples between n = 1 and n = 4. We wish to plot the sequence that results from transforming x(n) as follows: 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 + 3 The m axis is shown in the middle plot. Note that its orientation is reversed relative to the direction of n. The top and middle plots also show how the values of n correspond to the values of m. For example, 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 sequence as the original x(n) except that now the samples are plotted against the m axis. Finally, the bottom plot shows y (n) versus n. All we are doing here is replace the m axis from the middle plot by the n axis and keep the samples from the middle plot that correspond to valid values of n. Thus note, 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 transformation m = 2n + 3. Therefore, only 3 of the original samples of x(n) are kept in y (n); these are the samples marked with circles around their endpoints. The other samples are removed. 39 SECTION 2.6 SIGNAL TRANSFORMATIONS 40 CHAPTER 2 2 FUNDAMENTAL SEQUENCES 1 x(n) n 1 4 0 1 2 3 n 1 x(m) m m = 2n + 3 4 m 5 1 321 0 2 3 4 5 y (n) n 2 1 0 1 3 4 n FIGURE 2.14 The top plot shows a sequence x(n). The middle plot shows a new horizontal axis m 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 that of the n axis. The bottom plot shows the sequence y (n) = x(2n + 3). Observe that y (n) retains only 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 chapter in the context of a practical problem. Specically, we show how a one-sided exponential sequence, 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. The time 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 the return rate on the account is 5% per year. Then the amount of funds that will be present at 41 the start of year n = 1 will be: SECTION 2.7 APPLICATION y (1) = y (0) (1 + 0.05) = 1.05 1000 = US$1050 Likewise, 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.50 More generally, the amount of funds that will be present at the start of a generic year n will be y (n) = y (0) (1.05)n = 1000 (1.05)n , n 0 If 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 .3 8 ) which describes a one-sided exponential sequence. In general, for an initial deposit value of D at time n = 0, and assuming an annual return rate of %, the amount of funds that will be available at the start of year n would be y (n) = D 1 + 100 n u(n) ( 2 .3 9 ) 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 from shifting the samples of y (n) by one unit of time to the right. What would the interpretation of the samples of z (n) be in the context of the savings account? To see the 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 be interpreted as corresponding to the amount of funds that would be present in the account 2 Source of this placeholder image is istockphoto.com. 42 CHAPTER 2 FUNDAMENTAL SEQUENCES n y (n) z (n) 0 US$1000 0 1 y (1) US$1000 2 y (2) y (1) 3 y (3) y (2) 4 y (4) y (3) 5 y (5) y (4) ... ... ... had the initial deposit of US$1000 been made at year n = 1 (and not at year n = 0, as was the case with y (n)). In a similar manner, let us consider the alternative sequence w(n) = y (2n). It is obtained from scaling the n axis by a factor of 2. Again, we are interested in the interpretation of the samples of w(n) in the context of the savings account. To see the relation, we write down the rst few samples of the sequences y (n) and w(n): n y (n) w(n) 0 US$1000 US$1000 1 y (1) y (2) 2 y (2) y (4) 3 y (3) y (6) 4 y (4) y (8) 5 y (5) y (10) ... ... ... Thus, observe that w(1) w(2) w(3) w(4) . . . = y (2) = 1000 (1.05)2 = y (4) = 1000 (1.05)4 = 1000 (1.05)2 = y (6) = 1000 (1.05)6 = 1000 (1.05)2 = y (8) = 1000 (1.05)8 = 1000 (1.05)2 . =. . 2 3 4 so that, more generally, w(n) = 1000 (1.1025)n u(n) where we used (1.05)2 = 1.1025. It is clear that the value of w(n), at the start of year n, can be interpreted as corresponding to the amount of funds that would be present in the account when the initial deposit of US$1000 is still made at year n = 0 while the return rate is increased from 5% to 10.25% per year. Observe that the return rate increased by a factor larger than 2. Practice Questions: 1. Starting with an initial deposit of US$500 at year n = 0, how much funds will be available at the start of year n = 30 assuming an annual return rate of 2%. 2. Starting with an initial deposit of US$500 at year n = 3, how much funds will be available at the start of year n = 30 assuming the same annual return rate of 2%. 3. Starting with an initial deposit of US$500 at year n = 0, what should the annual return rate be such that the amount of funds that are present at the start of year n = 10 would be equal to the amount of funds that are present at the start of year 30 at 2% annual return? 43 2.8 PROBLEMS SECTION 2.8 PROBLEMS Problem 2.1 Consider the complex numbers 1 3 z1 = j , 2 2 z2 = 1 3 +j 2 2 2 Find the polar representations of the numbers: z1 , z2 , z1 z2 , z1 /z2 , z1 z2 , and |z1 |3 z2 . Problem 2.2 Consider the complex numbers 3 1 z1 = + j , 4 4 z2 = 3 1 j 4 4 2 3 Find the polar representations of the numbers: z1 , z2 , z1 z2 , z1 /z2 , z1 z2 , and |z1 |z2 . 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) = What is the energy and average power of this sequence? Problem 2.6 Plot in polar coordinates the terms of the sequence x(n) = What is the energy and average power of this sequence? Problem 2.7 Let 1 2 x(n) = n n+ 3 4 j e 2 4 2 2 n 2 2 2n j +j 2 4 u(n). u(n). 1 3 +j 2 2 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 Let x(n) = 1 4 n2 j e n 6 3 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). 1 3 j 2 2 44 CHAPTER 2 FUNDAMENTAL SEQUENCES Problem 2.9 Express the complex exponential sequence 1 3 +j x(n) = (1 j ) 2 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 2 1 1 +j 2 2 x(n) = 1 3 j 2 2 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)n1 u(n + 2). Plot x(n) and nd its energy as well. Problem 2.13 Let x(n) = 1 |n| 3 Problem 2.14 Let x(n) = 1 3 sin n2 7 n . Is x2 (n) even? sin n . Is x3 (n) odd? 5 Problem 2.15 Consider the sequence n 1 3 x(n) = u(n 1) + 1 2 n1 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? Problem 2.16 Consider the sequence x(n) = 1 + 1 2 n1 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, if possible, examples of nonzero sequences x(n) such that: (a) x(n) and x(n 2) are identical. (b) x(n)x(n + 1) = 0 for n = 0, 1, 2. (c) x(n) + x (n) = cos 3 (n 1) . Problem 2.18 Give, if possible, examples of nonzero sequences x(n) such that: (a) x(n) and x(n + 2) are identical. (b) x(n)x(n 3) = 0 for n = 0, 1, 2. (c) x(n) + x (n) = sin 4 (n + 1) . Problem 2.19 The DC level of a sequence x(n) is dened as the average value N x= lim N 1 x(n) 2N + 1 n=N 45 Let x(n) be an odd sequence. Show that its DC level is zero. SECTION 2.8 Problem 2.20 Consider an arbitrary sequence x(n) with even and odd parts denoted by xe (n) and xo (n), respectively. Show that the DC level of x(n) coincides with the DC level of its even part. Problem 2.21 Determine the DC level of the following sequences: (a) x(n) = (b) x(n) = 1 n2 2 1 |n| 3 u(n 3). sin 7 n. Problem 2.22 Determine the DC level of the following sequences: (a) x(n) = (b) x(n) = 1 n 4 u(n + 1). 1 n2 8 sin3 3 n. Problem 2.23 Plot the sequence x(n) = (n + 1) + components. 1 n 2 Problem 2.24 Plot the sequence x(n) = 2 (n 1) + odd components. u(n 3). Plot also its even and odd 1 n 4 u(n + 1). Plot also its even and 1 Problem 2.25 Let x(n) = (n 2) + 2 u(n 1) 1 u(n 3). 4 (a) Plot x(n). (b) Plot x(2n). (c) Plot x(n 1). (d) Plot x(n + 1). (e) Plot x(n 1). (f) Plot x(n + 1). (g) Plot x(2n + 1). (h) Plot x(2n 1). 1 Problem 2.26 Let x(n) = 2 (n + 1) u(n + 2) 1 u(n + 2). 3 (a) Plot x(n). (b) Plot x(2n). (c) Plot x(n 1). (d) Plot x(n + 1). (e) Plot x(n 1). (f) Plot x(n + 1). (g) Plot x(2n + 1). (h) Plot x(2n 1). Problem 2.27 Let x(n) = xe (n) + xo (n) denote the even-odd decomposition of a sequence x(n). Find the even-odd decomposition of the sequence x2 (n) in terms of xe (n) and xo (n). Apply the result to 1 1 x(n) = cos n + sin n 2 4 4 3 Problem 2.28 Repeat Prob. 2.27 for the sequence x(n) = Problem 2.29 Is x(n) = 1 |n| 2 cos 1 sin n 4 4 4 n j + 1 |n| 3 1 cos n 2 6 sin 6 n conjugate symmetric? PROBLEMS 46 Problem 2.30 Is x(n) = 1 n2 4 sin 6 n +j 1 |n| 2 cos 4 n conjugate symmetric? CHAPTER 2 FUNDAMENTAL SEQUENCES Problem 2.31 Let x(n) be an odd sequence. Show that its average power is zero. Problem 2.32 Let x(n) be a conjugate-symmetric sequence. Show that x(n) = n= xR (n) n= Problem 2.33 Let xo (n) denote the odd component of an arbitrary sequence x(n). Show that xo (0) = 0. Problem 2.34 Let x(n) be an arbitrary odd sequence. Show that x(n) = 0 n= Problem 2.35 Let x(n) = 1 |n| 2 sin 5 n . Find S = Problem 2.36 Repeat Prob. 2.35 for x(n) = 1 3 n2 n= sin 8 x(n). n3 . Problem 2.37 Given the sequence x(n) = (0.5)n u(n), plot the sequences x(2n) and x(n/2). Find the energies of the latter sequences as well. How do the even and odd components of x(2n) and x(n/2) relate to those of x(n)? Problem 2.38 Given the sequence x(n) = (1/4)n u(n), plot the sequences x(3n) and x(n/3). Find the energies of the latter sequences as well. How do the even and odd components of x(3n) and x(n/3) relate to those of x(n)? Problem 2.39 Assume x(n) = 0 for n < 0. Show that x(n) can be expressed in terms of its even part alone as follows x(n) = 2xe (n)u(n) xe (0) (n) Given xe (n) = (0.5)|n| , plot x(n). Problem 2.40 Let xe (n) and xo (n) denote the even and odd components of an arbitrary sequence, x(n). Let E, Ee , and Eo denote the energies of the sequences x(n), xe (n), and xo (n). Establish the equality E = Ee + Eo Problem 2.41 Assume x(n) = 0 for n < 0. The even part of x(n) is given by xe (n) = |n| , where is real and satises || < 1. Find the energy of x(n). Find also the odd component of x(n) and its energy. Problem 2.42 Assume x(n) = 0 for n < 0 and x(0) = 1/2. The energy of x(n) is equal to one. Find the energy of its even part. Problem 2.43 Given a sequence x(n), we perform the following three operations: (a) We plot the sequence y (n) = x(n 1) and then scale the time axis and plot y (2n). (b) We plot the sequence z (n) = x(n 2) and then scale the time axis and plot z (2n). (c) We plot the sequence w(n) = x(2n) and then shift it and plot w(n 2). Which procedure results in the right plot for x(2n 2)? How would you modify the wrong procedure(s)? Problem 2.44 How can you construct x(n + 3) from x(n)? (a) First reect x(n) about the vertical axis and then shift its samples to the left. (b) First shift x(n) three samples to the left and then reect the resulting signal about the vertical axis. (c) First shift x(n) three samples to the right and then reect the resulting signal about the vertical axis. (d) Both parts (a) and (b) are correct. Problem 2.45 The samples of the sequence ejn x(1 n) are {1, 2, 1 , 0, 2, 3, 1}, where the box denotes the origin of time (i.e., n = 0). Samples to the right of the box occur at positive time instants while samples to the left of the box occur at negative time instants. Samples outside the specied interval are all zero. Which terms of x(n) can you determine from this information? Problem 2.46 The samples of a sequence x(n) are zero except at the time instants shown in Fig. 2.16. The amplitudes of the non-zero samples are either 1, 2, or 3. Plot the sequence h(n) that is dened by 1 3 h(n) = x(n + 2) (n) + u(n 3) 2 2 Plot also the sequences x(3n 2), x(2n + 3), and x(2n 1). x(n) 3 2 1 2 1 0 1 2 3 4 5 6 n FIGURE 2.16 Sequence x(n) dened in Prob. 2.46. Problem 2.47 Answer True or False. In each case, either prove your answer or give a counterexample. (a) A power sequence is necessarily an energy sequence. (b) Every energy sequence has zero average power. (c) The sequence x(n) = 1/(n + 1), n 0, is an energy sequence. (d) If x(n) is an energy sequence then x(n) 0 as n . (e) There does not exist a sequence with innite average power. (f) The sum of two energy sequences, {x(n) = x1 (n) + x2 (n)}, is an energy sequence. Problem 2.48 Which of the following statements is false? (a) All energy signals are power signals. (b) Some energy signals are power signals. (c) All power signals are energy signals. (d) Some power signals are energy signals. Problem 2.49 In order to reconstruct x(n), it is enough to know which of the following signals? (a) x(2n) and x(n2 ). (b) x(2n + 3) and x(2n + 4). (c) x(2n + 3) and x(2n 1). 47 SECTION 2.8 PROBLEMS 48 (d) Both parts (a) and (b) are correct. CHAPTER 2 FUNDAMENTAL SEQUENCES Problem 2.50 Consider the sequence x(n) = 5 1 7 15 31 63 127 , , , ,... , , , 2 4 8 16 32 64 128 where the box denotes the origin of time (i.e., n = 0). Express x(n) in terms of the sequences (n), n u(n), and 1 . 2 Problem 2.51 Consider the expression for the sum of the geometric series: S= rn = n=0 1 , 1r |r | < 1 (a) Differentiate S with respect to r and conclude that nr n = n=0 r (1 r )2 (b) Differentiate S again with respect to r and conclude that n2 r n = n=0 Problem 2.52 Evaluate the following series: (a) S = (b) S = (c) S = n=0 n(0.5)n . n=0 n(0.5)2n . n=0 n2 (0.5)n . Problem 2.53 Evaluate the following series: (a) S = (b) S = (c) S = n=2 n=3 0 n(0.25)n . n(0.25)2n . n= (4) n . Problem 2.54 Evaluate the following series: (a) S = (b) S = (c) S = n=3 (n n=3 999 + 2n2 )(1/3)n . n2 (1/3)3n . n=0 (1/4) n . r (1 + r ) (1 r )3 CHAPTER 3 Periodic Sequences P eriodic sequences play an important role in the study of discrete-time signals and systems. A prominent role is played by the complex exponential sequence, x(n) = ejo n . In this chapter, we dene periodic sequences and highlight some of the properties of complex exponential sequences. 3.1 PERIODIC SIGNALS A sequence x(n) is said to be periodic with period N if N is the smallest positive integer such that x(n) = x(n + N ) for all integers n (3.1) In other words, N is the smallest positive integer for which the sequence repeats itself indenitely. In particular, if we shift a periodic sequence by any multiple of N samples to the left or to the right, then the resulting sequence would coincide with the original sequence. The value of N is also called the fundamental period of the sequence. Example 3.1 (A periodic sequence) Figure 3.1 shows a periodic sequence x(n) that repeats itself every 4 samples. Therefore, its period is N = 4. x(n) 1 4 3 2 1 01 2 3 45 6 7 n FIGURE 3.1 The plot shows a periodic sequence x(n) with period N = 4. 49 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 50 CHAPTER 3 Example 3.2 (Continuous-time sinusoidal signals) In continuous-time, sinusoidal signals of the form x(t) = sin(o t + o ) are always periodic, namely, there always exists a positive real number To such that x(t) = x(t + To ) for all real numbers t In particular, for the sinusoidal signal in this example, the value of the period To is given by To = 2/o (3.2) since then sin (o (t + To ) + o ) = sin (o (t + 2/o + o ) = sin (o t + o + 2 ) = sin(o t + o ) The period To in this case is measured in seconds and o is measured in radians/second, and we we say that the signal repeats itself every T seconds. We refer to o as the angular frequency of the continuous-time sinusoidal signal. We also dene the frequency of the signal as Fo = 1/To Fo = o /2 or (3.3) where Fo is measured in Hertz (or 1/sec). While the continuous-time sinusoidal signal is always periodic and repeats itself every To seconds, the same conclusion does not hold for sinusoidal sequences; they may or may not be periodic. This is because the period N is now required to be an integer as we verify in the next example. For illustration purposes, Figure 3.2 plots the periodic continuous-time sinusoidal signal x(t) = sin 5t + 3 3 over 5 t 5. Its period is To = 6/5 = 1.2 seconds. 1 0.5 x(t) PERIODIC SEQUENCES 0 0.5 1 5 0 t 5 T=1.2 FIGURE 3.2 The plot shows a continuous-time periodic sinusoidal signal x(t) = sin(5t/3 + /3) with period To = 1.2 seconds; the signal is shown over the interval 5 t 5. 51 SECTION 3.1 Example 3.3 (Discrete-time sinusoidal signals) PERIODIC SIGNALS Consider now the sinusoidal sequence x(n) = sin(o n + o ) for some parameters {o , o }. In order to verify whether this sequence is periodic or not, we need to nd the smallest positive integer, N , that satises sin(o n + o ) = sin(o (n + N ) + o ) for all n sin(o n + o ) = sin(o n + o + o N ) for all n or, equivalently, We know from the properties of the sine function that this equality holds if, and only if, o N = 2k, for some integer k (3.4) That is, if and only if, o N is an integer multiple of 2 . The smallest possible integer N that satises this relation would qualify as the period of the sinusoidal sequence. The difculty lies in the fact that there need not always exist an integer value of k that results in an integer value for N satisfying (3.4); in other words, not every sinusoidal sequence is periodic! This is just one of the subtle differences that exist between discrete-time and continuous-time signals. In continuous-time, all sinusoidal signals are periodic, but not in discrete-time. Example 3.4 (Periodic sinusoidal sequence) Let us continue with the prior example of a sinusoidal sequence and assume o = 5/3, i.e., x(n) = sin 5 n + o 3 Then, according to (3.4), N and k must be related via N= 6 k 5 In this case, the smallest integer k that results in an integer N is k = 5. It then follows that N = 6 and we conclude that the sequence x(n) repeats itself every 6 samples. We therefore say that it is periodic with period N = 6 samples. Figure 3.3 plots the periodic sinusoidal sequence x(n) = sin 5n + 3 3 It is seen that the sequence repeats itself every 6 samples so that the period is N = 6 samples. Example 3.5 (Non-periodic sinusoidal sequence) Consider now the sinusoidal sequence x(n) = sin 2 n + o 52 1 CHAPTER 3 PERIODIC SEQUENCES 0.5 0 0.5 1 15 13 11 9 7 5 3 1 1 n 3 5 7 9 11 13 15 N=6 FIGURE 3.3 The plot shows the periodic sinusoidal sequence x(n) = sin(5n/3 + /3) with period N = 6 samples.; the signal is shown over the interval 15 n 15. where o = 2. In this case, and according to (3.4), N and k should be related via N = 2k It is clear now that there does not exist any integer k that results in an integer N since 2 is an irrational number. For this reason, the sequence x n) in thisexample is not periodic! In contrast, the ( continuous-time signals sin( 2 t + o ) and sin 53 t + o are both periodic, since in continuoustime the period of a signal is allowed to be any positive real number. Figure 3.4 plots the sinusoidal sequence x(n) = sin 2n It is seen that the sequence is not periodic. 1 0.5 0 0.5 1 15 13 11 9 7 5 3 1 1 3 5 7 9 11 13 15 n FIGURE 3.4 The plot shows the non-periodic sinusoidal sequence x(n) = sin( 2 n) over the interval 15 n 15. 53 3.2 COMPLEX EXPONENTIAL SEQUENCES SECTION 3.2 The observations that were made in the above examples for sinusoidal sequences hold also for complex exponential sequences. Since the latter sequences play a prominent role in characterizing discrete-time signals and systems, as is going to be seen in future chapters, we proceed to examine the sequences and their properties more closely. Thus, consider a complex exponential sequence of the form x(n) = ejo n (3.5) This sequence will be periodic if we can nd the smallest positive integer N such that ejo n = ejo (n+N ) or, equivalently, if we can nd the smallest positive integer N such that ejo N = 1 (3.6) On the left hand side of the above equality we have a complex number, ejo N , which lies on the unit circle: its magnitude is one and its phase is o N , as illustrated in Fig. 3.5. Im ej0 N 1 0 N 1 1 Re FIGURE 3.5 The plot shows the complex number ejo N , which lies on the circle of unit radius in the complex plane. In order for equality (3.6) to hold, the complex number ejo N must coincide with the real number 1. This can happen if, and only if, the phase o N is a multiple of 2 , o N = 2k, for some integer k (3.7) We again see that, as in the case of sinusoidal sequences, complex exponential sequences may or may not be periodic. This is because we need to be able to select an integer value for k that would result in an integer value for N satisfying (3.7). COMPLEX EXPONENTIAL SEQUENCES 54 CHAPTER 3 PERIODIC SEQUENCES Example 3.6 (Periodic complex exponential sequence) Consider the complex exponential sequence x(n) = ej 6 n for which o = /6. Then, according to (3.7), N and k must be related via N = 12 k In this case, the smallest integer k that results in an integer N is k = 1. It then follows that N = 12 and we conclude that the sequence x(n) = ejn/6 repeats itself every 12 samples. We therefore say that the sequence is periodic with period N = 12 samples. This behavior can be illustrated on a polar plot as follows. Starting from n = 0, the terms of the sequence will be points on the unit circle at the following successive angles (in degrees and relative to the positive horizontal axis): 0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 0. These points cover the unit circle in a counter clockwise direction see Fig. 3.6, and it is seen that it takes 12 samples before the sequence repeats itself. n=3 o 90 o o 120 n=4 60 n=2 o o 150 n=5 30 n=1 1 o 180 n=6 o o 0 n=0 330o n=11 210 n=7 240o n=8 o 270 n=9 300o n=10 FIGURE 3.6 A polar plot showing the samples of the sequence x(n) = ej 6 n over one period on the circle of unit radius; the values of the angles are indicated in degrees and in steps of 30o . 55 SECTION 3.3 Example 3.7 (Non-periodic complex exponential sequence) ANGULAR FREQUENCY Consider now the complex exponential sequence x(n) = ej where o = 2n 2. In this case, and according to (3.7), N and k should be related via N = 2k It is clear that there does not exist any integer k that results in an integer N . For this reason, the sequence ej 2 n is not periodic. Example 3.8 (One-sided sequences) Let us start from a periodic complex exponential sequence and transform it into a one-sided sequence, say by considering an example of the form x(n) = ej 6 n u(n) Then, the resulting sequence is not periodic anymore. For instance, the sequence assumes zero values for negative time, n < 0, and nonzero values for nonnegative time, n 0. Although the samples of the sequence repeat themselves every 12 samples over n 0, if we shift the above sequence by 12 samples to the right, then the new sequence will not coincide with the original sequence, namely, x(n 12) = x(n) This is because the rst 12 samples of x(n 12) will all be zero, while the rst 12 samples of x(n) will consist of values on the unit circle. 3.3 ANGULAR FREQUENCY Consider again the periodic complex exponential sequence x(n) = ej 6 n We already know that the sequence is periodic with period N = 12 samples. Moreover, the samples of this sequence cover a phase change of 2 radians during every period, as was illustrated in Fig. 3.6. In other words, when the sequence starts repeating itself, its samples would have covered the circle once. Since the period is N = 12 samples, we therefore say that the sequence covers 2 = radians per sample 12 6 The value o = /6 therefore serves as a measure of how many radians are covered per sample by the periodic sequence. For this reason, we shall refer to o as the angular frequency and it is measured in radians/sample. Consider now the alternative sequence x(n) = ej 6 n with a negative value for o . One might wonder about the meaning of a negative o . First note that the sequence ej 6 n is still periodic with the same period N = 12. Now, however, 56 CHAPTER 3 PERIODIC SEQUENCES the terms of the sequence will be points on the unit circle at the following successive angles (measured in degrees and relative to the positive horizontal axis): 0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 0 These terms cover the unit circle in a clockwise direction. This is in contrast to the earlier sequence ej 6 n , with positive o , whose terms cover the circle in a counter-clockwise direction. Therefore, the sign of o indicates the direction by which the unit circle is covered by the samples of the sequence. Figure 3.7 shows the polar plots of both sequences ejn/6 and ejn/6 over one period; the arrows indicate the direction by which the unit circles are covered by the samples. n=9 n=3 o o 120 n=5 90 o o o 60 n=2 n=4 o 150 n=8 o 150 30o 1 180 n=6 o o o 270 n=9 300 o 1 0o 180 0 330 o n=10 30 n=11 n=6 n=0 o o 240 n=8 o 60 o o n=0 210 n=7 90 n=7 n=1 o 120 o 210 n=5 n=11 330 n=1 o o 240 n=4 n=10 o 270 n=3 300 n=2 j n/6 x(n)=e j n/6 x(n)=e FIGURE 3.7 The polar plot on the left corresponds to one period of the sequence ejn/6 whose samples cover the unit circle in a counter-clockwise direction. The polar plot on the right corresponds to one period of the sequence ejn/6 whose samples cover the unit circle in a clockwise direction. Accordingly, we say that the sequence ejn/6 has a negative angular frequency of /6 radians/sample, while the sequence ejn/6 has a positive angular frequency of /6 radians/sample. Sometimes, both sequences are said to have an angular frequency of /6 radians/sample without being specic about whether the sequence is covering the unit circle in one direction or the other. Example 3.9 (Angular frequency) Consider the complex exponential sequence x(n) = ej 3 n 5 for which o = 3/5. Then, according to (3.7), N and k must be related via N= 10 k 3 In this case, the smallest integer k that results in an integer N is k = 3. It then follows that N = 10 and we conclude that the sequence ej 3n/5 repeats itself every 10 samples. However, note that over these 10 samples and, hence, over one period, the samples of the sequence cover the unit circle 3 times (as revealed by the value of k = 3). Indeed, starting from n = 0, the samples of the sequence evolve according to the following angles (in radians and relative to the positive horizontal axis): 0, 3 6 9 12 18 21 24 27 , , , , , , , , , 2 5 5 5 5 5 5 5 5 Therefore, the angular frequency of the sequence is 3 2 3 = 10 5 radians/sample 3.4 EULERS RELATION We might wonder about how negative values for o arise. One motivation stems from the so-called Eulers relation, which allows us to express sinusoidal sequences as combinations of complex exponential sequences with positive and negative angular frequencies. Specically, Eulers relation states that, for any real scalar , ej = cos() + j sin() (3.8) The right-hand side of this expression can be interpreted as a complex number with real part cos() and imaginary part sin(). The left-hand side of the equality can be interpreted as the polar representation of the complex number: it has unit magnitude and phase . Applying Eulers relation to the choice = o n, we get the result ejo n = cos(o n) + j sin(o n) (3.9) which expresses a complex exponential in terms of cosine and sine sequences. By equating the complex conjugates of both sides of the above relation we get ejo n = cos(o n) j sin(o n) (3.10) We can combine (3.9)(3.10) to express the cosine and sine sequences in terms of the complex exponential sequence. Indeed, by adding (3.9)(3.10) we arrive at cos(o n) = 1 jo n e + ejo n 2 (3.11) Likewise, by subtracting (3.9)(3.10) we obtain sin(o n) = 1 jo n e ejo n 2j (3.12) We therefore nd that a cosine sequence can be obtained by combining the terms of two exponential sequences: one with a negative angular frequency and the other with a positive angular frequency. Later in the book, we shall arrive at a similar conclusion for generic sequences x(n), namely, that under some conditions, a generic sequence x(n) can also be expressed as a linear combination of (often more than two) exponential sequences with 57 SECTION 3.5 EULERS RELATION 58 positive and negative angular frequencies see (15.3) and the discussion in Sec. 15.1. CHAPTER 3 PERIODIC SEQUENCES 3.5 RELATING ANGULAR FREQUENCIES AND PERIODS Now that we have introduced the concept of angular frequencies, let us highlight some additional subtleties that arise when studying periodic sequences. Earlier we encountered one such subtlety, namely, that sinusoidal sequences need not be periodic; likewise, complex exponential sequences of the form (3.5) need not be periodic. First, in continuous-time, there is a direct relationship between the period of a signal and its angular frequency. In the sinusoidal signal of Example 3.2, namely, x(t) = sin(o t + o ) (3.13) the quantity o is called the angular frequency (measured in radians per second) and the quantity T = 2/o (3.14) is the period (measured in seconds). Observe that the larger the angular frequency, o , the smaller the period, T , and vice-versa. The same conclusion does not hold in discrete-time. Example 3.10 (Two periodic complex exponential sequences) Let o = /3 and consider the exponential sequence x(n) = ej 3 n This is a periodic sequence with period N = 6 and k = 1. The value of k signies that the sequence covers a 2 phase change (i.e., a single rotation around the circle) every six samples. The resulting angular frequency is therefore 2 = 6 3 radians per sample which is equal to o . Note that the angular frequency (/3) in this example is larger than the angular frequency in the earlier Example 3.2, which used o = /6. Moreover, the sequence in the current example has period N = 6, which is correspondingly smaller than the period N = 12 from Example 3.2. Therefore, in this case, we observe a similar behavior to continuous-time: a larger angular frequency results in a proportionally smaller period. The question is whether it always holds that higher angular frequencies correspond to lower periods. The answer, for discrete-time signals, is negative! Example 3.11 (Angular frequencies and periods) Let o = 3/4 and consider now the exponential sequence x(n) = ej 3 n 4 The value of o is higher than in the previous two cases, {/3, /6} from Examples 3.2 and 3.5. The sequence is still periodic with N = 8 and k = 3. The value of k means that the sequence goes around the circle 3 times before repeating itself. It therefore covers 3 2 = 6 radians every period or every 8 samples. This corresponds to an angular frequency of 3 6 = 8 4 radians/sample It follows that the sequence in this example has higher angular frequency than in the two earlier examples (with o = /6 and o = /3). Its period, however, is smaller than the period of one of them and larger than the period of the other; recall that the periods were found earlier as N = 6 and N = 12! We therefore conclude that, in discrete-time, we must always compare the (absolute) angular frequencies (radians/sample), and not the periods, in order to determine which sequence has higher angular speed (i.e., which sequence covers more radians per sample). Moreover, it is not difcult to see that for values of o in the range [, ], the higher the absolute value of o the higher the (absolute) angular frequency of the sequence. In fact, o itself is the angular frequency. This has been the case in all examples considered so far. However, for values of o outside the interval [, ], it does not hold that the higher the (absolute value of) o the higher the angular frequency of the sequence. This is yet another distinction from continuous-time, where the higher the value of the angular frequency (in radians per second) the faster the oscillations of the signal. We clarify this point by explaining the notion of indistinguishable sequences. Indistinguishable Sequences To begin with, observe that it always holds that ejo n = ej (o +2m)n for all integers n and m and for any o . That is, two complex exponential sequences whose angular frequencies differ by multiples of 2 are indistinguishable. This is distinct from the continuous-time case, where it does not hold that ej o t = ej (o +2m)t for all t since 2mt is not necessarily a multiple of 2 for all t. Therefore, if a complex exponential sequence has a value for o in the range [, 2 ], then by subtracting 2 from it we obtain a new value o that lies between [, 0], o = o 2 (3.15) and both sequences, ejo n and ejo n , will be indistinguishable. In such cases, we would choose the smaller number (in absolute value), o , to be the angular frequency for ejo n . In a similar fashion, if an exponential sequence has a value for o in the range [2, ], then by adding 2 to it we obtain a new value o that lies between [0, ], o = o + 2 (3.16) and both sequences, ejo n and ejo n , will again be indistinguishable. In this case, we would also choose the smaller number (in absolute value), o , to be the angular frequency for ejo n . 59 SECTION 3.5 RELATING ANGULAR FREQUENCIES AND PERIODS 60 CHAPTER 3 PERIODIC SEQUENCES In summary, given an exponential sequence x(n) = ejo n , we can always reduce the value of o to lie within the interval [, ], by adding or subtracting multiples of 2 as needed. The new equivalent sequence, x(n) = ejo n , becomes our starting point for any subsequent analysis. Example 3.12 (Two indistinguishable sequences) Consider the sequence x(n) = ej 5 n 4 with a value for o = 5/4, which lies outside the interval [, ]. First, we note that the sequence is periodic with N = 8 and k = 5. That is, the sequence repeats itself every 8 samples and during one period it covers the circle 5 times (in the counter-clockwise direction). Hence, the sequence covers 10 radians per 8 samples, which amounts to 5/4 radians per sample. However, note that 3 5 2 = 4 4 and, hence, ej 5 n 4 = e j 3 n 4 The new sequence y (n) = ej 3 n 4 is again periodic with the same period N = 8 but with k = 3. That is, the new sequence repeats itself every 8 samples and during one period it covers the circle 3 times (in the clockwise direction). Hence, the sequence y (n) covers 6 radians per 8 samples, which amounts to 3/4 radians per sample. The samples of y (n) coincide with those of x(n). That is, x(n) and y (n) are identical sequences. The question then is which angular frequency should we adopt for x(n)? As mentioned above, our convention throughout this book will be to adjust the angular frequencies so that they always lie within the interval [, ]. Therefore, for the example at hand, we shall say that the angular frequency of the sequence ej 5n/4 is 3/4 radians/sample. From the above discussion, we conclude that in discrete-time signal processing, the range of values for the angular frequency o are always limited to a 2 interval, say o (3.17) This means that we need not consider complex exponential sequences with angular frequencies outside this range. This is because we can always reduce an angular frequency by integer multiples of 2 and get an identical sequence with angular frequency within the [, ] range. Aliases. Angular frequencies o and 1 that differ by integer multiples of 2 are called aliases of each other, o = 1 2k, for any integer k This is because they generate identical complex exponential sequences. (3.18) High and low frequencies. We shall say that angular frequencies close to the endpoints of the interval [, ] correspond to high frequencies, while angular frequencies close to 0 correspond to low frequencies. This is because the higher the absolute value of the angular frequency, the more radians per sample are covered around the unit circle by the samples of a periodic sequence see Fig. 3.8. range of low angular frequencies around 0 range of high angular frequencies close to (radians/sample) 0 FIGURE 3.8 The range of angular frequencies for discrete-time signals is [, ]. Higher angular frequencies occur close to and lower angular frequencies occur around 0. 3.6 APPLICATION: HARMONICS AND MUSIC SYNTHESIS In this section, we illustrate one application of some of the concepts covered in the chapter in the context of a practical problem. Specically, we comment on how periodic signals in the form of harmonics arise during the generation of music notes. Consider a periodic continuous-time signal x(t) with period To (measured in seconds) and frequency Fo = 1/To (measured in Hertz). It is known that, under some mild technical conditions, such periodic signals admit a so-called Fourier series representation in the following form: x(t) = Ao + Ak cos (2kFo t) + k=1 k=1 Bk sin (2kFo t) (3.19) where k assumes integer values, and the Fourier coefcients {Ak , Bk } are evaluated as follows: Ao Ak Bk = = = 1 To 2 To 2 To To x(t)dt (3.20) x(t) cos (2kFo t) dt (3.21) x(t) sin (2kFo t) dt (3.22) 0 To 0 To 0 61 SECTION 3.6 APPLICATION 62 CHAPTER 3 PERIODIC SEQUENCES We refer to To as the fundamental period of x(t) and to Fo as its fundamental frequency. Using the trigonometric identity cos(a + b) = cos(a) cos(b) sin(a) sin(b) (3.23) we can easily verify the validity of the following equality Ak cos (2kFo t) + Bk sin (2kFo t) = Ck cos(2kFo t k ) where the parameters {Ck , k } and {Ak , Bk } are dened in terms of each other as follows: Ck 2 A2 + Bk k = (3.24) k = arctan (Bk /Ak ) (3.25) Ak Bk = = Ck cos(k ) Ck sin(k ) (3.26) (3.27) It follows that we can rewrite the Fourier series (3.19) in a more compact and equivalent form as: x(t) = Ao + k=1 Ck cos (2kFo t k ) (3.28) Harmonics Expression (3.28) shows that the periodic signal x(t) can always be expressed as the sum of sinusoidal components that occur at multiples of the fundamental frequency Fo , namely, at kFo . The DC level of the signal x(t) is equal to the rst coefcient, Ao , and it simply corresponds to the average value of the signal over one period. The sinusoidal components of the signal x(t) that occur at multiples of the fundamental frequency are called harmonics. In general, for well-behaved periodic signals x(t), a sufciently large number of harmonics can be used to approximate (or synthesize) the signal reasonably well. Now, when listening to a periodic signals x(t), both the frequency of the signal and its shape affect the resulting sound. Two periodic signals with identical fundamental frequencies, Fo , but different waveform shapes (say, one is a square periodic waveform and the other is a triangular periodic waveform) will sound differently. This effect is not surprising since such different periodic signals will have different Fourier series representations and, consequently, different content in terms of their harmonic frequencies; the coefcients {Ak , Bk } or {Ck } will be different. The human ear is insensitive to phase offsets and, hence, the phase parameters {k } do not affect the way a signal sounds. Timbers By combining several harmonic components with different amplitudes {Ck }, we can generate different timbres, which explains why the same notes on different musical instruments can sound differently. For example, when we play a note on an instrument, we not only excite the fundamental frequency Fo of the note (say, 440Hz for musical note A see Fig. 3.9)3 but also the harmonics kFo of the fundamental frequency (880Hz, 1320Hz, etc. for the same note A). The presence of the harmonics is the reason why a piano key sounds more natural and richer than a pure sinusoidal signal. The sound generated by the piano simultaneously 3 The source for this public domain image of music notes is Wikipedia. 63 SECTION 3.6 APPLICATION FIGURE 3.9 Several music notes and their respective frequencies in Hz. contains a lot of harmonics with different amplitudes and the sound is then said to be polytonic. Now even for the same note on a trumpet, the amplitudes (or energy) of the harmonics might be different than those on a piano. Therefore, by varying the amplitudes of the different harmonics that compose a polytonic note, we can give different timbres to the note. Figure 3.10 shows the waveforms of three different sound signals composed of the same fundamental frequency (440 Hz) and the same harmonic frequencies (880Hz, 1320Hz, 1760Hz, 2200Hz) but with different harmonic amplitudes {Ck } (with the DC level, Ao , and the phases {k } set to zero). Additive Synthesis A discretized version of the periodic signal representation (3.19) can be obtained by sampling x(t) at some rate of Fs samples per second. Thus, substituting t by nTs in (3.19), where Ts denotes the sampling period and is given by Ts = 1/Fs , we obtain the discretetime version: x(n) = Ao + k=1 Ak cos 2 Fo kn Fs + k=1 Bk sin 2 Fo kn Fs (3.29) The cosine and sine sequences in (3.29) may or may not be periodic depending on the relation between Fo and Fs . When the sampling frequency Fs is selected as a multiple of the fundamental frequency, Fo , say as Fs = N Fo , for some integer N (3.30) then the sequence x(n) becomes periodic and takes the form: x(n) = Ao + k=1 Ak cos 2 kn N + k=1 Bk sin 2 kn N (3.31) 64 C1=1, C2=0.5, C3=0.4, C4=0.3, C5=0.2 5 CHAPTER 3 amplitude PERIODIC SEQUENCES 0 5 C =1, C =0.2, C =0.3, C =0.6, C =0.1 1 2 3 4 5 amplitude 5 0 5 C1=1, C2=0.8, C3=0.1, C4=0.5, C5=0.4 amplitude 5 0 5 0 0.005 0.01 time (seconds) 0.015 0.02 FIGURE 3.10 Waveforms of three signals with the same fundamental frequency (440 Hz) and the same harmonic frequencies (880Hz, 1320Hz, 1760Hz, 2200Hz) but with different harmonic amplitudes Ck . We may express (3.29) in an alternative equivalent form in terms of exponential sequences by using Eulers relations (3.11)(3.12). Replacing the cosine and sine sequences in terms of exponential sequences and grouping terms gives Ak jBk 2 x(n) = Ao + k=1 Fo ej 2 Fs kn + Ak + jBk 2 k=1 Fo ej 2 Fs kn If we introduce the complex coefcient Xk = Ak jBk (3.32) then we can rewrite the above expression in the form: x(n) = Ao + 1 2 k=1 Fo Xk ej 2 Fs kn + 1 2 k=1 Fo Xk ej 2 Fs kn which involves exponentials with both positive and negative angular frequencies. More compactly, we can group the two summations and write x(n) = Ao + k=1 Fo Re Xk ej 2 Fs kn (3.33) in terms of the real part of the exponential sequence inside the summation symbol. In the case when the sampling frequency Fs is selected as a multiple of the fundamental frequency, Fo , say as Fs = N Fo , the above expression becomes 2 x(n) = Ao + k=1 Re Xk ej N kn (3.34) Expression (3.29), or its equivalent form (3.33), can be used to synthesize audio and musical sounds digitally by combining together a sufcient number of sinusoidal sequences through the selection of the coefcients {Ao , Ak , Bk } over some interval 1 k K and setting all other coefcients to zero. The DC term Ao is undesirable in audio and music synthesis applications and is therefore set to zero. This digital technique is a special case of a more general method known as additive synthesis in the eld of audio and music signal processing. Additive synthesis allows for the digital emulation of sounds. In one of its forms, the restriction of constant coefcients {Ak , Bk } is lifted and the coefcients are allowed to vary with time as well: K x(n) = k=1 Ak (n) cos 2 Fo kn Fs K + k=1 Bk (n) sin 2 Fo kn Fs (3.35) Through the selection and control of the sequences {Ak (n), Bk (n)}, different sounds can be generated. Practice Questions: 1. By combining sinusoids at close enough frequencies we can generate beat signals. For example, we can produce beat frequencies by playing two neighboring notes of a piano simultaneously, say, x(t) = cos(2F1 t) + cos(2F2 t) Introduce the center and deviation frequencies: Fc = F2 + F1 , 2 Fd = F2 F1 2 Verify that x(t) can be expressed in the equivalent representation: x(t) = 2 cos(2Fd t) cos(2Fc t) 2. Can you explain why the above expression is said to have the form of an Amplitude Modulated (AM) signal? 3. Is a continuous-time signal that is composed of a nite-number of non-harmonically related sinusoids a periodic signal? 4. Write the general form of the sequence x(n) in (3.35) for digitally synthesizing the musical note A assuming a sampling frequency of 20KHz and using 3 harmonics. 3.7 PROBLEMS Problem 3.1 What is the angular frequency of the sequence x(n) = ej 5n/4 ? Problem 3.2 What is the angular frequency of the sequence x(n) = ej 8n/7 ? Problem 3.3 Order the following sequences according to (a) increasing angular frequencies and (b) decreasing periods: x1 (n) = ej 4 n , x2 (n) = ej 8 n , x3 (n) = ej 7 n 8 65 SECTION 3.7 PROBLEMS 66 CHAPTER 3 Problem 3.4 Order the following sequences according to (a) increasing angular frequencies and (b) decreasing periods: PERIODIC SEQUENCES x1 (n) = ej 3 n , x2 (n) = ej 6 n , x3 (n) = ej Problem 3.5 What is the period of the sequence x(n) = sin Problem 3.6 What is the period of the sequence x(n) = cos n 3 + n 6 4 5 n 6 ? 3 ? Problem 3.7 What is the sequence that results from sampling x(t) = sin(120t) at the rate of 180 samples per second? What is the angular frequency and period of the sequence? Problem 3.8 What is the sequence that results from sampling x(t) = cos(50t) at the rate of 150 samples per second? What is the angular frequency and period of the sequence? Problem 3.9 Sample the sequence x2 (t) at the rate of 480 samples per second, where x(t) = cos(120t). Is the resulting sequence periodic? If so, nd its period. Problem 3.10 Sample the sequence x2 (t) at the rate of 500 samples per second, where x(t) = sin(50t). Is the resulting sequence periodic? If so, nd its period. Problem 3.11 Answer either True or False to the following statements and give brief justications. Statement T F The sequence u(n) u(n 3) has only 3 nonzero samples. The sequence ej 2.5 n has period N = 5 samples. The samples of the sequence e0.5n have unit magnitude for all n. The frequency of sin(t) is 0.5 Hz or rad/sec. This sinusoid covers a 2 phase change per period. Sampling it every 0.3 sec leads to the sequence sin(0.3n) of period N = 20 samples. This sequence also covers 2 phase change per period. cos(0.1n) and cos(1.9n) have the same angular frequency. Problem 3.12 Answer either True or False to the following statements and give brief justications. Statement The sequence u(n) u(n + 3) has only 3 nonzero samples. The sequence ej 4.5 n has period N = 18 samples. The samples of the sequence ejn have unit magnitude for all n. The frequency of sin(20t) is 10 Hz This sinusoid covers a phase change per period. Sampling it every 0.05 sec leads to the sequence sin(n) of period N = 2 samples. This sequence also covers phase change per period. sin(0.3n) and sin(3.7n) have the same angular frequency. Problem 3.13 Which of the following sequences are periodic? (a) ej 9 n . (b) e jn 9 (c) e j n2 9 (d) e j (n2) 9 u(n). . . T F 67 Problem 3.14 Which of the following sequences are periodic? (a) e j 3 n 7 SECTION 3.7 . PROBLEMS (b) ej 3 n 7 (c) ej 3 n3 7 (d) ej 3 (n+3) 7 u(n). . . Problem 3.15 Which of the following sequences are periodic? (a) sin (b) sin (c) (d) 3 3 (n 4) . 4 n . sin n + 3 4 sin2 n . 3 . Problem 3.16 Which of the following sequences are periodic? (a) cos (b) (c) (d) (n + 2) . 4 cos n3 . 4 cos 4 n . 7 cos2 n . 4 Problem 3.17 Find the period of the sequence x(n) = cos n+ 3 6 sin n+ 6 8 cos n+ 3 6 Problem 3.18 Find the period of the sequence x(n) = cos n 8 4 Problem 3.19 Find the period of the sequence 7 n 8 x(n) = ej 4 n + ej 8 n ej Problem 3.20 Find the period of the sequence x(n) = ej 5 n 7 + ej 2 n 5 + ej 4 n 9 Problem 3.21 Are the following sequences aliases of each other x(n) = ej 3 n 4 and x(n) = ej 13 n 4 ? What are their angular frequencies and periods? Problem 3.22 Are the following sequences aliases of each other x(n) = ej 5 n 6 and x(n) = ej 7 n 6 ? What are their angular frequencies and periods? Problem 3.23 What are the low and high frequency components of the sequence x(n) = ej 12 n + ej 7 n 8 + e j 8 n 9 + ej 24 n ? Problem 3.24 What are the low and high frequency components of the sequence x(n) = ej 12 n 13 + ej 9 n ej 6 n 7 2 + ej 25 n ? 68 Problem 3.25 Is the sequence CHAPTER 3 PERIODIC SEQUENCES x(n) = cos 2 n+ 3 6 + 2 sin n 4 periodic? If so, what is its period? Determine also its energy and average-power. Problem 3.26 Is the sequence x(n) = sin n 4 3 2 sin n 3 periodic? If so, what is its period? Determine also its energy and average-power. Problem 3.27 Assume x(n) has period N. Are the following sequences periodic? If so, determine their periods in terms of N : (a) x(1 2n)? (b) x(n) + (1)n x(0)? Problem 3.28 Assume x(n) has period N. Are the following sequences periodic? If so, determine their periods in terms of N : (a) x(3n + 3)? (b) x(2n)? Problem 3.29 If x(n) is periodic, prove that ej 4 n x(n) is also periodic no matter what the period of x(n) is. Problem 3.30 If x(n) is periodic, prove that cos period of x(n) is. 4 n x(n) is also periodic no matter what the Problem 3.31 Prove that sin(n) is periodic if, and only if, 2/ is a rational number. Problem 3.32 Assume x(n) is real-valued and periodic with period N . Are its even and odd components periodic? Problem 3.33 True or false? Except for the zero sequence, every periodic sequence has innite energy. Problem 3.34 True or false? The period of the sum of two periodic sequences is always the leastcommon multiple of their periods. 5 Problem 3.35 Consider the sequence x(n) = ej 12 n + ej 12 n . Show that it can be written in the form x(n) = A ejo n cos(1 n) for some positive real number A, and for some o > 1 . Is x(n) periodic? 3 2 Problem 3.36 Consider the sequence x(n) = ej 7 n ej 7 n . Show that it can be written in the form x(n) = A ej (o n 2 ) sin(1 n) for some positive real number A, and for some o < 1 . Is x(n) periodic? Problem 3.37 Let x(n) be a periodic sequence of period N and assume its energy over a period is equal to E . Show that its average power is equal to E/N . Problem 3.38 Let x(n) be a periodic sequence of period N and assume its DC level (i.e., the average of its samples) over one period is C . Show that the DC level of the entire sequence is C as well (refer to Prob. 2.19 for the denition of the DC level of a sequence). Problem 3.39 Consider an arbitrary sequence x(n) and an arbitrary nite positive integer N . Dene the sequence xp (n) = 69 SECTION 3.7 PROBLEMS x(n + N ) = Show that xp (n) is periodic and nd its period. Problem 3.40 Refer to the periodic sequence dened in Prob. 3.39. Let N = 3. (a) Assume x(n) = (n) + 0.5 (n 1) 2 (n 3). Determine the samples of xp (n) over the period 0 n N 1. (b) Repeat when x(n) = (n) + 0.5 (n 1) 2 (n 2). How do the samples of xp (n) and x(n) compare with each other over 0 n N 1. Problem 3.41 Consider the sequence x(n) = 0.5 (n + 1) + (n) + 0.5 (n 1) and let N = 4. Find the average power of the sequence xp (n) dened in Prob. 3.39. Problem 3.42 Consider the sequence x(n) = (n 2) + (n + 1) and let N = 4. Find the DC level of the sequence xp (n) dened in Prob. 3.39. Problem 3.43 Consider two periodic sequences x(n) and h(n) with periods Nx and Nh , respectively. Let Nx Nh N= gcd(Nx , Nh ) in terms of the greatest common divisor of Nx and Nh . Argue that the sum sequence, y (n) = x(n) + h(n), is periodic. How does its period relate to N ? Can the period be less than N ? Problem 3.44 Consider the same setting as Prob. 3.43. Argue that the product sequence, z (n) = x(n)h(n), is also periodic. How is the period of z (n) related to N ? Provide examples of sequences x(n) and h(n) for which the product sequences have periods either equal to N or less than N . CHAP T E R 4 Discrete-Time Systems Now that we have developed a basic understanding of what discrete-time signals (or sequences) are, we move on to study discrete-time systems and some of their properties. As the reader will soon realize, this chapter includes several denitions about systems and their characterizations. While the multitude of denitions might be overwhelming at rst sight, the interpretations of the denitions are in most cases straightforward to understand. We start with the denition of a system. 4.1 SYSTEMS A system is dened as a mapping between an input sequence and an output sequence; it operates on an input sequence and generates an output sequence through some transformation see Fig. 4.1. What makes a system special is that the input sequence, x(n), must uniquely dene the output sequence, y (n). In other words, there should be no ambiguity about what the output sequence will be for any given input sequence. The output sequence of a system is sometimes called the response sequence. input sequence x ( n) system S output sequence y (n ) FIGURE 4.1 A discrete-time system S maps an input sequence, x(n), into an output or response sequence, y (n). Schematically, we may denote the input-output mapping of a generic system by writing y (n) = S [x(n)] ( 4 .1 ) where the letter S [] refers to the transformation that is carried out by the system. The above notation signies that system S is being applied to the input sequence, x(n), in order to generate the output sequence, y (n). In general, each term of the output sequence y (n) can be a function of present, past, or future terms of the input sequence x(n). For the purposes of the treatment in this book, all input-output transformations (or relations) S corresponding to systems will be described by mathematical equations as the discussions will illustrate. 71 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 72 CHAPTER 4 DISCRETETIME SYSTEMS Example 4.1 (Examples of systems) The following transformations are examples of systems: 1. S is described by y (n) = x(n). This is a very simple system. It maps the input sequence to itself. Such a system can be viewed as a model for an ideal (i.e., lossless) wire connection transmitting a signal from one point to another in a communication system. 2. S is described by y (n) = x(n 1). This is a unit delay system. It delays the input sequence by one unit of time. 1 3. S is described by y (n) = 2 [x(n) + x(n 1)]. This system averages two successive samples of the input sequence. 4. S is described by y (n) = y (n 1) + x(n) for n 0 and with initial condition y (1) = 0. This system generates output values for n 0 by adding to its previous output sample the value of the present input sample. In all these examples, given the input sequence x(n) we can readily and uniquely evaluate the corresponding output sequence y (n). Example 4.2 (Evaluating the response of a system) Consider the averaging system y (n) = 1 [x(n) + x(n 1)] 2 and assume the input sequence is chosen as x(n) = (1)n Then one way to evaluate the output sequence is to employ the system description to evaluate the value of y (n) for every choice of n. Doing so leads to . . . y (1) y (0) y (1) . . . = = = = = . . . 1 [x(1) + x(2)] 2 1 [x(0) + x(1)] 2 1 [x(1) + x(0)] 2 = = = . . . 1 [(1)1 + (1)2 ] 2 1 [(1)0 + (1)1 ] 2 1 [(1)1 + (1)0 ] 2 = = = 0 0 0 It is easy to see that y (n) = 0 for all n. Alternatively, we can proceed more generally and evaluate the value of y (n) for a generic n as follows. We start from the system description and replace the input sequence by its expressions so that y (n) = = 1 [x(n) + x(n 1)] 2 1 (1)n + (1)n1 2 Now, we note that if n is even we have (1)n = 1 and if n is odd we have (1)n = 1 and and (1)n1 = 1 (1)n1 = 1 Therefore, in both cases of n even or odd, we conclude again that the expression for y (n) evaluates to zero. In summary, x(n) = (1)n = y (n) = 0 Let us now evaluate the output of the same system in response to the one-sided input sequence x(n) = (1)n u(n) Again, we can do so either by evaluating the output samples y (n) for different values of n or by using the system description to write y (n) 1 [x(n) + x(n 1)] 2 1 (1)n u(n) + (1)n1 u(n 1) 2 = = Since the step sequences u(n) and u(n 1) are both equal to zero for n < 0, we conclude that y (n) = 0 for n < 0. Let us determine the values of y (n) for n 0. To begin with, observe further that the step sequence u(n) is such that u(n) = u(n 1) = 1 for all n 1 This is because u(n 1) is simply a one-unit delayed version of u(n). It follows that the expression for y (n) reduces to 1 y (n) = (1)n + (1)n1 , for all n 1 2 Here again, depending on whether n is odd or even, the value of y (n) reduces to 0 for n 1. What about the value of y (n) at time 0? We can use the relation y (n) = 1 (1)n u(n) + (1)n1 u(n 1) 2 and replace n by 0 to get y (0) = 1 (1)0 u(0) + (1)1 u(1) 2 But since u(1) = 0 and u(0) = 1, we arrive at y (0) = 1/2. In summary, x(n) = (1)n u(n) = y (n) = 1 (n) 2 The response of the system in this case is an impulse sequence with amplitude 1/2. 4.2 CLASSES OF SYSTEMS Sometimes knowledge of the input sequence alone is not sufcient to evaluate the response of a system. This is because there are situations in which an input-output transformation denes a class of systems rather than a unique system. Consider the input-output relation y (n) = y (n 1) + x(n) (class of systems) (4.2) with input sequence x(n) and output sequence y (n). Knowledge of x(n) alone is not sufcient to determine the response of the system y (n) in this case. Additional information 73 SECTION 4.2 CLASSES OF SYSTEMS 74 CHAPTER 4 DISCRETETIME SYSTEMS is needed. For instance, in order to evaluate y (0) we need to know y (1) in addition to x(0). So assume, for this example, that we are given the additional piece of information that y (1) = 1. We say that y (1) = 1 species the initial condition of the system at time instant 1. Then, given x(n) we can proceed to compute the output sequence y (n). Indeed, assume x(n) = u(n). Then we can compute all values of y (n) recursively as follows: y (0) y (1) y (2) y (3) y (4) . . . = = = = = = y (1) + x(0) y (0) + x(1) y (1) + x(2) y (2) + x(3) y (3) + x(4) . . . = = = = = 1+1 2+1 3+1 4+1 5+1 = = = = = 2 3 4 5 6 We recognize a pattern in these calculations and deduce that y (n) = n + 2 for n 0 The values of y (n) for n < 1 can be similarly determined albeit by running the recursion backwards in time: y (n 1) = y (n) x(n) Doing so leads to the values y (2) = y (3) = . . . = y (1) x(1) = 1 0 y (2) x(2) = 1 0 . . . =1 =1 That is, y (n) = 1 for all n 1. We thus nd that for the present example and using x(n) = u(n) and y (1) = 1, we get x(n) = u(n) and y (1) = 1 = y (n) = (n + 2) for n 0 1 for n 1 For any other input sequence x(n), and for any other initial condition (whether specied at time n = 1 or at some other time), we can proceed in a similar manner and determine the corresponding output sequence y (n). We therefore say that the transformation {y (n) = y (n 1) + x(n) , y (1) = 1} (a system) with a particular initial condition specied, describes a system. Example 4.3 (The same input-output relation with a different initial condition) Consider again the input-output relation y (n) = y (n 1) + x(n) with the same input sequence x(n) = u(n). Assume now, however, that the additional information that we have available is y (2) = 1, i.e., we are given the initial condition at time 2 as opposed to 75 time 1. Repeating the previous arguments, we can determine y (n) for n 3 by recursion: y (3) y (4) y (5) y (6) . . . = = = = = y (2) + x(3) y (3) + x(4) y (4) + x(5) y (5) + x(6) . . . = = = = 1 + 1 0+1 1+1 2+1 = = = = SECTION 4.3 CLASS OF SYSTEMS 0 1 2 3 so that y (n) = n 3 for n 2 Likewise, for n < 2, we run the recursion backwards: y (n 1) = y (n) x(n) and nd y (1) y (0) y (1) y (2) . . . = = = = = y (2) x(2) y (1) x(1) y (0) x(0) y (1) x(1) . . . = = = = 1 1 2 1 3 1 4 0 = = = = 2 3 4 4 so that y (n) = 4 for n 1. In other words, we now obtain x(n) = u(n) and y (2) = 1 = y (n) = (n 3) 4 n0 n 1 Similarly, for any other input sequence x(n), we can determine the corresponding output sequence y (n) resulting from y (n) = y (n 1) + x(n) and y (2) = 1. We thus say that the transformation {y (n) = y (n 1) + x(n) , y (2) = 1} (a system) describes a system. What we have seen so far are examples of an input-output relation that leads to two different output sequences {y (n)} in response to the same input sequence {x(n) = u(n)}. For this reason, we say that {y (n) = y (n 1) + x(n) , y (1) = 1} denes one system, while {y (n) = y (n 1) + x(n) , y (2) = 1} denes another system. In these two examples, the systems differ not by their input-output transformation but by their assumed initial conditions. We also say that the transformation {y (n) = y (n 1) + x(n)} 76 CHAPTER 4 DISCRETETIME SYSTEMS describes a class of systems; it would dene a system once an initial condition is specied. We now proceed to characterize several important properties of systems. 4.3 RELAXED SYSTEMS A relaxed system or, equivalently, a system that is initially at rest, is dened as one whose output sequence is zero as long as the input sequence is zero. That is, if y (n) = S [x(n)] describes a relaxed system, then y (m) = 0 for all m n as long as x(m) = 0 over m n ( 4 .3 ) In other words, the output sequence stays at zero while the input sequence is at zero. When the input sequence moves away from zero, the output sequence may (or may not) move away from zero. We can alternatively describe a relaxed system as follows. Let no denote the time instant at which the input sequence x(n) becomes nonzero, i.e., x(n) = 0 for all n < n0 (if x(n) is always nonzero, then we select no = ). For a relaxed system we must have y (n) = 0 for all n < no . Example 4.4 (Non-relaxed systems) The system y (n) = x(n + 1) is not relaxed. This is because we can nd a counter-example that violates the denition of a relaxed system. Consider the input sequence x(n) = (n). This input sequence is zero for all n < 0 and assumes the value 1 at n = 0. Now the corresponding output sequence is y (n) = (n + 1), which is obtained by replacing x(n) in the input-output transformation by its expression. This output sequence is zero for all n < 1 but it assumes the value 1 at n = 1 see Fig. 4.2. Therefore, we have an example of an output sequence that does not remain at zero while the input sequence is at zero. Instead, the output sequence assumes the value 1 at time n = 1 even though the input sequence is still zero at that time. x (n ) = (n ) y (n) = (n + 1) 1 3 2 1 1 123 n 3 2 1 123 n FIGURE 4.2 An input-output pair corresponding to the system y (n) = x(n + 1); the plot on the left illustrates a particular input sequence, namely, x(n) = (n), while the plot on the right illustrates the response sequence. Only samples in the range 3 n 3 are shown. All other samples are zero. 77 SECTION 4.4 Example 4.5 (Systems with initial conditions) DYNAMIC SYSTEMS Likewise, the systems {y (n) = y (n 1) + x(n) , y (1) = 1}, {y (n) = y (n 1) + x(n), y (2) = 1} are not relaxed. For instance, if we choose x(n) = 0 for all n, then the corresponding output sequences y (n) for both systems will not be identically zero. Even the system {y (n) = y (n 1) + x(n) , y (1) = 0} with a zero initial condition is not relaxed! For example, if we evaluate its response to x(n) = u(n + 2), we nd that y (3) = 2, which is nonzero even though the input is zero up to and including n = 3. Example 4.6 (Relaxed systems) The following are examples of relaxed systems: 1. S is described by y (n) = x(n 1). The output sequence will stay at zero as long as the input sequence stays at zero. 2. S is described by y (n) = y (n 1) + x(n) with the requirement that the output sample right before the rst nonzero sample of the input sequence is zero. For example, assume we limit the above input-output relation to the interval n 0 and assume further that all input sequences are one-sided and exist over n 0. If it holds that y (1) = 0, then the system will be relaxed. In other words, the following system is relaxed y (n) = y (n 1) + x(n), y (1) = 0, n 0 (relaxed) Note that we are explicitly adding the requirement n 0 to stress the fact that we are only interested in the operation of the system over n 0. To verify that the system so dened is indeed relaxed, we iterate the recursion starting from n = 0 and nd that, at any particular time n, n x (k ), y (n) = k=0 n0 It follows that y (n) will stay at zero as long as the input sequence stays at zero. The output sequence y (n) will move away from zero only after the input sequence moves away from zero. 3. S is described by y (n) = 2y (n 2) + y (n 1) + x(n) with the requirement that the output samples at the two time instants right before the rst nonzero sample of the input sequence is zero. For instance, the following system is relaxed y (n) = 2y (n 2) + y (n 1) + x(n), y (1) = 0, y (2) = 0, n 0 (relaxed) 4.4 DYNAMIC SYSTEMS A system is static or memoryless if its output at time n depends only on its input at the same time instant n. Otherwise, the system is said to be dynamic or with memory. 78 Example 4.7 (Systems with memory) CHAPTER 4 DISCRETETIME SYSTEMS (1) The systems y (n) = ax(n) and y (n) = cos[x(n)] are memoryless. (2) The system {y (n) = y (n 1)+ x(n), y (1) = 0, n 0} is dynamic since at any particular time instant n, the value of y (n) does not only depend on x(n) but also on prior values of x(n) through the dependence on y (n 1). Indeed, assume we iterate the input-output relation. Then we nd y (0) = x(0) y (1) = y (0) + x(1) = x(0) + x(1) y (2) = y (1) + x(2) = x(0) + x(1) + x(2) . . . . =. . and it is seen, for example, that the values of y (1) and y (2) depend on the value of x(0) as well. (3) The system y (n) = x(n2 ) is dynamic. Note for instance that y (2) = x(4) so that the value of the output sequence at time n = 2 depends on the value of the input sequence at time n = 4. (4) The system y (n) = x(n 1) is also dynamic. Note that y (2) = x(1) so that the output value at time n = 2 depends on the input value at time n = 1. (5) The system 1 [x(n) + x(n 1)] 2 is dynamic since the value of y (n) depends on x(n 1) as well. y (n) = (6) The system y (n) = x2 (n) is static. 4.5 TIME-INVARIANT SYSTEMS A system is time-invariant if a time delay (or advance) in the input sequence yields an identical time delay (or time advance) in the output sequence. In other words, if y (n) = S [x(n)] describes a system, then it should hold that y (n K ) = S [x(n K )] for any integer K (4.4) Otherwise, the system is said to be time-variant. The integer k can be positive (in which case the input and output sequences are delayed) or negative (in which case the input and output sequences are advanced). What the denition of time-invariance implies is the following. Assume the system is excited with an input sequence x(n) to generate y (n). Then, if the same experiment is repeated some time later, the system will respond in the same manner except that the new output sequence will be delayed in relation to the previous output sequence. And the amount of delay will be the same as the delay in the input sequence. Time-invariant systems are also referred to as shift-invariant systems to accommodate situations where the variable n does not necessarily denote time. To prove that a system is time-variant, it is enough to nd a counter-example. That is, it is enough to nd a sequence x(n) for which the denition of time-invariance does not hold. On the other hand, to establish that a system is time-invariant we proceed as follows. We denote by y (n) the output sequence that corresponds to a generic input sequence x(n). We denote by yK (n) the output sequence that corresponds to the shifted input sequence x(n K ), for an arbitrary integer K (positive or negative). We then use the input-output relation of the system to establish that for any such K , it holds that yK (n) = y (n K ). Example 4.8 (Time-invariant systems) Let us prove that the system y (n) = 2x(n 1) is time-invariant. Let yK (n) denote the output sequence that corresponds to the input sequence x(n K ). It follows from the equation dening the system that yK (n) = 2x(n K 1) Now using the system description y (n) = 2x(n 1) we see that y (n K ) = 2x(n K 1) Comparing the expressions for yK (n) and y (n K ) we conclude that yK (n) = y (n K ) for any K and the system is therefore time-invariant. Likewise, the system y (n) = x(n 1) + x(n) is time-invariant. Thus, let yK (n) denote the output sequence that corresponds to the input sequence x(n K ). It follows from the equation dening the system that yK (n) = x(n K 1) + x(n K ) Using the system description y (n) = x(n 1) + x(n) we conclude that y (n K ) = x(n K 1) + x(n K ) Therefore, yK (n) = y (n K ) for any K and the system is time-invariant. Example 4.9 (Time-variant systems) The system {y (n) = y (n 1) + x(n), y (1) = 0} is time-variant. To see this, we only need to compare the output sequences that result from the choices x(n) = u(n) and x(n) = u(n + 5). The responses to these input sequences can be found by iterating the input-output recursion for all values of n (positive and negative) as was done in Example 4.2. Doing so leads to the following conclusion n+1 0 x(n) = u(n) = y (n) = for n 0 otherwise and x(n) = u(n + 5) = y (n) = n+1 5 for n 5 otherwise Both responses are depicted in Fig. 4.3. It is seen that the response to u(n) is not a delayed version of the response to u(n + 5). Likewise, the system, for n 0, y (n) = x(n) 0 n even n odd 79 SECTION 4.5 TIME-INVARIANT SYSTEMS 80 response to x(n) = u(n) CHAPTER 4 DISCRETETIME SYSTEMS 4 3 2 1 4 3 2 1 123 n response to x(n) = u(n + 5) 4 3 2 1 8 7 6 5 4 3 2 1 123 n 1 2 3 4 5 FIGURE 4.3 Response sequences of the system {y (n) = y (n 1) + x(n), y (1) = 0} to the input sequences x(n) = u(n) (top) and x(n) = u(n + 5) (bottom). is time-variant. To verify this fact it is enough to consider x(n) = (n) and to check the forms of the resulting output sequences for x(n) and x(n 1). Also, the system y (n) = x(n2 ) is time-variant. This is because y (n K ) = x ( (n K )2 ) while the response to x(n K ) is actually yK (n) = x(n2 K ) To convince yourself that this is the case, choose x(n) = (n). Then plot the response y (n) = x(n2 ). Now choose x(n) = (n 1) and plot the sequences {x((n 1)2 ), x(n2 1)}. Which one of these sequences is the response to (n 1)? 81 Example 4.10 (Time-invariant relaxed systems) SECTION 4.6 CAUSAL SYSTEMS The relaxed system {y (n) = y (n 1) + x(n) (relaxed)} is time-invariant. Indeed, for an arbitrary sequence x(n), let no denote the time instant at which x(n) becomes nonzero, i.e., x(n) = 0 for all n < no (if x(n) is always nonzero, then we set no = ). As dened before, since the system is relaxed, we must have y (n) = 0 for all n < no . Iterating the above input-output relation we get n x ( ) y (n) = =n0 which shows that y (n) is the sum of all input samples up to and including time n. If we now delay x(n) to x(n K ), for an arbitrary positive integer K , then no is replaced by no + K (since the new sequence is now zero for n < no + K . Let yK (n) denote the new output sequence and let xK (n) denote the input sequence x(n K ). Then yK (n) is given by n yK (n) = n x K ( ) = =no +K =no +K x ( K ) Introduce the change of variables = K Then the above equality gives yK (n) = nK x ( ) =n0 In other words, it follows that yK (n) = y (n K ) The same conclusion will hold when K is negative and we conclude that the relaxed system is timeinvariant. 4.6 CAUSAL SYSTEMS A system is causal if its output at time n depends only on present and past values of the input. In other words, y (n) depends only on x(m) for m n. Otherwise, the system is noncausal. Likewise, a system is strictly causal if its output at time n depends only on past values of the input sequence x(n) (i.e., for strict causality, the present value of x(n) is excluded). Example 4.11 (Causal and noncausal systems) (1) The system y (n) = nx(n 1) is strictly causal. (2) The systems y (n) = 1 2 [x(n) + x(n 1)] and y (n) = x2 (n) are causal. (3) The system y (n) = x(n2 ) is not causal. For example, y (2) = x(4) and it is seen that the output value at time n = 2 depends on a future value of the input sequence. An important equivalent characterization of causality is the following. For any two input sequences {x1 (n), x2 (n)}, it should hold that: if x1 (n) = x2 (n) for n < N , then y1 (n) = y2 (n) for n < N (4.5) 82 CHAPTER 4 DISCRETETIME SYSTEMS In other words, as long as the input sequences agree up to a certain time instant, the corresponding output sequences must also be identical up to that same time instant. Indeed, since the output of a causal system at any particular time instant can only depend on present and past input samples, we conclude that the values of the output sequences y1 (n) and y2 (n) over n < N must agree because these samples are being evaluated from identical input values. 4.7 STABLE SYSTEMS A system is said to be bounded-input bounded-output (BIBO) stable if every bounded input sequence x(n) yields a bounded output sequence y (n). By denition, a bounded sequence x(n) is one for which all samples are bounded by some nite positive number Bx , namely, |x(n)| Bx < for all n (4.6) To prove that a system is not BIBO stable, it is sufcient to nd a counter-example. That is, it is enough to nd a bounded sequence x(n) for which the output sequence y (n) is unbounded. On the other hand, in order to establish that a system is BIBO stable we proceed as follows. We let y (n) denote the output sequence that corresponds to an arbitrary bounded input sequence x(n). Then we use the input-output relation of the system to show that there exists a nite positive number By < such that |y (n)| < By for all n. Example 4.12 (Stable systems) (1) The systems y (n) = 1 [x(n) + x(n 1)] and y (n) = x(n2 ) are BIBO stable. Indeed, let 2 x(n) denote any bounded sequence, say |x(n)| Bx < for all n Then for the rst system we have |y (n)| = = 1 |x(n) + x(n 1)| 2 1 1 |x(n)| + |x(n 1)| 2 2 Bx Bx + 2 2 Bx and we conclude that the output sequence is also bounded. With regards to the second system we have |y (n)| = |x(n2 )| Bx so that the output sequence is again bounded. (2) The system y (n) = nx(n) is not BIBO stable. For instance, if we choose x(n) = 1 for all n, then x(n) is clearly bounded while y (n) = n is unbounded. (3) The system y (n) = 1 y (n 1) + x(n), y (1) = 0, n 0 2 is BIBO stable. We can verify the stability of this system from rst principles by applying the denition. Iterating the input-output relation for n 0 we nd that 83 SECTION 4.8 y (0) = y (1) = y (2) = . . . = x(0) 1 x(0) + x(1) 2 1 1 x(0) + x(1) + x(2) 4 2 . . . LINEAR SYSTEMS In general, for any n 0, we get n y (n) = k=0 k 1 2 x (n k ) Now let x(n) denote any bounded input sequence satisfying |x(n)| Bx < for all n 0 Then n |y (n)| k=0 1 2 k n Bx Bx = Bx = 2Bx k=0 k=0 1 1 |x(n k)| 1 2 k 1 2 k 1 2 and the output sequence is bounded as well. 4.8 LINEAR SYSTEMS A system is linear if it satises the superposition principle, which states that ay1 (n) + by2 (n) = S [ax1 (n) + bx2 (n)] (4.7) for any constants {a, b}. In other words, the response of the system to any linear combination of input sequences is the same linear combination of the individual output sequences. To be precise, we should also require the superposition property to hold for an innite combination of input signals but we forgo this technical detail here. To prove that a system is not linear, it is sufcient to nd a counter-example. That is, it is enough to nd a sequence x(n) for which the superposition property does not hold. On the other hand, to establish that a system is linear we proceed as follows. We denote by y1 (n) the output sequence that corresponds to a generic input sequence x1 (n). We denote by y2 (n) the output sequence that corresponds to another generic input sequence x2 (n). We denote by y (n) the output sequence that corresponds to the linear combination ax1 (n) + bx2 (n) for any scalars {a, b}. We then proceed to show that y (n) satises y (n) = ay1 (n) + by2 (n). 84 Example 4.13 (Two linear systems) CHAPTER 4 DISCRETETIME SYSTEMS Let us verify that y (n) = 2x(n 1) is a linear system. Let y1 (n) denote the output sequence that corresponds to an input sequence x1 (n). Likewise, let y2 (n) denote the output sequence that corresponds to another input sequence x2 (n). Then y1 (n) = 2x1 (n 1), y2 (n) = 2x2 (n 1) Now let y (n) denote the output sequence that corresponds to the linear combination ax1 (n) + bx2 (n), for any scalars {a, b}. Then, from the system description, y (n) = = = 2[ax1 (n 1) + bx2 (n 1)] a[2x1 (n 1)] + b[2x2 (n 1)] ay1 (n) + by2 (n) Therefore, the system is linear. Let us now prove that the following system {y (n) = y (n 1) + x(n), y (1) = 0} is also linear. Let y1 (n) denote the output sequence that corresponds to an input sequence x1 (n). Likewise, let y2 (n) denote the output sequence that corresponds to another input sequence x2 (n). Then it is easy to verify that for n 0: n y1 (n) = x1 (0) + x1 (1) + x1 (2) + . . . + x1 (n) = x 1 (k ) k=0 n y2 (n) = x 2 (k ) x2 (0) + x2 (1) + x2 (2) + . . . + x2 (n) = k=0 while for n < 1: y1 (n) y2 (n) = = x1 (n + 1) x1 (n + 2) x1 (n + 3) . . . x1 (1) = x2 (n + 1) x2 (n + 2) x2 (n + 3) . . . x2 (1) = 1 x 1 (k ) k=n+1 1 x 2 (k ) k=n+1 and y1 (1) = 0 = y2 (1) = 0 Now let y (n) denote the output sequence that corresponds to the linear combination ax1 (n) + bx2 (n), for any scalars {a, b}. Then, we also get n [ax1 (k) + bx2 (k)] k=0 y (n) = 1 n0 0 n = 1 [ax1 (k) + bx2 (k)] n < 1 k=n+1 so that y (n) = ay1 (n) + by2 (n), and the system is linear. Example 4.14 (Linear and nonlinear systems) for all n (1) The systems y (n) = nx(n 1) and y (n) = 1 [x(n) + x(n 1)] are linear, as can be 2 immediately veried by applying the denition of linearity. (2) The system, for n 0, 85 y (n) = x(n) 0 SECTION 4.8 n even n odd LINEAR SYSTEMS is also linear. (3) The systems y (n) = x2 (n) and y (n) = ejx(n) are not linear. (4) The system y (n) = x(2n + 3) is linear while y (n) = 2x(n) + 3 is not linear. (5) The system {y (n) = y (n 1) + x(n), y (1) = 1} is not linear. As a general rule, nonzero initial conditions for constant-coefcient difference equations (which are dened in the sequel in Sec. 4.9) destroy linearity. (7) The system y (n) = y (n 1) + x(n) when relaxed is linear. Recall again that being relaxed does not mean that y (1) = 0 but rather that the output is zero while the input is zero. For this example, this is equivalent to saying that the output is zero just prior to the rst nonzero sample of the input. Additivity and Homogeneity We further note that the following two conditions combined are equivalent to the property of linearity. In other words, if a system satises both of these properties then the system is necessarily linear and vice-versa: (A) Additivity. If y1 (n) = S [x1 (n)], y2 (n) = S [x2 (n)], then S [x1 (n) + x2 (n)] = y1 (n) + y2 (n) This means that the response to the sum of input sequences is the sum of the individual output sequences. (H) Homogeneity. If y (n) = S [x(n)] then S [ax(n)] = ay (n) for any scalar a This means that the response to a scaled input sequence is the corresponding scaled output sequence. Proof: To establish the equivalence between these two properties and linearity, let us assume rst that the properties of additivity and homogeneity hold and let us prove that the system y (n) = S [x(n)] is linear. Thus consider any linear combination of input sequences of the form ax1 (n) + bx2 (n). Then S [ax1 (n) + bx2 (n)] = = S [ax1 (n)] + S [bx2 (n)] aS [x1 (n)] + bS [x2 (n)] (by additivity) (by homogeneity) which shows that the system is linear. Conversely, assume the system y (n) = S [x(n)] is linear so that, by denition of linearity, S [ax1 (n) + bx2 (n)] = aS [x1 (n)] + bS [x2 (n)] for any scalars {a, b}. Choosing b = 0, we get S [ax1 (n)] = aS [x1 (n)] which shows that the system satises the homogeneity property. Choosing a = 1 and b = 1, we get S [x1 (n) + x2 (n)] = S [x1 (n)] + S [x2 (n)] 86 which shows that the system satises the additivity property. CHAPTER 4 DISCRETETIME SYSTEMS Absence of Excitation A useful property of linear systems is the following: the output sequence of the system is necessarily zero when the input sequence is the zero sequence. That is, if x(n) = 0 for all n then y (n) = 0 for all n (4.8) We therefore conclude that a linear system cannot generate a nonzero output sequence without excitation. Only nonlinear systems can generate nonzero outputs without excitation at the input. Proof: Let y1 (n) denote the output sequence that corresponds to a sequence x1 (n). Let y2 (n) denote the output sequence that corresponds to x2 (n) = x1 (n). We know from the homogeneity property that y2 (n) = y1 (n). Now, by the additivity property, the output that corresponds to x1 (n) + x2 (n) is y1 (n) + y2 (n). But both sequences are zero since x1 (n) + x2 (n) = 0 and y1 (n) + y2 (n) = 0. Hence, the response to the zero input sequence is the zero output sequence. The absence of excitation property of a linear systems does not mean that a linear system is a relaxed system. Consider, for example, the system y (n) = x(n + 1). This is a linear system but, as mentioned earlier, it is not relaxed. 4.9 CONSTANT-COEFFICIENT DIFFERENCE EQUATIONS In this book we shall primarily deal with systems that are described by difference equations with constant coefcients, namely, by input-output relations of the form: N M y (n) = k=1 ak y (n k ) + k=0 bk x(n k ) (4.9) for some constant coefcients {ak , bk }. In this description, for each n, the sample y (n) is a linear combination of past output samples and of present and past input samples. More explicitly, we write y (n) = a1 y (n1)+a2 y (n2)+. . .+aM y (nM ) + b0 x(n)+b1 x(n1)+. . .+bN x(nN ) The following remarks are therefore in place: (1) As explained before, the above difference equation describes a class of systems, unless additional information (such as initial conditions) is available along with the input sequence. (2) The above difference equation describes a relaxed system if it is assumed that the output sequence is zero while the input sequence is zero (see Example 4.10): if x(n) = 0 for n < no , then y (n) = 0 for n < no (3) A relaxed difference equation as above describes a linear time-invariant (LTI) system (recall Examples 4.10 and 4.13). In other words, whenever we say that we are given a relaxed system that is described by a constant-coefcient difference equation, then we can immediately conclude that the system should be linear and time-invariant, written as LTI. This a very important subclass of systems and it will be the focus of much of our studies in the remainder of this book. Specically, we shall often deal with systems described by difference equations similar to (4.9) but restricted to the interval n 0 and with initial conditions {y (1), y (2), . . . , y (M )}. Such systems are linear (Example 4.13) but generally time-variant (Example 4.9). It should be noted that a constant-coefcient difference equation can describe either a causal system or a noncausal system. For example, the description y (n) = y (n 1) + x(n) when used to determine y (n) from y (n 1) and x(n) is a causal system. If we instead rewrite it as y (n 1) = y (n) x(n) and use this recursion to compute y (n 1) from y (n) and x(n) then we have a non-causal system. In the rst case, time progresses forwards while in the second case time progresses backwards. For this reason, we always need to specify the direction of evolution of time in order to be able to conclude whether a given difference equation refers to a causal or noncausal system. 4.10 SYSTEM REPRESENTATIONS Besides mathematical equations, most systems that we shall encounter in this book can be described in terms of block diagrams or signal owgraph diagrams by employing three basic components, as we explain below. We shall have much more to say about system realizations in Chapter 23. Here we only introduce some initial ideas. Block Diagrams The three basic elements that we shall employ to describe systems in block diagrams are unit-time delays, multipliers by constants, and adders. Unit time-delays. These elements are denoted by the symbol z 1 . If the input to a unittime delay is x(n) then its output is x(n 1), as illustrated in Fig. 4.4. The reason for the use of the symbol z 1 to denote the unit delay block will become clearer later when we study the shift property of the z transform in Sec. 9.4. x ( n) z 1 x(n 1) FIGURE 4.4 The unit delay operator is denoted by the symbol z 1 . If x(n) is the input to the block then x(n 1) is its output. In other words, the input sequence is delayed by one unit of time. Multipliers by constants. This operation is usually denoted by an arrow with the value of the constant written next to it see Fig. 4.5. If the input to such a block is x(n), then its output is x(n) with denoting the multiplication constant. 87 SECTION 4.10 SYSTEM REPRESENTATIONS 88 CHAPTER 4 DISCRETETIME SYSTEMS x ( n) FIGURE 4.5 by . x ( n) An arrow with a constant next to it signies multiplication of the signal samples Adders. An input to an adder usually consists of two sequences, x1 (n) and x2 (n), and the output is the sequence x1 (n) + x2 (n). An adder is often denoted by a small circle with a plus sign, two arrows arriving at the circle, and one arrow leaving it see Fig. 4.6. x 1 ( n) x1 (n) + x2 (n) + x2 (n) FIGURE 4.6 An adder adds the samples of the incident signals, x1 (n) and x2 (n), and generates x1 (n) + x2 (n). Signal Flowgraph Diagrams An alternative representation to block diagrams is in terms of signal owgraph diagrams. In these diagrams, unit-time delays are denoted by an arrow with the symbol z 1 next to it, and adders are denoted by small circles without the plus sign inside them. Multiplications by constants continue to be represented by arrows with the constants listed next to them. The direction of the arrows indicate the direction of propagation of the signals. Figure 4.7 illustrates the owchart representations of the three basic elements just mentioned. Example 4.15 (Two block diagram representations) Figure 4.8 shows two block diagram representations for the class of systems {y (n) = y (n 1) + x(n 1) 2x(n)} The diagrams are obtained as follows. (1) Consider initially the block diagram representation shown in the top part of Fig. 4.8. We start by writing down the input and output terminals, x(n) and y (n). We then employ a unit-time delay to generate x(n 1) from x(n), and another unit-time delay to generate y (n 1) from y (n). We further multiply x(n) by the constant 2 and add outputs of the multiplier and the delay on the leftside to obtain x(n 1) 2x(n). We subsequently add this result to y (n 1) to obtain y (n). (2) Block diagram representations are not unique. While the block diagram representation in the top part of Fig. 4.8 requires two unit-time delays, the representation in the bottom part of the 89 SECTION 4.11 z 1 x ( n) x ( n) APPLICATIONS x( n 1 ) x ( n) x 1 ( n) x1 (n) + x2 (n) x2 (n) FIGURE 4.7 Flowgraph representations of the unit-time delay (top), multiplication by a constant (middle), and adders (bottom). same gure employs only one unit-time delay. This alternative implementation is obtained as follows. We rst add x(n) to y (n) and then delay the combination to obtain x(n 1) + y (n 1). The delayed combination is then added to 2x(n) to generate y (n). (3) Figure 4.9 shows the corresponding owchart representations for the same diagrams. x ( n) 2 + z 1 y ( n) + z 1 2 x ( n) + z 1 + y ( n) FIGURE 4.8 Two block diagram representations for the class of systems {y (n) = y (n 1) + x(n 1) 2x(n)}. The representation in the top employs two unit delays, whereas the representation in the bottom employs a single unit delay. 90 CHAPTER 4 x ( n) DISCRETETIME SYSTEMS 2 y ( n) z 1 z 1 2 x ( n) FIGURE 4.9 z 1 y ( n) Signal owgraph representations of the block diagrams shown in Fig. 4.8. 4.11 APPLICATIONS In this section, we illustrate applications of some of the concepts covered in the chapter in the context of several practical problems. Specically, we comment on how constantcoefcient difference equations are useful modeling tools in communications, nance, and population growth. 4.11.1 Multipath Communications In wireless communications, a signal is transmitted from a user to a base station through the air using electromagnetic waves. The base station subsequently routes the signal to its intended recipient. Propagation in a wireless medium suffers from multipath effects. During propagation, the waves may bounce off obstacles such as hills, trees, and buildings before arriving at the base station through different paths. The bounced signals arrive at the base station with different delays and different energy levels. In this way, the base station receives several replicas of the transmitted signals: these replicas generally arrive at different time instants and with different attenuation levels relative to the original transmitted signal. Let us denote the signal that leaves the originating users cell phone by x(n). There may exist a direct path between the user and the base station, one that does not entail any reections or bouncing. If the signal travels through this path, it will still arrive at the base station with some delay and with some attenuation, say, after some delay of 2 units of time and amplitude attenuation equal to 5/6. Therefore, the rst component of the received signal at the base station can be written as y1 (n) = 5 x(n 2) 6 Assuming some hills and high-rise buildings are present in the surroundings, the signal x(n) may get bounced off these obstacles and replicas will also arrive at the base station. Let us consider the case of two replicas: one delayed by 3 units of time and scaled by 1/4 91 and the other delayed by 5 units of time and scaled by 1/8. Then SECTION 4.11 y2 (n) = 1 x(n 3) 4 and y3 (n) = 1 x(n 5) 8 APPLICATIONS In this way, the overall received signal at the base station is the combination of all three signals {y1 (n), y2 (n), y3 (n)} and is given by y (n) = 5 1 1 x(n 2) + x(n 3) + x(n 5) 6 4 8 (4.10) We therefore arrive at a constant-coefcient difference equation relating the input sequence x(n) to the received signal y (n). We say that this equation models the multipath communications channel; here x(n) denotes the input sequence and y (n) denotes the output sequence, as illustrated in Fig. 4.10. The system in this case can be easily veried to be a causal LTI system. Path 2: scaling = 1/4 delay = 3 Path 1: scaling = 5/6 delay = 2 y (n ) x ( n) caller Path 3: scaling = 1/8 delay = 5 base station FIGURE 4.10 A multipath communications channel consisting of three paths: the delays and scaling factors of the paths are indicated in the gure. Some questions of interest in this wireless communications scenario relate to the following: (a) Assume the base station collects N data samples {y (0), y (1), . . . , y (N 1)} and has access to the transmitted data {x(0), x(1), . . . , x(N 1)}. How can these samples 5 1 be used to estimate the channel coefcients { 6 , 1 , 8 }? This question relates to a 4 so-called channel estimation problem, which we shall study later in Sec. 37.4. (b) Assume again that the base station collects N samples {y (0), y (1), . . . , y (N 1)}, and that the channel coefcients are now known. How can this information be used to recover the original input sequence x(n) over the same interval 0 n N 1? This question relates to a so-called channel equalization problem, which we shall study later in Sec. 37.5. 92 CHAPTER 4 DISCRETETIME SYSTEMS Practice Questions: 1. Draw a signal owgraph diagram for the multipath channel described by the difference equation (4.10). 2. The transmitted signal x(n) is usually zero for negative time since transmission starts at n = 0. What are the values of y (0) and y (1) in (4.10)? 3. Assume we know that y (2) = 1, y (3) = 3/4, y (4) = 1/3, and y (5) = 31/48. Can you determine the values of {x(0), x(1), x(2), x(3)}? 4. Which measurements y (n) are needed to recover the values of {x(4), x(5), x(6), x(7)}? 4.11.2 Financial Growth Model We reconsider in greater detail the savings account example of Sec. 2.7. A client opens a savings account with an initial deposit of D dollars. The time at which the account was created is selected as the origin of time, say, as n = 0. We assume an annual return rate of % and let y (n) denote the amount of funds that will be present at the start of year n. Then, the variable y (n) evolves according to the recursion: y (n) = 1 + y (n 1), y (0) = D = initial funds 100 (4.11) This is a constant-coefcient difference equation, which evolves over n > 0 starting from the initial condition y (0) = D. It is easy to determine an expression for y (n) as a function of n by iterating the above recursion, which leads to the exponential growth model (illustrated generically in Fig. 4.11):4 y (n) = 1 + 100 n D (4.12) Before generalizing the model, it is worth noting that we can rewrite recursion (4.11) in an alternative and useful form. This second form assumes a zero initial condition at time n = 1 and incorporates an input sequence of the form x(n) = 1000 (n) into the recursion as follows: y (n) = 1 + y (n 1) + 1000 (n), y (1) = 0 (4.13) 100 Recursion (4.13) now runs over n 0 (and not n > 0). The unit-sample sequence, (n), assumes the value 1 at n = 0 and disappears for all other values of n. Therefore, if we use (4.13) to evaluate y (0) we get y (1) + 1000 (0) 100 = 1+ 0 + 1000 1 100 = 1000 y (0) = 1+ which is the same value used in (4.11). Subsequently, for all values of n > 0, recursion (4.13) becomes identical to recursion (4.11) since the (n) term will only contribute with zero values over n > 0. 4 Source of this placeholder image is istockphoto.com 93 SECTION 4.11 APPLICATIONS FIGURE 4.11 An illustration of a growing nancial application. Recursion (4.13) describes a causal LTI system with input sequence equal to 1000 (n) and output sequence y (n). More generally, the client may wish to inuence the growth of the funds in the account by making additional annual deposits (or even withdrawals; apart from the initial deposit of US$1000 at time n = 0). Thus, let x(n) denote the amount of funds that the client deposits (or withdraws) into the account at the start of year n. Then recursion (4.13) can be replaced by the more general form: y (n) = 1 + y (n 1) + x(n), 100 y (1) = 0 (4.14) where x(0) = D corresponds to the initial deposit. This is a constant-coefcient difference equation and it represents a causal LTI system with input x(n) and output y (n); the system is clearly relaxed since the funds in the account will be zero while the client does not make any deposits. We can evaluate the successive values of y (n) by iterating the recursion. However, it is generally not possible to (guess or) arrive at a closed-form expression for y (n) in terms of n by simply iterating (4.14) for arbitrary sequences x(n), as was the case in (4.12) for recursion (4.11). Nevertheless, later in Chapters 8 and 12, we shall develop techniques that will allow us to determine, in a systematic manner, a closed-form expression for y (n) as a function of n for difference equations involving input sequences x(n), such as (4.14). When the client makes regular annual deposits, say, of d dollars from year one onwards, then the sequence x(n) can be expressed as x(n) = D (n) + d u(n 1) in terms of the step sequence. In this case, we can arrive at a closed-form expression for y (n) by iterating (4.14). Indeed, let = 1+ 100 (4.15) 94 and note the following sequence of calculations that follow from (4.14): CHAPTER 4 DISCRETETIME SYSTEMS y (0) = y (1) = D D + d y (2) y (3) . . . y (n) y (1) + d = 2 D + (1 + )d y (2) + d = 3 D + (1 + + 2 )d . . . y (n 1) + d = n D + (1 + + 2 + . . . + n1 )d = = = = Using the result of Example 2.11 for the sum of the rst n terms of a geometric series, we get 1 n d y (n) = n D + 1 Substituting by its value (4.15) in terms of , we arrive at y (n) = 1 + 100 n D + 100 1+ 100 n 1 d, n 0 (4.16) which can be compared with (4.12). Let us consider a numerical example. Assume = 2%, D =US$1000, and the client makes regular annual deposits of US$50 from year one onwards. Then the amount of funds in the account will evolve according to the recursion y (n) = 1.02 y (n 1) + 1000 (n) + 50 u(n 1), y (1) = 0 (4.17) Without the regular deposits, the amount of funds in the account would evolve instead according to y (n) = 1.02 y (n 1) + 1000 (n), y (1) = 0 (4.18) Table 4.1 and Fig. 4.12 compare the funds in both kinds of accounts (with and without regular annual deposits). TABLE 4.1 Evolution of the funds in the savings account with and without regular annual deposits of US$50, assuming an annual return rate of 2% and an initial deposit of US$1000. Without regular With regular Year deposits deposits n=0 n=1 n=2 n=3 n=4 n=5 1000.00 1020.00 1040.40 1061.20 1082.40 1104.00 1000.00 1070.00 1141.40 1214.20 1288.50 1364.30 Practice Questions: 1. Starting with an initial deposit of US$500 at year n = 0, and making regular annual deposits of US$20 from year one onwards, how much funds will be available at the start of year n = 30 assuming an annual return rate of 2%. 2. Starting with an initial deposit of US$500 at year n = 3, and making regular annual deposits of US$20 from year four onwards, how much funds will be available at the start of year n = 30 assuming the same annual return rate of 2%. 95 1800 SECTION 4.11 APPLICATIONS 1700 only based on initial deposit 1600 with regular annual deposits funds 1500 1400 1300 1200 1100 1000 0 1 2 3 4 5 6 n (years) 7 8 9 10 FIGURE 4.12 Evolution of the funds in the savings account with and without regular annual deposits of US$50, assuming an annual return rate of 2% and an initial deposit of US$1000. 3. Starting with an initial deposit of US$500 at year n = 0, and making regular annual deposits of US$20 from year one onwards, what should the annual return rate be such that the amount of funds that are present at the start of year n = 10 would be equal to the amount of funds that are present at the start of year 30 at 2% annual return? 4.11.3 Population Growth Models Mathematical models can be used to model the dynamics of population growth in humans and animal species. Let y (0) = Po denote the initial number of individuals in a population at some reference of time, which we select to correspond to n = 0. We would like to determine an expression for the evolution of the population size, y (n), as a function of time. We assume the time index, n, is measured in years so that y (0) is the population size at the beginning of year n = 0, and y (1) is the population size at the beginning of year n = 1, and so on. Figure 4.13 depicts a trend with a growing population size.5 Malthusian Model Now the size of the population decreases or increases as a function of the number of births and deaths that occur annually. Let us assume that the birth rate is b% per year and that the death rate is d% per year, where both rates are percentages relative to the existing population size. In this way, given y (n 1), the population size at year n will be given by y (n) = y (n 1) + 5 Source b d y (n 1) y (n 1) 100 100 of this placeholder image is istockphoto.com 96 CHAPTER 4 DISCRETETIME SYSTEMS FIGURE 4.13 An illustration of a growing population trend. Mathematical models can be used to model the dynamics of population growth in humans and animal groups. Grouping terms we arrive at the following so-called Malthusian model for population growth y (n) = 1 + b d y (n 1), y (0) = initial population size 100 100 (4.19) This model involves a constant-coefcient difference equation, which evolves over n > 0 starting from an initial condition, y (0) = Po , and progresses forward in time. It is straightforward to verify by iterating the Malthusian recursion that the population size grows exponentially as follows: y (n) = 1 + b d 100 100 n Po (4.20) For this reason, the Malthusian model is sometimes referred to as an exponential growth model. For example, given an initial population size of Po = 100 individuals and assuming the birth and death rates are 10% and 2%, respectively, we nd that the population size evolves according to the numbers listed in Table 4.2, which follow from the relation y (n) = 1.12 y (n 1), y (0) = 100 Before generalizing the Malthusian model (4.19), it is worth noting that we can rewrite the recursion in an alternative and useful form. This second form assumes a zero initial condition at time n = 1 and incorporates an input sequence of the form x(n) = Po (n) into the recursion as follows: y (n) = 1 + b d y (n 1) + Po (n), y (1) = 0 100 100 (4.21) 97 TABLE 4.2 Evolution of population size using the Malthusian model (4.19) with y (0) = 100, b = 10% and d = 2%. Year Size n=0 n=1 n=2 n=3 n=4 n=5 . . . 100 108 116 125 135 145 . . . Recursion (4.21) now runs over n 0 (and not n > 0). The unit-sample sequence, (n), assumes the value 1 at n = 0 and disappears for all other values of n. Therefore, if we use (4.21) to evaluate y (0) we get y (0) = = = d b y (1) + Po (0) 100 100 b d 1+ 0 + Po 1 100 100 Po 1+ which is the same value used in (4.19). Subsequently, for all values of n > 0, recursion (4.21) becomes identical to recursion (4.19) since the (n) term will only contribute with zero values over n > 0. Recursion (4.21) describes a causal LTI system with input sequence equal to Po (n) and output sequence y (n). More generally, we can study the situation where one wishes to inuence the dynamics of the population growth in a given society by adding (or even removing) individuals at various instants of time. This fact can be modeled by incorporating a more general input sequence, x(n), into the Malthusian recursion. For example, assume at year n = 5, a total of 50 individuals are added to the population. Then the Malthusian model (4.21) can be adjusted to capture this addition as follows: y (n) = 1 + d b y (n 1) + Po (n) + 50 (n 5), y (1) = 0 (4.22) 100 100 This recursion incorporates a driving signal in the form of two unit-sample sequences located at n = 0 and n = 5. For more general input sequences, x(n), the model becomes y (n) = 1 + b d y (n 1) + x(n), 100 100 y (1) = 0 (4.23) where x(0) = Po corresponds to the initial population size. In this case, the sequence x(n) represents the input to the system at the various time instants. The above constantcoefcient difference equation can be easily seen to represent a causal LTI system with input x(n) and output y (n). SECTION 4.11 APPLICATIONS 98 CHAPTER 4 DISCRETETIME SYSTEMS Logistic Model Continuing with the original Malthusian model (4.20), we see that according to this model, population growth follows an exponential evolution. This is not a realistic model since it predicts that the population size will grow or decline in an exponential manner. An alternative model is often used in practice and is known as the discrete-time logistic model. The main difference is that in the new model, the birth and death rates are not constants but are now functions of the size of the population at any particular time instant. For example, when the population size is very large, it is expected that the death rate in the population should become higher due to competition on limited resources. On the other hand, when the population size is relatively small, the birth rate should become higher to enable the perpetuation of the species. We arrive at the logistic model as follows. At any time n, we measure the rate of change in the population size relative to time n 1 through the ratio y (n) y (n 1) (n) = (4.24) y (n 1) We refer to this ratio as the population growth rate. We would like this ratio to assume large values when the population size, y (n 1), is small (so that the population would grow), and to assume small values (or even negative values) when the population size, y (n 1), is large (so that the population would decline). One way to achieve this behavior is to set y (n 1) (n) = 1 (4.25) P for some positive constants and P . If we drop the time indices for simplicity, the above equation can be rewritten as y = 1 (4.26) P which can be recognized as the equation of a straight line with a negative slope relating and y see Fig. 4.14. From the gure we see that when y is small, y is large (attaining the value at y = 0), and when y is large, y is small or negative (attaining the value zero at y = P ). Reincorporating the time indices, and expanding the equation (4.25), we nd that the logistic model is given by the following expression: y (n) = y (n 1) 1 + 1 y (n 1) P , y (0) = initial condition (4.27) This model now involves a quadratic term in y (n 1) on the right-hand side. For this reason, the logistic model does not correspond to a constant-coefcient difference equation of the form we studied in this chapter. In such cases, it is generally difcult to obtain a closed form expression that describes the evolution of y (n) as a function of n, as was the case with (4.20). Nevertheless, we can iterate the logistic model and simulate the evolution of the population growth. We may again consider the more general case in which one attempts to inuence the evolution of the population growth through the addition of individuals. In this case, we can adjust the logistic model to the following form: y (n) = y (n 1) 1 + 1 y (n 1) P + x(n), y (1) = 0 (4.28) and iterate it over n 0. Here, the sequence x(n) represents the individuals that are added at the various time instants n with x(0) = Po . Relation (4.28) represents a nonlinear system with input sequence, x(n), and output sequence, y (n). 99 SECTION 4.11 APPLICATIONS Population size at which the rate of growth becomes negative. Value of rate of growth when the population size is small. P y FIGURE 4.14 In the logistic model, the graph of the population growth rate () versus the population size (y ) is a straight line with a negative slope. Let us reconsider the earlier example with an initial population size of 100 individuals and use P = 400 and = 0.8, and apply the logistic model (4.27) to it. Iterating (4.27) we nd that the population size evolves according to the numbers listed in Table 4.3, which follow from the recursion y (n) = y (n 1) 1 + 0.8 1 y (n 1) 400 , y (0) = 100 In addition, Fig. 4.15 compares the evolution of an initial population of y (0) = 1000 individuals according to the Malthusian and logistic models; observe how the population size in the latter model tends to a steady-state value. TABLE 4.3 Evolution of population size using the logistic model (4.27) with y (0) = 100, = 0.8 and P = 400. Year Size n=0 n=1 n=2 n=3 n=4 n=5 n=6 . . . 100 160 236 313 367 391 398 . . . 100 CHAPTER 4 500 DISCRETETIME SYSTEMS 450 Malthusian model Logistic model population size 400 350 300 250 200 150 100 0 2 4 6 8 10 n (years) FIGURE 4.15 Evolution of population size using both the Malthusian model (4.19) with y (0) = 100, b = 10% and d = 2%, and the logistic model (4.27) with y (0) = 100, = 0.8 and P = 400. Practice Questions: 1. Refer to the Malthusian model (4.19). For what conditions on b and d, the model will correspond to a growing population, a declining population, a stable population? 2. Assume you are given the data in Table 4.2 showing the population growth as predicted by the Malthusian model starting from an initial population of y (0) = 100. Can you work backwards and nd the birth rate and the death rate in the population? 3. Assume the population size y (n 1) is very small in the logistic model (4.27) so that the term y (n 1)/P 0 and y (n) (1 + )y (n 1). Compare this relation with the Malthusian model and provide an interpretation for in terms of b and d. 4. Verify that the system described by the logistic model (4.28) is nonlinear. 4.12 PROBLEMS Problem 4.1 Determine whether each of the following systems is linear: (a) y (n) = x(n3 ). (b) y (n) = x(2n). (c) y (n) = x(n/3) when n = 0, 3, 6, . . . and y (n) = 0 otherwise. Problem 4.2 Determine whether each of the following systems is linear: (a) y (n) = x(n2 ). (b) y (n) = x(3n 2). (c) y (n) = x(n/4) when n = 0, 4, 8, . . . and y (n) = 0 otherwise. Problem 4.3 Determine whether each of the following systems is time-invariant: (a) y (n) = x(n3 ). 101 (b) y (n) = x(2n). SECTION 4.12 PROBLEMS (c) y (n) = x(n/3) when n = 0, 3, 6, . . . and y (n) = 0 otherwise. Problem 4.4 Determine whether each of the following systems is time-invariant: (a) y (n) = x(n2 ). (b) y (n) = x(3n 2). (c) y (n) = x(n/4) when n = 0, 4, 8, . . . and y (n) = 0 otherwise. Problem 4.5 Determine whether each of the following systems is causal: (a) y (n) = x(n3 ). (b) y (n) = x(2n). (c) y (n) = x(n/3) when n = 0, 3, 6, . . . and y (n) = 0 otherwise. Problem 4.6 Determine whether each of the following systems is causal: (a) y (n) = x(n2 ). (b) y (n) = x(3n 2). (c) y (n) = x(n/4) when n = 0, 4, 8, . . . and y (n) = 0 otherwise. Problem 4.7 Consider the moving average system with exponential weighting y (n) = 1 M +1 M k=0 k x (n k ) where || < 1. Is the system linear? causal? time-invariant? stable? Problem 4.8 Is the system y (n) = linear? causal? time-invariant? stable? 1 x n2 |n| + 1 Problem 4.9 True or False: (a) A relaxed system is linear. (b) A linear system is relaxed. Problem 4.10 True or False: (a) An LTI system is relaxed. (b) A linear and relaxed system is time-invariant. Problem 4.11 The response of a linear time-invariant system to x(n) = u(n) is y (n) = (0.5)n u(n). Find its response to (n). Problem 4.12 The response of a linear time-invariant system to x(n) = 2 (n 1) is y (n) = (0.5)n u(n). Find its response to (n) + 0.5 (n + 2). Problem 4.13 System S1 is dened by y (n) = log (|(x(n 1)|) and system S2 is dened by y (n) = exp(x(2n)). Which of the following statements is correct? (a) Both systems are BIBO stable. (b) Both systems are unstable. (c) System S1 is unstable and system S2 is BIBO stable. (d) Both systems are time invariant. 102 CHAPTER 4 DISCRETETIME SYSTEMS Problem 4.14 Which of the following statements is true? (a) System y (n) = sin(5n + 3)x(n) is linear. (b) System y (n) = x(2n) is time invariant. (c) System y (n) = x(n) is causal. (d) System y (n) = x(n)x(n2 )x(n3 ) is unstable. Problem 4.15 Determine the response of the system y (n) = 0.5n x(n) + x(n 1) to the unit sample x(n) = (n). Is this a linear system? What would its response be to x(n) = (n 3)? Problem 4.16 Determine the response of the system 2 y (n) = 0.5n x(n 1) + x(n) to the unit sample x(n) = (n). Is this a linear system? What would its response be to x(n) = (n + 1)? Problem 4.17 Determine whether each of the following systems is linear or not, time-invariant or not, causal or not, relaxed or not: (a) y (n) = y (n 1) + x(n), y (1) = 0. (b) y (n) = y (n 1) + x(n), y (1) = 1. (c) y (n) = y (n 1) + x(n), and the output is zero as long as the input is zero. (d) y (n) = y (n 1) + x(n), and the output is zero right before the rst nonzero sample in the input sequence. (e) y (n 1) = y (n) x(n), and the output is zero as long as the input is zero. Problem 4.18 Determine whether each of the following systems is linear or not, time-invariant or not, causal or not, BIBO stable or not, relaxed or not: (a) y (n) = ln[|x(n)| + 1]. (b) y (n) = y (n 1) + x(n), y (1) = 0. (c) y (n) = y (n 1) + x(n), y (1) = 1. (d) y (n) = 2 + x(n). Problem 4.19 Show that the following system is BIBO stable for any || < 1: {y (n) = y (n 1) + x(n), y (1) = 0, n 0} Problem 4.20 Prove that the system below is BIBO stable: y (n) = 1 y (n 2) + x(n), y (1) = 0, y (2) = 0, n 0 4 Problem 4.21 Show that y (n) = x(2n + 1) is a time-variant system. Problem 4.22 Let y (n) = x(n2 1). Is the system linear? time-invariant? causal? stable? Problem 4.23 Let y (n) = ejx(n) . Is the system linear? time-invariant? causal? stable? Problem 4.24 Let y (n) = ejx(n) cos(2x(n)). Is the system linear? time-invariant? causal? stable? Problem 4.25 The response of a linear system to 0.5n u(n) is u(n) and to 0.5n1 u(n 1) is u(n 1). Is the system time-invariant? Problem 4.26 The response of an LTI system to 0.5n u(n) is u(n). Is the system causal? 103 SECTION 4.12 Problem 4.27 Given an example of a system that satises the homogeneity property but does not satisfy the additivity property. Problem 4.28 Given an example of a system that satises the additivity property but does not satisfy the homogeneity property. Problem 4.29 Consider the system with output sequence y (n) and input sequence x(n) related via y (n) = m= x (m )x (n m ) Verify whether the system is linear, causal, time-invariant, or stable. Justify your statements or give valid counter-examples. Problem 4.30 Verify whether the system y (n) = 1 y (n 2) + x(n 3), y (1) = 0, y (2) = 0, n 0 4 satises the homogeneity property, the additivity property, and the superposition property. Is the system linear? time-invariant? Problem 4.31 Establish the validity of the following equivalent characterization of causality: as long as two input sequences to a causal system are identical, the corresponding output sequences must also be identical. That is, for any sequences {x1 (n), x2 (n)}, if x1 (n) = x2 (n) for n < N then y1 (n) = y2 (n) for n < N . Problem 4.32 Give examples of systems that are described by a constant-coefcient difference equation and are (a) Linear, time-invariant, and causal. (b) Linear, time-invariant, and non-causal. (c) Linear, time-variant, and causal. (d) Linear, time-variant, and non-causal. (e) Nonlinear. Problem 4.33 A relaxed system is described by the difference equation y (n) 1 y (n 1) = x2 (n) 2 where x(n) denotes the input sequence and y (n) denotes the output sequence. Prove or give counterexamples: (a) Is the system linear? (b) Is the system time-invariant? (c) Is the system causal? (d) Is the system BIBO stable? Problem 4.34 A relaxed system is described by the equation y (n) 1 y (n 2) = x(n2 ) 2 where x(n) denotes the input sequence and y (n) denotes the output sequence. Prove or give counterexamples: (a) Is the system linear? PROBLEMS 104 CHAPTER 4 DISCRETETIME SYSTEMS (b) Is the system time-invariant? (c) Is the system causal? (d) Is the system BIBO stable? Problem 4.35 If the response of an LTI system to x(n) = ej 3 n is y (n) = the response of the system to 1 cos (n 1) + 2 3 4 x(n) = 1 j ( n+ ) 6, e3 2 what is ? Problem 4.36 Refer to Fig. 4.16, which shows two LTI systems S1 and S2 . The response of S1 to an input sequence x1 (n) is y1 (n) = 1 , 3/2, 2, 2 where the boxed entry occurs at the origin of times, and the samples to its right occur at time instants n = 1, 2, 3. All other entries are zero. The response of S2 to the input sequence x2 (n) = 1 , 1/2, 1 is y2 (n) = 1 n1 3 u(n 2). The systems are connected in cascade where the output of S1 is the input to S2 . What would the response y (n) of the cascade be when x(n) = x1 (n) 2x1 (n 1) is applied to S1 ? x 1 ( n) 1 , 1/2, 1 x ( n) 1 , 3/2, 2, 2 S1 1 n 1 3 S2 S1 S2 u(n 2) y (n ) FIGURE 4.16 The top row shows the response of system S1 to x1 (n). The middle row shows the given sequences at the input and output of system S2 . The bottom row shows the series connection of both systems for Prob. 4.36 Problem 4.37 Draw block diagram and signal owgraph representations for the classes of systems (a) y (n) = 1 y (n 2) + y (n 1) + 1 x(n 2). 2 3 1 (b) y (n 1) = 2y (n) + 5 x(n 3). Problem 4.38 Draw block diagram and signal owgraph representations for the classes of systems 1 1 (a) y (n) = 4 y (n 3) 1 y (n 1) + x(n) + 4 x(n 3). 2 1 1 (b) y (n 2) = 2 y (n) + y (n 1) 5 x(n 2). Problem 4.39 The response of an LTI system to an even sequence x(n) is 0.5n u(n). Can you determine the response of the system to x(n + 1)? Problem 4.40 The response of an LTI system to an odd sequence x(n) is 0.5n u(n). Can you determine the response of the system to x(n 2)? CHAPTER 5 Impulse Response Sequence Tlinear time-invariant (LTI) systems, soamuch so that knowledge of the impulse response he impulse response sequence plays fundamental role in characterizing the behavior of sequence alone is sufcient in order to fully describe the behavior of an LTI system. For example, explicit knowledge of a mathematical model describing the input-output relation of the LTI system is not even needed; such a model can be inferred from the impulse response sequence itself. Moreover, for LTI systems, knowledge of the impulse response sequence enables us to determine whether the system is BIBO stable or not and whether it is causal or not. Knowledge of the impulse response sequence also enables us to determine the response of the system to any input sequence, x(n). In later chapters, we shall see that the impulse response sequence also conveys information about the properties of LTI systems in the frequency domain. This chapter expands on these remarks and emphasizes the signicance of the impulse response sequence in the context of LTI systems. 5.1 CONVOLUTION SUM FOR LTI SYSTEMS Consider a system that is described generically by the input-output relation y (n) = S [x(n)] where x(n) denotes the input sequence and y (n) denotes the output sequence. The symbol S denotes the transformation that the system performs on the input sequence in order to generate the output sequence. Initially, we will not restrict the system to be linear or even LTI. The impulse response sequence of S is dened as the response of the system to the unitsample sequence, x(n) = (n). We denote the impulse response sequence by the special symbol h(n) so that h(n) = S [ (n)] (5.1) Example 5.1 (Response to the unit-sample sequence) Consider the system described by the input-output relation y (n) = nx(n 1) The impulse response sequence is obtained by setting x(n) = (n) so that h(n) = n (n 1) 105 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 106 CHAPTER 5 IMPULSE RESPONSE SEQUENCE Observe that, in this case, since the unit-sample sequence, (n), assumes the value 1 at n = 0 and is zero elsewhere, we have that (n 1) will assume the value 1 at n = 1 and will be zero for all other values of n. It follows that we can simplify the above expression for h(n) and write instead h(n) = (n 1) Example 5.2 (Identical impulse response sequences) Consider now the system described by the input-output relation y (n) = x(n 1) (system I) Its impulse response sequence is easily seen to be h(n) = (n 1) which is the same result we obtained in Example 5.1 for the system y (n) = nx(n 1) (system II) However, both systems are different. System I is linear and time-invariant (LTI) while system II is linear but time-variant. Therefore, given knowledge of h(n) alone, it is not possible to conclude which system gave rise to it. Such ambiguous situations do not arise when we focus exclusively on LTI systems. As the discussion will show, no two LTI systems will share the same impulse response sequence. In other words, for LTI systems, the impulse response sequence serves as a dening property that uniquely identies the system. Example 5.3 (Impulse response sequence of an LTI system) Consider a relaxed system that is described by the input-output relation y (n) = 1 y (n 1) + x(n) 2 We already know from the discussion in Sec. 4.9 that relaxed systems that are described by such constant-coefcient difference equations are LTI. We would like to determine the impulse response sequence of the given system. Thus, let x(n) = (n) and let us denote the corresponding output sequence by h(n). It follows from the input-output relation that h(n) satises h(n) = 1 h(n 1) + (n) 2 Now since the input sequence (n) is zero for all n < 0 and the system is relaxed, we conclude from the denition of a relaxed system that h(n) = 0 for n < 0 as well. To determine the values of h(n) for n > 0, we iterate the recursion to get h(0) = (0) = 1 h(1) = 1/2 h(2) = 1/4 h(3) . . . = 1/8 . . . = 107 We identify a pattern in the successive values of {h(n)} and conclude that h(n) = 1 2 SECTION 5.1 n CONVOLUTION SUM FOR LTI SYSTEMS u(n) where we added the unit-step sequence u(n) to enforce the fact that h(n) = 0 for n < 0. LTI Systems From now on, we focus on the study of linear time-invariant (LTI) systems. In particular, we establish several useful results concerning the impulse response sequence of such systems. To begin with, we argue that the response of an LTI system to any input sequence can be determined solely from knowledge of the impulse response sequence of the system. In other words, a mathematical input-output relation for the system is not needed. Thus, consider an LTI system S and let h(n) denote its impulse response sequence. Due to the assumed time-invariance of the system, its response to (n k ), for any k , will be h(n k ). That is, if the input sequence is a time-shifted unit-sample sequence then the result will be an equally time-shifted impulse response sequence: h(n) = S [ (n) ] = h(n k ) = S [ (n k ) ] (by time-invariance) (5.2) Now, any arbitrary input sequence x(n) can be expressed as a linear combination of shifted unit-sample sequences, namely, for any x(n) we can write x(n) = . . . + x(1) (n + 1) + x(0) (n) + x(1) (n 1) + . . . (5.3) Specically, note that the unit-sample (or impulse) sequence (n), which is located at the origin n = 0, has amplitude x(0). Likewise, the unit-sample sequence (n 1), which is located at time n = 1, has amplitude x(1), and so forth see Fig. 5.1. x(n) x(3) (n 3) x(1) (n 1) x(3) (n + 3) x(0) (n) 2 3 x(2) (n + 2) 2 1 1 3 n x(2) (n 2) FIGURE 5.1 An arbitrary sequence x(n) can be expressed as a linear combination of shifted unit-sample sequences. 108 More compactly we write CHAPTER 5 IMPULSE RESPONSE SEQUENCE x(k ) (n k ) x(n) = (5.4) k= This is a representation for x(n) as a linear combination of the sequences { (n k )} for all k . The coefcients of the linear combination are the samples of the sequence itself. Proceeding with the argument, we invoke the superposition principle for linear systems and note that the response of the LTI system S to an arbitrary input sequence x(n) is given by y (n) = S [ x(n) ] = S k= x(k ) (n k ) (using (5.4)) = k= x(k ) S [ (n k ) ] (by superposition principle) where in the second equality we replaced x(n) by its alternative representation (5.4), and in the third equality we invoked the superposition principle to move the system operation S [] inside the summation. Using (5.2)), and invoking the denition of the impulse response sequence, we get y (n) = k= x(k )h(n k ) (5.5) The series k= x(k )h(n k )] that appears in (5.5) is called the convolution sum of x(n) and h(n); it is usually denoted more compactly as x(n) h(n) so that x(n) h(n) = k= x(k )h(n k ) (5.6) We therefore nd that the response of the LTI system S to any input sequence x(n) can be determined by evaluating the convolution sum of this input sequence with the impulse response sequence of the system, i.e., y (n) = x(n) h(n) (5.7) As we are going to see in the next chapter, the convolution sum can be evaluated in many ways, some are easier than others depending on the context. Here, we continue to describe several useful properties of the impulse response sequence of LTI systems. 109 SECTION 5.1 Example 5.4 (Convolution of two sequences) Consider the sequences h(n) = (0.5)n u(n) and x(n) = u(n 1). Then, by denition, their convolution is given by y (n) = k= = k= x(k)h(n k) u(k 1) [0.5nk u(n k)] We evaluate the summation as follows. First, we note that the step-sequence u(k 1) is zero for k < 1, while the step-sequence u(n k) is zero for k > n. This means that the product that appears inside the summation will be zero for all values of k in the interval k < 1 and k > n. Therefore, the limits of the summation should go from k = 1 to k = n and the expression for y (n) reduces to n y (n) 0.5nk = k=1 Clearly, the summation will include nontrivial elements only for values of n that are larger than or equal to one (which is the lower limit for the summation index). For n < 1, we get y (n) = 0, while for n 1 we have y (n) = = 1 + 0.5 + 0.52 + . . . + 0.5n1 1 0.5n 1 = 2 n1 1 0.5 2 In summary, we nd that y (n) = 2 1 u(n 1), 2n1 for all n where we added the step-sequence u(n 1) to enforce the condition y (n) = 0 for n < 1. Example 5.5 (Response to the unit-step sequence) Consider a relaxed system that is described by the input-output relation y (n) = 1 y (n 1) + x(n) 2 and let us determine its response to the input sequence x(n) = u(n 1). We already know from Example 5.1 that this system is LTI and its impulse response sequence is given by h(n) = 0.5n u(n). Therefore, the response of the system to the input sequence x(n) = u(n 1) is given by the convolution sum y (n) = u(n 1) (0.5)n u(n) which we already evaluated in Example 5.4, so that the desired output sequence is y (n) = 2 1 u(n 1), 2n1 for all n Alternatively, we may proceed from rst principles as follows. Since the system is relaxed, and since the input sequence u(n 1) is zero for n < 1, then y (n) = 0 for n < 1. For n 1, we iterate CONVOLUTION SUM FOR LTI SYSTEMS 110 CHAPTER 5 the recursion using x(n) = u(n 1) to get y (1) IMPULSE RESPONSE SEQUENCE = y (2) = y (3) = y (4) . . . x(1) = 1 1/2 + 1 = 3/2 = 2 1/2 = 3/4 + 1 = 7/4 = 2 1/4 7/8 + 1 = 15/8 = 2 1/8 . . . = A pattern can be recognized in these sample values and we are led to the same expression y (n) = 2 1 u(n 1), 2n1 for all n 5.2 CAUSALITY OF LTI SYSTEMS The impulse response sequence can be used to determine whether an LTI system is causal or not without the need to know a mathematical model describing the input-output relation. Before explaining how this step can be achieved, we rst dene what we mean by a causal sequence (as opposed to a causal system). We say that a sequence x(n) is causal if its samples are zero for n < 0, i.e., x(n) = 0 for n<0 (causal sequence) (5.8) Note that this is the denition of a causal sequence as opposed to a causal system, which was dened earlier in Sec. 4.6. Recall that a causal system is one for which the output at time n depends on present and past values of the input sequence (it does not depend on future values of the input sequence). With these denitions, it is straightforward to verify that the causality of an LTI system is equivalent to the causality of its impulse response sequence, namely, LTI system is causal h(n) = 0 for n < 0 (5.9) Proof: Assume rst that the LTI system is causal. By linearity, its response to the zero sequence has to be the zero sequence (recall the absence of excitation property for linear systems as was given by (4.8)). Now, by denition, the response of the system to (n) is h(n). Moreover, (n) and the zero sequence are identical for n < 0. It follows from the assumed causality of the system (recall property (4.5)), that the corresponding output sequences must agree for n < 0. This shows that we must have h(n) = 0 for n < 0. Conversely, assume h(n) = 0 for n < 0. Then, in view of the convolution sum (5.7), the output y (n) in response to any input x(n) is given by y (n) = k= = j = = j =0 x(k)h(n k) h(j )x(n j ) h(j )x(n j ) (using j = n k) where we employed in the second step a change of variables (j = n k), and used in the last step the fact that h(j ) = 0 for j < 0. The last expression shows that y (n) depends only on past and present values of the input sequence. Hence, the system is causal. Example 5.6 (Causal and noncausal systems) If n 1 u(n) 2 is the impulse response sequence of an LTI system, then this system must be causal. Accordingly, the relaxed system that is described by the input-output relation h(n) = y (n) = 1 y (n 1) + x(n) 2 is causal because, as we already know, its impulse response is given by the above h(n). On the other hand, the sequence h(n) = u(n + 2) cannot be the impulse response of a causal LTI system. This is because u(n + 2) is not a causal sequence; it is nonzero for n < 0. Limits of Summation For a causal LTI system, the convolution sum can be written in either of two forms: n y (n) = k= x(k )h(n k ) = k=0 h(k )x(n k ) (5.10) That is, the limits of the summation can be restricted to the intervals (, n] or [0, ). This is because for causal LTI systems, h(n) = 0 for n < 0. If, in addition, the input sequence itself is causal, then the above relations simplify to n n y (n) = k=0 h(k )x(n k ) = k=0 x(k )h(n k ) (5.11) since, for a causal input sequence, x(n) = 0 for n < 0. 5.3 BIBO STABILITY The BIBO stability of an LTI system can also be inferred from its impulse response. Recall that a system is BIBO if, and only if, its output sequence remains bounded for any bounded input sequence. It holds that for LTI systems, the following is an equivalent characterization of BIBO stability in terms of the impulse response sequence: LTI system is BIBO stable k= |h(k )| < (5.12) In other words, an LTI system is BIBO stable if, and only if, its impulse response sequence is absolutely summable. Proof: Let x(n) be any bounded sequence, say |x(n)| Bx < for all n 111 SECTION 5.3 BIBO STABILITY 112 CHAPTER 5 Let y (n) denote the corresponding output sequence and assume initially that the impulse response sequence is absolutely summable, say IMPULSE RESPONSE SEQUENCE k |h(k)| < K < for some positive scalar K . Then, according to the convolution sum, the output sequence of the LTI system is given by y (n) = k= which shows that |y (n)| = k= k= x(k)h(n k) x(k)h(n k) |x(k)h(n k)| Bx < Bx K k= |h(n k)| , since x(n) is bounded We therefore conclude that y (n) is also bounded so that the LTI system is BIBO stable. Conversely, assume the LTI system is BIBO stable and let us prove that its impulse response sequence must be absolutely summable. Assume not. That is, assume the system is BIBO stable but k= |h(k)| = We now verify that this assumption leads to a contradiction. Indeed, dene the obviously bounded input sequence h (n) if h(n) = 0 |h(n)| x(n) = 0 if h(n) = 0 where h (n) denotes the complex conjugate value of h(n). The corresponding output sample at time 0 is given by y (0) = k= x(k)h(k) = k= |h(k)| which in view of the assumption on h(n) is unbounded. We therefore have an example of a bounded input sequence that leads to an unbounded output sequence. This fact contradicts the assumed BIBO stability of the system. We conclude that the assumption on h(n) is false and we must necessarily have k= |h(k)| < Example 5.7 (Stable and unstable systems) Consider the sequence h(n) = 1 2 n u(n) This sequence can be the impulse response sequence of a BIBO LTI system since it is absolutely summable. Indeed, note that n= |h(n)| = n=0 1 1 = 2n 1 1 2 SERIES CASCADE OF LTI SYSTEMS = 2< On the other hand, the sequence h(n) = u(n) cannot be the impulse response sequence of a BIBO stable LTI system because it is not absolutely summable. 5.4 SERIES CASCADE OF LTI SYSTEMS We now illustrate what happens when we combine LTI systems together. We consider the cases of series and parallel cascades of such systems. Thus, consider two LTI systems S1 and S2 , with impulse response sequences h1 (n) and h2 (n), respectively. Both systems are connected in series, with the output of S1 connected to the input of S2 , as shown in the top part of Fig. 5.2. S x(n) S1 (n) S1 S2 h1 ( n ) S2 113 SECTION 5.4 y (n) h1 (n) h2 (n) FIGURE 5.2 Series cascade of two systems. The input to the cascade is x(n) and the output of the cascade is y (n). The combined system, say S , whose input is x(n) and output is y (n), is also LTI. Moreover, the impulse response sequence of the combination is denoted by h(n) and is given by h(n) = h1 (n) h2 (n) (5.13) Proof: Let us rst determine the impulse response sequence of S . For this purpose, take x(n) = (n). Then the output of S1 is, by denition, h1 (n), as illustrated in the bottom plot of Fig. 5.2. The sequence h1 (n) is now an input to S2 and the output y (n) will therefore be y (n) = h1 (n) h2 (n). This shows that the impulse response sequence of the combined system is h(n) = h1 (n) h2 (n). To establish linearity of the combined system, let x1 (n) and w1 (n) be any two input sequences to S1 and denote by y1 (n) and z1 (n) the corresponding outputs of S1 . Let also y2 (n) and z2 (n) denote the outputs of S2 when excited by y1 (n) and z1 (n), respectively. By linearity of S1 , we get that ax1 (n) + bw1 (n) outputs ay1 (n) + bz1 (n), which now excites S2 . By linearity of S2 , we get that ay1 (n) + bz1 (n) outputs ay2 (n) + bz2 (n). It then follows that the cascade satises the superposition principle and it is therefore a linear system. 114 CHAPTER 5 IMPULSE RESPONSE SEQUENCE To establish time-invariance of the combined system, we rst note from the time-invariance of S1 that the time-shifted sequence x1 (n k) outputs y1 (n k). This sequence now excites S2 . By time-invariance of S2 , we get that y1 (n k) outputs y2 (n k). It is then clear that the cascade is a time-invariant system. 5.5 PARALLEL CASCADE OF LTI SYSTEMS Assume now that the systems S1 and S2 are connected in parallel, having the same input sequence x(n) while their output sequences are added together to yield y (n), as illustrated in the top part of Fig. 5.3. The combined system, say S , whose input is x(n) and output is y (n) is also LTI. Moreover, its impulse response sequence h(n) is given by h(n) = h1 (n) + h2 (n) (5.14) Proof: The proof is similar to the case of a series cascade and is left as an exercise see the bottom part of Fig. 5.3. S x(n) S1 y (n) + S2 (n) S1 h1 ( n ) + h1 (n) + h2 (n) S2 h2 (n) FIGURE 5.3 Parallel connection of two systems. The input to both systems is x(n) and the output of the cascade is y (n). 115 5.6 FIR AND IIR SYSTEMS SECTION 5.6 There is a useful characterization of systems in terms of the length of their impulse response sequences. Systems can be classied into nite-impulse response (FIR) systems or innite-impulse response (IIR) systems. In the FIR case, the impulse response sequence has a nite duration (and, therefore, the number of nonzero samples is nite). In the IIR case, the impulse response sequence has innite duration. Example 5.8 (FIR and IIR) Consider, for example, the systems {y (n) = x(n) + x(n 1)} and {y (n) = y (n 1) + x(n), relaxed} Both systems are linear and time-invariant. The impulse response sequence of either system can be determined by inspection. For the rst system we have h(n) = (n) + (n 1) (rst system) which has nite duration. Therefore, the rst system corresponds to an FIR system. On the other hand, the impulse response sequence for the second system is the step sequence h(n) = u(n) (second system) which has innite duration. Therefore, the second system corresponds to an IIR system. Moving-Average (MA) Systems An FIR LTI system is also called a Moving-Average (MA) system for the following reason. Let h(n) denote the impulse-response sequence of an FIR LTI system. Given knowledge of h(n) alone, we can determine a difference equation that describes the input-output mapping of the system. Consider, for example, the case h(n) = 2 (n) (n 1) + 3 (n 2) (5.15) This is a sequence of duration 3. The response y (n) of the corresponding LTI system for any input sequence x(n) is given by y (n) = k= = k= h(k )x(n k ) [2 (k ) (k 1) + 3 (k 2)] x(n k ) = 2x(n) x(n 1) + 3x(n 2) (5.16) This result provides a mathematical description for the input-output relation of the FIR LTI system whose impulse response sequence is given by (5.15). The relation shows that the output at time n is obtained by linearly combining the present input sample, x(n), and two previous input samples, {x(n 1), x(n 2)}. Such linear combinations of a nite number of present and past input samples are called moving-average (MA) representations. We thus say that an FIR LTI system admits a MA representation; the coefcients of the linear combination are the samples of the impulse-response sequence. A moving-average or FIR FIR AND IIR SYSTEMS 116 CHAPTER 5 IMPULSE RESPONSE SEQUENCE system is also called a tapped-delay-line system. This is because, as shown by the example (5.16), FIR systems can be implemented by using a nite number of delays and linear combiners (a collection of multipliers by constants and adders) see Fig. 5.4. x ( n) x(n 1) z 1 2 x( n 2 ) z 1 1 3 + + y ( n) FIGURE 5.4 A tapped-delay-line implementation of the FIR system (5.16). Auto-Regressive Moving-Average (ARMA) Systems The above example shows that for FIR LTI systems, knowledge of the impulse-response sequence can be used to determine a mathematical input-output relation for the system. The same argument, however, cannot be used for IIR LTI systems since y (n) will then be expressed in terms of an innite number of present and past input samples (because h(n) has innite duration in this case). Nevertheless, we shall see later in the book (see Sec. 11.4) that by using transform techniques, it will be possible to determine compact mathematical input-output relations for IIR LTI systems as well from knowledge of their impulse-response sequences. Since the output of an IIR LTI system at time n is a function of an innite number of present and past input samples, it appears then that the implementation of such systems would require an innite number of delays. It turns out that for the case of IIR LTI systems that are described by constant-coefcient difference equations, an implementation with a nite number of delays is possible by using the block diagram technique of Sec. 4.10. Specically, such systems are described by difference equations of the form M y (n) = k =1 N ak y (n k ) + k =0 bk x(n k ) ( 5 .1 7 ) for some coefcients {ak , bk }. It is seen that the current output sample is not only a function of current and past input samples (as in the FIR case) but also of past output samples (compare with (5.16)). Such representations are called auto-regressive movingaverage (ARMA) representations. If y (n) were only dependent on past output samples and the present input sample, say, M y (n) = k =1 ak y (n k ) + b0 x(n) ( 5 .1 8 ) then the representation is said to be of the auto-regressive (AR) type. Such recursive or ARMA systems can be implemented with a nite number of delays by employing delayed versions of the output sequence. 117 SECTION 5.7 Example 5.9 (Implementation of an IIR system) INVERSE PROBLEM Consider the difference equation y (n) = y (n 1) + x(n 1) 2x(n) which was studied earlier in Example 4.15. In that example, we explained how to arrive at the two different implementations shown in Fig. 5.5. One implementation employs two delays, while the other implementation employs one delay. An implementation with the smallest number of delays is called minimal. x ( n) 2 y ( n) + + z 1 z 1 2 x ( n) + z 1 + y ( n) FIGURE 5.5 Two block diagram representations for the class of ARMA systems {y (n) = y (n 1) + x(n 1) 2x(n)}. 5.7 INVERSE PROBLEM We have seen that the impulse-response sequence of an LTI system is sufcient to fully characterize the response of the system to any input sequence via the convolution sum. What about the converse statement? Given any nonzero input-output pair {x(n), y (n)}, can we recover the impulse response sequence of the system? The answer is positive. We shall describe several different ways to solve this problem in this book. Among them we list the following: 1. Using transform techniques. This method will be described in subsequent chapters (see, for example, Sec. 11.4). 2. Invoking linearity and time-invariance. This method is useful in some special cases. For example, assume that we know that the step response, i.e., the response to x(n) = u(n) 118 of an LTI system is CHAPTER 5 IMPULSE RESPONSE SEQUENCE y (n) = (0.5)n u(n 1) Can we determine its impulse response? To do so, we proceed as follows. Note that the unit-sample sequence is related to the step sequence via the relation: (n) = u(n) u(n 1) This means that we can regard (n) as a linear combination of u(n) and a shifted version of u(n). Now, by linearity and time-invariance, the response of the system to (n) should be the same linear combination of the corresponding output sequences, so that h(n) = y (n) y (n 1) and we arrive at h(n) = (0.5)n u(n 1) (0.5)n1 u(n 2) 3. Solving a triangular linear system of equations. We start from the convolution sum y (n) = k= x(k )h(n k ) and observe that it leads to a linear equation between the observations {y (n)} and the input samples {x(n)}. To illustrate this fact, let us consider the case of a causal LTI system for which h(n) = 0 for n < 0 and, hence, n y (n) = k= x(k )h(n k ) We also assume that the input is a causal sequence, i.e., x(n) = 0 for n < 0, so that n n y (n) = k=0 x(k )h(n k ) = k=0 h(k )x(n k ) It follows that the output is a causal sequence as well (y (n) = 0 for n < 0). Expanding the convolution sum for each value of n, we nd that the samples of the sequences {y (), x(), h()} are related via the triangular system of equations: y (0) y (1) y (2) y (3) . . . = x(0) x(1) x(2) x(3) . . . x(0) x(1) x(0) x(2) x(1) x(0) .. . h(0) h(1) h(2) h(3) . . . The entries {h(n)} can now be determined by solving this linear system of equations by back-substitution. Assume, for instance, that x(0) is nonzero, then 1 y (0) x(0) 1 h(1) = [y (1) x(1)h(0)] x(0) 1 h(2) = [y (2) x(2)h(0) x(1)h(1)] x(0) . .=. . . . h(0) = Note the following facts: (a) If x(0) = 0 then we must have y (0) = 0. This is because we are dealing with a causal linear system and, hence, the output remains zero as long as there is no excitation. (b) Accordingly, when x(0) = 0 we cannot recover h(0) from the rst equation. We would recover it from the other equations. 5.8 APPLICATIONS In this section, we illustrate applications of some of the concepts covered in the chapter in the context of some practical problems. 5.8.1 Multipath Channels In the wireless communications application of Sec. 4.11 we provided one example of a multipath channel, which was described by the difference equation y (n) = 1 1 5 x(n 2) + x(n 3) + x(n 5) 6 4 8 (5.19) The equation describes a causal LTI system. To determine its impulse response sequence, we simply set x(n) = (n) and y (n) = h(n) and use the difference equation to conclude that 1 1 5 (5.20) h(n) = (n 2) + (n 3) + (n 5) 6 4 8 In other words, in this case, the impulse response sequence consists of three unit-sample sequences: one is located at n = 2 and has amplitude 5/6, another is located at n = 3 and has amplitude 1/4, and a third is located at n = 5 and has amplitude 1/8. We say that the channel exhibits three multipath components. Assume now that the signal that is transmitted over the multipath channel has the form x(n) = (0.5)n u(n). We can use the above expression for h(n) to determine what the corresponding received sequence will be. Using the fact that the channel is LTI we can 119 SECTION 5.8 APPLICATIONS 120 write CHAPTER 5 y (n) = = = x(n) h(n) n 1 1 1 5 u(n) (n 2) + (n 3) + (n 5) 2 6 4 8 n2 1 2 5 6 u(n 2) + 1 4 1 2 n3 u(n 3) + 1 8 1 2 n5 u(n 5) where we are using the following useful property about convolving sequences with the unit-sample sequence: z (n) (n no ) = z (n no ) (5.21) for any sequence z (n). That is, convolving a sequence z (n) with a unit-sample sequence that is located at n = no simply shifts z (n) by no . This property can be easily established from the denition of the convolution sum: z (n) (n no ) = = k= z (k ) (n no k ) z (n no ) Returning to the above expression for y (n) we can group terms as follows: y (n) = 5 2 1 28 (n 2) + (n 3) + (n 4) + 6 3 3 3 1 2 n u(n 5) Impulse response sequence, h(n) 1 h(n) 0.8 0.6 0.4 0.2 0 0 5 10 n Output sequence, y(n) 15 20 0 5 10 n 15 20 1 0.8 y(n) IMPULSE RESPONSE SEQUENCE 0.6 0.4 0.2 0 FIGURE 5.6 Plot of the impulse response sequence (top) and the output sequence (bottom) in response to x(n) = (0.5)n u(n) over the rst 20 samples. Figure 5.6 plots the rst 20 samples of h(n) and the output sequence y (n) computed above in response to the input sequence, x(n) = (0.5)n u(n). It is not uncommon to illustrate the plots of discrete-time sequences by connecting the dots of the stem plot with a continuous line, as we illustrate in Fig. 5.7. This second type of illustration is useful for better visualization of the behavior of the sequence, especially when the number of samples is large. We shall employ both types of plots in our presentation. Impulse response sequence, h(n) 1 h(n) 0.8 0.6 0.4 0.2 0 0 5 0 10 15 n Output response sequence, y(n) 5 20 1 y(n) 0.8 0.6 0.4 0.2 0 10 n 15 20 FIGURE 5.7 An alternative plot representation of discrete-time sequences. The gure plots the same impulse response sequence (top) and output sequence (bottom) that are shown in Fig. 5.6, except that now the stems are connected by a continuous line running through the ends of the sample values. Practice Questions: 1. Plot the impulse response sequence of the multipath channel. 2. What are the energy and average power of the impulse response sequence? 3. Determine the response of the channel to the input sequence x(n) = u(n) by convolving x(n) and h(n). Plot the samples of y (n) over the interval 0 n 8. 4. Is the multipath channel BIBO stable? 5. Is the multipath channel MA, AR, or ARMA? Is the channel FIR or IIR? 5.8.2 Financial Growth Model In Sec. 4.11 we studied the problem of a nancial account that grows at the annual return rate of % starting from an initial deposit of D dollars. We considered a general scenario where, in addition to the initial deposit, the client may consider making additional deposits (or withdrawals) at other time instants. In this case, the evolution of the funds in the account are governed by recursion (4.14), namely, y (n) = 1 + y (n 1) + x(n), 100 y (1) = 0 (5.22) where x(0) = D corresponds to the initial deposit. This is a constant-coefcient difference equation and it represents a causal LTI system with input sequence x(n) and output sequence y (n). 121 SECTION 5.8 APPLICATIONS 122 CHAPTER 5 IMPULSE RESPONSE SEQUENCE Let us determine the impulse response sequence of system (5.22). To do so, we set x(n) = (n) and y (n) = h(n) and use the difference equation to write h(n) = 1 + h(n 1) + (n), 100 h(1) = 0 (5.23) By iterating the recursion, we are able in this case to nd a closed-form expression for h(n). First note from the recursion that h(n) = 0 for all n < 0; this result is consistent with the fact that we are dealing with a causal LTI system, and the impulse response sequences of such systems must be causal sequences. Moreover, for n 0, we obtain from recursion (5.23) the following sequence of results: h(0) = 1 h(0) = 100 h(1) = 1+ 100 1+ h(2) = 100 h(1) = 1+ h(2) = h(3) = . . . = 100 1+ 100 1+ 100 1+ 2 3 . . . so that h(n) = 1 + 100 n u(n) (5.24) Let us use this result to examine the case when the client makes regular annual deposits of d dollars from year one onwards. That is, we now wish to determine the response of the LTI system (5.22) to the input sequence x(n) = D (n) + d u(n 1) We solved this problem earlier in Sec. 4.11 by iterating (5.22). Here, we address the same problem by appealing instead to the convolution result (5.7), i.e., by determining the convolution sum of x(n) with h(n). First, let = 1+ 100 (5.25) Now since the system is causal and the input sequence, x(n), is a causal sequence, we can use (5.11) to write n y (n) = k=0 n = h(k )x(n k ) k u(k ) [D (n k ) + d u(n k 1)] k=0 n = k=0 n1 k D (n k ) + k=0 k d = n D + 1 + + 2 + . . . + n1 d Using the result of Example 2.11 for the sum of the rst n terms of a geometric series, we get 1 n d y (n) = n D + 1 Substituting by its value (5.25) in terms of , we arrive at the same result (4.16), namely, 123 SECTION 5.9 y (n) = 1 + 100 n D + 100 1+ 100 n PROBLEMS 1 d, n 0 (5.26) Figure 5.8 illustrates the evolution of the funds in the account assuming an initial deposit of US$100, an annual return rate of 5%, and regular annual deposits of US$8. Return rate =5%, initial deposit = US$100, regular annual deposit = US$8 400 350 y(n) 300 250 200 150 100 0 5 10 n (year) 15 20 FIGURE 5.8 Evolution of the amount of funds in the account assuming an initial deposit of US$100, an annual return rate of 5%, and regular annual deposits of US$8. Practice Questions: 1. Start with an initial deposit of D dollars at year n = 0 and make regular annual deposits of d dollars every other year, starting from year one. Assuming an annual return rate of %, use the convolution sum method to determine an expression for the total funds, y (n), at year n. 2. Starting with an initial deposit of US$500 at year n = 0, and making regular annual deposits of US$20 every other year starting from year one, how much funds will be available at the start of year n = 30 assuming an annual return rate of 2%. 3. Start with an initial deposit of D dollars at year n = 0 and assume an annual return rate of %. Assume further that starting from year one onwards, the client makes regular deposits of d dollars during odd years and regular withdrawals of w dollars during even years. Use the convolution sum method to determine an expression for the total funds, y (n), at year n. 4. Starting with an initial deposit of US$500 at year n = 0, and making regular deposits of US$20 every odd year and regular withdrawals of US$10 every even year, how much funds will be available at the start of year n = 30 assuming an annual return rate of 2%. 5.9 PROBLEMS Problem 5.1 Find the impulse response sequences of the following systems: 1 (a) The relaxed system y (n) = 3 y (n 1) + x(n + 1). 1 (b) The system y (n) = 3 y (n 1) + x(n + 1), y (1) = 1 . 124 CHAPTER 5 IMPULSE RESPONSE SEQUENCE (c) The relaxed system y (n) = 1 y (n 1) + x2 (n + 1). 3 Which system is LTI? Problem 5.2 Find the impulse response sequences of the following systems: 1 (a) The relaxed system y (n) = 4 y (n 1) + x(n 1). 1 (b) The system y (n) = 4 y (n 1) + x(n 1), y (1) = 1 . 1 (c) The relaxed system y (n) = 4 y (n 1) + x2 (n 1). Which system is LTI? Problem 5.3 Answer True or False. (a) The series cascade of two causal LTI systems is causal. (b) The series cascade of two stable LTI systems is stable. (c) The parallel cascade of two causal LTI systems is causal. (d) The parallel cascade of two stable LTI systems is stable. Problem 5.4 Answer True or False. (a) The series cascade of two FIR LTI systems is FIR. (b) The parallel cascade of two IIR LTI system is IIR. (c) An FIR LTI system is always BIBO stable. (d) An IIR LTI system is always causal. Problem 5.5 Answer True or False. (a) If the input sequence to an LTI system is an even sequence, then the corresponding output sequence is also even. (b) If the input sequence to an LTI system is an odd sequence, then the corresponding output sequence is also odd. (c) If the output sequence of an LTI system is an odd sequence, then the corresponding input sequence is odd. Problem 5.6 Answer True or False. (a) If both the input sequence to an LTI system and its impulse response sequence are odd sequences, then the output sequence is also odd. (b) If both the input sequence to an LTI system and its impulse response sequence are even sequences, then the output sequence is also even. (c) If the input sequence to an LTI system is odd, and its impulse response sequence is even, then then the output sequence is odd. Problem 5.7 Classify each of the following LTI systems as MA, AR, or ARMA. (a) y (n) = 1 x(n) + 1 x(n 1). 2 3 1 (b) The relaxed system y (n) = 2 y (n 2) + x(n 1). (c) The relaxed system y (n) = 1 y (n 2) + x(n). 2 (d) h(n) = 1 n 2 u(n). Problem 5.8 Classify each of the following LTI systems as MA, AR, or ARMA. 1 (a) The relaxed system y (n) = 1 y (n 1) + 3 y (n 3) + x(n) 1 x(n 1). 2 2 1 (b) The relaxed system y (n) = 2 y (n 3) + x(n 2). (c) h(n) = (n) + 1 (n 1). 2 (d) h(n) = 1 n1 2 u(n 2). Problem 5.9 Which of the following LTI systems are FIR or IIR? (a) h(n) = u(n) u(n 10). (b) h(n) = 1 n 2 PROBLEMS u(n 3). 1 (c) The relaxed system y (n) = 2 y (n 1) + x(n). (d) The relaxed system y (n) = x(n) + 1 [x(n 1) + x(n 2)]. 2 (e) The series cascade of systems (a) and (b). (f) The series cascade of systems (c) and (d). (g) The parallel cascade of systems (b) and (c). Problem 5.10 Which of the following LTI systems are FIR or IIR? (a) h(n) = u(n) u(n + 5). (b) h(n) = 1 n+3 3 u(n + 1). (c) The relaxed system y (n) = 1 y (n 3) + x(n 1). 2 (d) The relaxed system y (n) = x(n) x(n 3). (e) The series cascade of systems (a) and (b). (f) The series cascade of systems (c) and (d). (g) The parallel cascade of systems (b) and (c). Problem 5.11 Which of the following LTI systems are causal? (a) h(n) = (b) h(n) = 1 n3 2 1 n 3 u(n 1). u(n + 1) + 1 n 2 u(n + 1). Problem 5.12 Which of the following LTI systems are causal? (a) h(n) = (b) h(n) = 1 n 2 1 n 3 u(n + 2). u(n + 1). Problem 5.13 Consider an LTI system with impulse response sequence: h(n) = 2 (n) (n 1) + (n 2) (a) Implement it as the parallel cascade of two LTI systems. (b) Implement it as the series cascade of two LTI systems. Problem 5.14 Consider an LTI system with impulse response sequence: h(n) = 125 SECTION 5.9 1 15 1 (n) + (n 1) (n 2) 2 8 2 (a) Implement it as the parallel cascade of two LTI systems. (b) Implement it as the series cascade of two LTI systems. Problem 5.15 A system is described by the input-output relation y (n) = x(3n 1) cos n u(n + 5) 3 Is the system linear? causal? time-invariant? BIBO stable? Problem 5.16 A relaxed system is described by the input-output relation: y (n) = y 2 (n 1) + 2(1)n x(2n) Is the system linear? time-invariant? causal? BIBO stable? 126 CHAPTER 5 IMPULSE RESPONSE SEQUENCE Problem 5.17 If h(n) is the impulse response sequence of an LTI system, what would the response of the system be to the input x(n) = (2n 4)? Problem 5.18 If h(n) is the impulse response sequence of an LTI system, what would the response of the system be to the input x(n) = (n + 1) + 3 (3n + 6)? Problem 5.19 The response of an LTI system to the input sequence x(n) = u(n) is y (n) = 1 n u(n). Is this a BIBO stable system? Is it a causal system? Is it an IIR system? Compute its 2 response to the sequence 1/3 n = 1 1 n=0 x(n) = 1/2 n=1 0 otherwise without using convolution. Problem 5.20 The response of an LTI system to the input sequence x(n) = u(n + 2) is y (n) = u(n). Is this a BIBO stable system? Is it a causal system? Is it an IIR system? Compute its 3 response to the sequence 1/4 n = 2 0 n=0 x(n) = 1/4 n=2 0 otherwise 1 n1 without using convolution. Problem 5.21 The step response of an LTI system S is y (n) = (1)n u(n). A cascade connection consists of S followed by the system y (n) = sign[x(n)], where sign[x(n)] = +1 1 if x(n) 0 otherwise Find the impulse response of the cascade. Problem 5.22 The impulse response of an LTI system S is h(n) = (0.2)n1 u(n 1). A cascade connection consists of the system y (n) = sign[x(n)] followed by S . What is the response of the cascade to the input x(n) = 0.5 , 2.2, 3.1, 4 ? Problem 5.23 Let x(n) = (n + 2) (a) Plot the sequence h(n) = 1 (n) + 2 (n 2) 2 1 1 x(n 1) + (n 1) + u(n 2) 2 4 (b) Can h(n) be the impulse response of a BIBO stable LTI system? (c) Can h(n 4) be the impulse response of a causal LTI system? (d) Dene the sequence h1 (n) = 1 3 n1 h(n)u(n) If h1 (n) were the impulse response sequence of an LTI system, will the system be BIBO stable? Problem 5.24 The samples of a sequence x(n) are zero except at the time instants shown Fig. 5.9. The amplitudes of the non-zero samples are either 1, 2, or 3. 127 (a) Plot the sequence 3 1 h(n) = x(n + 2) (n) + u(n 3) 2 2 SECTION 5.9 PROBLEMS (b) Can h(n) be the impulse response of a BIBO stable LTI system? (c) Can h(n 3) be the impulse response of a causal LTI system? (d) Dene the sequence h1 (n) = 1 2 n h(n)u(n) If h1 (n) were the impulse response sequence of an LTI system, will the system be BIBO stable? x(n) 3 2 1 2 1 0 1 2 3 4 5 6 n FIGURE 5.9 Sequence x(n) dened in Prob. 5.24. Problem 5.25 The response of a causal LTI system to the input sequence x(n) = is the sequence y (n) = 1 , 1, 2 1/2 , 2, 3 , where the boxed entries occur at the origin of time. Deter- mine its impulse response sequence, h(n). Problem 5.26 The response of an LTI system to x(n) = u(n 2) is y (n) = Find its impulse response sequence. Is this a BIBO stable system? Is it causal? 1 n2 2 u(n 4). Problem 5.27 The response of an LTI system to x(n) = u(n) is y (n) = (n + 1)u(n). Find h(n) by solving a triangular system of equations. Is the system BIBO stable? Problem 5.28 The response of an LTI system to x(n) = 2u(n 1) is y (n) = Find h(n) by solving a triangular system of equations. Is the system BIBO stable? 1 n 2 u(n 2). Problem 5.29 Find a difference equation to describe the input-output relation of the LTI system whose impulse response sequence is given by h(n) = (n 1) + 1 1 (n 2) (n 3) 3 4 (a) What is the response of the system to x(n) = ej 3 n u(n)? (a) What is the response of the system to x(n) = 2 cos 6 n+ 4 u(n)? Problem 5.30 Find a difference equation to describe the input-output relation of the LTI system whose impulse response sequence is given by h(n) = (n 2) + 1 (n 4) 2 128 CHAPTER 5 IMPULSE RESPONSE SEQUENCE (a) What is the response of the system to x(n) = ej 4 (n1) u(n)? (a) What is the response of the system to x(n) = sin 4 n 6 u(n)? Problem 5.31 What is the impulse response sequence of the overall LTI system whose input sequence is x(n) and output sequence is y (n) in Fig. 5.10. The box in the top branch denotes an LTI system with impulse response sequence equal to (0.5)n u(n). x(n) h ( n) = + 1n 2 y (n) u ( n) FIGURE 5.10 An LTI system involving a feedback connection for Prob. 5.31. Problem 5.32 What is the impulse response sequence of the overall LTI system whose input sequence is x(n) and output sequence is y (n) in Fig. 5.11. The box in the top branch denotes an LTI system with impulse response sequence equal to (0.5)n u(n). x(n) + y (n) h ( n) = 1n 2 u ( n) FIGURE 5.11 An LTI system involving a feedback connection for Prob. 5.32. Problem 5.33 When the sequence x(n) = { 0 , 1, 1} is applied to a causal LTI system, the odd part of the resulting output sequence is known to be: yo (n) = (1/4)n1 u(n 2) + (1/3)n u(n 1), n0 (a) Find the impulse response sequence of the system. (b) Find the energy of the impulse response sequence. (c) Find the power of the impulse response sequence. Problem 5.34 The even part of the impulse response sequence of a causal LTI system is given by he (n) = 1 2 n u(n 1) 1 4 n2 u(n) 129 (a) What is the energy of the impulse response sequence, h(n)? SECTION 5.9 (b) Find the unit-step response of the system. PROBLEMS (c) Find a constant-coefcient difference equation describing the system. (d) Draw a block diagram representation for the system. Problem 5.35 What is the impulse response sequence of the overall LTI system whose input sequence is x(n) and output sequence is y (n) in Fig. 5.12. The boxes denote LTI subsystems with impulse response sequences h1 (n) = n 1 2 u(n 1), x(n) n 1 3 h2 (n) = u(n), h1 (n ) h3 (n) = h1 (n) = 4u(n 4) y (n) h 2 (n ) h 3 (n ) + + FIGURE 5.12 An LTI system involving parallel and series cascades for Prob. 5.35. Problem 5.36 What is the impulse response sequence of the overall LTI system whose input sequence is x(n) and output sequence is y (n) in Fig. 5.13. The boxes denote LTI subsystems with impulse response sequences h1 (n) = 1 2 x(n) n u(n 1), h1 (n ) h2 (n) = + n 1 3 u(n), + h3 (n) = h1 (n) = 4u(n 4) h 2 (n ) y (n) h 3 (n ) FIGURE 5.13 An LTI system involving parallel and series cascades for Prob. 5.36. Problem 5.37 An LTI system is excited by a periodic sequence x(n) with period N . Show that the output sequence is also periodic with the same period. 130 CHAPTER 5 IMPULSE RESPONSE SEQUENCE Problem 5.38 An LTI system is excited by the exponential sequence x(n) = ejo n . Show that the output sequence is also an exponential sequence with the same angular frequency. Problem 5.39 Consider the relaxed system y (n) = y (n 2) + bx(n) + x(n 1) for some unknown nite positive number b. A student claims that, regardless of the value of b, the impulse response sequence has to be a power sequence. Do you agree? Prove or disprove the students statement. The student even claims that knowledge of the average power of h(n) is sufcient to identify b. Do you agree? If so, what would the value of b be if the average power were 3? If the difference equation were instead y (n) = 1 y (n 2) + bx(n) + x(n 1) 2 how would your answers change? Problem 5.40 The input-output relations of two systems S1 and S2 are shown in Fig. 5.14. System S1 is called an interpolator or upsampler, and system S2 is called a decimator or downsampler. (a) Verify that S1 and S2 are time-variant systems. (b) Show that their series cascade is a time-invariant system. Express y (n) in terms of x(n). (c) What if the order of the systems is reversed in the series cascade? Will the cascade continue to be a time-invariant system? x(n) S1 x( n ) 3 0 S2 x(3n) x(n) x ( n) S1 S2 n = 0, 3, 6, . . . otherwise y (n ) FIGURE 5.14 An upsampler (top plot) is cascaded in series with a downsampler (middle plot) to obtain the cascade shown in the bottom plot for Prob. 5.40. CHAPTER 6 Linear Convolution T he discussion in the previous chapter established that the response of an LTI system with impulse response sequence h(n) to any input sequence x(n) is given by the convolution sum y (n) = x(n) h(n) = k= x(k )h(n k ) (6.1) In this chapter we study more closely such convolution sums and establish several of their properties. We also provide physical interpretations for the derived properties. 6.1 PROPERTIES OF THE CONVOLUTION SUM The convolution sum exhibits several useful properties, which can be used to facilitate the computation of the convolution, as well as to establish additional properties of LTI systems. In the discussion that follows we let x(n) and h(n) denote two arbitrary sequences. When more than two sequences are needed, we will use the notation x1 (n), x2 (n), h1 (n), h2 (n), with subscripts to refer to multiple sequences. 6.1.1 Commutativity It holds that x(n) h(n) = h(n) x(n) That is, (6.2) k= x(k )h(n k ) = k= h(k )x(n k ) (6.3) In other words, the order by which the sequences are convolved does not matter. Proof: Introduce the new variable = n k. Then k= x(k)h(n k) = = x(n )h() Rename as k again to obtain = x(n )h() = k= h(k)x(n k) 131 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 132 CHAPTER 6 LINEAR CONVOLUTION Physical interpretation. We can view x(n) and h(n) as the impulse-response sequences of two LTI systems. These two systems can be cascaded in series in one of two ways, as shown in Fig. 6.1. In one case, the system represented by h(n) comes rst and in the second case, the system represented by x(n) comes rst. (n) (n) x(n) h (n ) h (n ) x(n) y1 (n) y2 (n) FIGURE 6.1 Two possibilities for the series cascade of the systems with impulse response sequences h(n) and x(n). If we feed (n) into the rst cascade (top of Fig. 6.1), then the output of the system represented by x(n) would be the sequence x(n) itself. With x(n) feeding into the second system represented by h(n), the output sequence will be given by the convolution sum y1 (n) = x(n) h(n) Likewise, if we feed (n) into the second cascade (bottom of Fig. 6.1), the response of this second combination will be y2 (n) = h(n) x(n) The commutativity property therefore states that both output sequences must agree, namely, y1 (n) = y2 (n) It follows that we can always switch the order of LTI systems in a series cascade. 6.1.2 Distributivity For arbitrary sequences {x(n), x1 (n), x2 (n), h1 (n), h2 (n)}, the following relations hold: x(n) [h1 (n) + h2 (n)] = x(n) h1 (n) + x(n) h2 (n) ( 6 .4 ) [x1 (n) + x2 (n)] h(n) = x1 (n) h(n) + x2 (n) h(n) ( 6 .5 ) an d Proof: We prove the rst relation. An identical argument applies to the second relation. Using the denition of convolution sum we have x(n) [h1 (n) + h2 (n)] = k = = k = = PROPERTIES OF THE CONVOLUTION S UM x(k)[h1 (n k) + h2 (n k)] x(k)h1 (n k) + k = x(k)h2 (n k) x(n) h1 (n) + x(n) h2 (n) Physical interpretation. Consider two LTI systems with impulse responses h1 (n) and h2 (n) and assume they are connected in parallel, as shown in Fig. 6.2. x(n) h1 ( n ) y (n) h2 (n) FIGURE 6.2 convolution. Parallel connection of two LTI systems to illustrate the distributivity property of Let x(n) be the input sequence that is applied to the cascade connection. We already know from Sec. 5.5 that the impulse response sequence of the parallel connection is h1 (n) + h2 (n). Therefore, the output of the system will be x(n) [h1 (n) + h2 (n)]. On the other hand, the output of h1 (n) is x(n) h1 (n) and the output of h2 (n) is x(n) h2 (n). Hence, x(n) [h1 (n) + h2 (n)] = x(n) h1 (n) + x(n) h2 (n) The distributivity property therefore states that the parallel connection of two LTI systems can be replaced by a single LTI system whose impulse response sequence is the sum of the individual impulse response sequences. 6.1.3 Associativity For arbitrary sequences {h1 (n), h2 (n), h3 (n)} it holds that h1 (n) [h2 (n) h3 (n)] = [h1 (n) h2 (n)] h3 (n) = [h1 (n) h3 (n)] h2 (n) Proof: Let z (n) denote the result of the convolution h1 (n) h2 (n). That is, z (n) = k = h1 (k)h2 (n k) 133 SECTION 6.1 ( 6 .6 ) 134 Then, using the denition of convolution sum, CHAPTER 6 [h1 (n) h2 (n)] h3 (n) LINEAR CONVOLUTION = z (n) h3 (n) = = z ()h3 (n ) = k= k= = k= = = = = = h1 (k) k= h1 (k)h2 ( k) h3 (n ) h1 (k)h2 ( k)h3 (n ) h1 (k)h2 ( k)h3 (n ) = h2 ( k)h3 (n ) Introduce the variable m = k and let w(n) = h2 (n) h3 (n). That is, w(n) = k= h2 (k)h3 (n k) Then we can write h1 (k) k= = h2 ( k)h3 (n ) = i= k= = k= h1 (k) h2 (m)h3 (n k m) h1 (k)w(n k) = h1 (n) w(n) = h1 (n) [h2 (n) h3 (n)] We therefore established that h1 (n) [h2 (n) h3 (n)] = [h1 (n) h2 (n)] h3 (n) A similar argument can be used to establish equality with [h1 (n) h3 (n)] h2 (n). Physical interpretation. Consider three LTI systems with impulse response sequences {h1 (n), h2 (n), h3 (n)} and assume they are connected in series, as illustrated in Fig. 6.3. h 2 (n ) h 3 (n ) (n) FIGURE 6.3 convolution. h1 ( n ) h2 (n) h3 (n) y (n) Series connection of three LTI systems to illustrate the associativity property of Let (n) be the input sequence to this cascade connection. We already know from Sec. 5.4 that the impulse response sequence of the series cascade of the last two systems is h2 (n) h3 (n). Now the output of the system h1 (n), when excited by an impulse sequence, is h1 (n). The output of the combined system will therefore be h1 (n) [h2 (n) h3 (n)]. In a similar manner, if we combine the rst two systems together we get an LTI system with impulse response sequence h1 (n) h2 (n). When this sequence is applied to the system h3 (n), the resulting output sequence will be [h1 (n) h2 (n)] h3 (n). Therefore, h1 (n) [h2 (n) h3 (n)] = h1 (n) h2 (n)] h3 (n) . Similar arguments lead to the other equality. The associativity property therefore states that in a series cascade of LTI systems, we can combine any pair of systems together. For example, we can combine {h1 (n), h2 (n)} rst, or {h2 (n), h3 (n)} rst, or even {h1 (n), h3 (n)} rst, and then combine the result with the remaining system. If we group the commutativity and associativity properties together, then we conclude that in a series cascade of LTI systems, we can reorder the systems at will and the impulse response sequence of the combination will not change. 6.1.4 Convolution with the Unit-Sample Sequence For any sequence h(n), it holds that h(n) (n k ) = h(n k ) (6.7) That is, convolution with a unit-sample sequence always shifts the original sequence, h(n), to the location of the unit sample. Proof: Using the denition of the convolution sum we have h(n) (n k) = = h() (n k ) = h(n k) since the impulse sequence (n k ) is nonzero only at = n k. Physical interpretation. Consider an LTI system with impulse response sequence h(n). Its response to (n) is, obviously, h(n). This result can also be expressed by saying h(n) = (n) h(n) where on the left-hand side we have the output sequence (which in this case is h(n) itself), and on the right-hand side we have the convolution of the impulse response sequence and the input sequence (which in this case is (n)). Now, by the time-invariance of the LTI system, the response to (n k ) is equal to h(n k ). Therefore, it must hold that h(n k ) = (n k ) h(n) 6.2 EVALUATION OF THE CONVOLUTION SUM The convolution sum of two sequences can be evaluated in several ways. We describe two time-domain methods in this chapter. Other methods will be described in future chapters by relying on transform techniques. 135 SECTION 6.2 EVALUATION OF THE CONVOLUTION SUM 136 6.2.1 Analytical Method CHAPTER 6 LINEAR CONVOLUTION In this method, we simply employ the denition of the convolution sum of two sequences to arrive at the result analytically. Example 6.1 (Convolution of two sequences by analytical method) Consider the sequences h(n) = 0.5n1 u(n 2) and x(n) = u(n + 1). Then, by denition, their convolution can be found as follows: y (n) = k= = k= x(k)h(n k) u(k + 1) [0.5nk1 u(n k 2)] Now the step-sequence u(k + 1) is zero for k < 1, while the step-sequence u(n k 2) is zero for k > n 2. This means that the product that appears inside the summation symbol will be zero for all values of k in the interval k < 1 and k > n 2. Therefore, the limits of the summation should go from k = 1 up to k = n 2 and the expression for y (n) reduces to y (n) n2 = 0.5nk1 k = 1 Clearly, the summation will include nontrivial elements only for values of n such that n 2 1 or, equivalently, n 1. For n < 1, we get y (n) = 0 and for n 1 we have y (n) = = = = n2 0.5n 2k+1 k = 1 0.5n 1 + 2 + 22 + 23 + . . . + 2n1 1 2n 0.5n 12 n 1 1 2 In summary, we nd that y (n) = 1 1 2 n u(n 1), for all n where we added the step-sequence u(n 1) to enforce y (n) = 0 for n < 1. 6.2.2 Graphical Method In this method, we evaluate the convolution sum x(n) h(n) graphically by applying the steps outlined below; these steps are illustrated in the numerical example that follows: (a) First, we plot the sequences h(k ) k and x(k ) k . Note that we are denoting the independent variable by k now. Therefore, the horizontal axis will be the k axis. (b) Then we plot h(k ). In other words, we ip the sequence h(k ) around the vertical axis to obtain h(k ). (c) We subsequently compute the sequence x(k )h(k ) by multiplying the sequences x(k ) and h(k ) sample-by-sample. We add the samples of the resulting sequence x(k )h(k ). The resulting value would be y (0), namely, the value of the convolution sum at time n = 0. (d) Next, we shift h(k ) by one time unit to the right in order to obtain h(1 k ). We again compute the product sequence x(k )h(1 k ) and add its sample values. This calculation provides y (1); the value of the convolution sum at time n = 1. (e) Likewise, we shift h(k ) by one time unit the the left to obtain h(1 k ). We compute the product sequence x(k )h(1 k ) and add its sample values. This calculation provides y (1); the value of the convolution sum at time n = 1 (f) We repeat the above procedure by shifting h(k ) further to the right and further to the left and computing the product sequences x(k )h(n k ) each time, for positive and negative n, and adding the resulting samples. This calculation provides the values of y (n) for the various n. Before illustrating the above procedure with an example, it is worth noting from the commutativity property of the convolution sum that, in the above graphical procedure, the roles of h(k ) and x(k ) can be interchanged: it is irrelevant whether we ip h(k ) and shift it or whether we ip x(k ) and shift it. Example 6.2 (Convolution of two sequences by graphical method) Let us evaluate the convolution of the following two sequences 2, 1 , 1, 2 0 , 1, 2 where we are using the box notation to indicate the location of the sample at time n = 0. The sequences are illustrated in Fig. 6.4. x(n ) h( n ) 2 1 FIGURE 6.4 1 2 1 1 2 n 1 2 n Two sequences x(n) and h(n) whose convolution we are evaluating graphically. The rst sequence has four samples with values x(1) = 2, x(0) = 1, x(1) = 1, x(2) = 2 and all other samples are zero. Likewise, the second sequence has three samples with values h(0) = 0, h(1) = 1, h(2) = 2 and all other samples are zero. We now follow the procedure outlined above in order to evaluate the convolution of both sequences by means of the graphical method. 1. We rst plot h(k) k and x(k) k. The result is shown in Fig. 6.5. 137 SECTION 6.2 EVALUATION OF THE CONVOLUTION S UM 138 h( k ) x( k ) CHAPTER 6 LINEAR CONVOLUTION 2 1 2 1 1 1 2 1 k 2 k FIGURE 6.5 Plots of x(k) and h(k) for Example 6.2. 2. We then ip h(k) around the vertical axis to obtain h(k), namely, h(k) = 2, 1 0 We further multiply the sequences x(k) and h(k) sample-by-sample. The result is shown in Fig. 6.6. Adding the terms of the product x(k)h(k) gives y (0) = 2. x(k)h(k) h( k ) 2 1 2 1 1 k 2 1 k 2 FIGURE 6.6 Plots of x(k)h(k) and h(k) for Example 6.2. 3. We now shift h(k) to the right by one unit of time and obtain h(1 k) = 2, 1 , 0 We multiply this sequence by x(k) to obtain x(k)h(1 k). The result is shown in Fig. 6.7. Adding the terms of the product x(k)h(1 k) gives y (1) = 3. x(k)h(1 k) h(1 k ) 2 1 2 1 1 k 1 1 k 4 FIGURE 6.7 Plots of x(k)h(1 k) and h(1 k) for Example 6.2. 139 4. We shift h(k) to the right by one more unit of time to obtain SECTION 6.2 2 , 1, 0 h(2 k) = We multiply this sequence by x(k) to obtain x(k)h(2 k). The result is shown in Fig. 6.8. Adding the terms of the product x(k)h(2 k) gives y (2) = 1. x(k)h(2 k) h( 2 k ) 2 2 1 1 1 k 1 2 k FIGURE 6.8 Plots of x(k)h(2 k) and h(1 k) for Example 6.2. 5. We shift h(k) to the right by three units of time and obtain 0 , 2, 1, 0 h(3 k) = We multiply this sequence by x(k) to obtain x(k)h(3 k). The result is shown in Fig. 6.9. Adding the terms of the product x(k)h(3 k) gives y (3) = 0. x(k)h(3 k) h( 3 k ) 2 2 1 1 2 1 k 2 k 2 FIGURE 6.9 Plots of x(k)h(3 k) and h(1 k) for Example 6.2. 6. We shift h(k) to the right by four units of time and obtain h(4 k) = 0 , 0, 2, 1, 0 We multiply this sequence by x(k) to obtain x(k)h(4 k). The result is shown in Fig. 6.10. Adding the terms of the product x(k)h(4 k) gives y (4) = 4. 7. Any further shifting to the right of the sequence h(k) gives a product x(k)h(n k) = 0 (for n > 4). Hence, y (n) = 0 for n > 4 8. We now shift h(k) to the left by one unit of time and obtain h(1 k) = 2, 1, 0, 0 However, the product x(k)h(1 k) evaluates to zero and, therefore, y (1) = 0 EVALUATION OF THE CONVOLUTION SUM 140 x(k)h(4 k) CHAPTER 6 LINEAR CONVOLUTION h (4 k ) 4 2 2 1 k 2 1 2 4 3 k FIGURE 6.10 Plots of x(k)h(4 k) and h(1 k) for Example 6.2. In fact, any further shifting to the left of h(k) gives y (n) = 0 for n < 0. 9. In conclusion we obtain y (n) = 2 , 3, 1, 0, 4 The result is illustrated in Fig. 6.11. x(n) h(n) 4 3 2 1 1 2 1 2 3 4 n 3 FIGURE 6.11 Plot of the sequence that results from the convolution x(n) h(n) for Example 6.2. 6.3 APPLICATIONS In this section, we illustrate applications of some of the concepts covered in the chapter in the context of some practical problems. 6.3.1 Echo Cancellation Consider two real-valued causal sequences, x(n) and y (n). Their correlation (also called cross-correlation) is denoted by rxy (n) and is dened as the sequence whose samples are computed as follows: rxy (n) = k= x(k )y (k n) (6.8) It is straightforward to verify that the sequence rxy (n) amounts to convolving x(n) with the time-reversed sequence, y (n). In this section, we are interested in causal sequences x(n) and y (n) of nite duration N each. This means that the nonzero samples of x(n) and y (n) are assumed to occur over the interval 0 n N 1. In this case, the denition of their cross-correlation sequence reduces to N 1 rxy (n) = k =n x(k )y (k n) (6.9) where the limits of the summation capture the nonzero samples of x(n) and y (n). Appealing to the graphical method for computing the convolution sum x(n) y (n), and using the fact that the samples of x(n) exist over 0 n N 1 and the samples of y (n) exist over (N 1) n 0, we can verify that the nonzero samples of rxy (n) will exist over the interval (N 1)1 n N 1 (see also Prob. 6.27): rxy (n) = x(n) y (n), (N 1) n N 1 (6.10) When x(n) and y (n) are the same sequence, their correlation is called the auto-correlation sequence of x(n) and is denoted by rx (n): rx (n) = x(n) x(n), (N 1) n N 1 (6.11) Observe in particular that the zeroth term of the auto-correlation sequence of x(n) coincides with the energy value of the sequence: N 1 rx (0) = Ex = k=0 |x(k )|2 (6.12) It can be further veried that the auto-correlation sequence, rx (n), is an even sequence and always assumes its peak value at the location n = 0 (see the top plot of Fig. 6.13 for an example): rx (n) = rx (n) and max |rx (n)| = rx (0) (6.13) n We now show how to employ the concepts of correlation and auto-correlation of sequences to solve an echo cancellation problem. Channel Probing or Training Thus, assume that a known sequence x(n) is transmitted over a channel whose scaling gain, , and delay, d, are unknown. The received signal at the other end of the channel is a combination of both x(n) and its delayed version, say, y (n) = x(n) + x(n d) (6.14) We say that the term x(n d) represents an echo of the original transmitted signal, x(n); it has undergone a delay of d samples and scaling by (usually, is smaller than one). The echo interferes with the transmitted signal, x(n), and the receiver ends up sensing a combination of both x(n) and x(n d) see Fig. 6.12. We select an integer N and assume it is large enough such that the nonzero samples of all three sequences {y (n), x(n), x(n d)} can be assumed to exist within the interval 0 n N 1. We collect N samples of x(n) and y (n). Now given knowledge of these N samples, we would like to use them to estimate and d. This set-up corresponds 141 SECTION 6.3 APPLICATIONS 142 Direct path: scaling = 1 delay = 0 CHAPTER 6 LINEAR CONVOLUTION Echo path: scaling = delay = d Received signal x(n) + x(n d) Source x ( n) FIGURE 6.12 The echo signal interferes with the transmitted signal, x(n). The receiver senses the combination y (n) = x(n) + x(n d). to a situation when we are probing the channel with a training sequence x(n) in order to estimate its gain and delay parameters. Using the various properties of the convolution sum operation that were established in this chapter we note that ry (n) = = y (n) y (n) [x(n) + x(n d)] [x(n) + x(n d)] so that ry (n) = (1 + 2 ) rx (n) + rx (n + d) + rx (n d) (6.15) where we used both the distributivity property (6.5) of the convolution sum, as well as property (6.7) pertaining to convolution with the unit-sample sequence. Indeed, note that x(n d) x(n) = = = = [ (n d) x(n)] x(n) (n d) [x(n) x(n)] (n d) rx (n) rx (n d) Likewise, x(n) x(n d) = = = = x(n) [x(n) (n + d)] [x(n) x(n)] (n + d) rx (n) (n + d) rx (n + d) and, similarly, x(n d) x(n d) = (n d) [x(n) x(n)] (n + d) = (n d) rx (n + d) = rx (n) It follows from the form of ry (n) in (6.15) that ry (n) has three peak values at the time instants n = 0, n = d, and n = d (see the bottom plot in Fig. 6.13 for an example). Therefore, the plot of ry (n) can be used to infer the value of d; it is the location of the second peak of ry (n): d = location of second peak of ry (n) (6.16) We can further evaluate the cross-correlation between the sequences x(n) and y (n) to nd rxy (n) = = x(n) y (n) x(n) [x(n) + x(n d)] That is, rxy (n) = rx (n) + rx (n + d) (6.17) With the value of already determined, we can use the above relation to estimate from = rxy (0) rx (0) rx (d) (6.18) This expression is in terms of the peaks values of rx (n) at n = 0 and n = d, and the peak value of rxy (n) at n = 0. Echo Cancellation The initial probing stage allows us to identify the channel over which the training signal, x(n), has been transmitted. With the channel parameters already identied, we can then switch to the normal mode of operation when the receiver does not know the signal that is being transmitted and would like to recover it. In other words, from knowledge of the received data and the channel, namely, {y (n), a, d}, we would now like to recover x(n). This operation amounts to using the channel parameters to clean the received sequence y (n) from the interference caused by the echo signal, x(n d), and to generate a clean version of x(n). The echo cancellation process can be achieved in the time-domain as follows. Since we are assuming that transmission starts at n = 0, then we know that x(n) is zero for n < 0. It follows that the rst d samples of x(n) and y (n) should coincide. In this way, we can recover x(n) over 0 n d 1 as follows: x(n) = y (n), 0nd1 (6.19) To recover the values of x(n) for the time instants larger than or equal to d, we simply note from (6.14) that x(n) = y (n) x(n d), n d (6.20) Figure 6.13 illustrates an example with N = 400, d = 100, and = 0.5. The gure shows the auto-correlations of two sequences x(n) and y (n), where x(n) has been generated randomly. The peaks of both auto-correlation sequences have been normalized to one in the plots for ease of display; their values are approximately rx (0) = 182.6 and ry (0) = 226.2. The locations of the three peaks in ry (n) are indicated by the circles around them. It is seen that the second peaks occur at locations n = 100, which allow us to identify d as 143 SECTION 6.3 APPLICATIONS LINEAR CONVOLUTION d = 100. The un-normalized values of rxy (0) and ry (d) are approximately rxy (0) = 181.6 and ry (d) = 2. Using (6.18) we get 181.6 182.6 = 0.5 2 as expected. Autocorrelation of x(n) 1 0.8 0.6 rx(n) CHAPTER 6 0.4 0.2 0 400 300 200 100 0 100 n Autocorrelation of y(n) 300 200 100 200 300 400 200 300 400 1 0.8 0.6 ry(n) 144 0.4 0.2 0 400 0 n 100 FIGURE 6.13 The top plot shows the auto-correlation of a randomly generated sequence of duration N = 200 samples. The bottom plot shows the auto-correlation of the received sequence y (n) assuming N = 400 and a channel with delay d = 100 and gain = 0.5. The peaks of both auto-correlation sequences are normalized to one in the plots. Practice Questions: 1. Show that for any sequence, x(n), its auto-correlation sequence, rx (n) is even and assumes its peak value at n = 0. 2. Using y (n) = x(n) + ax(n d), establish that the auto-correlation of y (n) has three peaks at n = 0, n = d, and n = d. 3. Assume x(n) = u(n) u(n 3), a = 0.5 and d = 5. Find the auto-correlation sequences of x(n) and y (n). Find also the cross- correlation sequence of x(n) and y (n). 4. How is the value of ry (0) in (6.15) related to ? 5. Assume y (n) = 2x(n 1) + x(n d). How would you estimate and d from knowledge of samples of {x(n), y (n)}? 6.3.2 Population Growth Management In Sec. 4.11 we studied the problem of population growth and introduced the Malthusian model (4.19), where the evolution of the population size was dictated by the birth (b%) and death (d%) rates in the population. We considered a general scenario where the dynamics of the population growth can be inuenced by adding or removing individuals at arbitrary time instants, and not only at the initial time instant. The addition and removal of individuals in a population is often the result of immigration and emigration acts. More generally, targeted population management techniques are used to manage population sizes in sheries and other animal groups. When management is desired, the evolution of the population size os governed by a recursion of the form (4.23), namely, y (n) = 1+ d b 100 100 y (n 1) + x(n), y (1) = 0 (6.21) where x(0) = Po corresponds to the initial population size, and the sequence x(n) represents the input to the system at the various time instants. The above constant-coefcient difference equation represents a causal LTI system with input sequence x(n) and output sequence y (n). Let us determine the impulse response sequence of system (6.21). To do so, we set x(n) = (n) and y (n) = h(n) and use the difference equation to write h(n) = 1+ d b 100 100 h(n 1) + (n), h(1) = 0 (6.22) By iterating the recursion, we are able in this case to nd a closed-form expression for h(n). First note from the recursion that h(n) = 0 for all n < 0; this result is consistent with the fact that we are dealing with a causal LTI system, and the impulse response sequences of such systems must be causal sequences. Moreover, for n 0, we obtain from recursion (6.22) the following sequence of results: h(0) = 1 h(1) = 1+ b d 100 100 h(0) = 1+ b d 100 100 h(2) = 1+ b d 100 100 h(1) = 1+ b d 100 100 . . . = 2 . . . so that h(n) = 1+ b d 100 100 n u(n) (6.23) Let us use this result to determine the response of the LTI system (6.21) to the case when, starting from year one, the user adds a individuals to the population every odd year and removes r individuals from the population every even year. The input sequence x(n) under consideration can be captured by the following expression: x(n) = (Po + r) (n) + a u n1 2 ru n 2 (6.24) Observe that we are including two step-sequences to the expression for x(n).The sequence u(n/2) is equal to one at all nonnegative even values of n (including n = 0) and is zero elsewhere. For this reason, we need to add r to Po at n = 0 in order to eliminate the contribution of r that comes from r u(n/2) at n = 0; this is because withdrawals start 145 SECTION 6.3 APPLICATIONS 146 CHAPTER 6 LINEAR CONVOLUTION occurring only at time n = 2 onwards. Likewise, the sequence u((n 1)/2) is equal to one at all positive odd values of n and it helps us model the addition of a individuals at these time instants. To determine the response of the LTI system (6.21) to x(n) we resort to the convolution sum of x(n) with h(n). First, let = 1+ d b 100 100 (6.25) Now since the system is causal and the input sequence, x(n), is a causal sequence, we can use (5.11) to write n y (n) = k=0 n x(k )h(n k ) = (6.26) (Po + r) (k ) + a u k=0 n (Po + r) n + a = r k1 2 u k1 2 u k 2 k=0 n k=0 ru k 2 nk u(n k ) nk (6.27) nk To evaluate the two sums that appear on the right-hand side, we note that their values depend on whether n is even or odd. Thus, note that n u k=0 k1 2 nk = n1 + n3 + . . . + 2 + 1, n1 + n3 + . . . + , n odd n even where in the rst case (n odd) we are adding (n + 1)/2 terms of a geometric series with ratio 2 and rst term equal to one. In the second case of n even, we are adding n/2 terms of a geometric series with ratio 2 and rst term equal to . Using the result of Example 2.11 for the sum of a nite number of terms of a geometric series, we get n u k=0 k1 2 nk = Likewise, n u k=0 k 2 nk = n+1 1 ( 2 ) 2 , 1 2 2n 1 ( ) 2 , 1 2 n + n2 + . . . + , n + n2 + . . . + 2 + 1, n odd n even n odd n even where in the rst case (n odd) we are adding (n + 1)/2 terms of a geometric series with ratio 2 and rst term equal to . In the second case of n even, we are adding n/2 + 1 terms of a geometric series with ratio 2 and rst term equal to 1. Using again the result 147 of Example 2.11 for the sum of a nite number of terms of a geometric series, we get 2 n+1 1 ( ) 2 , n odd n 1 2 k nk = u n 2 k=0 1 ( 2 ) 2 +1 , n even 1 2 SECTION 6.4 APPLICATIONS Substituting these results into the convolution sum expression (6.26) for y (n) we arrive at n+1 1 n+1 (Po + r) n + a 1 r , n odd 1 2 1 2 y (n) = (6.28) 1 n 1 n+2 r , n even (Po + r) n + a 1 2 1 2 These expressions describe the evolution of y (n) over n 0. Figure 6.14 illustrates the evolution of the population as a function of time assuming a birth rate of 4%, a death rate of 2%, addition of 3 individuals every odd year, and removal of 5 individuals every even year. birth rate=4%, death rate=2%, addition=3, and removal=5 125 y(n) 120 115 110 105 100 0 2 4 6 8 10 n (years) 12 14 16 18 FIGURE 6.14 Evolution of the population size over time assuming a birth rate of 4%, a death rate of 2%, addition of 3 individuals every odd year, and removal of 5 individuals every even year. Practice Questions: 1. Determine the response sequence, y (n), of the Malthusian system (6.21) when x(n) = 100 (n) + 4 (n 2) 2 (n 3). 2. Assume Po = 100 individuals, b = 5%, d = 1%, a = 3 and r = 1. Find the population size at years n = 1, 2, 3, 4, 5. 3. Repeat when a = 3 and r = 3. 148 6.4 PROBLEMS CHAPTER 6 LINEAR CONVOLUTION Problem 6.1 Let y (n) = x(n) h(n). Express the following convolution sums in terms of the sequence y (n): (a) x(n) h(n 1). (b) x(n 1) h(n). (c) x(n 1) h(n 2). (d) x(n) h(n 3). Problem 6.2 Let y (n) = x(n) h(n). Express the following convolution sums in terms of the sequence y (n): (a) x(n + 2) h(n 2). (b) x(n 3) h(n + 1). (c) x(n) h(n 2). (d) x(n) x(n 1) h(n) h(n + 2). Problem 6.3 Evaluate the convolution sums: (a) u(n) 1 n 2 (b) u(n) (c) u(2n) u(n 1). 1 n 2 1 n 2 u(n 1). u(n). Problem 6.4 Evaluate the convolution sums: (a) u(n + 1) 1 n1 (b) u(n + 2) (b) u(4n) 4 1 n 1 n 4 4 u(n). u(n 1). u(n 1). Problem 6.5 Evaluate the convolution sum 1 4 n n 1 2 u(n) u(n) using both the analytical and graphical methods. Compare your results. Problem 6.6 Evaluate the convolution sum 1 4 n+1 n1 1 2 u(n 2) u(n + 1) using both the analytical and graphical methods. Compare your results. Problem 6.7 Evaluate the convolution sum u(n + 2) n1 1 3 u(n 2) using both the analytical and graphical methods. Compare your results. Problem 6.8 Evaluate the convolution sum u(n 2) 1 2 n u(n) using both the analytical and graphical methods. Compare your results. 149 Problem 6.9 Evaluate n1 1 2 n 1 3 u(n) SECTION 6.4 PROBLEMS u(n 2) u(n + 1) using the distributivity property of the convolution sum. Problem 6.10 Evaluate 1 4 n+1 1 2 u(n) n+2 n3 1 3 u(n 1) u(n + 2) using the distributivity property of the convolution sum. Problem 6.11 Evaluate 1 1 (n + 1) (n) 2 3 n1 1 2 1 3 u(n) n u(n 2) Problem 6.12 Evaluate 1 1 (n + 2) + (2n 2) 2 4 1 2 n+3 u(n) 1 3 n u(n + 2) Problem 6.13 Use the graphical method to evaluate the convolution sum shown in Fig. 6.15. h(n ) x( n ) 2 1 1 2 3 1 2 4 5 n 2 2 1 11 1 2 n 2 FIGURE 6.15 Convolution sum of two sequences for Prob. 6.13. Problem 6.14 Use the graphical method to evaluate the convolution sum shown in Fig. 6.16. 150 CHAPTER 6 LINEAR CONVOLUTION h(n ) x( n ) 2 1 1 2 3 1 2 2 1 n 1 2 11 n 2 FIGURE 6.16 Convolution sum of two sequences for Prob. 6.14. Problem 6.15 A sequence x(n) is nonzero for values of n between 3 and 4 only, and a sequence y (n) is nonzero for values of n between 7 and 9 only. Let z (n) = x(n) y (n). What can you say about the sequence z (n)? (a) It is equal to zero for n < 3 and n > 12. (b) It can be nonzero at n = 0. (c) It is nonzero at any point 3 n 12. (d) None of the above. Problem 6.16 A sequence x(n) is nonzero for values of n between 0 and 3 only, and a sequence z (n) is nonzero for values of n between 1 and 5 only. If z (n) = x(n) y (n). What can you say about the sequence y (n)? (a) It is equal to zero for n < 1 and n > 5. (b) It is zero at n = 1. (c) It cannot be zero at n = 0. (d) None of the above. Problem 6.17 Consider the sequence x(n) shown in Fig. 6.17. The sequence is zero except at the specied time instants. The amplitudes of the non-zero samples are either 1, 2, or 3. x(n) 3 2 1 2 1 0 1 2 3 4 5 6 n FIGURE 6.17 Sequence x(n) dened in Prob. 6.17. a) Dene the sequence y (n) = u(n + 1) u(n 2). Compute the convolution x(n) y (n). 151 b) Dene 1 2 h1 (n) = n SECTION 6.4 h(n)u(n) PROBLEMS where 1 3 x(n + 2) (n) + u(n 3) 2 2 Take h1 (n) to be the impulse response of an LTI system. What would the response of the n system be to the input sequence 1 u(n)? 3 h(n) = Problem 6.18 Determine the output of an LTI system with impulse response sequence h(n) = 1 n u(n) when excited by each of the following input sequences: 2 (i) x(n) = u(n). (ii) x(n) = 1, 0 , 1 . (iii) x(n) = 1 n 3 n u(n). (iv) x(n) = 2 u(n). Problem 6.19 Determine the convolution [u(n) u(n L)] [u(n) u(n L)] where L is a positive integer. Plot the resulting sequence for L = 5. Problem 6.20 Determine the convolution [u(n) u(n 5)] 1 2 n u(n) Problem 6.21 Let z (n) be such that z (n) x(n + 1) = x(n 2) y (n 1) for any x(n) and y (n). Express the sequence z (n) in terms of y (n). Problem 6.22 Assume x(n) h(n) = y (n) h(n). What can you say about the relation between the sequences x(n) and y (n)? Problem 6.23 Consider two possibly complex-valued sequences x(n) and h(n). Their crosscorrelation is the sequence rxh (n) whose samples are dened as follows: rxh (n) = k= x(k)h (k n) (a) Verify that rxh (n) = x(n) h (n). (b) Use the graphical method to evaluate the correlation of the two sequences: x(n) = 2, 1 , 1, 2 and h(n) = 0 , 1, 2 Problem 6.24 The autocorrelation of a possibly complex-valued sequence x(n) is another sequence whose samples are dened as rx (n) = k= x(k)x (k n) = x(n) x (n) (a) Is rx (n) an even sequence? Is it conjugate symmetric? (c) Find the autocorrelation of x(n) = (0.5)n u(n). Problem 6.25 Let rx (n) denote the autocorrelation of a possibly complex-valued sequence x(n). Show that rx (0) is equal to the energy of x(n). 152 CHAPTER 6 LINEAR CONVOLUTION Problem 6.26 Consider an even sequence x(n). Let h(n) = x(n) x(n). Show that h(0) is equal to the energy of the sequence. How does h(n) relate to the autocorrelation sequence of x(n)? Problem 6.27 Assume x(n) has nonzero samples only in the interval N1 n N2 . Likewise, assume h(n) has nonzero samples only in the interval M1 n M2 . All quantities (N1 , N2 , M1 , M2 ) are positive integers. Generally, over what interval of time will the sequence x(n) h(n) have nonzero samples? Prove your result and check it on a numerical example with distinct values for the integers (N1 , N2 , M1 , M2 ). Problem 6.28 Assume x(n) has nonzero samples only in the interval N1 n N2 . Generally, over what interval of time will the following sequences have nonzero samples? (a) r (n) = x(n) x(n). (b) y (n) = x(n) x(n). (c) y (n) = x(n) u(n). Problem 6.29 The impulse response sequence of a causal LTI system is h(n) = u(n 2). Its n2 response to an unknown input sequence x(n) is y (n) = 1 u(n 3). Find x(n). 2 Problem 6.30 Let h(n) denote the impulse response sequence of a causal LTI system. The re n1 sponse of the system to an unknown input sequence x(n) is y (n) = 1 u(n 2). What is the 3 response of the system to the input sequence x1 (n) dened by x1 (n) = (n 2) + x(n 3) + x(n 1) y (n 3) + (n + 5) 1 2 n4 x(n + 1)? Problem 6.31 A causal LTI system is described by the difference equation y (n) = 1 y (n 1) + x(n 1) 4 Find its impulse response sequence. Find also the response to the input sequence shown in Fig. 6.18 using the convolution sum method. x( n ) 2 1 3 1 1 2 2 4 5 n FIGURE 6.18 Input sequence x(n) for Prob. 6.31. Problem 6.32 A causal LTI system is described by the difference equation y (n) = 1 y (n 1) x(n + 2) 2 Find its impulse response sequence. Find also the response to the input sequence shown in Fig. 6.19 using the convolution sum method. 153 SECTION 6.4 x( n ) 2 2 1 PROBLEMS 1 2 11 n 2 FIGURE 6.19 Input sequence x(n) for Prob. 6.32. Problem 6.33 A causal LTI system is described by the difference equation y (n) = 1 y (n 1) + x(n) 3 Find its response to the following input sequences (a) x(n) = u(n). (b) x(n) = u(n). Problem 6.34 A causal LTI system is described by the difference equation y (n) = 1 y (n 1) + x(n 1) 2 Find its response to the following input sequences (a) x(n) = u(n). (b) x(n) = 1 n 4 u(n). CHAPTER 7 Homogeneous Difference Equations In the earlier chapters we introduced several properties of discrete-time signals and systems (such as periodicity, causality, stability, linearity, and time-invariance). From this chapter onwards, we start to develop tools for the analysis of discrete-time systems and, in particular, LTI systems. These tools will enable us to answer questions such as how to determine the response of a system to an input sequence in a more systematic manner rather than continually resorting to convolution sum calculations or to iterating the respective difference equations. We shall not study general discrete-time systems. Instead, we shall focus on the important subclass of systems that are described by constant-coefcient difference equations. Our objective in the present chapter, and in the following one, is to describe a procedure for determining the response of systems described by constant-coefcient difference equations; the equations may or may not represent LTI systems. A useful rst step towards this objective is to understand how to solve homogeneous difference equations. 7.1 HOMOGENEOUS EQUATIONS First-Order Equations For motivation purposes, assume we are asked to identify a sequence y (n) that satises the difference equation: y (n) ay (n 1) = 0 (7.1) for all n and for some given coefcient a (real or complex). This is a rst-order difference equation in the variable y (n). The equation is said to be homogeneous since its right-hand side is zero and its left-hand side is a combination of y (n) and time-shifted versions of y (n) (in this case, y (n 1)). The equation, as described, cannot be viewed as an inputoutput relation for a system since it does not specify an input sequence, x(n). Still, we may interpret the equation as dening the response of the class of systems { y (n) ay (n 1) = x(n) } to the zero input sequence, x(n) = 0. By determining all sequences {y (n)} that satisfy the homogeneous equation (7.1) we would then be determining all possible responses of the above class of systems to the zero input sequence. Returning to (7.1), it is immediate to verify that the exponential sequence y (n) = an satises the homogeneous equation since an a an1 = 0 155 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 156 It is also easy to verify that any multiple of an is a solution as well, i.e., the choice CHAPTER 7 HOMOGENEOUS DIFFERENCE EQUATIONS y (n) = Can , for any constant C (7.2) satises (7.1), where C can be real or complex-valued. We therefore nd that even trivial homogeneous equations of the form (7.1) admit an innite number of solutions; one for each choice of the constant C in (7.2). The same conclusion holds for homogeneous equations of higher-order, as we proceed to verify. Higher-Order Equations To begin with, an M -th order homogeneous equation is one of the form y (n) + a1 y (n 1) + a2 y (n 2) + . . . + aM y (n M ) = 0 (7.3) where the {ai } are scalar coefcients (real or complex; in general, they will be real-valued). Observe that M delayed versions of y (n) appear in (7.3) and, hence, the equation is said to be of order M due to the presence of the term y (n M ). Observe further that we are normalizing the coefcient of y (n) to one while the coefcients for the time-delayed versions of y (n) are denoted by {a1 , a2 , . . . , aM }. Our objective is to determine the form of all sequences {y (n)} that satisfy the above homogeneous equation. The zero sequence, y (n) = 0 for all n is obviously one solution. We proceed to verify that we can nd nontrivial solutions of the form y (n) = n , for some nonzero number whose value can be real or complex. In other words, we now verify that exponential sequences, n , are solutions of the homogeneous equation (7.3) for some values of to be determined. To see that this is indeed the case, we substitute the assumed form, y (n) = n , into the homogeneous equation (7.3) and nd that the scalar must satisfy the following relation for all n: n + a1 n1 + . . . + aM nM = 0 (7.4) This condition is equivalent to requiring to satisfy nM M + a1 M 1 + . . . + an1 + aM = 0 But since = 0 by assumption, we conclude that has to be a root of the following algebraic equation (also known as the characteristic equation associated with (7.3)): M + a1 M 1 + a2 M 2 + . . . + an1 + aM = 0 (7.5) p() = M + a1 M 1 + a2 M 2 + . . . + an1 + aM (7.6) The polynomial is known as the characteristic polynomial associated with the homogeneous equation (7.3). Observe that the characteristic polynomial has the same order M as the homogeneous equation. Moreover, the coefcient of M is equal to 1 while the coefcients for the other decreasing powers of are equal to {a1 , a2 , . . . , aM }. Now, it is a well-known result from algebra theory that every polynomial of order M of the form (7.3) has M roots in the complex plane (some of them possibly repeated). This result is known as the Fundamental Theorem of Algebra. Thus, let us denote these roots by {1 , 2 , . . . , M }. The roots can be real or complex. When all the coefcients {a1 , a2 , . . . , aM } are real-valued, then complex roots of p() = 0 can only occur in conjugate pairs. This statement means that if o is some complex root then so is its complex conjugate, . The following situations arise. o 7.1.1 Distinct Roots Assume rst that all the roots { } of the characteristic equation (7.5) are distinct (real or complex). It follows that we can nd M solutions for the homogeneous equation (7.3), each of the form { y (n) = n , 1 M } There are in fact innitely many solutions. It is straightforward to verify that any arbitrary linear combination of the individual solutions {n } is also a solution of (7.3), say, y (n) = C1 n + C2 n + . . . + CM n 1 2 M (7.7) for arbitrary (real or complex) coefcients {C }. 7.1.2 Repeated Roots Let us examine what happens when some of the roots of the characteristic equation (7.5) are repeated. Assume initially that the characteristic equation has a nonzero double root at some value 1 . We already know that the sequence y (n) = n satises the homogenous 1 equation (7.3). We now verify that because 1 is a double root, the sequence y (n) = nn 1 also satises the homogeneous equation (7.3). Proof: The fact that 1 is a double root of the characteristic equation (7.5) means that both the characteristic polynomial (7.6) and its derivative should vanish at 1 : p ( 1 ) = 0 dp() =0 d =1 and That is, M + a 1 M 1 + a 2 M 2 + . . . + a M 2 2 + a M 1 1 + a M = 0 1 1 1 1 (7.8) and M M 1 + a1 (M 1)M 2 + a2 (M 2)M 3 + . . . + 2aM 2 1 + aM 1 = 0 1 1 1 Since 1 is assumed to be nonzero, this second equality can be rewritten as 1 M M + a 1 M 1 + a 2 M 2 + . . . + a M 2 2 + a M 1 1 1 1 1 1 1 = a M by virtue of the rst condition (7.8) a1 M 2 + 2a2 M 3 + 3a3 M 4 + . . . + (M 2)aM 2 1 + (M 1)aM 1 = 0 1 1 1 so that the following relation holds: a1 M 1 + 2a2 M 2 + 3a3 M 3 + . . . + (M 1)aM 1 1 + M aM = 0 1 1 1 (7.9) 157 SECTION 7.1 HOMOGENEOUS EQUATIONS 158 CHAPTER 7 HOMOGENEOUS DIFFERENCE EQUATIONS We now use this fact to establish the desired result that nn is a solution to the homogeneous equation 1 (7.3). For this fact to hold, we note by substituting nn into the left-hand side of (7.3) that the 1 following equality must hold: nn + a1 (n 1)n1 + a2 (n 2)n2 + . . . + aM (n M )nM = 0 1 1 1 1 This equality is equivalent to requiring nnM M + a1 M 1 + . . . + aM 1 1 + aM 1 1 1 nM a1 M 1 + 2a2 M 2 + . . . + M aM 1 1 1 =0 The above condition holds in view of the two equalities (7.8) and (7.9) shown above. In summary, when n is a double root, then both n and nn are solutions of the homo1 1 1 geneous equation (7.3); it can be further veried that any linear combination of these two solutions is also a solution, i.e., y (n) = [Co + C1 n] n 1 (when 1 is a double root) (7.10) Similar arguments can be used for repeated roots of higher multiplicities. For example, if 1 is a root of multiplicity 3, then the sequences n , nn and n2 n are solutions of (7.3), 1 1 1 as well as any linear combinations of these terms, and so forth. 7.1.3 Complex Roots When the coefcients {a1 , a2 , . . . , aM } are real-valued, complex roots of the characteristic equation (7.5) can only occur in conjugate pairs. If {1 , } represent a conjugate pair of 1 roots, then they contribute a term of the following form to the solution y (n): y (n) = C1 n + C2 ( )n 1 1 (general case) (7.11) for arbitrary complex numbers {C1 , C2 }. The above expression is simply a linear combination of the individual contributions n and ( )n that originate from the modes {1 , }. 1 1 1 When the terms of the sequence y (n) are required to be real-valued, then C2 and C1 must be conjugate pairs as well, i.e., they should satisfy C2 = C1 . In this case, y (n) will be expressed as the sum of two complex conjugate terms, in which case the sum assumes real-values: y (n) = C1 n + C1 ( )n (real-valued sequence) (7.12) 1 1 Proof: We already know that n satises the homogeneous equation (7.3), namely, 1 n + a1 n1 + a2 n2 + . . . + aM nM = 0 1 1 1 1 Conjugating both sides of the expression, and using the fact that the coefcients {a } are real-valued, we nd that ( ) 1 n + a 1 ( ) 1 n1 + a 2 ( ) 1 n2 + . . . + a M ( ) 1 nM =0 so that the sequence ( )n is also a solution to (7.3); this is a conrmation of the fact that complex1 roots must occur in conjugate pairs when the coefcients {a } are real-valued. It follows that any linear combination of the form C1 n + C2 ( )n is also a solution. When C2 = C1 , the samples of 1 1 the sequence y (n) become real-valued, as can be seen from the following argument. If we express C1 and 1 in polar forms, say, as C1 = Aej , 1 = ej with {A, } real and {, } [, ], then the term C1 n + C1 n can be equivalently expressed 1 1 as the sinusoidal sequence y (n) = 2An cos[n + ] which is real-valued. 7.1.4 Solution Method In summary, in order to determine nontrivial solutions for the homogeneous equation (7.3), we proceed as follows: (a) Solve the characteristic equation M + a1 M 1 + a2 M 2 + . . . + aM 1 + aM = 0 and nd its M roots. The roots { } are called modes. Some modes may be realvalued and other modes may be complex-valued. Some modes may be simple and other modes may have multiplicity larger than one. (b) Every distinct root o (whether real or complex) contributes a term of the form Cn o to the solution y (n), for some arbitrary constant C . (c) Every repeated root o , say with multiplicity m (and whether real or complex), contributes to the solution y (n) with a term of the form [Co + C1 n + C2 n2 + . . . + Cm1 nm1 ]n o for some arbitrary constants {Co , C1 , . . . , Cm1 } (d) When the coefcients {a1 , a2 , . . . , aM } are real-valued, complex roots must occur in conjugate pairs. When the solution y (n) is required to be real-valued, then the pair of roots {o , } contributes a term of the following form to y (n): o Cn + C ( )n o o for some arbitrary complex number C . This term can be expressed as the sinusoidal sequence: 2An cos[n + ] in terms of the real parameters {A, }, and the phases {, } [, ], that arise from the polar representation of C and o : C = Aej , o = ej (e) All solutions y (n) to the homogeneous equation (7.3) are obtained by linearly combining all the terms contributed by the modes of its characteristic equation. To complete the argument, we still need to show that the above construction provides all nontrivial solutions of the homogeneous equation (7.3). This is indeed the case, but we 159 SECTION 7.2 HOMOGENEOUS EQUATIONS 160 CHAPTER 7 HOMOGENEOUS DIFFERENCE EQUATIONS forgo a formal proof here. Instead, we shall focus henceforth on the important case in which we desire to determine the solution to a homogeneous equation under the requirement that the solution should satisfy a given set of initial conditions. In this situation, we are going to see that the homogeneous equation can only have a unique solution, and that the above construction will lead to it. 7.2 HOMOGENEOUS EQUATIONS WITH INITIAL CONDITIONS Consider again the difference equation (7.3) but assume now that we are given the values of M initial conditions, say at times: {y (1), y (2), . . . , y (M )} (7.13) We would like to determine the sequence (or sequences) y (n) that satisfy (7.3) and meet the given initial conditions. Note that starting from the conditions (7.13), we can in principle iterate recursion (7.3) and determine the values of y (n) for all n. For example, consider the rst-order equation (7.1) and assume we start from the initial condition y (0) = yo , namely, y (n) = ay (n 1), y (0) = yo (7.14) Iterating the recursion over n 1 we get y (1) = y (2) = y (3) = . .= . ay (0) = yo a ay (1) = yo a2 ay (2) = yo a3 . . . Likewise, running the recursion backwards we get for n 1: y (1) = y (2) = y (3) = . . . = 1 1 y (0) = yo a a 1 1 y (1) = yo 2 a a 1 1 y (2) = yo 3 a a . . . A pattern emerges and we can express the resulting sequence y (n) more compactly in the form y (n) = yo an (7.15) Observe that we are led to a well-dened and unique sequence, y (n). Note further that this solution is a special case of the general expression (7.2); it corresponds to the special choice C = yo . This choice of the constant C leads to the unique solution y (n) that passes through the condition y (0) = yo . More generally, it is obvious from the above argument that iterating a difference equation, as in (7.3), starting from a given set of initial conditions, as in (7.13), leads to a unique sequence y (n) that satises both the homogeneous equation and the initial conditions. We therefore conclude that every M th order homogeneous difference equation, such as (7.3), with M initial conditions, has a unique solution y (n). Determining this solution by iterating the equation, as we did in the above rst-order example, is not always feasible. To nd the solution in closed form, without resorting to exhaustive iteration of the difference equation, we proceed to show how to employ the procedure just described in Sec. 7.1) by considering several examples. Example 7.1 (Distinct modes) We wish to determine the unique solution of the homogeneous equation y (n) y (n 1) 2y (n 2) = 0 that passes through the initial conditions y (1) = 1, y (2) = 2 The rst step is to write down the characteristic equation and determine its modes. In this case, the characteristic equation is given by 2 2 = 0 and it has two distinct modes at = 2, = 1 These modes contribute with individual terms of the form (2)n and (1)n to the solution y (n), Accordingly, we know from the procedure described in Sec. 7.1, that all sequences that satisfy the homogeneous equation are parameterized as follows: y (n) = C1 2n + C2 (1)n for arbitrary constants {C1 , C2 }. Each choice of {C1 , C2 } gives one possible solution sequence y (n) that satises the homogeneous equation but not necessarily the assumed initial conditions. To determine from among these solutions that sequence y (n) that satises y (1) = 1 and y (2) = 2, we select the constants {C1 , C2 } in order to enforce the initial conditions. Using the initial values y (1) = 1 and y (2) = 2, we nd that {C1 , C2 } must satisfy the following system of linear equations: 1 = C1 /2 C2 2 = C1 /4 + C2 Solving we get C1 = 4 and C2 = 1. Hence, the desired solution sequence is y (n) = 4 2n + (1)n , for all n It is straightforward to verify that this sequence satises the given initial conditions at times n = 1 and n = 2. Moreover, it also satises the homogeneous equation. Example 7.2 (Repeated modes) Consider now the homogeneous equation y (n) 4y (n 1) + 4y (n 2) = 0 with initial conditions y (1) = 1 and y (2) = 0. The corresponding characteristic equation is given by 2 4 + 4 = 0 with repeated modes that are equal to = 2, =2 161 SECTION 7.2 HOMOGENEOUS EQUATIONS WITH INITIAL CONDITIONS 162 CHAPTER 7 HOMOGENEOUS DIFFERENCE EQUATIONS Accordingly, from the procedure described in Sec. 7.1, we know that the form of the general solution for the homogeneous equation is y (n) = C1 2n + C2 n2n We again use the initial conditions to arrive at the following linear system of equations in terms of the unknowns {C1 , C2 }: 1 = C1 /2 C2 /2 0 = C1 /4 C2 /2 Solving we get C1 = 4 and C2 = 2. Hence, the desired solution sequence is y (n) = 2n+2 + n2n+1 , for all n Example 7.3 (Complex modes and a real solution sequence) Consider the homogeneous equation y (n) + y (n 2) = 0 with initial conditions y (1) = 1 and y (2) = 1. It is clear that if we iterate the recursion for all values of n, the resulting samples of y (n) will all be real-valued. Therefore, we are seeking the unique real-valued sequence y (n) that satises the homogeneous equation and passes through the given initial conditions. The corresponding characteristic equation is given by 2 + 1 = 0 with complex modes at = j = ej/2 , = j = ej/2 Accordingly, from the procedure described in Sec. 7.1, we know that the form of the general solution for the homogeneous equation is y (n) = Cj n + C (j )n We again use the initial conditions to arrive at the following linear system of equations in terms of the unknown C and its complex conjugate: 1 = Cj C j 1 = C C Solving we get 3 1 1 C = (1 + j ) = ej 4 2 2 Hence, the desired solution sequence is y (n) = = n 1 3 1 j 34 ej/2 + ej 4 ej/2 e 2 2 3 n 1 j ( n 34 ) e2 + e j ( 2 4 ) 2 n which, in view of Eulers relation (3.11), reduces to y (n) = cos 3 n 2 4 163 Example 7.4 (Complex modes and a complex solution sequence) SECTION 7.3 IMPULSE RESPONSE OF LTI SYSTEMS Consider the same homogeneous equation y (n) + y (n 2) = 0 but with initial conditions y (1) = 0 and y (0) = j . Now, if we iterate the recursion for all values of n, we nd that the resulting sequence will have complex-valued samples. To determine the sequence, we proceed as before but now express the general solution of the homogeneous equation in the form y (n) = C1 j n + C2 (j )n for two complex constant C1 and C2 that are not necessarily complex conjugates of each other. We use the initial conditions to arrive at the following linear system of equations in terms of the unknowns C1 and C2 : j = C1 + C2 0 = jC1 + jC2 Solving we get C1 = C2 = j/2 Observe that the coefcients {C1 , C2 } in this case are not complex conjugates of each other. Hence, the desired solution sequence is y (n) jn j j + ( j )n 2 2 1 [1 + (1)n ] j n+1 2 1 [1 + (1)n ] ej 2 (n+1) 2 = = = so that y (n) = 0, n (1) 2 j, n odd n even 7.3 IMPULSE RESPONSE OF LTI SYSTEMS One useful application of the solution method we just described for nding the homogeneous response of a constant-coefcient difference equation is that it can be used to determine closed-form expressions for the impulse response sequence of LTI systems that are described by such difference equations. Example 7.5 (Distinct modes) Consider a causal system that is described by the difference equation y (n) + 2y (n 1) 8y (n 2) = 2x(n) Let us assume the system is relaxed, so that the above input-output relation describes an LTI system. We want to determine its impulse response sequence, i.e., the response to x(n) = (n). We move slowly in this rst example in order to highlight the main ideas. Since the system is causal and LTI, we already know that its impulse response sequence, denoted by h(n), should satisfy h(n) = 0 for n < 0 (7.16) 164 CHAPTER 7 HOMOGENEOUS DIFFERENCE EQUATIONS Moreover, over n 0, the sequence h(n) should satisfy the same difference equation with x(n) replaced by (n), i.e., h(n) + 2h(n 1) 8h(n 2) = 2 (n), n0 (7.17) We want to solve this equation and determine h(n) over n 0. Since the system is relaxed, it must hold that h(2) = 0 = h(1). This is because, by the denition of a relaxed system, the output h(n) has to remain at zero as long as the input sequence stays at zero. In the present situation, the input sequence is given by x(n) = (n), and it is zero for all n < 0; it moves away from zero only at time n = 0. Now note that the above difference equation for h(n) is not a homogeneous equation since it contains the term (n) on the right-hand side. However, since (n) is zero for all n 1, we conclude that the difference equation becomes homogeneous over the interval n 1 and can be written as h(n) + 2h(n 1) 8h(n 2) = 0, for n 1 This is a second-order homogeneous equation in h(n). In order to determine the sequence h(n), we need to identify two initial conditions. Usually, but not necessarily, we identify these conditions at the two time instants right before n = 1 (when the equation became homogeneous). These initial conditions will in general reect the impact of the unit-sample sequence, (n), that was present at n = 0. We already know that h(1) = 0. For time n = 0, we use the difference equation (7.17) and the fact that (0) = 1 to nd that h(0) = 2. Starting from the homogeneous equation (7.17), we reduced the problem to solving the secondorder homogeneous equation h(n) + 2h(n 1) 8h(n 2) = 0, h(1) = 0, h(0) = 2, n 1 (7.18) with two initial conditions. The modes of the system can be easily found to be = 2 and = 4. The general form of the homogeneous solution for all n is h(n) = C1 2n + C2 (4)n for some constants C1 and C2 that we need to determine. Using the initial conditions at times n = 0 and n = 1 we obtain the following linear system of equations in the unknowns {C1 , C2 }: 2 = C1 + C2 , 0= C1 C2 2 4 Solving we obtain C1 = 2/3 and C2 = 4/3. In this way, we arrive at the sequence h(n) = 4 2n 2 + (4)n 3 3 which satises the following homogeneous equation for all values of n (both positive and negative): h(n) + 2h(n 1) 8h(n 2) = 0, h(1) = 0, h(0) = 2 This is still not the sequence h(n) we are looking for. This is because the desired h(n) should be zero for all n < 0 due to the assumed causality of the system. However, we can derive the desired sequence by writing instead h(n) = 4 2n 2 + (4)n u(n) 3 3 (7.19) where we introduced the the step-sequence to enforce the fact that h(n) = 0 for n < 0. 165 Example 7.6 (Mode cancelation) SECTION 7.3 Let us now determine the impulse response sequence of a relaxed causal system that is described by the difference equation y (n) + 2y (n 1) 8y (n 2) = x(n) 2x(n 1) This is again an LTI system. Since the system is causal and LTI, we already know that its impulse response sequence, denoted by h(n), needs to satisfy h(n) = 0 for n < 0 (7.20) Moreover, h(n) satises the difference equation h(n) + 2h(n 1) 8h(n 2) = (n) 2 (n 1), n0 (7.21) We want to solve this equation and determine h(n) over n 0. Since the input sequence is x(n) = (n), and the system is assumed to be relaxed, then we must have h(1) = h(2) = 0. This is because, by the denition of a relaxed system, the output has to remain at zero as long as the input stays at zero. In the present situation, the input sequence, x(n) = (n), is zero for n < 0 and it moves away from zero only at time n = 0. Now, the difference equation (7.21) for h(n) becomes homogeneous only for n 2. This is because the input sequence combination (n) 2 (n 1) becomes zero for all n 2. In this way, the difference equation becomes h(n) + 2h(n 1) 8h(n 2) = 0 for n 2 In order to solve this second-order homogeneous difference equation, we need to determine two initial conditions. We select the time instants n = 0 and n = 1 just prior to n = 2, when the equation (7.21) becomes homogeneous. It follows from (7.21) that h(0) = 1 and h(1) = 4. We are therefore reduced to solving the homogeneous equation h(n) + 2h(n 1) 8h(n 2) = 0, h(0) = 1, h(1) = 4, for n 2 (7.22) The general form of the homogeneous solution for all values of n is h(n) = C1 2n + C2 (4)n Using the initial conditions at times n = 0 and n = 1 we obtain the linear system of equations 1 = C1 + C2 , 4 = 2C1 4C2 which gives C1 = 0 and C2 = 1. We thus arrive at the sequence h(n) = (4)n which satises the following homogeneous equation for all values of n (both positive and negative): h(n) + 2h(n 1) 8h(n 2) = 0, h(0) = 1, h(1) = 4 This is still not the sequence h(n) we are looking for. This is because the desired h(n) should be zero for all n < 0 due to the assumed causality of the system. We can derive the desired sequence by writing instead h(n) = (4)n u(n) (7.23) IMPULSE RESPONSE OF LTI SYSTEMS 166 CHAPTER 7 Observe that in this case one of the modes does not appear in the expression for h(n) (since C1 = 0). We therefore say that mode cancelation occurred. HOMOGENEOUS DIFFERENCE EQUATIONS Example 7.7 (Complex modes) Let us now determine the impulse response sequence of the relaxed causal system y (n) + 2y (n 1) + 2y (n 2) = x(n) Since the system is causal and LTI, we already know that its impulse response sequence, denoted by h(n), needs to satisfy h(n) = 0 for n < 0 (7.24) Moreover, h(n) satises the difference equation h(n) + 2h(n 1) + 2h(n 2) = (n), n0 (7.25) We want to solve this equation and determine h(n) over n 0. As in the previous two examples, the fact that the system is relaxed gives h(1) = h(2) = 0. Also, since (n) is zero for all n = 0, the difference equation for h(n) becomes homogeneous over n 1: h(n) + 2h(n 1) + 2h(n 2) = 0 for n 1 In order to solve this second-order homogeneous difference equation, we determine the initial conditions at times n = 1 and n = 0 from (7.25) as h(0) = 1 and h(1) = 0. We are thus reduced to solving the homogeneous equation h(n) + 2h(n 1) + 2h(n 2) = 0, h(1) = 0, h(0) = 1, n 1 (7.26) The characteristic equation is given by 2 + 2 + 2 = 0 with complex roots at = 1 + j = 2ej 3 4 , = 1 j = 2 e j 3 4 The general form of the homogeneous solution for all values of n is: 3 3 h(n) = C ( 2)n ej 4 n + C ( 2)n ej 4 n with C and its complex conjugate used as arbitrary constants. The initial conditions at times n = 0 and n = 1 lead to the equations 3 3 1 = C + C , 0 = 2Cej 4 + 2C ej 4 If we write C = a + jb, these equations collapse to 1 = 2a and a = b so that a = 1/2 and b = 1/2. Hence, 1 2 j e4 C = (1 + j ) = 2 2 And we conclude that the desired impulse response sequence is h(n) = ( 2)n+1 cos 3 (n + 1) u(n) 4 (7.27) where we again added the step-sequence, u(n), to enforce the condition h(n) = 0 for n < 0. 167 7.4 STABILITY OF CAUSAL LTI SYSTEMS SECTION 7.4 All three examples in Sec. 7.3 deal with causal LTI systems that are described by constantcoefcient difference equations, namely, with LTI systems that are described by equations of the form: M N y (n) = k=1 ak y (n k ) + k=0 bk x(n k ) (7.28) for some constant coefcients {ak , bk } and with time progressing forward. From the examples in Sec. 7.3, we observe the important fact that the impulse response sequence, h(n), of every such system can always be expressed as a linear combination of sequences that are dened by the modes of the system. Every mode o of multiplicity mo contributes to the expression for h(n) up to mo terms that are of the form n u(n), nn u(n), n2 n u(n), . . . , nmo 1 n u(n) o o o o (7.29) When all modes of the system are taken into account, the expression for h(n) will be a linear combination of all such terms contributed by all modes. Assuming the system has a total of L distinct modes { } with multiplicities {m } each, then the general expression for h(n) would take the form: L m 1 h(n) = =1 m=0 Cm nm n u(n) (7.30) for some combination coefcients {Cm }. Usually, all the modes of the system would appear in the expression for h(n), although sometimes mode cancelations may occur and some of the coefcients Cm end up being zero, as was the case with Example 7.6. Now recall from Sec. 5.3 that an LTI system is BIBO stable if, and only if, its impulse response sequence is absolutely summable, namely, it should satisfy the condition n= |h(n)| < Bh < for some nite positive scalar Bh . We would like to translate this condition into an equivalent statement in terms of the modes of the system. To do so, we rst note that, for any o , each of the sequences below n u(n), nn u(n), n2 n u(n), . . . o o o is known to be absolutely summable (also said to be absolutely convergent) if, and only if, o is such that |o | < 1. That is, for any nite integer m 0, the following statement holds: n=0 |nm n | < o |o | < 1 (7.31) Proof: This argument can be skipped on a rst reading (it requires familiarity with series and the ratio convergence tests). One way to establish (7.31) is to invoke the so-called ratio test for checking whether a series is absolutely convergent. Consider a generic sequence with terms {cn } for n 0. The ratio test states that cn+1 < 1 then if lim n cn n=0 |cn | < STABILITY OF CAUSAL LTI SYSTEMS 168 CHAPTER 7 HOMOGENEOUS DIFFERENCE EQUATIONS In other words, if the limit of the ratio is strictly less than one, then the series is absolutely convergent. Thus, consider the sequence {cn = nm n } for n 0 and for any nite integer m. It follows that o (n + 1)m n+1 o = |o | lim lim n n nm n o n+1 n m = |o | Therefore, the condition |o | < 1 is sufcient for the absolute convergence of the sequence {nm n } o over n 0. Conversely, assume that this sequence converges absolutely. Then this implies that its individual terms tend to zero, namely, lim nm n = 0 o n This is only possible if |o | < 1 so that the condition |o | < 1 is also necessary for absolute convergence of the sequence. Applying the result (7.31) to expression (7.30) for h(n), we conclude that h(n) will be absolutely summable if, and only if, all modes } that appear in the expression for h(n) have magnitudes strictly less than one; this is equivalent to saying that these modes should lie inside the circle of unit radius in the complex plane. Observe that we are only requiring the modes that appear in h(n) to lie inside the unit circle for stability to hold: Causal LTI systems described All modes { } that by constant-coefcient difference appear in h(n) satisfy equations are BIBO stable | | < 1 (7.32) Proof: Assume initially that all modes that appear in expression (7.30) lie inside the unit circle, | | < 1. Then we have n=0 |h(n)| = m 1 L n=0 =1 L n=0 =1 m 1 m=0 m 1 L = =1 < m=0 m=0 m Cm n n |Cm nm n | |Cm | n=0 |nm n | since each of the sequences {nm n } is absolutely convergent. It follows that h(n) is absolutely summable and the system is BIBO stable. Conversely, assume that h(n) is absolutely summable. This implies that the sequence h(n) tends to zero as n . This is only possible if all the that appear in expression (7.30) lie inside the unit circle. Example 7.8 (Stable LTI system) Consider a causal system that is described by the constant-coefcient difference equation y (n) 1 y (n 2) = x(n) 4 The modes of the system are the roots of the characteristic equation 2 1 =0 4 169 which are given by 1 = 1/2, 2 = 1/2 SECTION 7.5 Since both modes lie within the unit disc, the system is BIBO stable. This conclusion holds regardless of the form of the input sequence that would appear on the right-hand side of the different equation. In the above equation we have x(n). But had it been any combination of x(n) and delayed versions of x(n), the same conclusion would still hold. For example, the following causal system y (n) 1 y (n 2) = x(n) 2x(n 3) 4 is also BIBO stable for the same reason. This is because the modes of the system continue to be the same and they lie inside the unit circle. 7.5 IMPULSES RESPONSE OF NON-LTI SYSTEMS We can use the same technique described in Sec. 7.3 to nd the response to the unit-sample sequence, (n), of a constant-coefcient difference equation that is not necessarily relaxed (and which therefore does not describe an LTI system). Example 7.9 (Non-LTI system) Consider a system that is described by the difference equation y (n) + 2y (n 1) 8y (n 2) = x(n) 2x(n 1) with initial conditions y (2) = 0 and y (1) = 1. We want to nd its response to x(n) = (n) for all n (i.e., for both n 0 and n < 0). This system is not relaxed. For example, even when the input sequence is chosen to be x(n) = 0 for all n, the system will exhibit a nonzero output sequence y (n) due to the initial condition y (1) = 1. Therefore, the given difference equation does not describe an LTI system; recall that constant-coefcient difference equations need to be relaxed in order to describe LTI systems. Still, we can proceed to nd the response of the system to the unit-sample sequence x(n) = (n). Thus, note that the equation becomes homogeneous for n 2. If we denote the impulse response sequence by h(n), then h(n) satises the relation h(n) + 2h(n 1) 8h(n 2) = 0, over n 2 with the same initial conditions h(2) = 0 and h(1) = 1, as the given system. To solve the above homogeneous equation in h(n), we rst need to propagate the initial conditions to the time instants n = 0 and n = 1 to nd h(0) = 1 and h(1) = 8; these initial conditions incorporate the effect of the input combination (n) 2 (n 1) at times n = 0 and n = 1. We are reduced t solving the homogeneous equation h(n) + 2h(n 1) 8h(n 2) = 0, h(0) = 1, h(1) = 8, for n 2 (7.33) The general form of the homogeneous solution for all n is given by h(n) = C1 2n + C2 (4)n We now use the initial conditions at times n = 0 and n = 1 to determine the constants {C1 , C2 } that would describe h(n) over the interval n 0. Doing so leads to the equations 1 = C1 + C2 , 4 = C1 2C2 IMPULSE RESPONSES OF NON-LTI SYSTEMS 170 CHAPTER 7 HOMOGENEOUS DIFFERENCE EQUATIONS so that C1 = 2/3 and C2 = 5/3. Therefore, the response of the system to x(n) = (n) is h(n) = 2n 5 2 (4)n , 3 3 n0 (7.34) We still need to nd the form of h(n) over n < 0. For this purpose, we use instead the initial conditions h(2) = 0 and h(1) = 1 (which do not incorporate the inuence of the input excitation (n) 2 (n 1)) and solve for the constants {C1 , C2 }. Doing so leads to C1 = 2/3 and C2 = 8/3 and we conclude that the response of the system over n < 0 is given by h(n) = 2n 8 2 (4)n , 3 3 n<0 (7.35) 7.6 COMPLETE RESPONSE OF LTI SYSTEMS Clearly, the impulse response sequence of a system is most useful when the system is LTI since it would then allow us to determine the response of the system to arbitrary input sequences via convolution. Given that we now know how to nd the impulse response sequence of an LTI system that is described by a constant-coefcient difference equation, we can therefore utilize the following two-step procedure to determine the response of such systems to any other input sequence: (a) First, determine the impulse response, h(n), as described in Sec. 7.3. (b) Then, evaluate the convolution of h(n) with the given input sequence x(n) to nd the output sequence y (n). Example 7.10 (Finding a complete response) Let us determine the step-response of the relaxed and causal system that is described by the difference equation y (n) + 2y (n 1) 8y (n 2) = x(n) 2x(n 1) Since the system is relaxed, the difference equation describes an LTI system. Hence, the stepresponse can be found by rst determining the impulse response sequence and then convolving it with the step sequence, u(n). We already found the impulse response sequence of this system in Example 7.6, namely, h(n) = (4)n u(n) Now we convolve it with u(n) to nd y (n) = = (4)n u(n) u(n) k= (4)k u(k)u(n k) n = (4)k k=0 Obviously, the sum evaluates to 0 when n < 0 so that y (n) = 0 for n < 0. On the other hand, the sum contains non-trivial terms for n 0 in which case we get 1 (4)n+1 y (n) = , 5 n0 We can combine the results for n < 0 and n 0 into a single expression and write y (n) = 1 1 (4)n+1 u(n) 5 (7.36) The fact that the sequence y (n) is zero for negative time in response to x(n) = u(n) also follows from the fact that the system is relaxed and causal. 7.7 APPLICATIONS In this section, we illustrate applications of some of the concepts covered in the chapter in the context of practical problems. 7.7.1 Carbon Dating In chemical reactions, radioactivity refers to the change of one element into another mainly through the emission of radioactive particles, such as (alpha) or (beta) particles. Alpha particles consist of two protons and 2 neutrons each bound together (similar to Helium nuclei) and beta particles consist of electrons. The half-life of a radioactive element is dened as the time it takes for half of the sample size of the element to decay. One important radioactive element is carbon-14 (written as 14 C; its nucleus contains 6 protons and 8 neutrons). 14 C occurs in tiny traces in the environment and corresponds to only about 1 part per trillion of all the carbon present in the atmosphere; the other two isotopes of carbon are far more abundant (with 12 C corresponding to 99% of all carbon and 13 C corresponding to the remaining 1%). All three isotopes of carbon have the same number of protons (6 per atom) and differ in their number of neutrons (8, 7, and 6 in 14 C, 13 C, and 12 C, respectively). FIGURE 7.1 Carbon dating is used to estimate the age of historical artifacts. 171 SECTION 7.7 APPLICATIONS 172 CHAPTER 7 HOMOGENEOUS DIFFERENCE EQUATIONS Although 14 C is not strongly radioactive, its level of decay is still detectable by modern techniques to enable its use as the basis for the process known as carbon dating. By measuring the level of radioactive activity in 14 C, it is possible to estimate the age of historical remains for the following reason. During the photosynthesis process, plants absorb CO2 from the atmosphere and incorporate a quantity of 14 C into their living tissues at an amount that approximately matches the percentage of 14 C present in the atmosphere. After a plant or an organism dies, the amount of 14 C continues to decay in the buried matter without being replaced. By measuring the remaining radiation level in a historical artifact, and comparing it with the radiation level in a living organism, it becomes possible to approximate the age of the artifact see Fig. 7.1.6 The half-life of 14 C is T1/2 = 5730 years. This means that if we start with a certain amount of 14 C, then half of this amount will be present 5730 years later. The amount of 14 C continues to be halved in this manner every 5730 years. Let y (0) = ro denote the radiation level of one gram of 14 C in a living material (a plant or an organism) right before it dies. This radiation level can be measured in terms of the number of atom disintegrations that occur per minute (dpm). It is know that the radiation level of 14 C is in living organisms is about 14dpm. In writing y (0), we are using n = 0 to denote the origin of time. More generally, we write y (n) to denote the radiation level at year n. Assume that, N years later, a piece of wood is recovered from an ancient tomb that has been contaminated by the dead plant or organism. Assume further that we measure the radiation of carbon at that point in time. Thus, let y (N ) = rN denote the radiation level measured in one gram of 14 C found in the piece of wood. Given knowledge of ro and T1/2 for 14 C , and measurement of rN , we would like to use this information to estimate N (which in turn would help us determine the age of the piece of wood). Let us write down a model for the radioactive decay of 14 C. Starting at n = 0, the radiation level at any subsequent year, n, will be modeled, to a reasonable extent, by a rst-order difference equation of the form: y (n) = 1 y (n 1), y (0) = ro , n 0 100 (7.37) where the parameter % denotes the percentage by which the radiation level of 14 C decays every year; this quantity is not known. However, the argument below will show that it can be inferred from knowledge of T1/2 see (7.40). We are only interested in the evolution of the radioactivity level over the interval of time n 0. Recursion (7.37) is a homogeneous difference equation with a single mode at =1 100 (7.38) This mode controls the exponential rate of decay of the radioactivity level of 14 C . Indeed, from the result (7.2), we already know that the form of the general solution of the difference equation over n 0 is given by y (n) = C 1 100 n , n0 The constant C is determined from the initial condition y (0) = ro so that C = ro and y (n) = ro 1 6 The source for this image is Wikimedia Commons. 100 n , n0 (7.39) This recursion models how the radiation level of 14 C decays with time. We do not know the value of but can determine it from knowledge of the half-time of 14 C. Since the radiation level of 14 C is halved every T1/2 = 5730 years, we can set n = T1/2 and y (T1/2 ) = ro /2 into the above equation to get 1 ro = ro 1 2 100 or, equivalently, 1 = 10 100 T1/2 log(1/2) T1/2 (7.40) This relation shows how the mode of the difference equation (7.37) is determined by T1/2 ; the relation can be used to determine from knowledge of T1/2 and vice-versa. For carbon-dating the piece of wood, we would like to determine the value of N that results in y (N ) = rN . Substituting into (7.39), and using (7.37), we get rN = ro 1 100 N = ro 10 log(1/2) T1/2 N Solving for N we arrive at the following expression N = 3.2193 T1/2 log ro rN (7.41) This result tells us how to estimate the age, N , of the artifact, from knowledge of {ro , rN , T1/2 }. Let us use the following numerical values for the piece of wood: T1/2 = 5730 years, ro = 14 dpm, rN = 11 dpm Substituting into the expression for N gives N = 2695 years old (7.42) Practice Questions: 1. For the same numerical values used above, at what rate does the carbon-14 isotope decay per year? 2. Find the numerical value of the mode of the difference equation (7.37). 3. Carbon dating of a mummy resulted in a measurement of rN = 9.5 dpm. What is the age of the mummy? 4. The radioactive element radon-222 decays at the rate of 16.8% per day. Find its half-life in days. 7.7.2 Rabbit Population and Fibonacci Numbers Let us start with a pair of rabbits and assume that each pair bears a new pair every month. A month later, the new pair of rabbits becomes productive, and so on. We would like to examine the evolution of the number of pairs of rabbits with time. 173 SECTION 7.7 APPLICATIONS 174 CHAPTER 7 HOMOGENEOUS DIFFERENCE EQUATIONS Let y (n) denote the number of rabbits at the start of month n, with n = 0 taken as the origin of time when the original pair of rabbits is introduced. Assuming the original pair of rabbits at n = 0 is young and becomes productive a month later at n = 1, we have that y (0) = 1 and y (1) = 1. The pair of rabbits born at month n = 1 will only become productive later at the start of month n = 2. Table 7.1 illustrates the evolution of the rabbit population with the symbol denoting a productive pair of rabbits and the symbol denoting an unproductive pair of rabbits. TABLE 7.1 Evolution of the rabbit population over the rst 5 months starting with one pair of young rabbits at month n = 0. n=0 y (n) n=1 n=2 n=3 n=4 1 1 2 3 5 n=5 8 The resulting sequence of integers for y (n) {1, 1, 2, 3, 5, 8, 13, 21, 34, 55, . . .} ( 7 .4 3 ) are called the Fibonacci numbers, where each subsequent number is the sum of the previous two numbers see Fig. 7.2. 1 1 2 3 5 FIGURE 7.2 The rabbit population evolves over consecutive generations according to the sequence of Fibonacci numbers (7.43). It can be seen that the quantity y (n) evolves with time according to the second-order difference equation y (n) = y (n 1) + y (n 2), y (0) = 1, y (1) = 1, n 0 (7.44) Let us determine a closed-form expression for y (n) using the techniques developed in this chapter. The characteristic equation is 2 1 = 0 with modes at 1+ 5 , 1 = 2 The general form of the solution is therefore y (n) = C1 1+ 5 2 1 5 1 = 2 n + C2 1 5 2 n u(n) where we added the step-sequence, u(n), to enforce the condition y (n) = 0 for all n < 0. We can determine the constants {C1 , C2 } from the initial conditions. Using y (0) = 1 = y (1) we nd that C1 and C2 should satisfy 1 5 1+ 5 + C2 1 = C1 + C2 and 1 = C1 2 2 Solving we get 5 5 5+ 5 , C2 = C1 = 10 10 so that y (n) = 5+ 5 10 1+ 5 2 n + 5 5 10 1 5 2 n u(n) (7.45) This result provides a closed-form expression for the Fibonacci numbers and, therefore, for the number of rabbit pairs as a function of n. Despite the awkward looking expression for y (n) above, the terms on the right-hand side always add up to an integer number. Practice Questions: 1. Dene the ratio r (n) = y (n)/y (n + 1). Show that it satises the recursion r (n) = 1 , 1 + r (n 1) r (0) = 1 2. Verify that the limit of r (n) as n is given by the so-called (inverse) golden ratio: 51 lim r (n) = n 2 3. Consider a segment AB of length 1 and divide it into two segments AC of length x and CB of length 1 x with AC denoting the longer segment. Determine the value of x such that the ratio of the shorter segment to the longer segment equals the ratio of the longer segment to the whole. 175 SECTION 7.8 APPLICATIONS 176 7.8 PROBLEMS CHAPTER 7 HOMOGENEOUS DIFFERENCE EQUATIONS Problem 7.1 Find the modes of the LTI systems: (a) y (n) + y (n 1) 5y (n 2) = x(n). (b) y (n) = 4y (n 2) + x(n 1). (c) y (n) 4y (n 2) = 2x(n). Problem 7.2 Find the modes of the LTI systems: (a) y (n) = y (n 2) + x(n) + x(n 2). (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1). (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n). Problem 7.3 Give an example of a causal LTI system whose modes are at 1 = 1/2, 2 = 1/3, 1 3 = 2 (1 + j ), and 4 = 1 (1 j ). 2 Problem 7.4 Give an example of a causal LTI system whose modes are at 1 = 1/4, 2 = 1 1 (1 + j ), and 3 = 3 (1 j ). 3 Problem 7.5 Describe all solutions to the following homogeneous equations: (a) y (n) + y (n 1) 5y (n 2) = 0. (b) y (n) = 4y (n 2). (c) y (n) 4y (n 2) = 0. Problem 7.6 Describe all solutions to the following homogeneous equations: (a) y (n) = y (n 2). (b) y (n) 6y (n 1) + 9y (n 2) = 0. (c) y (n) y (n 1) + y (n 2) y (n 3) = 0. Problem 7.7 Determine the solution of each of the following homogeneous equations with initial conditions: (a) y (n) + y (n 1) 5y (n 2) = 0, y (0) = 0, y (1) = 1. (b) y (n) = 4y (n 2), y (2) = 1, y (1) = 0. (c) y (n) 4y (n 2) = 0, y (2) = 1, y (3) = 0. Problem 7.8 Determine the solution of each of the following homogeneous equations with initial conditions: (a) y (n) = y (n 2), y (0) = 0, y (1) = 3. (b) y (n) 6y (n 1) + 9y (n 2) = 0 y (1) = 2, y (0) = 1. (c) y (n) y (n 1) + y (n 2) y (n 3) = 0 y (0) = 0, y (1) = 1, y (1) = 2. Problem 7.9 Determine the solution of each of the following homogeneous equations with initial conditions: (a) y (n) + 9y (n 2) = 0, y (0) = 0, y (1) = 1. (b) y (n) + 9y (n 2) = 0, y (0) = 0, y (1) = j . Problem 7.10 Determine the solution of each of the following homogeneous equations with initial conditions: (a) y (n) + y (n 2) = 0, y (0) = 1, y (1) = 0. (b) y (n) + y (n 2) = 0, y (0) = j, y (1) = 0. Problem 7.11 Find the impulse-response sequences of the following causal LTI systems: (a) y (n) + y (n 1) 5y (n 2) = x(n). (b) y (n) = 4y (n 2) + x(n 1). (c) y (n) 4y (n 2) = 2x(n). Problem 7.12 Find the impulse-response sequences of the following causal LTI systems: (a) y (n) = y (n 2) + x(n) + x(n 2). (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1). (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n). Problem 7.13 Find the step-response sequences of the following causal LTI systems: (a) y (n) + y (n 1) 5y (n 2) = x(n). (b) y (n) = 4y (n 2) + x(n 1). (c) y (n) 4y (n 2) = 2x(n). Problem 7.14 Find the step-response sequences of the following causal LTI systems: (a) y (n) = y (n 2) + x(n) + x(n 2). (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1). (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n). Problem 7.15 Verify which each of the following causal LTI systems is BIBO stable: (a) y (n) + y (n 1) 5y (n 2) = x(n). (b) y (n) = 4y (n 2) + x(n 1). (c) y (n) 4y (n 2) = 2x(n). Problem 7.16 Verify which each of the following causal LTI systems is BIBO stable: (a) y (n) = y (n 2) + x(n) + x(n 2). (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1). (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n). Problem 7.17 Assume the difference equation below describes a causal and relaxed system y (n) + 5 1 y (n 1) y (n 2) = x(n) 6 6 where the time index runs forward. (a) Find its modes. (b) Find its impulse-response sequence. (c) Find its response to x(n) = 1 n 2 n u(n). (d) Find its response to x(n) = 2 u(n). Problem 7.18 Assume the difference equation below describes a non-causal and relaxed system y (n) + 1 5 y (n 1) y (n 2) = x(n) 6 6 where the time index runs backwards. (a) Find its modes. (b) Find its impulse-response sequence. (c) Find its response to x(n) = 1 n 2 n u(n). (d) Find its response to x(n) = 2 u(n). 177 SECTION 7.8 PROBLEMS 178 Problem 7.19 Consider the relaxed and causal system CHAPTER 7 HOMOGENEOUS DIFFERENCE EQUATIONS y (n) + 5 1 y (n 1) y (n 2) = x(n 2) 6 6 (a) Is the system BIBO stable? (b) Find its impulse-response sequence. (c) Find its response to x(n) = 1 n 2 u(n 2). Problem 7.20 A causal and relaxed system is described by the difference equation y (n) 5 y (n 1) + y (n 2) = x(n 1) 2x(n 2) 2 Is the system BIBO stable? Find its step response. Problem 7.21 A causal and relaxed system is described by the difference equation y (n) 1 1 2 y (n 1) y (n 2) + y (n 3) = x(n) 3 12 12 (a) Find the modes of the system. (b) Find its impulse response sequence. Is the system BIBO stable? (c) Assume the initial conditions of the difference equation are set to y (3) = y (2) = 0 and y (1) = 1. Find the response of the system when x(n) = 0 for all n. Problem 7.22 A causal and relaxed system is described by the difference equation 7 2 y (n 1) + y (n 2) = x(n) 3 3 y (n) (a) Find the modes of the system. (b) Find its impulse response sequence. Is the system BIBO stable? (c) Assume the initial conditions are set to y (1) = and y (2) = . Find {, } for which only one of the modes will be present in the response of the system to x(n) = 0 for all n. Problem 7.23 Give an example of a causal and BIBO stable LTI system whose modes are at 1 = 1/2 and 2 = 2. Problem 7.24 Give an example of a causal and BIBO stable LTI system whose modes are at 1 = 1/4, 2 = 1/3, and 3 = 2 Problem 7.25 Write a constant-coefcient homogeneous difference equation, with initial conditions, whose solution is given by y (n) = 1 3 n + 1 2 n+1 for all n. Problem 7.26 Write a constant-coefcient homogeneous difference equation, with initial conditions, whose solution is given by y (n) = for all n. 1 3 n1 + 1 2 n+2 2n 1 2 n Problem 7.27 Write a constant-coefcient homogeneous difference equation, with initial conditions, whose solution is given by 179 SECTION 7.8 PROBLEMS y (n) = 1 3 n 1 2 + n n+ cos 3 4 for all n. Problem 7.28 Write a constant-coefcient homogeneous difference equation, with initial conditions, whose solution is given by y (n) = 1 3 n 1 2 + n sin n+ 3 4 for all n. Problem 7.29 The impulse-response sequence of a causal and relaxed LTI system is given by h(n) = 1 3 n1 1 2 u(n) + n+2 u(n) 2n 1 2 n u(n) Use the techniques of this chapter to deduce a description for the system in terms of a constantcoefcient difference equation. Problem 7.30 The impulse-response sequence of a causal and relaxed LTI system is given by h(n) = 1 3 n1 u(n 3) 1 2 n+2 u(n 4) Use the techniques of this chapter to deduce a description for the system in terms of a constantcoefcient difference equation. Problem 7.31 Find the solution y (n) of the so-called Fibonacci difference equation y (n) y (n 1) y (n 2) = 0 with y (1) = 0 and y (0) = 1. Problem 7.32 Use the techniques of this chapter to nd the solution of the following difference equation y (n) + 5 1 y (n 1) y (n 2) = 6 6 1 2 n u(n), y (2) = 0, y (1) = 0, n 0 Problem 7.33 Find the response of the following causal and relaxed system when the input se n quence is given by x(n) = 1 u(n 3): 2 y (n) + 1 5 y (n 1) y (n 2) = x(n 2) + (n 1)u(n), n 0 6 6 Problem 7.34 Find the response of the following causal and relaxed system when x(n) is the sequence depicted in Fig. 7.3: y (n) + 5 1 y (n 1) y (n 2) = x(n 2) + (n 1)u(n), n 0 6 6 Problem 7.35 Given an example of a causal LTI system that is described by a constant-coefcient difference equation with modes at 1 = 1/2, 2 = 1/3, 3 = 1/3, and 4 = 0. Problem 7.36 Given an example of a causal LTI system that is described by a constant-coefcient difference equation with modes at 1 = 1/2, 2,3 = (1 j )/2, and 4 = 1/4. 180 CHAPTER 7 HOMOGENEOUS DIFFERENCE EQUATIONS x(n) 4 3 2 1 1 2 1 2 3 4 n 3 FIGURE 7.3 Input sequence for Prob. 7.34. Problem 7.37 Given an example of a causal LTI system that is described by a constant-coefcient difference equation with modes at 1 = 1/2, 2 = (1 + j )/3, and 3 = (2 + j )/4. Problem 7.38 Given an example of a causal LTI system that is described by a constant-coefcient difference equation with modes at 1 = 1/2, 2 = (1 + j )/3, and 3 = (2 + j )/4. Problem 7.39 Given an example of a causal LTI system that is described by a constant-coefcient difference equation with modes at 1 = 1/2, 2 = 1/4, and 3 = 1/3 and where mode cancellation occurs at 2 = 1/4. Problem 7.40 Given an example of a causal LTI system that is described by a constant-coefcient difference equation with modes at 1 = 1/2, 2 = 1/3, and 3 = 1/4 and where mode cancellation occurs at 2 = 1/3. CHAPTER 8 Solving Difference Equations O ur objective from the discussions in Chapters 7 and 8 is to end up with a procedure that would enable us to determine closed-form expressions for the solutions of constantcoefcient difference equations in response to certain types of input sequences without the need for computing convolutions (as we did in Sec. 7.6). We shall henceforth focus on the common situation of causal input sequences, whose samples are zero over n < 0, and on the case of difference equations that run forward in time. For example, by the end of the current chapter, we will be able to determine the solution over n 0 of a difference equation of the form y (n) 2y (n 1) + 4y (n 2) = x(n), y (1) = 1, y (2) = 0, n 0 (8.1) with knowledge of both the initial conditions and the causal input sequence x(n). The technique described earlier in Sec. 7.6 does not apply to this case since the system described by the above difference equation is not LTI any longer. In such a case, we would not be able to determine the complete solution, y (n), by convolving x(n) with the impulse response sequence of the LTI system that would correspond to the relaxed difference equation. Thus, in this chapter, we shall motivate a systematic procedure for determining the response of systems described by constant-coefcient difference equations. Alternative procedures that employ transform techniques will be described in later chapters. While the method of computation in this chapter involves straightforward calculations, what is likely to confuse the reader are the various terms used to refer to different stages of the solution. For example, by the end of this chapter, the reader will be exposed to each of the terms listed in Table 8.1 and their meanings. The steps for nding each of the solutions listed in Table 8.1 will be straightforward once the reader understands what each term means. TABLE 8.1 Terminologies for important solutions associated with difference equations. particular solution homogeneous solution complete solution transient solution steady-state solution zero-input solution zero-state solution forced solution unforced solution natural solution Before we proceed, we would like to re-emphasize that there is one important special case for which we already know how to determine the complete solution of a constantcoefcient difference equation, as was described in Sec. 7.6. In that section we showed that when the difference equation describes an LTI system, then we can rst determine the impulse response sequence of the system by solving a homogeneous equation and subsequently convolve it with the given input sequence. 181 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 182 CHAPTER 8 SOLVING DIFFERENCE EQUATIONS In this chapter, however, we are interested in the more general case in which the difference equation need not describe an LTI system, for example, when the difference equation has nonzero initial conditions. The techniques developed in this chapter can be applied to both LTI and non- LTI systems. In the case of LTI systems, the techniques of this chapter will provide an alternative to the two-step procedure of Sec. 7.6; in particular, they can help avoid some of the effort that goes into computing the impulse response sequence and the subsequent convolution operation. In the rst part of this chapter we develop a procedure for determining the complete response of constant-coefcient difference equations for a restricted (yet important) subclass of input sequences. Towards the end of the chapter, we present a procedure for general input sequences; the procedure will rely on the use of convolution and on the concept of the zero-state response. Useful Causal Input Sequences For the most part in this chapter, we focus on causal input sequences of the four types listed in Table 8.2. Later, when we introduce the z -transform technique starting in Ch. 9, we shall be able to solve constant-coefcient difference equations for a broader set of input sequences. TABLE 8.2 Useful types of causal input sequences. x(n) = Au(n) x(n) = An u(n) x(n) = A cos(o n)u(n) x(n) = A sin(o n)u(n) x(n) = An cos(o n)u(n) x(n) = An sin(o n)u(n) x(n) = Anp u(n) x(n) = Anp n u(n) step-sequence exponential sequence sinusoidal sequence sinusoidal sequence sinusoidal sequence with exponential modulation sinusoidal sequence with exponential modulation polynomial sequence, where p 0 is an integer polynomial sequence with exponential modulation 8.1 PARTICULAR SOLUTION We start by dening what is meant by a particular solution to a constant-coefcient difference equation, such as the one described by (8.1). Specically, a particular solution of a constant-coefcient difference equation is one sequence (from many others that are possible; hence, the designation particular) that satises the difference equation for the given input sequence and over an interval of time of the form n no , for some no 0. No initial conditions enter into the determination of a particular solution. We denote particular solutions by yp (n). Referring to (8.1), assume we select the input sequence to be x(n) = (0.5)n u(n). Then, a particular solution would be any sequence yp (n) that satises yp (n) 2yp (n 1) + 4yp (n 2) = (0.5)n u(n) over some interval n no to be specied. When the input sequence, x(n), belongs to the class of sequences listed in Table 8.2, there is a useful procedure for determining yp (n) and no . In each case, the particular solution is essentially assumed to have a similar form to the input sequence and is selected according to the construction outlined in Table 8.3. For example, the rst line of the table states that if x(n) is a multiple of the step sequence, then we assume a similar form for yp (n) for some constant K to be determined. Likewise, the second line of the table states that if x(n) is an exponential sequence, then the same form is selected for yp (n). On the other hand, when x(n) is a sinusoidal sequence, the third line of table states that we should yp (n) as a combination of sine and cosine sequences for some constants {K1 , K2 } to be determined. The next to last line of the table states that we should select yp (n) to be a linear combination of powers of n when x(n) is of the form np u(n), and so on. The multiplication constants K or {K } are determined from the difference equation, as we illustrate in the sequel with several examples. TABLE 8.3 Assumed forms for the particular solution. Input sequence, x(n) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Particular solution, yp (n) Au(n) An u(n) A cos(o n)u(n) A sin(o n)u(n) An cos(o n)u(n) An sin(o n)u(n) Anu(n) An2 u(n) Anp u(n) Anp n u(n) Ku(n) Kn u(n) [K1 cos(o n) + K2 sin(o n)]u(n) [K1 cos(o n) + K2 sin(o n)]u(n) n [K1 cos(o n) + K2 sin(o n)]u(n) n [K1 cos(o n) + K2 sin(o n)]u(n) [K1 n + K2 ]u(n) [K1 n2 + K2 n + K3 ]u(n) [K1 np + K2 np1 + . . . + Kp+1 ]u(n) n [K1 np + K2 np1 + . . . + Kp+1 ]u(n) Example 8.1 (Exponential sequence) Let us determine a particular solution for the difference equation y (n) + 2y (n 1) 8y (n 2) = 2x(n 1) when x(n) = (0.5)n u(n) and time runs forward (i.e., the difference equation describes a causal system). In this case, we use the second line of Table 8.3 and select an exponential form for the particular solution, say, yp (n) = K (0.5)n u(n) for some constant K to be determined. Substituting this choice back into the difference equation we nd that the following relation must hold for all n in order for this selection of yp (n) to satisfy the equation: K (0.5)n u(n) + 2K (0.5)n1 u(n 1) 8K (0.5)n2 u(n 2) = 2(0.5)n1 u(n 1) We need to determine the value of K . Thus, note that none of the terms in the above equation vanish for n 2. Evaluating both sides of the equation at any n 2, we nd that K must always satisfy the relation: K + K 8K = 1 4 which leads to K = 4/27. Therefore, the particular solution is yp (n) = 4 (0.5)n , n 2 27 183 SECTION 8.1 PARTICULAR SOLUTION 184 CHAPTER 8 SOLVING DIFFERENCE EQUATIONS and this choice solution is valid over n 2 (so that no = 2). What this means is that the sequence yp (n) so determined satises the difference equation for all values of n 2 and for the given sequence, x(n) = (0.5)n u(n). Example 8.2 (Polynomial sequence) Let us determine a particular solution for the difference equation y (n) + 2y (n 1) = x(n) when x(n) = nu(n) and time runs forward (i.e., the difference equation describes a causal system). Since the input sequence is of polynomial type, then according to the last line in Table 8.3 we assume a similar form for the particular solution, namely, yp (n) = [K1 n + K2 ]u(n) for some constants K1 and K2 to be determined. Substituting this selection into the difference equation we nd that the following relation must be satised in order for the choice of yp (n) to be a viable solution: K1 nu(n) + K2 u(n) + 2K1 (n 1)u(n 1) + 2K2 u(n 1) = nu(n) Note that none of the terms in the above equality vanish for n 1. Evaluating at any n 1, we get that K1 and K2 must satisfy 3K1 n + (3K2 2K1 ) = n Equating the coefcients of powers of n on both sides we nd that K1 = 1/3 and K2 = 2/9. Therefore, the particular solution is given by yp (n) = 2 1 n+ , 3 9 n1 and this choice is valid over n 1 and for the input sequence x(n) = nu(n). Example 8.3 (Sinusoidal sequence) Let us determine a particular solution for the difference equation y (n) + 2y (n 1) 8y (n 2) = 2x(n 1) when x(n) = cos( n)u(n) and time runs forward. In this case, we use the third line of Table 8.3 3 and select a particular solution of the form: yp (n) = K1 cos n u(n) + K2 sin n u(n) 3 3 for some constants K1 and K2 to be determined. Substituting this choice back into the difference equation we nd that the following relation must hold for all n in order for this selection of yp (n) to satisfy the equation: K1 cos n u(n) + K2 sin n u(n) + 2K1 cos (n 1) u(n 1) + 3 3 3 (n 1) u(n 1) 8K1 cos 3 8K2 sin (n 2) u(n 2) = 2 cos 3 2K2 sin (n 2) u(n 2) 3 (n 1) u(n 1) 3 Note that the step-sequences on both sides of the equality are nonzero for all n 2. Evaluating both sides of the equality for any n 2 shows that K1 and K2 must satisfy: K1 cos n 3 + K2 sin n 3 (n 2) 3 Using the trigonometric identities 8K1 cos + 2K1 cos (n 1) 3 8K2 sin (n 2) 3 + 2K2 sin (n 1) 3 = 2 cos (n 1) 3 cos(a b) = cos a cos b + sin a sin b (8.2) sin(a b) = = sin a cos b cos a sin b (8.3) cos( a) sin( a) = sin(a) (8.5) cos(a) (8.4) we can expand the terms of the previous equality and reduce it to the following equivalent form: n n + K2 sin 3 3 n n K1 cos + K1 3 sin 3 3 n n K2 sin K2 3 cos 3 3 n 4K1 cos 4 3K1 sin 3 n 4K2 sin + 4 3K2 cos 3 n n cos + 3 sin 3 3 K1 cos + + + = n 3 n 3 Grouping terms we have that K1 and K2 must satisfy n 6K1 + 3 3K2 cos 3 n 3 3K1 + 2K2 sin 3 = cos n n + 3 sin 3 3 Equating the coefcients of cos() and sin() on both sides we nd that K1 and K2 must satisfy the relations 6K1 + 3 3K2 = 1 and 3 3K1 + 2K2 = 3 which lead to K1 = 11/15 and K2 = 3 3/5. Therefore, the particular solution is yp (n) = 11 33 cos n u(n) + sin n , n2 15 3 5 3 and this choice solution is valid over n 2. Example 8.4 (Failure of procedure) The procedure illustrated in the previous two examples can fail in some situations. Consider for example the difference equation y (n) 2y (n 1) + y (n 2) = x(n) and let us try to determine its particular solution when x(n) = u(n). If we let yp (n) have the form Ku(n) for some K , as suggested by Table 8.3, then the following equality must hold: Ku(n) 2Ku(n 1) + Ku(n 2) = u(n) 185 SECTION 8.1 PARTICULAR SOLUTION 186 CHAPTER 8 SOLVING DIFFERENCE EQUATIONS This equation cannot be satised by any choice of K for any value of n 2 since we would get the impossible relation K 2K + K = 1 (impossible equality) The difculty in this case lies in the fact that the form we adopted for the particular solution, yp (n) = Ku(n), also happens to be a solution to the homogeneous equation y (n) 2y (n 1) + y (n 2) = 0 In such situations, the procedure we described can be adjusted in order to yield a correct particular solution. However, we shall avoid pursuing such details here. This is because the z -transform technique that we shall introduce in later chapters will provide a powerful alternative method for solving constant-coefcient different equations under varied conditions and for varied input sequences, not just the ones listed in Table 8.3. 8.2 CHARACTERIZING ALL SOLUTIONS Once we know how to nd a particular solution for a constant-coefcient difference equation, we can then proceed to characterize all sequences that satisfy the same equation. Actually, there are innitely many such sequences and this is how we nd them: (a) First, we determine a particular solution, yp (n), by following the procedure explained in the previous section. As illustrated in the examples, the particular solution will generally hold over an interval of the form n no , for some no 0. (b) Next we determine the general form of the corresponding homogeneous solution. Let us denote this form by yh (n). The homogeneous solution will satisfy the homogeneous equation for all n. (c) If we now add the sequences yp (n) and yh (n), as yc (n) = yp (n) + yh (n) then yc (n) is a sequence that satises the same difference equation as the particular solution. It will further hold, as we shall establish further ahead, that the sequences {yc (n)} so constructed describe all possible solutions to the difference equation over the interval n no . The following example illustrates the procedure. Example 8.5 (Describing all solutions) Consider the difference equation y (n) 0.5y (n 1) = u(n) with time running forward. A particular solution of the form yp (n) = Ku(n) can be found by determining the value of K from the equality: Ku(n) 0.5Ku(n 1) = u(n) This equality holds for all n 1 if we select K = 2. Moreover, we already know from Sec. 7.2 that all solutions of the homogeneous equation y (n) 0.5y (n 1) = 0 187 have the form yh (n) = C (0.5)n , for arbitrary constants C SECTION 8.3 CHARACTERIZING ALL SOLUTIONS Therefore, all solutions that satisfy the original difference equation are given by yc (n) = C (0.5)n + 2, n 1 Thus, observe that yc (n) describes a class of solutions: one sequence for every choice of C . Let us now justify the following claim. Given a constant-coefcient difference equation, the construction yc (n) = yp (n) + yh (n) (8.6) describes all solutions to the equation for all n no , where n no is the range over which the particular solution is valid. Proof: Assume to the contrary that there is a solution to the difference equation over n no that is not captured by the representation (8.6). Let us denote this solution by yc (n). Now pick any solution yc,o (n) from the set (8.6), say, yc,o (n) = yp (n) + yh,o (n) for some homogeneous sequence yh,o (n). Then both sequences, yc,o (n) and yc (n), satisfy the difference equation for n no . Consequently, their difference satises the homogeneous difference equation for n no . Indeed, assume for illustration purposes, that the difference equation is secondorder and of the form y (n) a1 y (n 1) a2 y (n 2) = x(n) Then, since, by assumption, the sequence yc (n) satises the difference equation over n no we have yc (n) a1 yc (n 1) a2 yc (n 2) = x(n), n no (8.7) Likewise, since yc,o (n) satises the difference equation over n no , we must have yc,o (n) a1 yc,o (n 1) a2 yc,o (n 2) = x(n), n no (8.8) Subtracting (8.7) and (8.8) over n no we nd that [c (n) yc,o (n)] a1 [c (n 1) yc,o (n 1)] a2 [c (n 2) yc,o (n 2)] = 0, n no y y y so that the difference, yc (n) yc,o (n), satises the homogeneous equation y (n) a1 y (n 1) a2 y (n 2) = 0, n no This argument can be easily extended to more general constant-coefcient difference equations. Therefore, we must have that the difference, yc (n) yc,o (n), is some homogeneous solution and we denote it by yh,1 (n): yc (n) yc,o (n) = yh,1 (n), n no It follows that we can express yc (n) over the interval n no in the following form: yc (n) = yc,o (n) + yh,1 (n) = yp (n) + [yh,o (n) + yh,1 (n)] 188 CHAPTER 8 But since the sum of two homogeneous solutions is also a homogeneous solution, we conclude that yc (n) belongs to the same set (8.6). SOLVING DIFFERENCE EQUATIONS 8.3 FIRST METHOD FOR FINDING COMPLETE SOLUTIONS The procedure described so far can be used to determine the complete response of systems that are characterized by constant-coefcient difference equations with initial conditions. These systems are not necessarily LTI. As indicated in the introduction of the chapter, we are mainly interested in solving difference equations over n 0 in response to causal input sequences. We proceed as follows: (a) First, we determine the form of all solutions, yc (n), and the interval over which the representation is valid, say over n no . (b) Second, we propagate the given initial conditions up to the time instant no 1. (c) We then determine the unknown constants in the description of the solution from these initial conditions. Example 8.6 (Finding the complete solution) Consider again the system from Example 8.1, that is described by the difference equation y (n) + 2y (n 1) 8y (n 2) = 2x(n 1) albeit now with the initial conditions y (1) = 1 and y (2) = 0. Let us determine its complete response when x(n) = (0.5)n u(n). Time is assumed to run forward. We proceed in steps. 1. We already know from Example 8.1 that a particular solution is given by yp (n) = 4 (0.5)n , 27 for n 2 2. The general form of the homogeneous solution is yh (n) = C1 2n + C2 (4)n , for all n since the modes of the system are 1 = 2 and 2 = 4, and where C1 and C2 are arbitrary constants. 3. All solutions to the difference equation y (n) + 2y (n 1) 8y (n 2) = 2x(n 1) are therefore given by y (n) = C1 2n + C2 (4)n 4 (0.5)n , 27 for n 2 for some constants {C1 , C2 }. 4. We propagate the initial conditions up to the time instants just prior to n = 2, i.e., we determine y (0) and y (1). These values follow from the given initial conditions and from the difference equation: y (0) = 2, y (1) = 14 5. Using these initial conditions we nd that the constants {C1 , C2 } must satisfy the linear system of equations 4 2 = C1 + C2 , 27 ZERO-STATE RESPONSE 2 14 = 2C1 4C2 27 which leads to C1 = 10/9 and C2 = 80/27. 6. Therefore, the complete solution of the system in response to x(n) = (0.5)n u(n) is given by yc (n) = 10 n 80 4 2 (4)n (0.5)n , 9 27 27 n0 This solution is valid over n 0 and not just n 2 because we already enforced the initial conditions at time instants n = 0 and n = 1. 8.4 ZERO-STATE RESPONSE Now that we know how to determine the complete solution of a constant-coefcient difference equation, we move on to explain how to nd two special responses of a system. One is called the zero-state (or forced) response of the system and the other is called the zero-input response of the same system. By denition, the zero-state response of a system is the complete response of the system when it is assumed to be relaxed or in zero initial state. In other words, the determination of the zero-state response of the difference equation amounts to assuming that it describes an LTI system by assuming that the system is relaxed and, accordingly, that the initial conditions are zero. We shall denote the zero-state response of a system by yzs (n). Example 8.7 (Finding the zero-state response) Consider again the system from Example 8.6: y (n) + 2y (n 1) 8y (n 2) = 2x(n 1) with initial conditions y (1) = 1 and y (2) = 0. Time is assumed to run forward. Let us determine its zero-state response when x(n) = (0.5)n u(n). In order to do so, we need to assume that the system is relaxed and use instead the alternative initial conditions y (1) = 0, y (2) = 0 We proceed in steps. The rst four steps are similar to what we already did in Example 8.6. 1. We already know from Example 8.6 that the particular solution is given by yp (n) = 4 (0.5)n , 27 for n 2 2. The general form of the homogeneous solution is yh (n) = C1 2n + C2 (4)n , for all n since the modes of the system are 1 = 2 and 2 = 4, and where C1 and C2 are arbitrary constants. 3. All solutions to the difference equation y (n) + 2y (n 1) 8y (n 2) = 2x(n 1) 189 SECTION 8.4 190 are therefore described by CHAPTER 8 SOLVING DIFFERENCE EQUATIONS y (n) = C1 2n + C2 (4)n 4 (0.5)n , 27 for n 2 for some constants {C1 , C2 }. 4. We propagate the initial conditions y (1) = 0 and y (2) = 0 to the time instants just prior to n = 2. Using the given difference equation along with the relaxed initial conditions we get y (0) = 0, y (1) = 2 5. Using these initial conditions we nd that the constants {C1 , C2 } must satisfy the linear system of equations 0 = C1 + C2 4 , 27 14 = 2C1 4C2 2 27 which leads to C1 = 12/27 and C2 = 8/27. 6. Therefore, the zero-state response of the system is yzs (n) = 12 n 8 4 2 (4)n (0.5)n , 27 27 27 n0 Superposition Principle for Zero-State Responses An important property of the zero-state response of relaxed systems that are described by constant-coefcient difference equations is that the zero-state response satises a superposition principle. Specically, if we determine the zero-state responses of the system to the input sequences x1 (n) and x2 (n) separately, then the zero-state response to the linear combination ax1 (n) + bx2 (n) is the corresponding linear combination of the individual zero-state responses to x1 (n) and x2 (n). This is simply because such relaxed systems are linear. Example 8.8 (Superposition property) Consider a relaxed and causal system that is described by the difference equation y (n) + 2y (n 1) 8y (n 2) = 2x(n 1) and let us determine its response to the input sequence x(n) = (0.5)n u(n) + 2u(n 1) Obviously, since the system is relaxed, its response to the above input sequence coincides with the zero-state response of the system. So let us determine the zero-state response. First, note that the given sequence x(n) is a linear combination of two sequences. We already know from Example 8.7, that the zero-state response of the system to the input sequence 0.5n u(n) is 12 n 8 4 yzs,1 (n) = 2 (4)n (0.5)n , n 0 27 27 27 Let us now determine the zero-state response to 2u(n 1). For this purpose, we proceed as in Example 8.6. 191 To begin with, we know that the homogeneous solution has the form SECTION 8.5 yh (n) = C1 2n + C2 (4)n , for all n ZERO-INPUT RESPONSE A particular response to 2u(n 1) is assumed to be of the form yp (n) = Ku(n) In order determine the constant K we substitute yp (n) into the difference equation and nd that it must satisfy Ku(n) + 2Ku(n 1) 8Ku(n 2) = 4u(n 2) Evaluating both sides of the equality for any value of n 2 (for which none of the terms vanish), we arrive at K = 4/5. This means that the complete solution of the system in response to 2u(n 1) has the form 4 yc (n) = C1 2n + C2 (4)n , for n 2 5 Since the system is assumed to be relaxed, we now determine the constants {C1 , C2 } from the initial conditions y (1) = 0 = y (2). We propagate these conditions up to n = 1 to get y (1) = 0 and y (0) = 0. Solving for C1 and C2 we obtain C1 = 2 2 and C2 = 3 15 Therefore, the zero-state response that corresponds to the input 2u(n 1) is yzs,2 (n) = 2 4 2n 2+ (4)n , 3 15 5 n0 It then follows from the superposition principle that the zero-state response of the system to x(n) = (0.5)n u(n) + 2u(n 1) is yzs (n) = = yzs,1 (n) + yzs,2 (n) 12 8 2 2 + 2n + 3 27 15 27 (4)n 4 4 (0.5)n , n 0 27 5 That is, yzs (n) = 10 n 22 4 4 2+ (4)n (0.5)n , n 0 9 135 27 5 8.5 ZERO-INPUT RESPONSE The zero-input response (also called natural or unforced) response of a system is simply the homogeneous solution with the constants determined from the initial conditions. In other words, we set the input sequence to zero (and, hence, the name zero-input). We denote the zero-input response of a system by yzi (n). 192 CHAPTER 8 SOLVING DIFFERENCE EQUATIONS Example 8.9 (Finding the zero-input solution) Consider the same system from Example 8.6, namely, y (n) + 2y (n 1) 8y (n 2) = 2x(n 1) but with initial conditions y (1) = 1 and y (2) = 0. Time is assumed to run forward. We already know that the general form of the homogeneous solution is yh (n) = C1 2n + C2 (4)n , for all n For the given initial conditions y (1) = 1 and y (2) = 0, we nd that the constants {C1 , C2 } must satisfy the linear system of equations 1= C1 C2 , 2 4 0= C1 C2 + 4 16 which leads to C1 = 2/3 and C2 = 8/3. Therefore, the zero-input response is yzi (n) = 2n 8 2 (4)n , n 0 3 3 Observe that we specied the time interval for yzi (n) as n 0 since we are focusing on responses of systems over n 0. It is easy to see from the above example that the zero-input response of a system that is described by a constant-coefcient difference equation will always include a linear combination of the exponentials contributed by the modes of the system. Superposition Principle for Zero-Input Responses An important property of the zero-input response of systems that are described by constantcoefcient difference equations is that the zero-input response also satises a superposition principle in relation to the initial conditions. Specically, if we determine separately the zero-input responses for two given sets of initial conditions that are specied at the same time instants, then the zero-input response to a linear combination of these initial conditions is the corresponding linear combination of the individual zero-input responses. Proof: We establish the statement for a second-order constant-coefcient difference equation with two distinct nonzero modes, say and . The argument is general enough and conveys the main idea. For the second-order system, the zero-input response will be a linear combination of n and n , say yzi (n) = C1 n + C2 n Given initial conditions y (1) = a1 and y (2) = b1 , we can determine C1 and C2 by solving the linear system of equations 1 1 a1 C1 = 1 1 b1 C2 2 2 r1 A z1 This is a linear system of equations of the form Az1 = r1 , whose unique solution z1 gives us the desired values for the constants {C1 , C2 } and, therefore, determines the rst zero-input response, which we denote by yzi,1 (n). If we change the initial conditions to y (1) = a2 and y (2) = b2 , we obtain a new system of linear equations with the same coefcient matrix, A, but with a different right-hand side vector r2 , say, Az2 = r2 , where now a2 1 1 1 2 1 2 C1 = b2 r2 A C2 z2 The unique solution vector z2 gives us the values of the new constants {C1 , C2 } and it leads to a second zero-input response, yzi,2 (n). It is now easy to see that if we employ an initial condition vector r3 that is a linear combination of the earlier initial condition vectors {r1 , r2 }, say, r3 = 1 r1 + 2 r2 for some coefcients {1 , 2 }, then the new solution vector z3 to the linear system of equations Az3 = r3 is given by the same linear combination of the corresponding {z1 , z2 }, i.e., z3 = 1 z1 + 2 z2 Consequently, the new zero-input sequence yzi,3 (n) is given by the same linear combination of the corresponding sequences {yzi,1 (n), yzi,2 (n)}, yzi,3 = 1 yzi,1 (n) + 2 yzi,2 (n) 8.6 SECOND METHOD FOR FINDING COMPLETE SOLUTIONS Using the concepts of the zero-state and zero-input responses, we can now describe a second method for nding the complete solution of a system that is described by a constantcoefcient difference equation with initial conditions. Specically, it always holds that the complete response of such systems is the sum of the zero-input and zero-state responses, yc (n) = yzi (n) + yzs (n) (8.9) This result suggests that in order to determine the complete solution, we simply determine separately the zero-input response and the zero-state response and then add both responses. This procedure decouples the effects of the initial conditions and the input sequence. When we evaluate the zero-input response, we set the input sequence to zero and obtain the response of the system to the initial conditions. When, on the other hand, we evaluate the zero-state response, we set the initial conditions to zero and evaluate the response of the system to the input sequence. Example 8.10 (Finding the complete solution) Consider again the system y (n) + 2y (n 1) 8y (n 2) = 2x(n 1) 193 SECTION 8.6 SECOND METHOD FOR FINDING COMPLETE SOLUTIONS 194 CHAPTER 8 with initial conditions y (1) = 1, y (2) = 0, and input sequence x(n) = (0.5)n u(n). Time is assumed to run forward. We found earlier in Example 8.6 that the complete solution is given by SOLVING DIFFERENCE EQUATIONS yc (n) = 10 n 80 4 2 (4)n (0.5)n , 9 27 27 n0 We also found in Examples 8.7 and 8.9 that the zero-state and zero-input solutions of the system are given by yzs (n) = yzi (n) = 8 4 12 n 2 (4)n (0.5)n , n 0 27 27 27 2n 8 2 (4)n , n 0 3 3 By adding these two components we easily nd that the sum is identical to the expression for yc (n) given above. 8.7 TRANSIENT AND STEADY-STATE RESPONSE The transient response of a system is dened as that part of the complete response that decays to zero as n approaches innity. On the other hand, the steady-state response of the system is that part of the complete solution that persists in the response as n . We denote the steady-state response by yss (n) and the transient response by ytr (n). Furthermore, the steady-state value of a sequence, denoted by y (), refers to its limiting value as n , i.e., y () = lim y (n) (8.10) n Example 8.11 (Components of the complete solution) Consider the same system of Example 8.11. Its complete response is given by yc (n) = 4 10 n 80 2 (4)n (0.5)n , 9 27 27 n0 In this case, the steady-state response is yss (n) = 10 n 80 2 (4)n , 9 27 n while the transient response is ytr (n) = 4 (0.5)n , 27 n0 Example 8.12 (Steady-state value of a sequence) The steady-state value of the sequence y (n) = 2u(n) + 1 2 n u(n) is easily seen to be lim y (n) = 2. n since the exponential sequence dies out with time. 8.8 THIRD METHOD FOR FINDING COMPLETE SOLUTIONS 195 SECTION 8.8 The earlier discussions provided two methods for evaluating the complete responses of systems that are described by constant-coefcient difference equations. Both methods require the input sequence to belong to one of the forms listed in Table 8.3 since both methods involve a step that requires determining a particular solution: 1. First Method. Determine a particular solution, yp (n), and the general form of the homogeneous solution, yh (n), in terms of arbitrary constants. Then, set yc (n) = yp (n) + yh (n) and determine the unknown constants from the given initial conditions. 2. Second Method. Determine the zero-input response, yzi (n), by solving a homogeneous equation with the given initial conditions. Determine further the zerostate response by nding the complete solution of the relaxed system. Then, set yc (n) = yzi (n)+ yzs (n). The complete solution of the relaxed system is determined by using the rst method, through a combination of particular and homogeneous solutions. Nevertheless, the second method described above in terms of the zero-state and zero-input responses can be extended to more general input sequences (other than those listed in Table 8.3) by noting that the zero-state response can be alternatively determined via a convolution sum: 3. Third Method. Since nding the zero-state response requires that we assume that the system is relaxed, then the difference equation in question will be describing an LTI system. Hence, we can rst determine the impulse response sequence of this LTI system and then convolve it with the input sequence to determine the zero-state response, yzs (n). This response is subsequently added to the zero-input response, yzi (n), to obtain the complete solution, yc (n). Example 8.13 (Finding the complete solution) Consider again the system studied in Example 8.10, and which is described by the difference equation y (n) + 2y (n 1) 8y (n 2) = 2x(n 1) with initial conditions y (1) = 1 and y (2) = 0. Time is assumed to run forward. Let us determine the complete response to x(n) = (0.5)n u(n) by means of the third method outlined above. We already know from Example 8.10 that the complete solution is given by yc (n) = 10 n 80 4 2 (4)n (0.5)n , 9 27 27 n0 We would like to arrive at this same expression by means of the third method. According to this method, we proceed as follows: 1. We rst determine the zero-input response of the system, which we already know from Example 8.9 to be: 2 8 yzi (n) = 2n (4)n , n 0 3 3 2. We next determine the impulse response sequence of the relaxed system, namely, we determine the solution of h(n) + 2h(n 1) 8h(n 2) = 2 (n 1) THIRD METHOD FOR FINDING COMPLETE SOLUTIONS 196 CHAPTER 8 SOLVING DIFFERENCE EQUATIONS with assumed initial conditions h(2) = 0 = h(1) due to relaxation. Relaxed systems described by such constant-coefcient difference equations are LTI. Since the system is assumed be causal, we must have h(n) = 0 for n < 0. The above difference equation in h(n) becomes homogeneous for n 2. Propagating the initial conditions up to n = 1 we have h(0) = 0, h(1) = 2 The modes of the system are 1 = 2 and 2 = 4. Therefore, the general form of the impulse response sequence is h(n) = C1 2n + C2 (4)n We determine the constants {C1 , C2 } from the conditions h(0) = 0 and h(1) = 2. Doing so, we obtain the linear system of equations C1 + C2 = 0, 2C1 4C2 = 2 which leads to C1 = 1/3 and C2 = 1/3. Therefore, the impulse response sequence is given by 1 1n h(n) = 2 (4)n u(n) 3 3 where we incorporated a step-sequence to enforce h(n) = 0 over n < 0. 3. We now determine the zero-state response of the system by convolving the input sequence, x(n) = (0.5)n u(n), with the impulse response sequence, h(n). Specically, yzs (n) = x(n) h(n) Obviously, since both sequences, x(n) and h(n) are causal, the resulting sequence yzs (n) is also causal, i.e., yzs (n) = 0 for n < 0 To determine the samples of yzs (n) for n > 0 we evaluate the convolution sum: yzs (n) = = x(n) h(n) k= x(k)h(n k) n 1 nk 1 2 (4)nk 3 3 (0.5)k = k=0 = 1n 2 3 n k=0 1 4 k 1 (4)n 3 n k=0 1 8 k n+1 = = 1 1 (1/8)n+1 1 n 1 (1/4) 2 (4)n 3 1 1/4 3 1 + 1/8 8 4 4n n n 2 (4) (0.5) , n 0 9 27 27 4. Finally, we add yzs (n) and yzi (n) to get yc (n) = 10 n 80 4 2 (4)n (0.5)n , 9 27 27 n0 197 8.9 APPLICATIONS SECTION 8.9 APPLICATIONS In this section, we illustrate an application of some of the concepts covered in the chapter in the context of macroeconomics and cell division in biology. 8.9.1 Macroeconomics Model A simplied model for the national economy of a country can be motivated as follows. Let y (n) denote the size of the national income evaluated during the accounting period n. This income is the combined sum of three components: (a) The amount of consumer expenditure through the purchase of goods. We denote this quantity by C (n). It is assumed that C (n) proportional to the national income during the preceding accounting period, say, C (n) = y (n 1) where is a positive variable smaller than one. (b) The amount of private investments, which we denote by I (n). It is assumed that I (n) is proportional to the increase in consumption of the current accounting period relative to the previous period, i.e., I (n) = [C (n) C (n 1)] = [y (n 1) y (n 2)] where is a positive constant. (c) The amount of Government spending, which we will assume is normalized to one unit. Adding the three components (a)-(c), we nd that the evolution of the national income is governed by the second-order difference equation: y (n) = (1 + )y (n 1) y (n 2) + 1, n 0 which we rewrite as y (n) (1 + )y (n 1) + y (n 2) = 1, n 0 (8.11) We set the origin of time n = 0 at the accounting period from which we start to assess the evolution of the national income starting from some initial conditions, say, y (2) = 2 and y (1) = 5/2. With this frame of reference, the value of one that appears on the right-hand side of (8.11) can be taken to correspond to the step-sequence, u(n). The evolution of y (n) with time is a function of the modes of the system (8.11), which are in turn determined by the relative values of the parameters and . The characteristic equation of the difference equation is 2 (1 + ) + = 0 and the modes are given by = (1 + ) 2 (1 + )2 4 2 (8.12) 198 Note that complex modes are possible when the quantity below is negative CHAPTER 8 SOLVING DIFFERENCE EQUATIONS = 2 (1 + )2 4 When < 0, the evolution of y (n) with time will exhibit an oscillatory behavior. Table 8.4 lists the modes that correspond to three choices of the pair (, ). We now solve the difference equation (8.11)for the three cases listed in the table. TABLE 8.4 Modes of system (8.11) for three different choices of the parameters (, ). 1 2 8/9 5/9 1/2 1/2 5 1 2/3 5/3 1 (1 + j ) 2 2/3 5/3 1 (1 j ) 2 (a) = 8/9 and = 1/2. In this case, the national economy is modeled according to the difference equation 4 4 y (n) y (n 1) + y (n 2) = u(n), y (2) = 2, y (1) = 5/2, n 0 3 9 We determine the complete solution by nding the zero-state and zero-input responses. To begin with, the system exhibits a double mode at = 2/3 (which lies inside the unit circle). Therefore, the general form of the homogeneous solution is n n 2 2 yh (n) = C1 + C2 n , for all n 3 3 For the given initial conditions we nd that the constants C1 and C2 must satisfy the relations 3 5 9 (C1 2C2 ) = 2 and (C1 C2 ) = 4 2 2 which lead to C1 = 11/9 and C2 = 1/6. Therefore, the zero-input solution is given by yzi (n) = 2 3 11 9 n 1 +n 6 2 3 n , n0 Let us now determine the zero-state solution. We select a particular solution of the form yp (n) = Ku(n) and substitute into the difference equation 4 4 Ku(n) Ku(n 1) + Ku(n 2) = u(n) 3 9 For any value of n 2, we nd that K = 9 so that yp (n) = 9u(n) We already know that the general form of the homogeneous solution is yh (n) = D1 2 3 n + D2 n 2 3 n , for all n for some constants D1 and D2 , which we now determine differently from the C1 and C2 in the zero-input case. Indeed, all solutions to the relaxed system 4 4 y (n) y (n 1) + y (n 2) = u(n) 3 9 are described by y (n) = 9u(n) + D1 n 2 3 + D2 n n 2 3 , n2 We now propagate the initial conditions y (1) = 0 = y (2) to the time instants n = 0 and n = 1 to nd y (0) = 1 and y (1) = 7/3 We use these values to solve for D1 and D2 and to arrive at the zero-state solution, yzs (n). Doing so we nd that D1 and D2 must satisfy 1 = 9 + D1 7 2 2 = 9 + D1 + D2 3 3 3 and so that D1 = 8 and D2 = 2. Therefore, the zero-state response is yzs (n) = 9u(n) 8 2 3 n n 2 3 2n , n2 Adding yzi (n) and yzs (n) we arrive at the desired complete solution, which describes the evolution of the national income as a function of time: yc (n) = 9 61 9 n 2 3 11 n 6 n 2 3 u(n) (8.13) We observe in this case that the national income tends to the steady-state response yss (n) = 9u(n) as n (8.14) while the transient term below tends to zero ytr (n) = 11 61 + n 9 6 2 3 n u(n) (8.15) (b) = 5/9 and = 5. In this case, the national economy is modeled according to the difference equation y (n) 10 25 y (n 1) + y (n 2) = u(n), y (2) = 2, y (1) = 5/2, n 0 3 9 Now the the system exhibits a double mode at = 5/3 (which lies outside the unit circle). We can repeat a similar argument to the previous case and determine the complete solution to arrive at yc (n) = 9 1185 + 4 252 5 3 n + 30 n 7 5 3 n u(n) (8.16) 199 SECTION 8.9 APPLICATIONS 200 We observe now that the national income grows unbounded rather fast with time. CHAPTER 8 (c) = 1/2 and = 1. In this case, the national economy is modeled according to the difference equation 1 y (n) y (n 1) + y (n 2) = u(n), y (2) = 2, y (1) = 5/2, n 0 2 Now the system exhibits two complex conjugate modes at 1 2 j = (1 j ) = e4 2 2 Both modes lie inside the unit circle. We can repeat a similar argument to the previous cases in order to determine the corresponding complete solution. We leave it as an exercise to the reader. It will be observed in this case that the solution exhibits decaying oscillatory behavior at the angular frequency = /4 and that it tends in steady-state towards y (n) 2 as n . Figure 8.1 plots the evolution of y (n) for the three cases considered above over the rst 20 iterations. Only the rst 6 iterations are shown for the second case with modes at = 5/3 since the solution grows fast. =8/9, =1/2, double modes at =2/3 y(n) 10 5 0 0 5 10 15 n (years) =5/9, =5, double modes at =5/3 20 y(n) 100 50 0 0 1 2 3 4 n (years) =1/2, =1, complex modes at =0.5(1+j) and =0.5(1j) 5 2.5 y(n) SOLVING DIFFERENCE EQUATIONS 2 1.5 0 5 10 n (years) 15 20 FIGURE 8.1 Plot of the time evolution of the national income as a function of time for three cases involving modes inside the unit circle (top plot), modes outside the unit circle (middle plot), and complex modes (bottom plot). 201 Practice Questions: 1. Determine the evolution of the national income when = 1/2 and = 1. Identify the transient and steady-state components of the response. 2. For a xed , describe all values of that would result in real modes. Describe all values of that would result in modes that lie inside the unit circle. 3. For a xed , describe all values of that would result in real modes. 4. Let = 8/9 and = 1/2. Assume the Government wishes to stimulate the economy by injecting resources at time n = 5. Change the input signal from u(n) to u(n) + 0.25 (n 5). Determine the evolution of the national economy and compare it with (8.13). How do the corresponding steady-state responses compare with each other? 8.9.2 Cell Division in Biology We describe in this section a simplied mathematical model for the division of biological cells as they evolve through three stages, starting from stem cells into progenitor cells and then mature cells. The model adopted here can also be applied to other scenarios involving multiple states and transitions between these states. Stem cells have the ability to regenerate (or self-renew). They also have the ability to divide into intermediate cells known as progenitor cells. This process of division is called differentiation. Progenitor cells are more specialized than stem cells. They in turn can differentiate to generate mature cells with highly specialized functions such as blood cells, skin cells, or muscle cells. Progenitor cells lie in an intermediate state between stem cells and mature cells. All three types of cells can also die. We would like to examine the evolution of the number of cells in a tissue over time. To do so, we let {s(n), p(n), q (n)} denote the number of stem, progenitor, and mature cells at iteration n. We choose the time interval between two successive values of n to correspond to the duration of time it takes for a stem cell to divide. We assume that progenitor cells take P units of time to differentiate (with P 1) and that mature cells live for Q units of time (with Q 1). Both P and Q can assume fractional values. Stem Cell Population Let s denote the fraction of stem cells that regenerate at each iteration. Let also s denote the fraction of stem cells that differentiate into progenitor cells. The remaining fraction of stem cells, given by 1 s s , is assumed to die see Fig. 8.2. Then, at time n, the number of stem cells that are present is given by the following relation: s(n) = 2s s(n 1), s(0) = so , n 0 (stem cells) (8.17) The factor of 2 is because each of the s s(n 1) cells divide into 2 cells during regeneration. The above recursion is a rst-order homogeneous difference equation with an initial condition, whose solution we immediately identify as the following exponential sequence: s(n) = so (2s )n u(n) (stem cell population) (8.18) SECTION 8.9 APPLICATIONS 202 CHAPTER 8 p SOLVING DIFFERENCE EQUATIONS p s progenitor cell s stem cell mature cell FIGURE 8.2 Stem cells regenerate and divide with probabilities s and s , respectively. The remaining fraction of 1 s s dies. Likewise, progenitor cells regenerate and divide with probabilities p and p , respectively. The remaining fraction of 1 p p dies. Progenitor Cell Population Likewise, let p denote the fraction of progenitor cells that regenerate every P units of time. Let also p denote the fraction of progenitor cells that divide into mature cells every P units of time. Since we are assuming that progenitor cells take P units of time to regenerate, compared with one unit of time for the stem cells, we conclude that p /P is the fraction (or probability) of progenitor cells that divide during one unit of time. Therefore, we can express the number of progenitor cells that are present at time n by the following relation: p(n) = 2p p(n 1) + 2s s(n 1), p(0) = po , n 0 P (progenitor cells) (8.19) This relation takes into account the two sources of progenitor cells: self-renewal of a fraction of the cells (represented by p /P ) and differentiation by a fraction of the stem cells (represented by s ). If we substitute (8.18) into (8.19), we obtain p(n) = 2p p(n 1) + x(n), p(0) = po , n 0 P (8.20) with the exponential input sequence x(n) = 2s so (2s )n1 u(n 1) To solve the rst-order difference equation (8.20), we can procedure in many ways, as explained in the body of this chapter. Here we illustrate the computation of the solution by determining its zero-input and zero-state components and then combining them. Zero-input component. We note that the general form of the homogenous solution of (8.20) is n 2p , n0 ph (n) = C P for arbitrary constants C . We nd C by using the initial condition ph (0) = p(0), which gives C = po so that the zero-input component of the solution is given by 2p P pzi (n) = po n , n0 Zero-state component. To determine the zero-state solution of (8.20), we rst determine a particular solution of the same form as x(n), namely, pp (n) = K (2s )n u(n 1) Plugging into (8.20) we nd that K must satisfy K (2s )n u(n 1) = 2p K (2s )n1 u(n 2) + 2s so (2s )n1 u(n 1) P Selecting any value of n 2 and solving for K we nd K= s s o s Pp so that the particular solution is given by pp (n) = s s o n (2s ) , n 2 s Pp The zero-state solution then has the form pzs (n) = C 2p P n + s s o n (2s ) , n 2 s Pp where we added the contribution from the homogeneous component. To determine the constant C we use the difference equation (8.20) to propagate the (now zero-state) initial condition p(0) = 0 to time n = 1 to get p(1) = 2s so . Using this initial condition in the above expression for pzs (n) gives C= s s o s Pp Therefore, yzs (n) = s s o n (2s ) s Pp 2p P n , n1 Complete solution. Adding the zero-input and zero-state components we arrive at the desired expression for the evolution of the population of the progenitor cells: s s o n p(n) = p (2s ) + s P po s s o s Pp 2p P n , n0 (8.21) We see that the evolution of p(n) is controlled by the two modes: 1 = 2s and 2 = 2p /P . The rst mode represents the dynamics of stem-cell differentiation, while the second mode represents the dynamics of progenitor cell regeneration. 203 SECTION 8.9 APPLICATIONS CHAPTER 8 SOLVING DIFFERENCE EQUATIONS Mature Cell Population Let denote the fraction of mature cells that die every Q units of time. Then /Q represents the fraction of mature cells that die during one unit interval. It follows that we can express the number of mature cells that are present at time n by the following relation: q (n) = 1 Q q (n 1) + 2 p p(n 1), q (0) = qo , n 0 P (mature cells) (8.22) This relation takes into account two effects: differentiation by progenitor cells (represented by p /P ) and survival rate of mature cells (represented by 1 /Q). Recursion (8.22) represents a rst-order difference equation with input sequence given by 2 p p(n 1) x(n) = P We can use the expression for p(n) from (8.21) to determine a closed-form expression for q (n) as a function of time by following the same procedure we used for p(n) in terms of zero-state and zero-input components. We leave the details to the reader. Figure 8.3 illustrates the evolution of the population sizes of stem cells, progenitor cells, and mature cells for the numerical values indicated in the caption of the gure. mature cells 5 10 population size 204 progenitor cells stem cells 4 10 0 50 100 n (iteration) 150 200 FIGURE 8.3 Evolution of the population of stem, progenitor, and mature cells in a simulation that assumes s = 0.5, s = 0.3, p = 0.6, p = 0.3, = 0.1, P = 1.5, Q = 2, and po = 104 stem cells. Practice Questions: 1. Determine a closed-form expression for q (n) by solving the difference equation (8.22). 2. What condition s should satisfy in order for the population of stem cells to remain stable at so ? 3. Using s = 0.5, what condition should be satised in order for the steady-state value of the progenitor cell population to be larger than the steady-state value of the stem cell population? 4. What is the steady-state value of the mature cell population? How does it compare to the steady-state value of the progenitor cell population? 5. Assume a mutation happens that affects the value of and changes it to > . Will this change affect the rate at which the number of mature cells evolves with time? Will the change affect the steady-state population of mature cells? 8.10 PROBLEMS Problem 8.1 Find, when possible, particular solutions to the following difference equations when x(n) = u(n): (a) y (n) + y (n 1) 5y (n 2) = x(n). (b) y (n) = 4y (n 2) + x(n 1). (c) y (n) 4y (n 2) = 2x(n). Problem 8.2 Find, when possible, particular solutions to the following difference equations when x(n) = u(n 1) : (a) y (n) = y (n 2) + x(n) + x(n 2). (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1). (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n). Problem 8.3 Find, when possible, particular solutions to the following difference equations when n x(n) = 1 u(n): 4 (a) y (n) + y (n 1) 5y (n 2) = x(n). (b) y (n) = 4y (n 2) + x(n 1). (c) y (n) 4y (n 2) = 2x(n). Problem Find, when possible, particular solutions to the following difference equations when 8.4 n x(n) = n 1 u(n): 4 (a) y (n) = y (n 2) + x(n) + x(n 2). (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1). (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n). Problem 8.5 Find, when possible, particular solutions to the following difference equations when n x(n) = 1 cos n u(n): 4 4 (a) y (n) + y (n 1) 5y (n 2) = x(n). (b) y (n) = 4y (n 2) + x(n 1). (c) y (n) 4y (n 2) = 2x(n). Problem 8.6 Find, when possible, particular solutions to the following difference equations when x(n) = sin (n 1) u(n 2): 4 (a) y (n) = y (n 2) + x(n) + x(n 2). (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1). (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n). Problem 8.7 Determine the zero-state solutions of the following systems when the input sequence n is x(n) = n 1 u(n): 4 205 SECTION 8.10 PROBLEMS 206 CHAPTER 8 SOLVING DIFFERENCE EQUATIONS (a) y (n) + y (n 1) 5y (n 2) = x(n), y (2) = 1, y (1) = 1. (b) y (n) = 4y (n 2) + x(n 1), y (2) = 1, y (1) = 1. (c) y (n) 4y (n 2) = 2x(n), y (2) = 1, y (1) = 1. Problem 8.8 Determine the zero-state solutions of the following systems when the input sequence is x(n) = n2 u(n 1): (a) y (n) = y (n 2) + x(n) + x(n 2), y (2) = 1, y (1) = 1. (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1), y (2) = 1, y (1) = 1. (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n), y (2) = 1, y (1) = 1. Problem 8.9 Determine the zero-input solutions of the following systems when the input sequence n is x(n) = n 1 u(n): 4 (a) y (n) + y (n 1) 5y (n 2) = x(n), y (2) = 1, y (1) = 1. (b) y (n) = 4y (n 2) + x(n 1), y (2) = 1, y (1) = 1. (c) y (n) 4y (n 2) = 2x(n), y (2) = 1, y (1) = 1. Problem 8.10 Determine the zero-input solutions of the following systems when the input sequence is x(n) = n2 u(n 1): (a) y (n) = y (n 2) + x(n) + x(n 2), y (2) = 1, y (1) = 1. (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1), y (2) = 1, y (1) = 1. (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n), y (2) = 1, y (1) = 1. Problem 8.11 Describe all solutions to the following systems using the parametrization yc (n) = n yp (n) + yh (n), when the input sequence is x(n) = n 1 u(n): 4 (a) y (n) = y (n 2) + x(n) + x(n 2). (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1). (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n). Problem 8.12 Describe all solutions to the following systems using the parametrization yc (n) = yp (n) + yh (n), when the input sequence is x(n) = n2 u(n 1): (a) y (n) = y (n 2) + x(n) + x(n 2). (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1). (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n). Problem 8.13 Describe all solutions to the following systems using the parametrization yc (n) = n yzi (n) + yzs (n), when the input sequence is x(n) = n 1 u(n): 4 (a) y (n) + y (n 1) 5y (n 2) = x(n). (b) y (n) = 4y (n 2) + x(n 1). (c) y (n) 4y (n 2) = 2x(n). Problem 8.14 Describe all solutions to the following systems using the parametrization yc (n) = yzi (n) + yzs (n), when the input sequence is x(n) = n2 u(n 1): (a) y (n) = y (n 2) + x(n) + x(n 2). (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1). (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n). Problem 8.15 Determine the complete solution of the following systems using the parametrization n yc (n) = yp (n) + yh (n), when the input sequence is x(n) = n 1 u(n): 4 (a) y (n) + y (n 1) 5y (n 2) = x(n), y (2) = 1, y (1) = 1. (b) y (n) = 4y (n 2) + x(n 1), y (2) = 1, y (1) = 1. (c) y (n) 4y (n 2) = 2x(n), y (2) = 1, y (1) = 1. Problem 8.16 Determine the complete solution of the following systems using the parametrization yc (n) = yp (n) + yh (n), when the input sequence is x(n) = n2 u(n 1): (a) y (n) = y (n 2) + x(n) + x(n 2), y (2) = 1, y (1) = 1. (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1), y (2) = 1, y (1) = 1. (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n), y (2) = 1, y (1) = 1. Problem 8.17 Determine the complete solution of the followingsystems using the parametrization n yc (n) = yzs (n) + yzi (n), when the input sequence is x(n) = n 1 u(n): 4 (a) y (n) + y (n 1) 5y (n 2) = x(n), y (2) = 1, y (1) = 1. (b) y (n) = 4y (n 2) + x(n 1), y (2) = 1, y (1) = 1. (c) y (n) 4y (n 2) = 2x(n), y (2) = 1, y (1) = 1. Problem 8.18 Determine the complete solution of the following systems using the parametrization yc (n) = yzs (n) + yzi (n), when the input sequence is x(n) = n2 u(n 1): (a) y (n) = y (n 2) + x(n) + x(n 2), y (2) = 1, y (1) = 1. (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1), y (2) = 1, y (1) = 1. (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n), y (2) = 1, y (1) = 1. Problem 8.19 For each of the systems in Prob. 8.17 indicate how the zero-state and the zero-input components of the solution will change if the initial conditions are changed to y (2) = 1 and y (1) = 0. Find the new complete solution in each case. Problem 8.20 For each of the systems in Prob. 8.18 indicate how the zero-state and the zero-input components of the solution will change if the initial conditions are changed to y (2) = 1 and y (1) = 0. Find the new complete solution in each case. Problem 8.21 For each of the systems in Prob. 8.17 indicate how the zero-state and the zero-input n components of the solution will change if the input sequence is instead x(n) = 1 u(n) while the 4 initial conditions stay the same. Problem 8.22 For each of the systems in Prob. 8.18 indicate how the zero-state and the zero-input components of the solution will change if the input sequence is instead x(n) = u(n) while the initial conditions stay the same. Problem 8.23 For each of the systems in Prob. 8.15 indicate how the particular and homogeneous components of the solution will change if the initial conditions are changed to y (2) = 1 and y (1) = 0. Find the new complete solution in each case. Problem 8.24 For each of the systems in Prob. 8.16 indicate how the particular and homogeneous components of the solution will change if the initial conditions are changed to y (2) = 1 and y (1) = 0. Find the new complete solution in each case. Problem 8.25 For each of the systems in Prob. 8.15 indicate how the particular and homogeneous n components of the solution will change if the input sequence is instead x(n) = 1 u(n) while the 4 initial conditions stay the same. Problem 8.26 For each of the systems in Prob. 8.16 indicate how the particular and homogeneous components of the solution will change if the input sequence is instead x(n) = u(n) while the initial conditions stay the same. 207 SECTION 8.10 PROBLEMS 208 CHAPTER 8 SOLVING DIFFERENCE EQUATIONS Problem 8.27 Determine the transient and steady-state components of the complete response of n the following systems when the input sequence is x(n) = n 1 u(n): 4 (a) y (n) + y (n 1) 5y (n 2) = x(n), y (2) = 1, y (1) = 1. (b) y (n) = 4y (n 2) + x(n 1), y (2) = 1, y (1) = 1. (c) y (n) 4y (n 2) = 2x(n), y (2) = 1, y (1) = 1. Problem 8.28 Determine the transient and steady-state components of the complete response of the following systems when the input sequence is x(n) = n2 u(n 1): (a) y (n) = y (n 2) + x(n) + x(n 2), y (2) = 1, y (1) = 1. (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1), y (2) = 1, y (1) = 1. (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n), y (2) = 1, y (1) = 1. Problem 8.29 Determine the complete solution of the following systems when the input sequence is n n 1 1 x(n) = n u(n) + u(n) 4 2 (a) y (n) + y (n 1) 5y (n 2) = x(n), y (2) = 1, y (1) = 1. (b) y (n) = 4y (n 2) + x(n 1), y (2) = 1, y (1) = 1. (c) y (n) 4y (n 2) = 2x(n), y (2) = 1, y (1) = 1. Problem 8.30 Determine the complete solution of the following systems when the input sequence is n 1 u(n) x(n) = n2 u(n 1) + 3 (a) y (n) = y (n 2) + x(n) + x(n 2), y (2) = 1, y (1) = 1. (b) y (n) 6y (n 1) + 9y (n 2) = 2x(n 1), y (2) = 1, y (1) = 1. (c) y (n) y (n 1) + y (n 2) y (n 3) = x(n), y (2) = 1, y (1) = 1. Problem 8.31 Find the complete response of the causal system y (n) = 1 y (n 1) + x(n) , y (1) = 1 2 in at least four different ways, when x(n) = u(n). Problem 8.32 Find the complete response of the causal system y (n) + 1 y (n 1) = x(n 1) , y (1) = 1 4 in at least four different ways, when x(n) = 1 n 2 u(n). Problem 8.33 A causal system is described by the difference equation y (n) 1 1 2 y (n 1) y (n 2) + y (n 3) = x(n) 3 12 12 with initial conditions y (3) = y (2) = 0 and y (1) = 1 (a) Find the zero-state response for x(n) = u(n). (b) Find the complete response of the system to x(n) = u(n). Identify both the transient and the steady-state responses. (c) Find the complete response of the system when x(n) = u(n) u(n L), for any nite positive integer L. Problem 8.34 A causal system is described by the difference equation y (n) + 1 2 3 1 y (n 1) + y (n 2) = 2 4 8 n x(n 1) with initial conditions y (2) = 0, (a) Find the zero-state response for x(n) = y (1) = 1 1 n2 3 u(n). (b) Find the complete response of the system to x(n) = and the steady-state responses. 1 n2 3 u(n). Identify both the transient (c) Find the complete response of the system when x(n) = u(n) u(n L), for any nite positive integer L. Problem 8.35 Consider a causal system that is described by the difference equation y (n) 7 2 y (n 1) + y (n 2) = x(n) + x(n 1) 3 3 with initial conditions y (1)= 1 and y (2) = 0. Determine its responses to x(n) = u(n) + n 1 u(n 2) and to x(n) = 1 u(n 1). 2 2 Problem 8.36 Consider a causal system that is described by the difference equation y (n) + 1 3 y (n 1) + y (n 2) = 2 4 8 1 2 n x(n 1) with initial conditions y (2) = 0 and y (1) = 1. Determine its response to x(n) = u(n 3) + 1 u(n 2). 4 Problem 8.37 The input sequence x(n) = u(n 1) is rst processed by the causal system y (n) = 2y (n 1) + x(n), y (1) = 1 The result, y (n), is then processed by an LTI system with impulse response sequence h(n) = 1 , 1 What is the output of this second system? Problem 8.38 The input sequence x(n) = y (n) = 1 n1 2 u(n 3) is rst processed by the system 1 y (n 1) + x(n 2), 3 y (1) = 1 The result, y (n), is then processed by an LTI system with impulse response sequence h(n) = 209 SECTION 8.10 1 , 0, 1 What is the output of this second system? Problem 8.39 Consider the causal system y (n) 2y (n 1) + y (n 2) = x(n) , y (2) = 1, y (1) = 0 Determine its complete response to x(n) = u(n). Problem 8.40 Consider the causal system y (n) 2y (n 1) + y (n 2) = x(n) , y (2) = 1, y (1) = 0 PROBLEMS 210 Determine its complete response to x(n) = cos n 2 u(n). CHAPTER 8 SOLVING DIFFERENCE EQUATIONS Problem 8.41 Find the complete response of the causal system y (n) 1 2 y (n 1) y (n 2) = x(n) , y (2) = 1, y (1) = 0 3 3 to the input sequence x(n) = 1 u(n 2) + 2 n1 1 4 u(n) Check your answer. Problem 8.42 Find the complete response of the causal system y (n) 1 2 y (n 1) y (n 2) = x(n) , y (2) = 0, y (1) = 1 3 3 to the input sequence x(n) = n3 1 2 n u(n 2) + n2 2 u(n) Check your answer. Problem 8.43 Consider the causal system 6y (n) = y (n 1) + y (n 2) + 3x(n) , (a) Find its zero-input response, yzi (n). (b) Find its zero-state response, yzs (n), to x(n) = y (1) = 0 , y (2) = 1 1 n1 4 u(n). (c) Find its complete response. (d) Find the same complete response by using instead the representation yc (n) = yh (n) + yp (n) and by nding the constants that dene the homogeneous solution from the initial conditions. (e) Now assume the initial conditions are changed to y (1) = 1 and y (2) = 2. Which part of the response will change, yzi (n) or yzs (n)? What would the new complete response be? (f) Find the new complete response when the initial conditions are given by any linear combination of the above initial conditions. (g) Assume now the system is relaxed. Find its impulse response sequence, h(n). (h) Let x(n) be a sequence for which the convolution w(n) = x(n 2) h(n) is known. Find the complete response of the original system to x(n) in terms of w(n), assuming initial conditions y (1) = 0 and y (2) = 1. Problem 8.44 Consider the causal system y (n) = 3 1 y (n 1) y (n 2) + x(n) 4 8 (a) Find the modes of the system. (b) Find all solutions to the homogeneous equation. (c) Find particular solutions when (c.1) x(n) = u(n). (c.2) x(n) = nu(n). (c.3) x(n) = 1 n 3 u(n). (d) Find the complete solution in each of the above cases. (e) Find the impulse response h(n) of the relaxed system. Is the relaxed system BIBO stable? (f) Assume for the remainder of the problem that y (1) = 1 and y (2) = 1. Find the impulse response sequence h1 (n) of the system. Verify that the sequence {h1 (n)} is absolutely summable. Is this sufcient to conclude that the system is BIBO stable? (g) Find the zero-input response, yzi (n). (h) Find the zero-state response, yzs (n), when x(n) = 1 n 3 u(n). (i) Find the complete response of the system by combining the answers of parts (g) and (h). (j) Find the steady-state response, yss (n). (k) Find the complete solution of part (i) via the alternative expression y (n) = yp (n) + yh (n), where the constants of the homogeneous part are determined from the initial conditions. Your answer should match that of part (i). (l) Find the complete response of the system to x(n) = u(n). (m) Find the complete response of the system to the input sequence x(n) = 1 1 1+ 2 2 1 3 n1 u(n 2) by using the results derived so far and the superposition principle. (n) How does your answer to part (i) change if the initial conditions become y (1) = 0 and y (2) = 1? (o) Using y (1) = 0 and y (2) = 1, nd the complete response of the system to the sequence x(n) = 1 , 1, 0, 2 (p) For any given initial conditions {y (1), y (2)}, how would you determine the complete response of the system to an arbitrary input sequence x(n) for which you dont know how to nd a particular solution? Problem 8.45 Consider the difference equation y (n) = 5 y (n 1) y (n 2) + x(n 1) 2x(n 2) 2 (a) Assume the recursion describes a system that is causal and relaxed. Is the system LTI? Find its impulse response sequence and verify whether it is BIBO stable or not. (b) Assume now that the initial conditions are y (2) = 0 and y (1) = 1. Is the system LTI? Find its impulse response sequence. (c) Find the step responses of the systems in parts (a) and (b). Problem 8.46 A causal system is described by the difference equation y (n) 1 y (n 1) = x2 (n), 2 n0 with initial condition y (1) = 2, and where x(n) denotes the input sequence. (a) Draw a block diagram representation for the system. (b) Find the zero-input response of the system. (c) Find the zero-state response of the system corresponding to x(n) = (1/2)n u(n 1). (d) Find the complete response of the system. Verify that your solution satises the initial condition and the difference equation. Problem 8.47 Consider the causal system y (n) = 1 y (n 1) + 2 1 3 n1 x(n)u(n 1), y (1) = 1 211 SECTION 8.10 PROBLEMS 212 (a) Find the complete response of the system when CHAPTER 8 SOLVING DIFFERENCE EQUATIONS x(n) = u(n 2) + 1 4 n1 u(n 3) (b) What would the complete response be if the initial condition is changed from y (1) = 1 to y (2) = 0? Problem 8.48 A causal system is described by the difference equation: y (n) = 3 1 y (n 1) + y (n 2) + x(n 2) + 2x(n 3) 10 10 with initial conditions y (0) = a and y (1) = b, where a and b are some constants. 1. Assume a = b = 0 and the system is initially relaxed. Find the impulse response sequence of the system. 2. Assume now a = 1 and b = 0. Find the complete response of the system when x(n) = 7u(n). 3. Find values for a, b, and K such that the complete response due to the input x(n) = Ku(n), satises y (n) = 1 for n 2. CHAPTER 9 z-Transform O ur discussion so far in the book has focused on studying signals and systems in the time domain. Specically, in the earlier chapters, we studied the properties of signals and systems, and determined the responses of systems, by focusing on their descriptions in the time domain. There is much more to be learned by studying signals and systems in the transform and frequency domains. Apart from simplifying many of the calculations that we performed before, such as solving difference equations and computing convolution sums, the transform domain representation will enable us to get a deeper understanding of the behavior of signals and systems by analyzing their frequency content as well. Before plunging into a full-blown study of the frequency-domain characterization of signals and systems, we will initially develop the z transform technique in preparation for our discussions on the Discrete-Time Fourier Transform (DTFT) and the Discrete-Fourier Transform (DFT). 9.1 BILATERAL Z-TRANSFORM The bilateral (also called two-sided) z transform of a sequence x(n) is denoted by X (z ) and is dened as the series X (z ) = x(n)z n (9.1) n= at all values of z in the complex plane where the series is well-dened, as explained in greater detail in Sec. 9.2. For now, note that either a negative or positive power of z 1 is associated with each term of the sequence and the result is summed to provide the function X (z ). In this way, the z transform maps a sequence x(n) into a function of the complex-variable z . The z transform, X (z ), then helps provide a compact representation of the entire sequence. Rather than work with the (possibly) innitely-numbered samples of x(n), it becomes more convenient to work with and manipulate algebraically the function representation X (z ). Several examples to this effect are given in the sequel. If we expand the dening relation (9.1) for X (z ) we see that X (z ) = . . . + x(2)z 2 + x(1)z + x(0) + x(1)z 1 + x(2)z 2 + . . . so that samples of x(n) that exist at times n < 0 are multiplied by positive powers of z , and samples of x(n) that exist at times n > 0 are multiplied by positive powers of z 1 . Note that x(0) is not multiplied by any power of z or z 1 . The qualication bilateral or two-sided refers to the fact that powers of both z and z 1 appear in the expression for X (z ); this is in contrast to the unilateral z -transform, which we shall encounter later in Ch. 12. Nevertheless, we shall often use the shorter terminology z -transform to refer 213 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 214 CHAPTER 9 z-TRANSFORM to X (z ). This is because it will usually be understood from the context that X (z ) is the bilateral transform. Example 9.1 (Finite-duration sequence) Consider the nite-duration sequence x(n) = 2 (n + 1) + 4 (n) + 3 (n 1) The sequence consists of 3 nonzero samples (and, therefore, has nite duration), as illustrated in Fig. 9.1. x( n ) 4 2 1 1 n 2 FIGURE 9.1 A nite-duration sequence x(n) with three samples. Using (9.1), the corresponding z -transform is given by X (z ) = 2z + 4 + 3z 1 In general, the z transform of a sequence is not dened for all values of z . For example, in this particular example, the above X (z ) is dened for all values of z in the complex plane with the exception of the points z = 0 and ; the term involving z 1 is not dened at z = 0 and the term involving z is not dened at . 9.2 REGION OF CONVERGENCE The series (9.1), which denes the z -transform of a sequence, may or may not converge for all values of z in the complex plane. In Example 9.1 we observed that the corresponding X (z ) did not exist at the points z = 0 and z = . In order to exclude such points, we shall associate with every z transform a so-called region of convergence (ROC, for short). The ROC is dened as the set of all points z where the series X (z ) converges. The convergence properties of power series of the form (9.1) is a well-studied subject in complex analysis. Appendix 9.A provides a summary of the main results in this respect and some of the subtleties that arise. Based on the overview in the appendix, it is sufcient for our treatment in this book to dene the ROC of a z transform as the set of all points z 215 that satisfy the following condition: SECTION 9.2 ROC = z C such that n= |x(n)z n | < (9.2) where the symbol C denotes the set of complex numbers. Actually, in our treatment, the symbol C will refer to the extended set of complex numbers, which includes the points at z = pm as well. Denition (9.2) states that the ROC of X (z ) consists of all points z in the complex plane for which the sequence {x(n)z n } is absolutely summable, i.e., the sum of the magnitudes of its terms is nite. When this happens, we say that the series (9.1) dening X (z ) converges absolutely. It follows that X (z ) will be well-dened and assumes nite values at all z ROC as shown by the following simple calculation: |X (z )| = x(n)z n n= n= x(n)z n < for all z ROC We now distinguish between two kinds of sequences and comment on the nature of their regions of convergence. 9.2.1 Finite-Duration Sequences A nite-duration sequence, x(n), is dened as a sequence whose samples are equal to zero for all values of n outside some nite interval [na , nb ]. Accordingly, a nite-duration sequence has a nite number of nonzero samples within the interval [na , nb ]. As was illustrated by the solution of Example 9.1, the z transform of a nite-duration sequence generally involves either a nite number of powers of z or a nite number of powers of z 1 or a nite number of powers of both z and z 1 (this last case was encountered in Example 9.1). Subsequently, the ROC of a nite-duration sequence, x(n), is always the entire complex plane except possibly the points z = 0 or z = as follows: (a) The point z = 0 is excluded when x(n) is nonzero for some positive n (since then X (z ) will contain powers of z 1 ). (b) The point z = is excluded when x(n) is nonzero for some negative n (since then X (z ) will contain powers of z ). REGION OF CONVERGENCE 216 CHAPTER 9 z-TRANSFORM Example 9.2 (Finite-duration sequences) Table 9.1 lists three nite-duration sequences x(n) and the corresponding z transforms and their ROCs. In the rst line, the ROC is the entire complex plane with the exception of point z = 0. In the second line, the ROC is the entire complex plane with the exception of z = . In the third line, the ROC is the entire complex plane with the exception of both z = 0 and z = . In the fourth line, the ROC is the entire complex plane. TABLE 9.1 Three nite-duration sequences and their z -transforms. Sequence x(n) x(n) = 2 (n) 3 (n 5) x(n) = 4 (n + 5) + 2 (n) x(n) = 4 (n + 5) + 2 (n) 3 (n 5) x(n) = 2 (n) z-transform X (z ) X (z ) = 2 3z 5 X (z ) = 4z 5 + 2 X (z ) = 4z 5 + 2 z 5 X (z ) = 2 ROC z=0 |z | < 0 < |z | < zC 9.2.2 Innite-Duration Sequences An innite-duration sequences is dened as a sequence with innitely many nonzero samples. Such sequences can be divided into three categories see Fig. 9.2: (a) A right-sided sequence x(n) is one for which x(n) = 0 for n < no for some nite no . In other words, the nonzero samples of x(n) exist to the right of some nite time instant no see Fig. 9.2. The value of no can be positive, negative, or zero. For example, the sequence x(n) = (0.5)n u(n + 3) has innite-duration. Moreover, it is a right-sided sequence since the samples of x(n) are zero for n < 3. (b) A left-sided sequence is one for which x(n) = 0 for n > no for some nite no . In other words, the nonzero samples of x(n) exist to the left of some nite time instant no see Fig. 9.2. The value of no can be positive, negative, or zero. For example, the sequence x(n) = (0.5)n u(n + 3) has innite-duration. Moreover, it is a left-sided sequence since the samples of x(n) are zero for n > 3. (c) A two-sided sequence is one that is neither right-sided nor left-sided. For example, the sequence x(n) = (0.5)n is two-sided. 217 SECTION 9.2 REGION OF CONVERGENCE x(n) right-sided sequence n no x(n) left-sided sequence n no FIGURE 9.2 The top plot illustrates the domain of nonzero samples of right-sided sequences, namely, to the right of some no . Likewise, the bottom plot illustrates the domain of of nonzero samples of left-sided sequences, namely, to the left of some no . It turns out that the ROC of innite-duration sequences consists of discs or rings in the complex domain as follows see Fig. 9.3: (a) The ROC for right-sided sequences is always the exterior of a disc, namely, |z | > r for some positive real number r. (b) The ROC for left-sided sequences is always the interior of a disc, namely, |z | < r for some positive real number r. (c) The ROC for two-sided sequences is always a ring, namely, r1 < |z | < r2 , for some positive real numbers {r1 , r2 }. (d) In all three cases above, the points z = 0 or z = may or may not be included in the ROC. Proof: In order to justify the nature of the ROCs shown in Fig. 9.3 we proceed as follows. We rst express the complex argument z in polar form, say, z = rej . Then, n= |x(n)z n | = n= |x(n)|r n It follows from this equality that if a value of z belongs to the ROC, then all values of z that lie on the same circle of radius r also belong to the ROC. This observation establishes that the ROC consists of a collection of concentric circles. Now assume x(n) is a right-sided sequence with a possibly negative no . Then its z transform can be expressed as X (z ) = 1 n=no x(n)z n + n=0 x(n)z n 218 Im CHAPTER 9 left-sided sequence z-TRANSFORM r Re right-sided sequence Im r Re Im two-sided sequence r2 r1 Re FIGURE 9.3 The regions of convergence of left-sided sequences (top), right-sided sequences (middle), and two-sided sequences (bottom). When no is negative, the rst sum converges for all z except at z = . When no is positive, the rst sum does not exist and z = is not excluded from the ROC. As for the second sum, assume a point z of magnitude r belongs to the ROC and, hence, n=0 |x(n)|r n < Then by the previous argument, all points z of same magnitude r belong to the ROC. Now let z1 be any point with |z1 | > r , say |z1 | = r1 . It follows that r1 n < r n . Therefore, n=0 |x(n)|r1 n < n=0 |x(n)|r n < This means that all such z1 will also belong to the ROC. We therefore conclude that the ROC of a right-sided sequence is necessarily the exterior of a disc. Similarly, we can argue that the ROC of a left-sided sequence is the interior of a disc. As for a two-sided sequence, we can express it as the sum of left- and right-sided sequences. Hence, its ROC will be the intersection of the corresponding ROCs, which in general is a ring (when the intersection exists). 219 9.3 EXPONENTIAL SEQUENCES SECTION 9.3 We now illustrate the previous concepts by considering the important case of exponential sequences. Right-Sided Exponential Sequence We start with a right-sided exponential sequence x(n) = n u(n) (9.3) Figure 9.4 illustrates the behavior of x(n) for two choices of over the interval 0 n 10; the samples of the sequence are zero over n < 0. In one case, = 1/2 and the sequence is seen to decay towards the value zero as n increases. In the other case, = 2 and the sequence is seen to grow unbounded as n increases. n x(n)=(1/2) u(n) 1 0.5 0 0 2 4 6 8 10 6 8 10 n n x(n)=2 u(n) 1000 500 0 0 2 4 n FIGURE 9.4 The top plot shows the decaying exponential sequence x(n) = (1/2)n u(n), while the bottom plot shows the growing exponential sequence x(n) = 2n u(n). Both sequences are shown over the interval 0 n 10. The z transform of the exponential sequence (9.3) is given by n u(n)z n X (z ) = = n= n n z n=0 = (z 1 )n n=0 The terms (z 1 )n that appear in the above series are the terms of a geometric sequence whose rst element is equal to 1 and whose ratio is z 1 . Therefore, as long as |z 1 | < EXPONENTIAL SEQUENCES 220 1, the series converges to CHAPTER 9 z-TRANSFORM X (z ) = 1 z = 1 z 1 z (9.4) This means that the region of convergence is given by ROC = { z C such that |z | > || } We thus arrive at the following transform pair: n u(n) 1 z = 1 z 1 z for |z | > || (9.5) The sequence x(n) = n u(n) is a right-sided sequence. As we argued in the previous section, the regions of convergence of such sequences are always the exterior of a disc, and the above result is consistent with this property. Left-Sided Exponential Sequence Now consider the left-sided exponential sequence x(n) = n u(n 1) (9.6) Figure 9.5 illustrates the behavior of x(n) for two choices of over the interval 10 n 1; the samples of the sequence are zero over n 0. In one case, = 1/2 and the sequence is seen to grow unbounded as n decreases. In the other case, = 2 and the sequence is seen to decay as n decreases. n x(n)=(1/2) u(n1) 0 500 1000 10 9 8 7 6 5 4 3 2 1 4 3 2 1 n n x(n)=2 u(n1) 0 0.25 0.5 10 9 8 7 6 5 n FIGURE 9.5 The top plot shows the growing exponential sequence x(n) = (1/2)n u(n 1), while the bottom plot shows the decaying exponential sequence x(n) = 2n u(n 1). Both sequences are shown over the interval 10 n 1. 221 The z -transform of the left-sided exponential sequence (9.6) is given by SECTION 9.3 EXPONENTIAL SEQUENCES n X (z ) = n= u(n 1)z n 1 = = n z n n= 1 ( z )n n=1 1 z 1 1 z 1 1 z 1 z z = = = as long as |1 z | < 1. This means that the region of convergence is now ROC = { z C such that |z | < || } and we arrive at the transform pair n u(n 1) z 1 = 1 1 z z for |z | < || (9.7) Observe that the sequence x(n) = n u(n1) is a left-sided sequence. As we argued in the previous section, the regions of convergence of such sequences are always the interior of a disc and the result we arrived at is consistent with this conclusion. Comparing (9.5) and (9.7), note the interesting fact that the two different sequences x(n) = n u(n) and x(n) = n u(n 1) have the same z -transform albeit with different regions of convergence. This fact highlights the important point that knowledge of the z transform of a sequence alone does not uniquely identify the sequence unless more information is provided such as the ROC of the transform. Example 9.3 (Unit-step sequence) The z transforms of the unit-step sequences x(n) = u(n) and x(n) = u(n 1) can be obtained as special cases from (9.5) and (9.7) by setting = 1. Thus, note that u(n) 1 z = 1 z 1 z1 for |z | > 1 (9.8) and u(n 1) 1 z = 1 z 1 z1 for |z | < 1 (9.9) 222 Example 9.4 (Two sequences) CHAPTER 9 z-TRANSFORM Let us determine the sequence x(n) whose z transform is X (z ) = z z 1/2 We know from the results (9.5) and (9.7) that x(n) could be either x(n) = (1/2)n u(n) (a right-sided sequence) or x(n) = (1/2)n u(n 1) (a left-sided sequence) If we were additionally given the ROC of X (z ), say as |z | > 1/2, then we would be able to conclude that the actual sequence is the right-sided sequence x(n) = (1/2)n u(n) Two-Sided Exponential Sequence Consider now the two-sided sequence x(n) = n u(n) + n u(n 1) (9.10) Figure 9.6 illustrates the behavior of x(n) for two choices of and over the interval 10 n 10. In one case, we use = 1/2 and = 2 and the samples of the sequence are seen to decay to zero as n approaches . In the other case, we use = 2 and = 1/2 and the samples of the sequence are seen to grow unbounded as n approaches . n n x(n) = (1/2) u(n) + 2 u(n1) 1 0.5 0 10 5 0 n 5 10 5 10 x(n)=2n u(n) + (1/2)n u(n1) 1000 500 0 10 5 0 n FIGURE 9.6 The top plot shows the decaying two-sided exponential sequence x(n) = (1/2)n u(n) + 2n u(n 1), while the bottom plot shows the unbounded two-sided exponential sequence x(n) = 2n u(n) + (1/2)n u(n 1). Both sequences are shown over the interval 10 n 10. 223 The z transform of the two-sided exponential sequence (9.10) is given by SECTION 9.4 n= = (z 1 )n + n=0 = = PROPERTIES OF THE z-TRANSFORM [n u(n) + n u(n 1)]z n X (z ) = ( 1 z )n n=1 1 1 1 z 1 1 z 1 z z z z as long as |z 1 | < 1 and | 1 z | < 1. This means that the region of convergence is now given by ROC = { z C such that || < |z | < | | } which is a nonempty set whenever | | > ||; otherwise, the z transform of the two-sided sequence will not exist. Therefore, we arrive at the transform pair x(n) = n u(n) + n u(n 1) 1 z z 1 = 1 z 1 1 z 1 z z for || < |z | < | | (9.11) The sequence x(n) = n u(n) + n u(n 1) is a two-sided sequence. As we argued in the previous section, the regions of convergence of such sequences are always rings and the above result is consistent with this conclusion. 9.4 PROPERTIES OF THE Z-TRANSFORM The z transform has several important properties that can be easily veried from its denition. A summary of these properties is given in Table 9.2 with the corresponding regions of convergence. For example, the rst two lines of the table start from two generic sequences x(n) and y (n) with ROCs dened by Rx = {r1 < |z | < r2 } and Ry = {r < |z | < r } respectively, and then the subsequent lines provide the z transforms of combinations and transformations of these sequences along with the corresponding ROCs. 9.4.1 Linearity Consider, for instance, the third line of the table. It states that the z transform of a linear combination of two sequences, namely, ax(n) + by (n), for any two scalars a and b, is given by the same linear combination of their respective z transforms, i.e., ax(n) + by (n) aX (z ) + bY (z ) (9.12) 224 CHAPTER 9 z-TRANSFORM But what about the ROC of the combination? Obviously, both X (z ) and Y (z ) need to exist in order for the combination aX (z ) + bY (z ) to be well-dened. This means that all points z Rx Ry should belong to the ROC of aX (z ) + bY (z ). The third line of the table indicates, however, that the ROC can be larger than Rx Ry . This is because the points z = 0 or z = may be included, as illustrated by Example 9.5. TABLE 9.2 Properties of the z -transform. Sequence z -transform ROC 1. x(n) X (z ) Rx = {r1 < |z | < r2 } 2. y (n) Y (z ) Ry = {r < |z | < r } 3. ax(n) + by (n) aX (z ) + bY (z ) {Rx Ry } plus possibly z = 0 or z = linearity Rx except possibly z = 0 or z = time-shifts Property x(n n0 ) z n0 X (z ) 5. an x(n) X (z/a) |a|r1 < |z | < |a|r2 exponential modulation 6. x(n) X (1/z ) 1/r2 < |z | < 1/r1 time reversal 7. nx(n) z 4. dX (z ) dz Rx except possibly z = 0 or z = linear modulation 8. x (n) [X (z )] Rx conjugation 9. x(n) y (n) X (z )Y (z ) {Rx Ry } plus possibly z = 0 or z = convolution Proof: Let w(n) = ax(n) + by (n). Then W (z ) = w(n)z n n= = [ax(n) + by (n)]z n n= = a x(n)z n + b n= = y (n)z n n= aX (z ) + bY (z ) for all values of z Rx Ry . The ROC of W (z ) may include z = 0 or z = or both depending on whether powers of z 1 or z disappear from the combination aX (z ) + bY (z ), as the next example illustrates. 225 SECTION 9.4 Example 9.5 (Combining two sequences) PROPERTIES OF THE z-TRANSFORM Consider the sequences x(n) = (n) 2 (n 1) X (z ) = 1 2z 1 with Rx = { z = 0 } and y (n) = 3 (n+1)+5 (n)+2 (n1) Y (z ) = 3z +5+2z 1 with Ry = { 0 < |z | < } Consider now the linear combination w(n) = x(n) + y (n), which evaluates to w(n) = 3 (n + 1) + 6 (n) The z transform of w(n) is given by W (z ) = 3z + 6 with ROC = { |z | < } It is seen that the ROC of W (z ) is larger than Rx Ry since Rx Ry = { 0 < |z | < } which excludes z = 0, while z = 0 is included in the ROC of W (z ); this is because when x(n) and y (n) are added together, the terms 2z 1 and 2z 1 that appear individually in X (z ) and Y (z ), respectively, cancel each other from W (z ). Example 9.6 (Inverse-transformation) Since different sequences can have identical z -transforms, it is therefore important to specify the ROC of a z -transform in order to be able to recover the original sequence uniquely. For example, let us determine the sequence x(n) whose z transform is X (z ) = z z + z2 z+3 for the three possibilities of ROCs: i) |z | > 3 ii) |z | < 2 iii) 2 < |z | < 3 iv) |z | > 2 To begin with, since X (z ) is the sum of two rst-order terms of the form z/(z 2) and z/(z + 3), we note that there are four possible linear combinations of left- and right-sided sequences that could have given rise to X (z ): x(n) = x(n) = x(n) = x(n) = 2n u(n) + (3)n u(n) (right-sided sequence) 2n u(n) (3)n u(n 1) n n 2 u(n 1) + (3) u(n) 2n u(n 1) (3)n u(n 1) (two-sided sequence) (two-sided sequence) (left-sided sequence) The ROC for the rst possibility is |z | > 3, while the ROC for the second possibility is 2 < |z | < 3, and the ROC for the fourth possibility is |z | < 2. The third possibility has an empty ROC and, therefore, the sequence does not have a z transform. We then conclude that: 1. For |z | > 3, the sequence is x(n) = 2n u(n) + (3)n u(n). 2. For |z | < 2, the sequence is x(n) = 2n u(n 1) (3)n u(n 1). 3. For 2 < |z | < 3, the sequence is x(n) = 2n u(n) (3)n u(n 1). 226 CHAPTER 9 4. For |z | > 2, there is no valid sequence since this is not a valid ROC. None of the choices: right-sided, left-sided, two-sided, or nite-duration sequences, can lead to this ROC. z-TRANSFORM Example 9.7 (Poles) In the previous example, the answer to the last part (namely, recognizing that there is no sequence x(n) with the given X (z ) and whose ROC is |z | > 2) can also be motivated as follows. Recall that the ROC is the set of all points z in the complex plane where the z -transform, X (z ), is well-dened. Hence, for rational z -transforms, the ROC should exclude the poles of X (z ), since a pole is dened as a point where the rational function X (z ) evaluates to . The poles of X (z ) given in the previous example, namely, z z X (z ) = + z2 z+3 are located at the points z = 2 and z = 3. The region |z | > 2 includes the pole at 3 and, therefore, it cannot be a valid ROC! 9.4.2 Time Shifts Consider now the fourth line in Table 9.2. It establishes the transform pair x(n no ) z no X (z ) (9.13) In other words, if the original sequence x(n) is shifted in time by an amount no (where no can be positive or negative), then the corresponding z transform is modied by multiplying it by z no . The ROC of the time-shifted sequence, x(n no ), will coincide with the ROC of the original sequence x(n), with the exception of the points z = 0 or z = , which may be included or excluded as a result of the shift operation. Proof: Let w(n) = x(n no ). Then W (z ) = w(n)z n n= = n= = x(n no )z n x(k)z (k+no ) , k= = z no = using k = n no z no X (z ) x ( k ) z k k= for all values of z Rx . The ROC of W (z ) may include or exclude the points z = 0 or z = or both depending on whether powers of z 1 or z disappear from z no X (z ), as the next example illustrates. 227 Example 9.8 (Time-shifted exponential sequence) SECTION 9.4 Property (9.13) is particulary useful in inverse-transform operations. Consider, for instance, the z transform 1 , |z | > 0.5 X (z ) = z 0.5 with the ROC identied as the set of all points z in the complex plane satisfying |z | > 0.5. By multiplying and dividing the given X (z ) by an appropriate power of z , we can rewrite it as X (z ) = z 1 z = z 1 z 0.5 z z 0.5 Now we know that the inverse transform of z/(z 0.5) is 0.5n u(n) over |z | > 0.5. By taking the additional z 1 factor into account, and in view of the time-shift property (9.13), we then conclude that 1 (0.5)n1 u(n 1) z 0.5 Example 9.9 (A delayed exponential sequence) Consider the exponential sequence x(n) = (0.5)n+3 u(n + 3) The samples of this sequence are nonzero for n 3; the sequence is obtained by shifting x (n) = (0.5)n u(n) to the left by 3 units of time, i.e., x(n) = x (n + 3) We already know what the z transform of x (n) is, namely, X (z ) = z , z 0.5 |z | > 0.5 Using property (9.13), we conclude that the z transform of x(n) is X (z ) = z 3 X (z ) = z4 z 0.5 Observe, however, that the sequence x(n) contains samples that occur at negative time, namely, x(3), x(2), and x(1). Therefore, using the denition (9.1) for the z transform, we know that X (z ) = x(3)z 3 + x(2)z 2 + x(1)z + x(n)z n n=0 The three leading terms in the above series, namely, x(3)z 3 + x(2)z 2 + x(1)z show that the point z = should be excluded from the ROC. We therefore conclude that X (z ) = z4 , z 0.5 0.5 < |z | < The fact that z = should be excluded from the ROC is also obvious from the expression for X (z ); observe that it is not dened at z = . 9.4.3 Exponential Modulation PROPERTIES OF THE z-TRANSFORM 228 Consider the fth line in Table 9.2. It establishes the transform pair CHAPTER 9 z-TRANSFORM an x(n) X (z/a) (9.14) In other words, if the original sequence x(n) is multiplied by the exponential sequence an , for some nonzero constant a, then the corresponding z transform is modied by replacing the independent variable z by z/a. The ROC of the exponentially-weighted sequence, an x(n), is given by ROC = {z C such that |a|r1 < |z | < |a|r2 } We refer to the multiplication by the exponential sequence by saying that the original sequence is being exponentially weighted or modulated. The latter terminology of modulation is more appropriate when the scalar a is a complex number. Proof: Let w(n) = an x(n). Then W (z ) = w(n)z n n= = an x(n)z n n= = x(n)(z/a)n n= = x(n)(z )n , using z = z/a n= = X (z ) for all values of z Rx . Example 9.10 (Alternating signs) Consider a sequence x(n) with generic ROC given by Rx = {r1 < |z | < r2 }. Let us determine the z transform of the sequence (1)n x(n). This sequence amounts to reversing the signs of all oddindexed samples of x(n). Using property (9.14) with a = 1, we nd that the new z transform is given by (1)n x(n) X (z ), with ROC = Rx (9.15) Example 9.11 (Sinusoidal sequences) Let us determine the z transform of the sinusoidal sequence x(n) = cos(o n)u(n) for some angular frequency o . For this purpose, we rst invoke Eulers relation (3.11) to express x(n) as the linear combination of two causal exponential sequences: x(n) = 1 jo n 1 e u(n) + ejo n u(n) 2 2 The rst term on the right-hand side can be interpreted as an exponentially-weighted version of u(n) with a = ejo . Likewise, the second term on the right-hand side can be interpreted as an exponentially-weighted version of u(n) with a = ejo . Therefore, using the linearity property (9.12), the exponential weighting property (9.14), and the z transform of the unit-step sequence from Example 9.3, namely, u(n) 1 , 1 z 1 |z | > 1 we get = 1 2 = X (z ) 1 2 1 1 1 + 2 1 (z/ejo )1 1 (z/ejo )1 1 1 1 + , for |z | > 1 1 ejo z 1 2 1 ejo z 1 Combining terms we conclude that cos(o n)u(n) 1 z 1 cos o , 1 2z 1 cos o + z 2 for |z | > 1 (9.16) z 1 sin o , 1 2z 1 cos o + z 2 for |z | > 1 (9.17) Similarly, we can verify that sin(o n)u(n) Example 9.12 (Exponential modulation of sinusoidal sequences) Let us determine the z transform of the sequence x(n) = an cos(o n)u(n) for some angular frequency o . We already know from the solution to Example 9.11 that cos(o n)u(n) Using property (9.14) we get 1 z 1 cos o , for |z | > 1 1 2z 1 cos o + z 2 an cos(o n)u(n) 1 az 1 cos o , for |z | > |a| 1 2az 1 cos o + a2 z 2 (9.18) an sin(o n)u(n) az 1 sin o , for |z | > |a| 1 2az 1 cos o + a2 z 2 (9.19) Likewise, 9.4.4 Time Reversal Consider the sixth line in Table 9.2. It establishes the transform pair x(n) X (1/z ) (9.20) In other words, if the original sequence x(n) is reversed in time (i.e., ipped around the vertical axis), then the corresponding z transform is modied by replacing the indepen- 229 SECTION 9.4 PROPERTIES OF THE z-TRANSFORM 230 CHAPTER 9 z-TRANSFORM dent variable z by its inverse, 1/z . The ROC of the time-reversed sequence, x(n), is given by ROC = {z C such that 1/r2 < |z | < 1/r1 } Proof: Let w(n) = x(n). Then W (z ) = w(n)z n n= = n= = x(n)z n x (k )z k , using k = n k= = x(k)(1/z )k k= = X (1/z ) for all values of 1/z Rx , i.e., r1 < 1/|z | < r2 or, equivalently, 1/r2 < |z | < 1/r1 Example 9.13 (Time-reversing an exponential sequence) Consider the sequence studied in Example 9.9, namely, x(n) = (0.5)n+3 u(n + 3) X (z ) = z4 , z 0.5 0.5 < |z | < Reversing the sequence in time corresponds to replacing n by n. Thus, consider the sequence x (n) = x(n) = (0.5)n+3 u(n + 3) Using property (9.20), we nd that the new z transform is given by X (z ) = X (1/z ) = z 4 2z 3 = , 0.5 z 2 z 1 0 < |z | < 2 9.4.5 Linear Modulation Consider the seventh line in Table 9.2. It establishes the transform pair nx(n) z dX (z ) dz (9.21) In other words, if the original sequence x(n) is modulated by the linear sequence n, then the corresponding z transform is obtained from the derivative of X (z ) via multiplication by z . The ROC of the linearly modulated sequence, nx(n), is Rx except possibly z = 0 or z = . 231 Proof: Let w(n) = nx(n) and recall rst the denition of X (z ): SECTION 9.4 X (z ) = PROPERTIES OF THE z-TRANSFORM x(n)z n n= for all values of z Rx . The series X (z ) is absolutely summable over Rx . Thus, differentiating it with respect to z we can write dX (z ) dz = d z n dz x(n) nz n1 z 2n n= = n= so that z x(n) dX (z ) = nx(n)z n = W (z ) dz n= And the ROC of W (z ) coincides with the ROC of X (z ) except possibly at z = 0 or z = . Example 9.14 (Linearly-modulated exponential sequence) Let us determine the z transform of x(n) = nn u(n). We already know that z 1 = , 1 z 1 z n u(n) for |z | > || Therefore, z z = , z (z )2 for |z | > || z z 1 = , (1 z 1 )2 (z )2 for |z | > || nn u(n) z d dz In other words, nn u(n) (9.22) In a similar vein we nd that nn u(n 1) z 1 z = , (1 z 1 )2 (z )2 for |z | < || (9.23) Table 9.3 summarizes several of the transform pairs that have been encountered so far in our exposition. 9.4.6 Complex Conjugation Consider the eighth line in Table 9.2. It establishes the conjugation property: x (n) [X (z )] (9.24) In other words, if the samples of the time-domain sequence are complex conjugated, then the corresponding z transform is obtained by replacing z by z and subsequently conjugating X (z ). The ROC of x (n) continues to be Rx . 232 TABLE 9.3 Some useful z -transform pairs and their ROCs. CHAPTER 9 z-TRANSFORM Sequence z -Transform ROC (n) 1 u(n) z z1 |z | > 1 n u(n) z z |z | > || n u(n 1) z z |z | < || nn u(n) z (z )2 |z | > || nn u(n 1) z (z )2 |z | < || complex plane cos(o n)u(n) z 2 z cos o z 2 2z cos o + 1 |z | > 1 sin(o n)u(n) z sin o z 2 2z cos o + 1 |z | > 1 n cos(o n)u(n) z 2 z cos o z 2 2z cos o + 2 |z | > || n sin(o n)u(n) z sin o z 2 2z cos o + 2 |z | > || Proof: Let w(n) = x (n). Then W (z ) = w(n)z n n= = x (n)z n n= = n= = [X (z )] x(n)(z )n for all z Rx . In particular, note that if the sequence x(n) is real-valued, then it should hold that X (z ) = [X (z )] (for real-valued sequences) (9.25) 233 Example 9.15 (Illustration of conjugation property) SECTION 9.4 PROPERTIES OF THE z-TRANSFORM Consider the complex-valued sequence x(n) = (n) + j (n 1) Its z transform is given by = 1 + jz 1 = X (z ) 1 + j (1/z ), ROC = {entire complex plane except z = 0} Now observe that if we replace z by z we get X (z ) = 1 + j (1/z ) If we further conjugate X (z ) we obtain [X (z )] = 1 j (1/z ) = 1 jz 1 which is the z transform of the complex conjugated sequence x (n) = (n) j (n 1) 9.4.7 Linear Convolution Consider the ninth line in Table 9.2. It establishes the transform pair x(n) y (n) X (z )Y (z ) (9.26) In other words, convolution in the time domain amounts to multiplication in the transform domain. The ROC of the linear convolution is Rx Ry plus possibly z = 0 or z = . Proof: Let w(n) = x(n) y (n) = k= x (k )y (n k ) 234 Then, CHAPTER 9 z-TRANSFORM W (z ) = w(n)z n n= = n= k= = k= n= = x ( k ) y ( n k ) z n x (k ) n= k= = x ( k ) y ( n k ) z n x ( k ) z k n= k= = n= k= = x ( k ) z k x (k )z k k= = y ( n k ) z n z k y (n k)z (nk) y (n )z n x (k )z k using n = n k , n = k= = y ( n k ) z n y (n )z n n = X (z )Y (z ) for all z Rx Ry plus possibly z = 0 or z = . Example 9.16 (Convolution of two sequences) Let us re-consider the two sequences x(n) and h(n) from Example 6.2 and proceed to evaluate their linear convolution y (n) = 2, 1 , 1, 2 0 , 1, 2 where we are using the box notation to indicate the location of the sample at time n = 0. The sequences are reproduced in Fig. 9.7. x(n ) h( n ) 2 1 1 2 1 1 2 n 1 2 n FIGURE 9.7 Two sequences x(n) and h(n) whose convolution we are evaluating by means of the z transform. The z transform of the sequence x(n) = 235 2, 1 , 1, 2 is given by X (z ) = 2z + 1 z 1 + 2z 2 , SECTION 9.4 PROPERTIES OF THE z-TRANSFORM ROC = {0 < |z | < } 0 , 1, 2 is given by and the z transform of the sequence h(n) = H (z ) = z 1 + 2z 2 , ROC = {|z | > 0} Multiplying both z transforms we nd that Y (z ) = 2 3z 1 + z 2 + 4z 4 , ROC = {|z | > 0} In this case, the z transform of the linear convolution sequence, y (n), only has a few terms in its expansion and we can use the denition (9.1) of the z transform to conclude that y (0) = 2, y (1) = 3, y (2) = 1, y (3) = 0, y (4) = 4 and all other samples are zero. Observe how the result is obtained here more directly than using the graphical method of Example 6.2. Example 9.17 (Convolving two other sequences) Let us now evaluate the convolution y (n) = u(n) 1 2 n u(n 1) The rst step is to determine the z transforms of the sequences u(n) and 0.5n u(n 1). We already know from Example 9.3 that the z transform of the unit-step sequence is given by U (z ) = z , z1 |z | > 1 In order to determine the z transform of the sequence 0.5n u(n 1) we note that we can express it as n n1 1 11 u(n 1) = u(n 1) 2 22 where the sequence (0.5)n1 u(n 1) can be identied as a time-delayed version of 0.5n u(n) and, hence, n z 1/2 1 1 = , |z | > 1/2 u(n 1) z 1 2 2 z 1/2 z 1/2 It follows that the z -transform of y (n) is Y (z ) = z 1/2 , z 1 z 1/2 |z | > 1 with the ROC found by taking the intersection of the individual ROCs: ROC = { |z | > 1 } { |z | > 1/2 } = { |z | > 1 } In order to determine the sequence y (n) we need to inverse transform Y (z ), i.e., we need to know how to determine the time-domain sequence from its z transform. We shall learn how to do this reverse operation by means of partial fractions in Chapter 10. For now, it sufces to note that we can express Y (z ) as the sum of two rational functions as follows: Y (z ) = 1 1/2 , z1 z 1/2 |z | > 1 236 Its inverse transform can be determined by noting that CHAPTER 9 z-TRANSFORM Y ( z ) = z 1 z z1 1 1 z 2 z z 1/2 , |z | > 1 Now since the ROC is the outside of a disc, the inverse transform of both terms appearing in Y (z ) need to be right-sided sequences. More specically, we have z 1 1 1 z 2 z z1 z z 1/2 u(n 1) 1 2 n1 1 2 u(n 1) so that y (n) = = 1 1 2 n1 1 2 1 2 u(n 1) u(n 1) n u(n 1) 9.5 EVALUATING SERIES One useful application of the z -transform technique is the evaluation of series. Example 9.18 (Evaluating a series) Let us evaluate the series S= n=0 n 1 2 n 3 cos For this purpose, we rst note that S can be identied as the value at the point z = 2 of the z transform of the sequence n u(n) x(n) = cos 3 Indeed, by denition, X (z ) = x(n)z n = n= cos n=0 n z n 3 so that if z is set to z = 2 we get X (z )|z =2 = n=0 1 2 n cos n 3 =S This conclusion obviously requires the point z = 2 to belong to the ROC of X (z ). Now we know from Example 9.4 that cos 1 0.5z 1 n u(n) X (z ) = , 3 1 z 1 + z 2 and since z = 2 belongs to the ROC, we conclude that S= 1 0.5z 1 =0 1 z 1 + z 2 z =2 |z | > 1 Example 9.19 (A useful series) Let us now evaluate the following series S= nn , n=0 || < 1 Thus, note that S can be identied as the value at the point z = 1 of the z -transform of the sequence x(n) = nn u(n) Indeed, by denition, X (z ) = x(n)z n = n= nn z n n=0 so that if z is set to z = 1 we get X (z )|z =1 = n=0 nn = S This conclusion obviously requires the point z = 1 to belong to the ROC of X (z ). Now we know from Table 9.3 that z , |z | > || nn u(n) X (z ) = (z )2 and since z = 1 belongs to the ROC, we conclude that S= z = (z )2 z =1 (1 )2 Hence, nn = n=0 , (1 )2 || < 1 (9.27) 9.6 INITIAL VALUE THEOREM Another useful property of the z transform is that it allows us to determine the value of a causal sequence x(n) at time 0 without the need to perform inverse z -transformation. Thus, assume that x(n) is a causal sequence, namely, x(n) = 0, for n < 0 Then it holds that lim X (z ) = x(0) z where the point z = must belong to the ROC of X (z ) for the limit to exist. Proof: The result follows immediately from the relation X (z ) = x(0) + x(1)z 1 + x(2)z 2 + . . . , (9.28) 237 SECTION 9.6 INITIAL VALUE THEOREM 238 CHAPTER 9 z-TRANSFORM where only negative powers of z are present due to the causality of x(n). Note that since x(n) is causal, the ROC of X (z ) is the outside of a disc. Moreover, since X (z ) does not contain positive powers of z , its ROC includes z = . In this way, the limit (9.28) is well-dened. Example 9.20 (Initial value) Consider the z transform X (z ) = 0.5z , z 2 1.5z + 0.5 |z | > 1 Taking the limit as z we nd that lim X (z ) = 0 z so that x(0) = 0. We are therefore able to infer this result without determining x(n) from X (z ). Note that since the ROC is the outside of a disc, we know that x(n) is a right-sided sequence. Subsequently, since the limit of X (z ) as z is nite, we conclude that x(n) is necessarily a causal sequence. 9.7 UPSAMPLING AND DOWNSAMPLING We end this chapter by introducing briey the notions of upsampling and downsampling of a sequence, which will be useful in the study of multi-rate discrete-time systems in Chapters 2931. Multirate systems are systems that involve signals that are sampled at different rates. 9.7.1 Upsampling Starting from a sequence x(n), let us construct the sequence x n , L y (n) = 0, if n is integer L (9.29) otherwise We say that y (n) is obtained via time-expansion, which amounts to inserting L 1 zero samples between two successive samples of x(n). We represent the upsampling of a generic sequence x(n) in block diagram form as shown in Fig. 9.8. x(n) FIGURE 9.8 L y ( n) Block diagram representation of upsampling a sequence x(n) by a factor L. 239 SECTION 9.7 Example 9.21 (Time expansion by a factor of 3) Figure 9.9 illustrates the effect of time-expansion on a sequence x(n) using an upsampling factor of L = 3. It is seen that the values of y (n) coincide with those of x(n/L) whenever n is a multiple of 3. It is also seen that L 1 = 2 zeros are inserted between successive samples of y (n). x(n) 3 2 1 n 123 y (n) = x(n/3) 3 2 1 n 123 456789 FIGURE 9.9 (bottom). Upsampling a sequence x(n) (top) by a factor L = 3 to generate the sequence y (n) The z transforms of the sequences x(n) and y (n) in Fig. 9.8 are related as follows. Assume that the ROC of the sequence x(n) is given by Rx = { z C such that r1 < |z | < r2 } Then, it holds that Y (z ) X zL (9.30) with ROC given by 1/L Ry = { z C such that r1 1/L < |z | < r2 } (9.31) UPSAMPLING AND DOWNSAMPLING 240 Proof: Using the denition (9.29), we have CHAPTER 9 z-TRANSFORM Y (z ) = y (n)z n n= = x(n/L)z n n = n/L integer Now as n varies over the interval < n < , the ratio n/L covers all possible integer values and, hence, all samples of the sequence x() enter into the second summation. Dene the change of variables m = n/L, whenever n/L is an integer. Then, we can write Y (z ) = x(m)z mL m= = x(m)(z L )m m= = X (z L ) for all values of z such that z L Rx . 9.7.2 Downsampling Let us now consider a related operation known as downsampling. We motivate the discussion by considering rst the sequence y (n) = x(2n). We represent the downsampling operation of a generic sequence x(n) in block diagram form as shown in Fig. 9.10. The sequence y (n) = x(2n) is shown in Fig. 9.11 starting from the same x(n) used in Example 9.21. It is seen that some samples of x(n) are now discarded. In this particular example, every other sample of x(n) is discarded: x(0) and x(2) are maintained while x(1) and x(3) are removed. x(n) FIGURE 9.10 2 y ( n) Block diagram representation of downsampling a sequence x(n) by a factor of 2. 241 SECTION 9.7 x(n) UPSAMPLING AND DOWNSAMPLING 3 2 1 7 4 56 123 89 n y (n) = x(2n) 3 2 1 2 1 n 34 FIGURE 9.11 Downsamping a sequence x(n) by a factor of 2. The dotted line are used to illustrate which samples are maintained besides the sample at n = 0. The z transforms of the sequences x(n) and y (n) in Fig. 9.10 are related as follows. Assume that the ROC of the sequence x(n) is given by Rx = { z C such that r1 < |z | < r2 } Then, it holds that 1 X (z 1/2 ) + X (z 1/2 ) 2 x(2n) (9.32) with the ROC corresponding to the sequence y (n) = x(2n) given by 2 2 Ry = { z C such that r1 < |z | < r2 } (9.33) Proof: Introduce the sequence b(n) = 1 [x(n) + (1)n x(n)] 2 Then b(n) = x(n) whenever n is even and b(n) = 0 whenever n is odd. Moreover, it also holds that y (n) = b(2n). Now it follows from the properties of the z transform that (recall Example 9.10): B (z ) = 1 [X (z ) + X (z )] 2 242 CHAPTER 9 z-TRANSFORM and we can proceed to evaluate the z transform of y (n) as follows: Y (z ) = y (n)z n n= = b(2n)z n n= = b(k)z k/2 , using k = 2n k = k even = b(k)z k/2 , because for odd k we have b(k) = 0, by construction k= = b(k)(z 1/2 )k k= = = B (z 1/2 ) 1 X (z 1/2 ) + X (z 1/2 ) 2 for all values of z such that z 1/2 Rx . M-fold Downsampling More generally, we can perform M fold downsampling by considering y (n) = x(M n) (9.34) for positive integers M see Fig. 9.12. x(n) FIGURE 9.12 y ( n) M Block diagram representation of downsampling a sequence x(n) by a factor of M . It holds in this general case that the z transform of y (n) is related to the z transform of x(n) as follows: Y (z ) = 1 M M 1 k=0 k X WM z 1/M (9.35) where WM denotes the M th root of unity, i.e., WM = ej 2/M (9.36) and the ROC corresponding to y (n) is given by M M Ry = { z C such that r1 < |z | < r2 } (9.37) 243 Proof: Dene the auxiliary sequence SECTION 9.8 x(n), 0, b(n) = APPLICATIONS n = multiple of M otherwise Then y (n) = b(M n). Moreover, Y (z ) = y (n)z n n= = b(M n)z n n= = b(k)z k/M , because b(k) = 0 unless k is a multiple of M k= = b(k)(z 1/M )k k= B (z 1/M ) = for all values of z such that z 1/M belongs to the ROC corresponding to the sequence b(n). We still need to relate B (z ) to X (z ). For this purpose, we note that we can express b(n) in terms of x(n) as follows: b(n) = = 1 M M 1 WMkn x(n) k=0 1 n(M 1) 1 + WMn + WM2n + . . . + WM x(n) M This is because when n is a multiple of M , say n = mM , we get WMkn = ej 2/M kmM = ej 2km = 1 and, consequently, b(n) = = 1 [1 + 1 + 1 + . . . + 1] x(n), M x(n) when n is multiple of M On the other hand, when n is not a multiple of M , the sum below evaluates to zero n(M 1) 1 + WMn + WM2n + . . . + WM = 0, when n is not multiple of M These facts justify the expression for b(n) in terms of x(n), namely, b(n) = 1 n(M 1) 1 + WMn + WM2n + . . . + WM x(n) M Using the modulation property (9.14) of the z transform we now get B (z ) = for all values z Rx . 1 M M 1 k X (W M z ) k=0 244 9.8 APPLICATIONS CHAPTER 9 z-TRANSFORM TO BE ADDED Practice Questions: 1. 2. 9.9 PROBLEMS Problem 9.1 What is the ROC for the z -transform of x(n) = u(n + 3) u(n 3)? Problem 9.2 What is the ROC for the z -transform of x(n) = u(n + 3) Problem 9.3 Let X (z ) = 1 n 2 u(n 3)? 1 z 1 + z 1/4 (z 1/3)2 Describe all sequences x(n) whose z -transforms coincide with X (z ). Problem 9.4 Let X (z ) = z 1 z 2 2 (z 1/4) z 1/2 Describe all sequences x(n) whose z -transforms coincide with X (z ). Problem 9.5 Find the z transforms and ROCs of the following sequences: (a) x(n) = (b) x(n) = 1 n2 2 u(n 4). 2 u(n). 1 n2 (c) x(n) = n 1 n2 2 2 (d) x(n) = n u(n 2). 1 n+2 2 u(n). Problem 9.6 Find the z transforms and ROCs of the following sequences: (a) x(n) = (n 1) (b) x(n) = 1 n (c) x(n) = n 2 1 n+1 2 u(n 1). u(n 2). 1 n1 2 (d) x(n) = n(n 1) u(n). 1 n u(n). 2 Problem 9.7 Find the z transforms and ROCs of the following sequences: (a) x(n) = n cos 3 (n 1) u(n 2). (b) x(n) = (n 2) cos (c) x(n) = (n 1) sin n 3 n 1 sin n 2 6 3 3 u(n). (n 1) u(n 3). Problem 9.8 Find the z transforms and ROCs of the following sequences: (a) x(n) = cos (b) x(n) = n (c) x(n) = 6 n u(n 1). 1 n1 2 1 2n2 2 sin cos 3 n 3 2 3 u(n). n u(n 2). Problem 9.9 Determine the z transforms of each of the following sequences and indicate their regions of convergence: (a) x(n) = nu(n 1). 2 (b) x(n) = 1 + n |n| (c) x(n) = 245 n2 SECTION 9.9 u(n 1). PROBLEMS , with > 0. (d) The impulse response sequence of the relaxed causal system y (n) 3 y (n 1)+ 1 y (n 2) = 4 8 x(n 1). Problem 9.10 Determine the z transforms of each of the following sequences and indicate their regions of convergence: (a) x(n) = n2 u(n 1). (b) x(n) = 1 n2n2 u(n 1). (c) x(n) = |n| , with > 0. (d) The impulse response sequence of the relaxed causal system y (n) 1 y (n 1) 1 y (n 2) = 4 8 2x(n 2). Problem 9.11 Determine the z transforms of the following sequences: (a) x(n) = u(2n). (b) x(n) = { 1 , 1, 1, 1, 1, 1, 1, 1, . . .}. That is, the samples of x(n) alternate between 1 and 1. Problem 9.12 Determine the z transforms of the following sequences: (a) x(n) = u(2n 2). (b) x(n) = { 1 , 1, 1, 1, 1, 1, 1, 1, . . .}. That is, the samples of x(n) alternate between 1 and 1. Problem 9.13 Find the z transform of the sequence n 1 2 x(n) = nu(n 2) + u(n + 1) Problem 9.14 Find the z transform of the sequence x(n) = n2 u(n + 2) + Problem 9.15 Let X (z ) = n+2 1 4 u(n 1) z , |z | < 1/4 z 1/4 Can you use the initial value theorem to determine x(0)? Problem 9.16 Let X (z ) = Find x(0). z 51 , |z | > 1/2 (2z 1/4)(3z 1/2)5 0 Problem 9.17 Consider the sequence x(n) shown in Fig. 9.13. Dene h(n) = 1 3 x(n + 2) (n) + u(n 3), 2 2 h1 (n) = 1 2 n h(n)u(n) Determine H (z ), the z transform of h(n), and indicate its ROC. Find also the z transform of h1 (n) and its ROC. Problem 9.18 Consider the same sequence x(n) shown in Fig. 9.13. Dene h(n) = 1 x(n + 1) + 4 1 2 n u(n 2), h1 (n) = 1 3 n1 h(n)u(n 1) 246 x(n) CHAPTER 9 z-TRANSFORM 3 2 1 2 1 0 2 1 3 4 5 6 n FIGURE 9.13 Sequence x(n) dened in Prob. 9.17. Determine H (z ), the z transform of h(n), and indicate its ROC. Find also the z transform of h1 (n) and its ROC. Problem 9.19 Let 1 2 x(n) = n u(n 1), 1 3 h(n) = 2n u(n 3) Use the z transform technique to evaluate the following sequences: (a) x(n) h(n). (b) x(n 2) 1 n 4 h(n). (c) x(n) cos 4 n h(n). (d) x(n) h(n 1) 1 n 4 u(n). Problem 9.20 Let x(n) = n 1 3 n u(n), h(n) = 1 4 n1 u(n + 1) Use the z transform technique to evaluate the following sequences: (a) x(n) h(n). (b) x(n 1) 1 n1 (c) x(n) sin 3 h(n 2). n h(n 1). 3 (d) x(n) h(n 2) 1 n 3 u(n). Problem 9.21 Use the z transform technique to evaluate the value at n = 0 of the convolution sequence n1 n+1 1 1 u(n) u(n 2) 1 + 2 3 Problem 9.22 Use the z transform technique to evaluate the value at n = 0 of the convolution sequence n+1 2n+2 1 1 u(n 1) n u(2n) 3 2 Problem 9.23 Let x(n) = (0.5)n u(n 1). Find the z transform of the sequence n y (n) = mx(m) m= Problem 9.24 Let x(n) = n(0.5)n2 u(n + 1). Find the z transform of the sequence n PROBLEMS y (n) = m= Problem 9.25 Let (m 1)x(m) n1 1 n u(n 2) cos 2 6 Find the z -transform and the corresponding ROCs of the following sequences: x(n) = n (a) x(2n). (b) x(3n). Problem 9.26 Let n+1 1 3 x(n) = n sin (n 1) u(n) 3 Find the z -transform and the corresponding ROCs of the following sequences: (a) x(2n 2). (b) x(4n). Problem 9.27 Let 1 2 x(n) = n n1 n u(n 2) 6 cos and assume x(n) is upsampled by a factor of 4 to generate the sequence y (n). Find Y (z ) and its ROC. Problem 9.28 Let x(n) = n 1 3 n+1 sin (n 1) u(n) 3 and assume x(n) is upsampled by a factor of 3 to generate the sequence y (n). Find Y (z ) and its ROC. Problem 9.29 Evaluate the series k=0 (k 1) 1 2 k 3 Problem 9.30 Evaluate the series k=2 1 3 k+2 cos n 6 3 Problem 9.31 Use the z transform technique to evaluate the following sums: (a) n2 1 n 3 n=2 (b) 100 1 n n 3 n=0 (c) n n=999 . . 1 n 2 . Problem 9.32 Use the z transform technique to evaluate the following sums: (a) (n 1) n=3 (b) 1000 n=100 n 1 n 4 1 n1 . 2 . 247 SECTION 9.9 248 CHAPTER 9 (c) n=9999 n2 1 n1 2 . z-TRANSFORM Problem 9.33 A causal system is described by the difference equation y (n) y (n 1) + 1 y (n 2) = x(n 1), 4 y (1) = 0, y (2) = 7/2 (a) Find its zero-input response. (b) Find the z transform of the zero-state response of the system when x(n) = 1 n+1 2 u(n). Problem 9.34 A causal system is described by the difference equation y (n) 1 1 y (n 1) y (n 2) = x(n 1), 8 8 y (1) = 0, y (2) = 1 (a) Find its zero-input response. 1 (b) Find the z transform of the zero-state response of the system when x(n) = 4 n u(n). Problem 9.35 A causal system is described by the block diagram shown in Fig. 9.14 with x(n) denoting the input sequence and y (n) denoting the output sequence. The initial state of the system is y (2) = 0 and y (1) = 4/3. x ( n) y ( n) + 3/4 1 / 8 z 1 z 1 FIGURE 9.14 Block diagram for the system of Prob. 9.35. (a) Is the system BIBO stable? (b) Use the z transform technique to nd the complete response of the system when x(n) = n u(n), where || < 1. (c) Are there choices of for which at least one of the modes of the system is not excited (i.e., does not appear) at the output? Describe all such s. (d) Find the energy of the output sequence when = 1/4. (e) Which value of results in an output sequence with smallest energy? Problem 9.36 A causal system is described by the block diagram shown in Fig. 9.15 with x(n) denoting the input sequence and y (n) denoting the output sequence. The initial state of the system is y (2) = 1 and y (1) = 0. (a) Is the system BIBO stable? (b) Use the z transform technique to nd the complete response of the system when x(n) = 2n u(n 1), where || < 1. (c) Are there choices of for which at least one of the modes of the system is not excited (i.e., does not appear) at the output? Describe all such s. (d) Find the energy of the output sequence when = 1/4. (e) Which value of results in an output sequence with smallest energy? 249 SECTION 9.9 x ( n) y ( n) + 1/4 1/8 z 1 z 1 FIGURE 9.15 Block diagram for the system of Prob. 9.36. x(n) x(n) FIGURE 9.16 2 2 2 2 y ( n) w ( n) Two separate cascades of upsampling and downsampling blocks for Prob. 9.37. Problem 9.37 Consider the two cascades shown in Fig. 9.16 where the order of downsampler the n and upsampler blocks is switched in one case relative to the other. Let x(n) = 1 u(n). Find 2 Y (z ) and W (z ). Are the two cascades equivalent? Problem 9.38 Consider the system shown in Fig. 9.17 with input x(n) and output y (n). Find n Y (z ) when x(n) = 1 u(n). 2 x(n) 2 2 2 y ( n) 2 z 1 FIGURE 9.17 Block diagram representation of the system for Prob. 9.38. Problem 9.39 Assume x(n) is a real-valued and even sequence. Show that its z transform satises X (z ) = X (1/z ). Problem 9.40 Assume x(n) is a real-valued and even sequence. Show that if X (z ) has a zero at z = zo and a pole at z = po , then X (z ) also has a zero at z = 1/zo and a pole at z = 1/po . PROBLEMS 250 CHAPTER 9 z-TRANSFORM Problem 9.41 Let x(n) = (1/2)n u(n 1). Find the z transform of the sequence nx(n) + x2 (n 2). Specify its region of convergence. Find also the energy of this sequence. Problem 9.42 Let x(n) = (1/3)n2 u(n + 1). Find the z transform of the sequence n2 x(n) x2 (n). Specify its region of convergence. Find also the energy of this sequence. Problem 9.43 Find the inverse z transform of the following (non-rational) functions: (a) X (z ) = cos z . (b) X (z ) = sin z . (c) X (z ) = sin z cos z . Problem 9.44 Find the inverse z transform of the following (non-rational) functions: (a) X (z ) = cos2 z . (b) X (z ) = sin 2z . (c) X (z ) = sin(z/2). Problem 9.45 Consider the following complex series expansion of the natural logarithm around the point z = 1, (1)n+1 n z , |z | < 1 ln(1 + z ) = n n=1 Use the result to determine the sequence x(n) whose z transform is given by X (z ) = ln(1 + z 1 ), |z | > || Problem 9.46 Find the inverse transform of X (z ) = ln(1 + z 1 ), |z | > || by using the differentiation property of the z transform. Problem 9.47 Find the right-sided sequence whose z transform is given by 1 X (z ) = e 2z Problem 9.48 Let X (z ) denote the z transform of the sequence x(n) = n u(n), for integers 1. Show that dX1 (z ) X (z ) = z dz Use this recursion to determine the z transforms, and the corresponding ROCs, of the sequences x2 (n), x3 (n), and x4 (n). Problem 9.49 Find the inverse z transform of X (z ) = z 1 1 1 50 2 z 50 Problem 9.50 Find the inverse z transform of X (z ) = z 1 1+ 1 48 3 z 60 Problem 9.51 Find the z transform of x(n) = cosh(n). Problem 9.52 Find the z transform of x(n) = tanh(n). Problem 9.53 Show that upsamplers are linear but time-variant systems. 251 Problem 9.54 Show that downsamplers are linear but time-variant systems. SECTION 9.A CONVERGENCE OF POWER SERIES 9.A APPENDIX: CONVERGENCE OF POWER SERIES The convergence of sequences, series, and power series is a well studied problem in mathematical and complex analysis. Here we summarize some of the main results in order to shed some light on the convergence properties of the z transform. For the benet of the reader, we start from some basic denitions. Sequences. A sequence of numbers {an } is said to converge to some value a if, and only if, for any > 0, there exists an integer N large enough such that |an a| < for all n > N (9.38) A useful equivalent characterization of the convergence of a sequence is given by Cauchys criterion, which states that the sequence {an } convergence to some number a if, and only if, for any > 0, there exists an integer N large enough such that |an am | < for all n, m > N (9.39) That is, the terms of the sequence get close to each other. Series. A series is dened as the sum of an innite number of terms, say an n=0 The sum may or may not converge. The convergence of a series is dened in terms of the convergence of a partial sum sequence as follows. Let m an Sm = (9.40) n=0 That is, Sm is the sum of the terms up to time m. Then, the series is said to convergence to some value S if, and only if, the sequence of partial sums {Sm } converges to S . Absolute convergence of series. A series is said to converge absolutely if n=0 |an | converges (9.41) where the terms {an } are replaced by their magnitudes, {|an |}. A useful result is the fact that if a series converges absolutely then the series is convergent. n=0 |an | converges = an converges (9.42) n=0 We therefore say that absolute convergence = convergence A useful test for absolute convergence is the ratio test. Let = lim n |an+1 | |an | If < 1, then the series converges absolutely. If > 1, the series diverges. The case = 1 needs to be studied separately and no general statement can be made beforehand. 252 CHAPTER 9 Conditional convergence of series. The converse statement is not true. There are series that con- verge but are not absolutely convergent. For example, the series z-TRANSFORM n=1 (1)n+1 n can be shown to converge; but is not absolutely convergent. Series of this kind, namely convergent series that are not absolutely convergent are said to converge conditionally. an converges while n=0 n=0 |an | diverges = conditional convergence (9.43) Reordering. Consider a sequence {an } and reorder its terms into a new sequence {bn }. If the series an n=0 converges absolutely, then any reordering of the terms of the series will always result in the same value, i.e., an = n=0 bn n=0 On the other hand, if a series converges conditionally, then reordering of its terms can lead to any result. For example, for any real number , it can be shown that there always exists a reordering of the sequence {an } into a new sequence {bn } such that the new series will evaluate to . Therefore, there is ambiguity associated with conditional convergence, which makes it undesirable. Power series. A power series is dened as a series of the form n=0 a n (z z o )n where z is an arbitrary complex variable and zo is some given complex number. There are values of z for which the series converges and other values of z for which the series diverges. The following result is well-known for such power series. One of only three possibilities may occur: 1. The power series converges absolutely for all z , except possibly at z = . 2. The power series diverges for all z = zo . 3. There exists an r > 0 such that the power series converges absolutely for all |z zo | < r and diverges for all |z zo | > r . Under the third possibility, the series may diverge or converge for points z on the circle |z zo | = r . However, if convergence occurs, it will be conditional in this case and, therefore, ambiguous. In all other cases, the convergence of the power series is in the absolute (and desirable) sense. For this reason, the region of convergence of a power series is dened as the set of all points z for which the series converges absolutely: ROC = z C such that n=0 n | a n (z z o ) | < The value of the radius of convergence, r , can be determined from the expression |an+1 | 1 = lim n |an | r Two-sided power series. Consider now a power series of the form n= CONVERGENCE OF POWER SERIES a n (z z o )n where the sum starts from n = . We can split the above series into two separate series: S1 = S2 = n=0 a n (z z o )n 1 n= 253 SECTION 9.1 a n (z z o )n = n=1 a n ( z z o ) n Observe that S1 involves positive powers of (z zo ) while S2 involves negative powers of (z zo ). If we now apply the result regarding the convergence of power series, we nd that S1 converges absolutely for all points z satisfying |z zo | < for some > 0, while S2 converges absolutely for all points z satisfying |z zo | > for some > 0. Therefore, the ROC of the two-sided series will be of the general form < |z zo | < and the values of and are found as follows: 1 |an+1 | = lim , n |an | 1 = lim n |an+1 | |an | CHAPTER 10 Partial Fractions I nverse transformation is the process of recovering a sequence x(n) from knowledge of its z transform, X (z ), and the corresponding ROC. In this chapter we describe one useful technique for performing inverse transformation for z transforms that are rational functions of z . The procedure is known as the partial fractions method and it is best explained by means of examples. 10.1 RATIONAL TRANSFORMS Many of the z transforms that arise in discrete-time signal processing are rational functions of z (or z 1 ), say, of the form: X (z ) = b 0 + b 1 z 1 + b 2 z 2 + . . . + b q z q a0 + a1 z 1 + a2 z 2 + . . . + ap z p q = b k z k k=0 p ak z k k=0 = B (z ) A(z ) where B (z ) and A(z ) denote the numerator and denominator polynomials in z 1 and have degrees q and p, respectively. Usually, the degree of the numerator is smaller than or equal to the degree of the denominator, i.e., q p, in which case we say that X (z ) is a proper rational function in z 1 . When this is not the case, the rational function can be written in the alternative form R(z ) X (z ) = Q(z ) + A(z ) where Q(z ) is some polynomial in z 1 obtained by dividing B (z ) by A(z ) with remainder R(z ) (also a polynomial in z 1 ), namely, B (z ) = Q(z )A(z ) + R(z ) and where R(z )/A(z ) is a proper rational function in z 1 . For example, note that we can write 2 z 1 z 2 = 2 z 1 + X (z ) = 1 1 1 2 z 1 1 2 z 1 255 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 256 CHAPTER 10 PARTIAL FRACTIONS In several instances, it is convenient to express rational z transforms in terms of powers of z as opposed to z 1 . Thus, the following two representations are equivalent X (z ) = 2 2 z 1 = 1 1 2 z 1 z 1 2 where the right-most expression is obtained by multiplying the numerator and denominator of the middle expression by z . More generally, starting from a proper rational function of the form X (z ) = b(0) + b(1)z 1 + b(2)z 2 + . . . + b(q )z q , qp a(0) + a(1)z 1 + a(2)z 2 + . . . + a(p)z p if we multiply the numerator and denominator polynomials by z p , we arrive at an equivalent expression in terms of powers of z : X (z ) = b(0)z p + b(1)z p1 + b(2)z p2 + . . . + b(q )z pq a(0)z p + a(1)z p1 + a(2)z p2 + . . . + a(p) This expression will be a proper rational function in z since the degrees of its numerator and denominator polynomials are both equal to p. 10.2 ELEMENTARY RATIONAL FRACTIONS Now consider a z transform X (z ) that is a rational function of z (proper or not, i.e., the degree of its numerator polynomial may be equal to, more than, or less than the degree of its denominator polynomial). Starting from such a transform, the method of partial fraction expansion expresses it as the sum of simpler z transforms whose inversions are immediate. The simpler transforms are usually of the form: A A , ... , z (z )2 A, (10.1) for some constants {A, }. During the partial fraction expansion process, these terms may appear multiplied by some powers of z or z 1 , which would be handled during the inversion process by invoking the time-shift property of the z transform. The main reason for choosing to express X (z ) as the sum of such terms is that the inverse transforms of these terms are readily available, e.g., from the listing in Table 9.3, as we explain below. Obviously, the inverse transforms will depend on the nature of the ROCs of the terms in (10.1). We need to consider two situations. Region of Convergence Outside the Disc (|z | > ||) For regions of convergence of the form |z | > ||, the inverse transforms of (10.1) will be right-sided sequences and we can invert each term to obtain the sequences shown in Table 10.1. Thus, consider the term A , (z )2 |z | > || We already know from Table 9.3 that the following transform pair holds: nn u(n) z , |z | > || (z )2 257 Now note that the desired term, A/(z )2 , is related to the above transform via SECTION 10.2 Elementary Rational Fractions A A 1 z = z (z )2 (z )2 Therefore, by using the time-shift and linearity properties of the z transform from Table 9.3, we conclude that A , |z | > || (z )2 A (n 1)n2 u(n 1) (10.2) which is the third line in Table 10.1. We can justify the second line in the table by using a similar argument. TABLE 10.1 Inverse transforms of elementary functions in terms of right-sided sequences. z transform sequence A (n) A (z )2 A A + z z |z | > || A (n 1)n2 u(n 1) A z complex plane An1 u(n 1) A ROC |z | > || 2 |A| ||n1 cos[ (n 1) + ] u(n 1) |z | > || Region of Convergence Inside the Disc (|z| < ||) For regions of convergence of the form |z | < ||, the inverse transforms of terms of the form (10.1) will be left-sided sequences and we can invert each term to obtain the sequences shown in Table 10.2. Thus, consider again the term A , (z )2 |z | < || We already know from Table 9.3 that the following transform pair holds: nn u(n 1) z , |z | < || (z )2 A (n 1)n2 u(n) and, as before, we conclude that A , |z | < || (z )2 (10.3) which is the third line in Table 10.2. Likewise, we can justify the second line in the table by using a similar argument. 258 CHAPTER 10 TABLE 10.2 PARTIAL FRACTIONS Inverse transforms of elementary functions in terms of left-sided sequences. z transform sequence ROC A A (n) complex plane A z An1 u(n) |z | < || A (z )2 A (n 1)n2 u(n) |z | < || A A + z z 2 |A| ||n1 cos[ (n 1) + ] u(n) |z | < || Complex Terms Sometimes, during the process of partial fraction expansion, a complex conjugate pair {, } arises and contributes to the expansion of X (z ) with a sum of the form A A + z z (10.4) for some constant A and its complex conjugate, A . Thus, consider initially regions of convergence of the form |z | > ||. In this case, using the second line of Table 10.1, the inverse z transform of the above sum is [An1 + A (n1) ] u(n 1) (10.5) If we express the complex numbers {A, p} in polar forms, say, A = |A|ej , = || ej then An1 + A (n1) = |A|ej ||n1 ej(n1) + |A|ej ||n1 ej(n1) = |A| ||n1 ej ((n1)+) + ej ((n1)+) = 2 |A| ||n1 cos[ (n 1) + ] It follows that A A 2 |A| ||n1 cos[ (n 1) + ] u(n 1) , |z | > || + z z (10.6) A similar argument will show that for regions of convergence of the form |z | < ||, the following conclusion holds: A A 2 |A| ||n1 cos[ (n 1) + ] u(n) , |z | < || + z z (10.7) 10.3 PARTIAL FRACTIONS EXPANSION 259 SECTION 10.3 We can now proceed to explain the procedure for inverse transformation via partial fractions expansion. Thus, given a rational z -transform, X (z ), and its ROC, the following are general guidelines for its inversion by means of partial fractions. With time, as the reader becomes more comfortable with the z transform and its properties, the reader will develop personal preferences and variations for some of the steps below. (1) First, express the rational function X (z ) in terms of positive powers of z in both the numerator and the denominator. For example, starting from X (z ) = 1 1 2 z 1 we rewrite it as X (z ) = z z2 after multiplying the numerator and denominator by z . Sometimes, it may be easier to extract a negative power of z from X (z ). For example, the transform X (z ) = z 1 + 1 z+2 can be written as X (z ) = z 1 z+1 z+2 X (z ) and we can proceed to invert X (z ). If we succeed in inverse-transforming X (z ), then the inverse transform of X (z ) is immediate since x(n) = x (n 1). (2) In the sequel, we denote the transform that results from Step 1, in terms of positivepowers of z , by X (z ). We next make sure that X (z ) is strictly proper (i.e., that the degree of its numerator is less than the degree of its denominator). If not, we can divide the numerator by the denominator and proceed with the strictly proper part, denoted by S (z ). For example, given X (z ) = z+1 z+2 we can write it as X (z ) = 1 1 z+2 S (z ) where the strictly proper part is S (z ) = 1/(z + 2). The additional terms that result from this division (in the above example, it is only the term that is equal to 1), will contribute a unit-sample sequence and possibly time-shifted versions of it. Thus, the inverse transform of X (z ) in the above example is one of two possibilities: x (n) x (n) = (n) (2)n1 u(n 1) = (n) + (2)n1 u(n) when ROC = { |z | > 2 } when ROC = { |z | < 2 } PARTIAL FRACTIONS EXPANSION 260 CHAPTER 10 PARTIAL FRACTIONS (3) More generally, when the denominator of S (z ) is of higher-order, we determine the roots of the denominator and use these roots to express S (z ) as the sum of lowerorder terms: (3.a) Each single root, say 1 , will contribute with a term of the form A/(z 1 ), for some constant A to be determined. (3.b) A double root at 2 will instead contribute with two terms of the form B/(z 2 ) and C/(z 2 )2 , for some constants {B, C }. (3.c) For rational transforms S (z ) with real coefcients, a complex pair at {, } will contribute with two terms of the form D/(z ) and D /(z ), for some constant D. (3.d) We determine the coefcients (A, B, C, . . .) of the partial fraction expansion by equating the numerators of both sides of the equality: S (z ) = B C A + + + ... z 1 z 2 (z 2 )2 Alternatively, the constant A can be determined from evaluating the product S (z )(z 1 ) at z = 1 , i.e., A = S (z )(z 1 )|z=1 Likewise, C can be determined from C = S (z )(z 2 )2 z =2 and so forth. We illustrate the procedure with several examples. Example 10.1 (Simple roots) Consider the z transform X (z ) = 1 + z 1 , 1 1.5z 1 + 0.5z 2 with ROC = { |z | > 1 } We proceed as follows in order to determine the sequence x(n): 1. We multiply both the numerator and the denominator of X (z ) by z 2 to express X (z ) in terms of positive powers of z : z2 + z X (z ) = 2 z 1.5z + 0.5 2. The resulting X (z ) is not a strictly proper rational function. Dividing the numerator by the denominator, we get 2.5z 0.5 X (z ) = 1 + 2 z 1.5z + 0.5 S (z ) where S (z ) is strictly proper. 3. The roots of the denominator of S (z ) are 1 and 0.5, which are simple roots. Therefore, we can expand S (z ) into partial fractions as follows: A B S (z ) = + z1 z 0.5 for some coefcients A and B to be determined. The value of A follows from: 2.5z 0.5 =4 z 0.5 z =1 A = S (z )(z 1)|z =1 = The value of B follows from B = S (z )(z 0.5)|z =0.5 = 4. Therefore, S (z ) = which we can also write as 1.5 4 z1 z 0.5 z z1 S (z ) = 4z 1 2.5z 0.5 = 1.5 z 1 z =0.5 1.5z 1 z z 0.5 Using the second line of Table 10.1 we nd that the inverse transform of S (z ) over |z | > 1 is given by n1 1 u(n 1) s(n) = 4u(n 1) 1.5 2 5. Consequently, the inverse z transform of X (z ) = 1 + S (z ) over |z | > 1 is x(n) = (n) + 4 1.5 1 2 n1 u(n 1) Example 10.2 (Simple roots again) Consider the same z transform from the previous example, X (z ) = 1 + z 1 , 1 1.5z 1 + 0.5z 2 with ROC = { |z | > 1 } We could have instead proceeded as follows. In step 1 of that example we obtained X (z ) = z2 z2 + z 1.5z + 0.5 This transform is a proper rational function with z 2 + z in the numerator. We can alternatively express X (z ) as X (z ) = zX (z ) where X (z ) = z+1 z 2 1.5z + 0.5 261 SECTION 10.3 PARTIAL FRACTIONS EXPANSION 262 CHAPTER 10 PARTIAL FRACTIONS is strictly proper. This amounts to extracting a z factor from the numerator of X (z ). We can now inverse transform X (z ) to nd x (n) and from it x(n). 1. We rst expand X (z ) into partial fractions: X (z ) = A B + z1 z 0.5 where the values of A and B follow from A = X (z )(z 1)z =1 = B = X (z )(z 0.5)z =0.5 = 2. Therefore, z+1 =4 z 0.5 z =1 z + 1 = 3 z 1 z =0.5 X (z ) = 4 3 z1 z 0.5 X (z ) = 3z 4z z1 z 0.5 and, hence, 3. The inverse z transform of X (z ) is then given by x(n) = 4 3 1 2 n u(n) It is straightforward to verify that this expression for x(n) coincides with the one obtained in the previous example. Example 10.3 (Double roots) Let us inverse transform X (z ) = 1 z 3 5 z 2 + 2z 2 1 2 , with ROC = 1 < |z | < 1 2 In this case, X (z ) is already expressed in terms of positive powers of z and, moreover, it is a strictly proper rational function. The denominator of X (z ) has a simple root at z = 1/2 and a double root at z = 1. Therefore, the partial fractions expansion of X (z ) will be of the form X (z ) = A B C + + z1 (z 1)2 z 1 2 for some constants {A, B, C } to be determined. These constants can be obtained by comparing the coefcients of the numerators on both sides of the equality: 1 5 z 3 2 z 2 + 2z 1 2 = 1 A(z 1)(z 2 ) + B (z 1 ) + C (z 1)2 2 (z 1)2 (z 1 ) 2 = (A + C )z 2 + ( 3 A + B 2C )z + ( A 2 2 1 z 3 5 z 2 + 2z 2 2 B 2 + C) 263 which leads to the linear system of equations SECTION 10.3 A+C 3 A + B 2C 2 A B +C 2 2 = = = PARTIAL FRACTIONS EXPANSION 0 0 1 The solution is given by A = 4, B = 2, and C = 4. Therefore, = 4 2 4 + + z1 (z 1)2 z = X (z ) 4z 1 z z1 + 2z 1 1 2 z (z 1)2 + 4z 1 z z 1 2 , 1 < |z | < 1 2 Since the ROC is a ring, we nd that the inverse transforms of the terms with poles at 1 lead to left-sided sequences, while the inverse transform of the term with pole at 1/2 leads to a right-sided sequence, namely, z z1 z (z 1)2 z z 1 2 u(n 1) nu(n 1) 1 2 n u(n) and, consequently, x(n) = 4u(n) 2(n 1)u(n) + 4 1 2 n1 u(n 1) Example 10.4 (Complex roots) Let us inverse transform X (z ) = 1 , z2 + 1 with ROC = |z | > 1 2 The denominator of X (z ) has complex roots at j . Therefore, the partial fractions expansion of X (z ) will be of the form A A X (z ) = + z+j (z j ) for some constant A and its complex conjugate, A , to be determined. These constants can be obtained by comparing the coefcients of the numerators on both sides of the equality: 1 z2 + 1 = = A A + z+j (z j ) (A + A )z + j (A A ) z2 + 1 which leads to the equations A + A = 0 and j (A A ) = 1 Solving for A and A we nd that A= j 1 = ej 2 2 2 and A = j 1 = e j 2 2 2 264 Therefore, CHAPTER 10 PARTIAL FRACTIONS X (z ) = j/2 j/2 z+j zj Using (10.6) we arrive at = 1 2 n1 = x(n) 1 2 n1 cos (n 1) + u(n 1) 2 2 cos n u(n 1) 2 10.4 INTEGRAL INVERSION FORMULA There is a useful integral inversion formula that can be used to recover specic sample values of a sequence x(n) for general z transforms X (z ), whether they are rational functions of z or not. The formula can be motivated as follows. Let X (z ) denote a given z transform with the corresponding ROC. Consider the integral expression 1 2j z k dz (10.8) where z is complex-valued and the notation means that the integration is carried over any counter-clockwise contour around the origin and within the ROC of X (z ). For our purposes, it is sufcient to consider circular contours around the origin. So let z = rej describe all points that lie on a circle of radius r with the phase varying between 0 and 2 see Fig. 10.1. Im z r Re FIGURE 10.1 Points z lying on the circle of radius r in the complex plane. Assume further that the value of r is such that all these points z lie inside the ROC of X (z ). Then dz = jrej d 265 and, consequently, the contour integral (10.8) becomes SECTION 10.4 1 2j z k dz 1 2rk1 = 2 INTEGRAL INVERSION FORMULA ej(1k) d 0 It is clear that the right-hand side evaluates to 1 when k = 1. On the other hand, when k = 1, we get 1 2rk1 2 ej(1k) d 1 1 ej(1k) 2rk1 j (k 1) 0, k = 1 = 0 = 2 =0 In other words, 1 2j 1, k = 1 0, k = 1 z k dz = (10.9) over circular contours around the origin. The result (10.9) is actually more general and is not limited to circular contours; however, the argument is beyond the needs of our exposition. For the purposes of our discussion, it sufces to focus on circular contours. Using the useful result (10.9), we can now proceed to develop an expression to recover x(n) from X (z ). We start from the denition of the z transform x(k )z k X (z ) = k= which converges absolutely for all points z in the ROC of X (z ). Multiplying both sides of the above equality by z n1 we get x(k )z nk1 X (z )z n1 = x(n)z 1 + k=,k=n Integrating over a circular contour around the origin and within the ROC of X (z ) we get 1 2j X (z )z n1dz = 1 2j x(n)z 1 dz + 1 2j = x(n) = k=,k=n z 1 dz 1 2j + x(k )z nk1 dz x(k ) 2j z nk1 dz x(n) + 0 k=,k=n so that x(n) = 1 2j X (z )z n1 dz (10.10) We therefore arrive at a useful integral expression for recovering the sample x(n) by means of a contour integral. Fortunately, evaluating the contour integral is a special case of a famous result in complex analysis known as the Cauchys Residue Theorem, which facilitates determination of (10.10). 266 CHAPTER 10 PARTIAL FRACTIONS Cauchys Residue Theorem Assume F (z ) is a rational function of z , which is the case of interest for our treatment in this book. Let {k } denote the poles of F (z ), namely the points in the complex plane where F (z ) evaluates to . Let mk denote the multiplicity of pole k . By denition, the residue of F (z ) at any of its poles, say at z = k with multiplicity mk , is computed as follows. Let G(z ) = F (z )(z k )mk That is, we multiply F (z ) by (z k )mk in order to obtain a function G(z ) that does not have a pole at k . Then dmk 1 1 G(z ) (mk 1)! dz mk 1 residue of F (z ) at k = (10.11) z =k in terms of the derivative of order (mk 1) of G(z ). For example, if is a pole of order 1, then residue of F (z ) at = F (z )(z ) |z= (pole of order 1) On the other hand, if is a pole of order 2, then residue of F (z ) at = d F (z )(z )2 dz (pole of order 2) z = and so forth. Cauchys residue theorem states that if we integrate the function F (z ) over a counterclockwise contour, C , around the origin and within the ROC of F (z ), then the result of the integration is equal to the sum of the residues of F (z ) at all poles that are inside C . More explicitly, 1 2j F (z )dz = (residues of F (z ) at poles lying inside contour curve) (10.12) Hence, the evaluation of the contour integral in (10.10) reduces to the evaluation of the residues of the function X (z )z n1 in the region enclosed by the contour of integration and we nd that x(n) = (residues of X (z )z n1 at poles lying inside contour curve) Example 10.5 (Evaluating residues) Consider the z transform z over |z | > || z We already know from Table 9.3 that the inverse transform is X (z ) = x(n) = n u(n) (10.13) Let us use instead the result (10.13) to arrive at the expression for x(n). For any n 1, we start from the function zn X (z )z n1 = z and note that it has a single pole at z = and possibly multiple poles at z = . Let us choose a circular contour around the origin and within the ROC, namely, within |z | > ||. It is clear that this contour encircles only the pole at z = . The residue at z = is easily seen to be zn zn residue of at = (z ) = n z z z = Therefore, for all n 1, we get x(n) = n . For n = 0 we have X (z )z n1 = 1 z which has a single pole at z = and its residue is equal to 1 1 residue of at = (z ) =1 z z z = It follows that x(0) = 1, which can be written as 0 . Let us now examine the values of x(n) for n < 0. Start with n = 1 so that X (z )z n1 = z 1 1 = z z (z ) and note that X (z )z n1 now has a single pole at z = and a single pole at z = 0; both poles are encircled by a contour within the ROC. The residue at z = is easily seen to be residue of 1 1 at = (z ) = 1 z (z ) z (z ) z = while the residue at z = 0 is 1 1 residue of at 0 = z ) = 1 z (z ) z (z ) z =0 Therefore, using (10.13) we conclude that x(1) = 0 In a similar vein, we can nd that x(n) = 0 for all n < 0. Consequently, putting the results together, we arrive at x(n) = n u(n) as expected. It is worth noting as well that relation (10.10) allows us to conclude that the following integral result holds: 1 zn n = (10.14) dz 2j z over any circular contour around the origin and within the region |z | > ||. Therefore, as shown by the above example, a sequence x(n) can be recovered by evaluating the residues of X (z )z n1 within an appropriate circular contour region within the ROC of X (z ). This procedure may be useful in several instances, especially when we are interested in the value of the sequence x(n) at a particular time instant n. In general, how- 267 SECTION 10.5 INTEGRAL INVERSION FORMULA 268 ever, inversion via (10.13) is not the most simple method to pursue. CHAPTER 10 PARTIAL FRACTIONS 10.5 APPLICATIONS TO BE ADDED Practice Questions: 1. 2. 10.6 PROBLEMS Problem 10.1 Invert the transform X (z ) = 1 , ROC = {|z | > 1/5} (z 1/8)(z + 1/5) Problem 10.2 Invert the transform X (z ) = 1 , ROC = {|z | < 1/8} (z + 1/8)(z 1/4) Problem 10.3 Invert the transform X (z ) = 1 , ROC = {1/8 < |z | < 1/3} (z + 1/8)2 (z + 1/3) Problem 10.4 Invert the transform X (z ) = 1 , ROC = {|z | > 1/2} z 2 + 1/4 Problem 10.5 Invert the transform X (z ) = 1 , ROC = {|z | < 1/3} z 2 + 1/9 Problem 10.6 Invert the transform X (z ) = 1 , ROC = {1/5 < |z | < 1/2} (z 1/2)(z 2 + 1/25) Problem 10.7 Given X (z ) = 1 2 z 3 Find x(n) when + z 1 + z 1 z2 6 z 1 6 1 (a) ROC = {|z | > 2 }. (b) ROC = {|z | < 1 }. 3 (c) ROC = { 1 < |z | < 1 }. 3 2 Problem 10.8 Given X (z ) = z2 z 2 1 4z 1 8 1 2 269 Find x(n) when SECTION 10.6 (a) ROC = {|z | > 1 }. 2 PROBLEMS (b) ROC = {|z | < 1 }. 4 (c) ROC = { 1 < |z | < 1 }. 4 2 Problem 10.9 Determine all possible sequences x(n) with z transform 6z + 3 2z 1 6z 2 5z + 1 X (z ) = Problem 10.10 Determine all possible sequences x(n) with z transform z 1 8z 2 z 1 X (z ) = Problem 10.11 Determine all possible sequences x(n) with z transform X (z ) = 12z 3 4z 2 + 12z 3 12z 2 7z + 1 Problem 10.12 Determine all possible sequences x(n) with z transform X (z ) = 1 z 12 2 12z 3 4z 2 + 12z 3 12z 2 7z + 1 Problem 10.13 Determine all possible sequences x(n) with z transform X (z ) = z2 z 2 z+ 1 2 Problem 10.14 Determine all possible sequences x(n) with z transform X (z ) = 1 z 1 3 z2 z 2 z + 1 2 Problem 10.15 Determine all possible sequences x(n) with z transform 1 X (z ) = z 13 3 Problem 10.16 Determine all possible sequences x(n) with z transform 1 X (z ) = z Problem 10.17 Let X (z ) = 1 z 1 2 12 3 1 z 1 , z2 + 1 1 2 |z | > 1 Decide whether x(n) is a causal sequence without inverting the transform. Problem 10.18 Let X (z ) = 1 z+ 1 3 1 , z2 + 4 1 < |z | < 2 3 Decide whether x(n) is a causal sequence without inverting the transform. Problem 10.19 Let X (z ) = 12z 3 4z 2 + 12z 3 , |z | > 1/2 12z 2 7z + 1 270 Use Cauchys residue theorem to evaluate x(99). CHAPTER 10 PARTIAL FRACTIONS Problem 10.20 Let 12z 3 4z 2 + 12z 3 , |z | < 1/4 12z 2 7z + 1 Use Cauchys residue theorem to evaluate x(99). X (z ) = Problem 10.21 Use the z transform technique to evaluate the convolution 1 2 n1 u(n 2) 1+ 1 3 n+1 u(n) Problem 10.22 Use the z transform technique to evaluate the convolution n 1 2 n1 u(n + 3) 1 3 n 2n+1 u(n) Problem 10.23 Consider the system y (n) = 5 y (n 1) y (n 2) + x(n) , 2 y (2) = 0, y (1) = 1 Find its complete response to the input sequence shown in Fig. 10.2 in two different ways: (a) Using the z transform technique. (b) Without using the z transform technique. The input sequence is equal to one for all time instants n 0 except at n = 0, where it is zero, and at n = 3, where it is equal to 1. The input sequence is also zero for n < 0. Simplify your answers to parts (a) and (b) until they are identical. Plot the samples of the response sequence over 0 n 5. x(n) 1 3 1 2 4 5 6 7 8 n 1 FIGURE 10.2 Input sequence x(n) for Prob. 10.23. Problem 10.24 Consider the system y (n) 1 1 y (n 1) y (n 2) = x(n 2) , 4 8 y (2) = 1, y (1) = 0 Find its complete response to the same input sequence shown in Fig. 10.2 in two different ways: (a) Using the z transform technique. (b) Without using the z transform technique. Simplify your answers to parts (a) and (b) until they are identical. Plot the samples of the response sequence over 0 n 5. Problem 10.25 Determine the sequence x(n) that is dened by x(n) = 1 2 n2 u(n) n+1 1 3 u(n 2) (n + 1) 1 4 n u(n + 1) Problem 10.26 Determine the sequence x(n) that is dened by x(n) = n 1 2 2n n+1 1 3 u(n + 1) u(2n) 1 4 n2 3n u(n 1) Problem 10.27 Consider a causal system that is described by the difference equation y (n) = 5 1 y (n 1) y (n 2) + x(n 2), 6 6 y (2) = 0, y (1) = 1. Determine its complete response to the sequence x(n) = (n 1) 1 4 n2 u(n 1). Problem 10.28 Consider a causal system that is described by the difference equation y (n) = 1 1 y (n 1) + y (n 2) + x(n 1), 4 8 y (2) = 1, y (1) = 0. Determine its complete response to the sequence 1 3 x(n) = n 2n2 u(n 2). Problem 10.29 A causal system is described by the difference equation y (n) y (n 1) + 1 y (n 2) = x(n), 4 Find its complete response to x(n) = 1 n 2 y (1) = 0, y (2) = 4. u(n 1). Problem 10.30 A causal system is described by the difference equation y (n) + 2y (n 1) + 2y (n 2) = x(n), Find its complete response to x(n) = 1 n 3 y (1) = 0, y (2) = 1. u(n 1). Problem 10.31 Consider the z transforms X (z ) = H (z ) = 1 1 , z 1/2 z 1/3 0.5z 3 , z 1/4 ROC = Rx ROC = Rh Let y (n) = x(n) h(n). Decide in each of the following cases whether y (n) is a causal sequence by working with Y (z ): (a) Rx = {1/3 < |z | < 1/2} and Rh = {|z | > 1/4}. (b) Rx = {|z | > 1/2} and Rh = {|z | > 1/4}. (c) Rx = {|z | < 1/2} and Rh = {|z | < 1/4}. Find y (0) in each case. 271 SECTION 10.6 PROBLEMS 272 CHAPTER 10 Problem 10.32 Consider the z transforms PARTIAL FRACTIONS X (z ) = H (z ) = 1 1 , (z 1/3)2 z 1/5 z 1 , (z 1/6)2 ROC = Rx ROC = Rh Let y (n) = x(n) h(n). Decide in each of the following cases whether y (n) is a causal sequence by working with Y (z ): (a) Rx = {1/5 < |z | < 1/3} and Rh = {|z | > 1/6}. (b) Rx = {|z | > 1/3} and Rh = {|z | > 1/6}. (c) Rx = {|z | < 1/3} and Rh = {|z | < 1/6}. Find y (0) in each case. CHAPTER 11 Transfer Functions T he z transform is an important tool in the study of linear time-invariant (LTI) systems, and also in the study of systems that may not be LTI by are still described by constantcoefcient linear difference equations. In this chapter, we focus on LTI systems and show how the z transform allows us to tackle several useful questions about such systems and their behavior in a rather straightforward manner. 11.1 TRANSFER FUNCTIONS OF LTI SYSTEMS To begin with, consider an LTI system with impulse response sequence h(n). Let H (z ) denote the z transform of h(n): H (z ) = h(n)z n (11.1) n= over all values of z belonging to the corresponding ROC, namely, z Rh . We refer to H (z ) as the transfer function of the system. For example, the transfer function of an LTI system with impulse response sequence h(n) = n u(n) is given by H (z ) = z , z |z | > || Thus, note that the impulse response sequence, h(n), and the transfer function, H (z ), of an LTI system determine each other uniquely. The transfer function of an LTI system plays a critical role in characterizing the behavior of the system, as the discussion in the current chapter will reveal. For most of our discussions, unless otherwise specied, we shall focus on LTI systems whose transfer functions are rational functions in z or z 1 . As we are going to see, this is a rich class of systems and it includes LTI systems that are described by constant-coefcient difference equations. 11.2 EIGENFUNCTIONS OF LTI SYSTEMS Let us now select any point zo from within the ROC of the transfer function H (z ), and assume the LTI system is excited with the exponential input sequence n x(n) = zo , zo Rh 273 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 274 CHAPTER 11 TRANSFER FUNCTIONS The value of zo may be real or complex. Since the system is LTI, its output sequence, y (n), is obtained by convolving x(n) and h(n), i.e., y (n) = k= h(k )x(n k ) n h(k )zo k = k= h(k )zo k = n zo = k= n zo H (zo ) (11.2) n We therefore nd that the output sequence y (n) is the same exponential sequence, zo , as the input but scaled by the complex number H (zo ). The scaling factor is equal to the value of the transfer function H (z ) at the point z = zo see Fig. 11.1. For this reason, we say that exponential sequences are eigenfunctions of LTI systems; an eigenfunction is a sequence that is not modied by the system apart from some complex scaling. Here we see n that the exponential input sequence zo is regenerated at the output and suffers only scaling by H (zo ). n zo n H (zo )zo h (n ) n FIGURE 11.1 When an LTI system is excited with the exponential sequence zo , the output is the same exponential sequence but scaled by H (zo ). Example 11.1 (Eigenfunction) Consider the LTI system with transfer function H (z ) = 0.5z 2 , z 2 1.5z + 0.5 |z | < 1/2 and assume it is excited by the exponential sequence x(n) = 1 4 n The point zo = 1/4 belongs to the ROC of H (z ). Moreover, H (1/4) = H (z )|z =1/4 = 1/6 275 so that the response of the system will be y (n) = 1 6 1 4 SECTION 11.3 n 11.3 EVALUATION FROM DIFFERENCE EQUATIONS The transfer function of an LTI system can be evaluated directly from knowledge of a constant-coefcient difference equation describing the system, without the need to determine beforehand the corresponding impulse response sequence. The procedure is best illustrated by means of an example. Example 11.2 (Finding the transfer function) Consider a relaxed and causal system that is described by the difference equation y (n) 1 y (n 1) = x(n) 2 Since the system is relaxed, and since this is a constant-coefcient difference equation, we know that the system is LTI. Let h(n) denote its impulse response sequence. In addition, because the system is causal we know from the discussion in Sec. 5.2 that h(n) = 0 for n < 0 and, therefore, h(n) is a right-sided sequence; its corresponding ROC has to be the outside of a disc. Returning to the difference equation, we can evaluate the z transforms of all sequences on both sides of the equation, and use the linearity and time-shift properties of the z transform, to obtain the following algebraic equation: 1 Y ( z ) z 1 Y ( z ) = X ( z ) 2 Here, Y (z ) denotes the z transform of the sequence y (n) and X (z ) denotes the z transform of the sequence x(n). Furthermore, z 1 Y (z ) denotes the z transform of the sequence y (n 1). The sequences {x(n), y (n)} denote an arbitrary input-output pair satisfying the difference equation. Let Rx and Ry denote the ROCs of X (z ) and Y (z ), respectively. The above algebraic equation relating {Y (z ), X (z )} will exist for all values z Rx Ry (i.e., for all values of z belonging to the intersection of Rx and Ry ). Thus, the key fact to note is that the original constant-coefcient difference equation has now been transformed into a purely algebraic equation in the transform domain. The algebraic equation can be solved to yield an expression for Y (z ) in terms of X (z ), namely, Y (z ) 1 = X (z ) 1 1 z 1 2 This ratio holds for any input-output pair {Y (z ), X (z )}. For this reason, the ratio Y (z )/X (z ), of the output transform divided by the input transform, must be equal to the transfer function H (z ) of the LTI system. To see that this is indeed the case, assume x(n) = (n). Then, by denition, y (n) = h(n). Hence, when X (z ) = 1 we get Y (z ) = H (z ) and the ratio Y (z )/X (z ) becomes equal to H (z ), namely, 1 z H (z ) = = 1 1 1 2z z 1 2 Now since h(n) is a right-sided sequence, it follows that the ROC of H (z ) must be the outside of a disc. Moreover, since the ROC of H (z ) must exclude its pole located at z = 1/2, we conclude that the ROC of H (z ) should be given by |z | > 1/2. In summary, we arrive at H (z ) = z z 1 2 , |z | > 1/2 EVALUATION FROM DIFFERENCE EQUATIONS 276 CHAPTER 11 TRANSFER FUNCTIONS The above example illustrates one convenient method for determining the impulse response sequence of an LTI system that is described by a constant-coefcient difference equation. Specically, we use the difference equation to determine the transfer function, H (z ), and then inverse transform H (z ) to nd h(n). Example 11.3 (Finding the impulse response sequence) Consider the same LTI system from the previous example, which is described by the relaxed equation 1 y (n 1) = x(n) 2 y (n) We already determined its transfer function as H (z ) = z z 1 2 , |z | > 1/2 The inverse transform is the impulse response sequence: h(n) = (0.5)n u(n) Example 11.4 (Causal LTI systems) Recall from Sec. 5.2 that an LTI system is causal if, and only if, its impulse response sequence satises h(n) = 0 for n < 0. It follows that h(n) is a right-sided sequence so that the expansion of H (z ) in terms of powers of z will have the form: H (z ) = h(0) + h(1)z 1 + h(2)z 2 + . . . with only negative powers of z appearing in the expansion. Therefore, we conclude that an LTI system is causal if, and only if, the ROC of its transfer function is the exterior of a disc, say, |z | > r for some nite r ; the point z = is included in the ROC since positive powers of z do not appear in the expansion for H (z ) due to the causality of h(n). Example 11.5 (Stable LTI systems) Recall from Sec. 5.3 that an LTI system is BIBO stable if, and only if, its impulse response sequence is absolutely summable. That is, it must hold that n= |h(n)| < In the transform domain, this condition is equivalent to requiring the ROC of H (z ) to include the unit circle, LTI system is BIBO stable {|z | = 1} ROC (11.3) Indeed, for any point z such that |z | = 1, we have n= |h(n)z n | = n= |h(n)| Now if |z | = 1 is a point in the ROC of H (z ), then the term on the left-hand side converges absolutely and, therefore, the impulse response sequence is absolutely summable. EVALUATION FROM DIFFERENCE EQUATIONS For example, consider the LTI system with transfer function H (z ) = 1 , (z 2)(z 0.5) 0.5 < |z | < 2 Since the ROC includes the unit circle, we conclude that the system is BIBO stable. Indeed, the impulse response sequence of the system is 2 2 h(n) = (2)n1 u(n) (0.5)n1 u(n 1) 3 3 which is absolutely summable. Note that the system in question has two poles at z = 2 and z = 0.5; it also has two zeros at z = . Therefore, the conclusion about the BIBO stability of the system holds despite the fact that one of the modes (or poles) lies outside the unit circle! This result does not contradict a statement we made earlier in (7.32) requiring all modes of the impulse response sequence to lie inside the unit circle in order for BIBO stability to hold. The statement given in (7.32) was specic to causal systems. In our present example, we are dealing with a non-causal system (as evidenced from the fact that its impulse response sequence is not zero for negative time or from the fact that the ROC of H (z ) is a ring). Example 11.6 (Impulse response sequence) We can also determine the impulse response sequence of an LTI system from knowledge of any inputoutput pair response (since any such pair of sequences determines the transfer function). Indeed, given an input sequence, x(n), and the corresponding output sequence, y (n), we use their respective z transforms to determine the transfer function, H (z ): H (z ) = Y (z ) X (z ) and then inverse-transform the result using the proper ROC. For example, assume that we know that the step response of a stable causal LTI system is (0.5)n u(n). Let us nd its impulse response sequence. We thus have x(n) = u(n) and y (n) = (0.5)n u(n). Therefore, Y (z ) = z , z 0.5 and X (z ) = This leads to z , z1 277 SECTION 11.4 |z | > 0.5 |z | > 1 z1 z 1 = z 0.5 z 0.5 z 0.5 What about the ROC of H (z )? This can be determined from the statement that the system is both causal and stable. Since H (z ) has a pole at z = 0.5, we nd that the ROC can be either |z | > 0.5 or |z | < 0.5. However, the assumed stability of the system implies that the region of convergence must include the unit circle. Moreover, the assumed causality of the system implies that the ROC must be the exterior of a disc. Therefore, either condition, allows us to conclude that the ROC of H (z ) must be given by |z | > 0.5. Inverse-transforming H (z ) then leads to H (z ) = h(n) = 0.5n u(n) 0.5n1 u(n 1) 278 11.4 FINDING OUTPUT SEQUENCES CHAPTER 11 TRANSFER FUNCTIONS We can use the transfer function of an LTI system to determine its response to arbitrary input sequences. Thus, let x(n) denote the input sequence to an LTI system with impulse response sequence h(n). We already know from Sec. 5.1 that the response sequence, say y (n), can be determined via the convolution sum y (n) = x(n) h(n) = k= x(k )h(n k ) If we, however, denote the z transforms of {x(n), h(n)} by {X (z ), H (z )} and the corresponding ROCs by {Rx , Rh }, then from the convolution property (9.26) we know that the z transform of y (n) is given by Y (z ) = X (z )H (z ) (11.4) The ROC of Y (z ) consists of Rx Ry plus possibly the points z = 0 or z = . This result suggests that the response of the LTI system can be determined via inverse-transformation of the product X (z )H (z ). Example 11.7 (Evaluating the response sequence) Consider again the same causal and relaxed system from Example 11.3 and let us determine its response to the input sequence x(n) = u(n). We already know that the transfer function of the system is given by 1 z , |z | > H (z ) = 2 z 1 2 On the other hand, the z transform of the input sequence is z , z1 X (z ) = |z | > 1 It follows that the z transform of the output sequence is Y (z ) = X (z )H (z ) = z2 , (z 0.5)(z 1) |z | > 1 We can inverse-transform Y (z ) by using the partial fractions method. Indeed, if we expand the strictly proper function Y (z )/z 2 into partial fractions we obtain Y (z ) 2 2 = z2 z1 z 0.5 so that Y (z ) = 2z Consequently, we arrive at z z1 2z z z 0.5 , y (n) = 2[1 (0.5)n+1 ]u(n + 1) |z | > 1 11.5 FINDING DIFFERENCE EQUATIONS Relation (11.4) also suggests a method for determining a description for an LTI system in terms of a constant-coefcient difference equation from knowledge of its impulse response sequence or, equivalently, its rational transfer function. 279 SECTION 11.5 FINDING DIFFERENCE EQUATIONS Example 11.8 (Determining a difference equation) Consider the LTI system with transfer function H (z ) = z , z 1/2 |z | > 1/2 and let us determine an input-output description for the system in terms of a constant-coefcient difference equation. Multiplying the numerator and denominator of H (z ) by z 1 we obtain H (z ) = 1 , 1 1 z 1 2 |z | > 1/2 It is usually more convenient (though not necessary) to work with negative powers of z when determining difference equations. This observation explains why our rst step involved multiplying the numerator and denominator of H (z ) by z 1 . Now, the fact that the ROC is |z | > 1/2 indicates that the impulse response sequence, h(n), is a right-sided sequence. Then, for any input-output pair {x(n), y (n)}, we know from (11.4) that the following relation must hold Y (z ) z 1 = X (z ) 1 1 z 1 2 Cross-multiplying we get Y (z ) 1 1 1 = X (z ) z 2 and using the properties of the z transform we arrive at the difference equation y (n) 1 y (n 1) = x(n) 2 One question that arises is how the argument would be different had we started from the same transfer function but with a different ROC, say, H (z ) = z , z 1/2 |z | < 1/2 In this case, the impulse response sequence will need to be a left-sided sequence. However, if we repeat the previous argument we arrive at the same difference equation for the system. So how do we capture the fact that in the rst case the difference equation should lead to a ROC that is equal to |z | > 1/2, while in the second case the same difference equation should lead to a ROC that is equal to |z | < 1/2? The answer lies in the fact that in one case the impulse response sequence is right-sided while in the second case it is left sided. Thus returning to the difference equation that we arrived at: y (n) 1 y (n 1) = x(n) 2 we see that this relaxed equation describes a causal system if it is expressed in the following form y (n) = 1 y (n 1) + x(n) 2 with time running forward. The causality of the system implies h(n) = 0 for n < 0 and, therefore, h(n) would be right-sided, as desired. Indeed, since the system is relaxed and using x(n) = (n), we nd by iteration that n 1 u(n) h(n) = 2 280 CHAPTER 11 TRANSFER FUNCTIONS On the other hand, the same relaxed equation would describe a non-causal system if it is expressed instead in the alternative form y (n 1) = 2y (n) x(n) with time running backwards. In this case, the resulting impulse response sequence will be left-sided (and zero for n 0). Indeed, since the system is relaxed and using again x(n) = (n), we nd by iteration that n 1 h(n) = u(n 1) 2 Note that, in this case, we have h(n) = 0 for n 0 and we say that the system is strictly anti-causal. In summary, we conclude that H (z ) = H (z ) = z , z 1/2 z , z 1/2 1 y (n 1) + x(n) 2 |z | > 1/2 y (n) = |z | < 1/2 y (n 1) = 2y (n) x(n) Example 11.9 (Determining another difference equation) Consider now an LTI system with transfer function H (z ) = z+1 z 2 + 2z 3 and let us determine an input-output description for the system in terms of a constant-coefcient difference equation. We are leaving the ROC of H (z ) unspecied for now. Multiplying the numerator and denominator of H (z ) by z 2 we obtain H (z ) = z 1 + z 2 1 + 2z 1 3z 2 Then, for any input-output pair {x(n), y (n)}, we know from (11.4) that the following relation must hold z 1 + z 2 Y (z ) = X (z ) 1 + 2z 1 3z 2 Cross-multiplying we get Y (z )[1 + 2z 1 3z 2 ] = X (z )[z 1 + z 2 ] and using the properties of the z transform we arrive at the following difference equation y (n) + 2y (n 1) 3y (n 2) = x(n 1) + x(n 2) As was explained in the previous example, we can now determine in which direction this difference equation should run in accordance with the ROC of H (z ). Thus, note that H (z ) has two poles at z = 1 and z = 3. Therefore, there are 3 possibilities of valid ROCs: 1. ROC = {|z | > 3}: In this case, the impulse response sequence needs to be right-sided and, consequently, the difference equation should run forwards in time and represent a relaxed causal system: y (n) = 2y (n 1) + 3y (n 2) + x(n 1) + x(n 2) In general, this will be the case of most interest for our studies: we start from a transfer function description for a system and we arrive at a difference equation description that runs forwards in time. 2. ROC = {|z | < 1}: In this case, the impulse response sequence needs to be left-sided and, consequently, the difference equation should run backwards in time and represents a relaxed 281 anti-causal system: y (n 2) = SECTION 11.6 2 1 1 1 y (n) + y (n 1) x(n 1) x(n 2) 3 3 3 3 Poles, Zeros, and Modes 3. ROC = {1 < |z | < 3}: In this case, the impulse response sequence needs to be two-sided. The question is how to express the difference equation in this case and how to determine a suitable input-output representation for the system. To do so, we rst use the partial fractions expansion of H (z ) to write H (z ) = 0.5 0.5 0.5z 1 0.5z 1 + = + 1 z+3 z1 1 + 3z 1 z 1 so that Y (z ) = 0.5z 1 0.5z 1 X (z ) + X (z ) 1 + 3z 1 1 z 1 =Y1 (z ) =Y2 (z ) In other words, the partial fraction expansion allows us to identify Y (z ) as the result of combining the outputs {Y1 (z ), Y2 (z )} of the two subsystems: 0.5z 1 1 + 3z 1 and 0.5z 1 1 z 1 respectively, namely, Y (z ) = Y 1 (z ) + Y 2 (z ) Now, in view of the ROC in this case, we nd that for the subsystem giving Y1 (z ), its difference equation should run backwards in time. This is because the transfer function of this subsystem is 0.5z 1 H 1 (z ) = , |z | < 3 1 + 3z 1 and its ROC is of the form |z | < 3; this is the ROC for H1 (z ) that would be consistent with the overall ROC described by 1 < |z | < 3. Likewise, for the second subsystem giving Y2 (z ), its difference equation should run forwards in time. The transfer function for this subsystem is 0.5z 1 H 1 (z ) = , |z | > 1 1 z 1 In view of these remarks, starting from Y 1 (z ) = we write y1 (n 1) = 0.5z 1 X (z ) 1 + 3z 1 1 1 y1 (n) x(n 1) 3 6 (time running backwards) and starting from Y 2 (z ) = we write 0.5z 1 X (z ) 1 z 1 1 x(n 1) (time running forwards) 2 Combining y1 (n) and y2 (n) at any particular time instant n, we obtain the desired value for y (n): y (n) = y1 (n) + y2 (n) y2 (n) = y2 (n 1) + 282 11.6 POLES, ZEROS, AND MODES CHAPTER 11 TRANSFER FUNCTIONS The poles of a transfer function H (z ) are the points in the extended complex plane where H (z ) = . In general, the poles are a subset of the roots of the denominator of H (z ) since cancellations can occur between the roots of the numerator and the denominator. Likewise, the zeros of a transfer function H (z ) are the points in the extended complex plane where H (z ) = 0. Again, the zeros are generally a subset of the roots of the numerator due to the possibility of cancellations. Nevertheless, it always holds that the number of poles and zeros of a transfer function, including those located at , should be equal: number of poles = number of zero (11.5) Example 11.10 (Characteristic polynomial; poles and modes) Consider the LTI system with transfer function H (z ) = z+1 , z 2 + 2z 3 |z | > 3 where the denominator is expressed in terms of positive powers of z . Note that the numerator polynomial is zero at z = 1 while the denominator polynomial is zero at z = 1 and z = 3. Therefore, the numerator and denominator polynomials of H (z ) do not share any common root and are said to be coprime. We already know from Example 11.9 that the system is described by the difference equation y (n) = 2y (n 1) + 3y (n 2) + x(n 1) + x(n 2) The corresponding homogeneous equation is given by y (n) + 2y (n 1) 3y (n 2) = 0 and its characteristic polynomial is p() = 2 + 2 3 The polynomial p() is also said to be the characteristic polynomial of the original systems complete difference equation (and not only of its homogeneous part). Now, observe that the polynomial that appears in the denominator of H (z ) coincides with the characteristic polynomial, p(), of the difference equation. Recall that the roots of the characteristic polynomial are called the modes of the system, while the roots of the denominator of H (z ) are called the poles of the system. We therefore conclude that if no cancellations occur between the numerator and the denominator polynomials of H (z ) (i.e., if these polynomials are coprime), then the denominator of H (z ) (when written in terms of positive powers of z ) coincides with the characteristic polynomial of the difference equation. We also conclude that the modes of an LTI system can be determined by evaluating the roots of the denominator of H (z ). The same conclusion would hold if the ROC of H (z ) were instead |z | < 1 (i.e., for the case of non-causal systems). Example 11.11 (Cancellations) Consider transfer function z1 z 2 3z + 2 The denominator has two roots at z = 1 and z = 2; the former pole is canceled by the root of the numerator at z = 1. Therefore, H (z ) has a single pole at z = 2. The transfer function does not have H (z ) = z zero at z = 1 due to the same cancellation, but it has a zero at z = . We thus note that H (z ) has the same number of zeros and poles (one of each in this case). 11.7 REALIZABLE LTI SYSTEMS In practice we are generally interested in LTI systems whose transfer functions are realizable. This means that the systems need to be both BIBO stable and causal. The stability property ensures that the system output remains bounded for bounded inputs. The causality property ensures that the system output does not depend on future input samples. Now recall that the stability of an LTI system requires the ROC of its transfer function, H (z ), to include the unit circle, |z | = 1. Likewise, the causality of an LTI system requires its impulse response sequence, h(n), to be be causal: h(n) = 0, n<0 In other words, h(n) must be a right-sided sequence and, accordingly, the ROC of H (z ) must be the outside of a disc (including the point at z = ). Combining these conditions allows us to conclude that an LTI system is realizable if, and only if, its ROC is of the form ROC = {|z | > } for some 0 < 1 Realizable (11.6) Now since the ROC of a transfer function must exclude all its poles, we conclude that the poles of any realizable H (z ) must all lie inside the unit circle. Example 11.12 (Realizable systems) The system z , |z | > 0.5 z 0.5 is realizable since its ROC is of the required form (11.6). Note that H (z ) has a singe pole at z = 1/2 and this pole lies inside the unit circle, as expected. On the other hand, the system H (z ) = H (z ) = z , (z 0.5)(z 2) |z | > 2 is not realizable since its ROC does not have the required form (11.6) for some 0 < 1. What about the system z , |z | < 0.5? H (z ) = z 0.5 Obviously, this system is not realizable since its ROC does not have the form (11.6). Note, however, that the system has a pole at z = 1/2, which lies inside the unit circle. Therefore, having poles inside the unit circle is not sufcient for a system to be realizable; it is only a necessary condition: LTI system is realizable Poles lie inside unit circle poles lie inside unit circle realizable LTI system 283 SECTION 11.8 REALIZABLE LTI SYSTEMS 284 11.8 SYSTEM INVERSION CHAPTER 11 T RA NS F E R FUNCTIONS When an input sequence, x(n), is fed into an LTI system with transfer function H (z ), the result is an output sequence y (n) that is related to x(n) through the convolution sum y (n) = n= x(k )h(n k ) in terms of the impulse response sequence, h(n), of the system. We say that the input sequence is modied (or distorted) by the system and transformed from x(n) into y (n). In the transform domain, the z transforms of x(n) and y (n) are related via Y (z ) = H (z )X (z ) ( 1 1 .7 ) In several applications, we are interested in undoing the effect of the system on the input sequence. This task can be accomplished by cascading a system G(z ) in series with H (z ) in order to recover x(n), illustrated as in Fig. 11.2. x( n ) FIGURE 11.2 H (z ) y ( n) G(z ) x ( n) The series cascade of an LTI system H (z ) with its inverse system G(z ). The system G(z ) acts on the sequence y (n) in order to recover the sequence x(n). When this is possible, we say that G(z ) is the inverse of H (z ). In order to accomplish this task, it must hold that X (z ) = G(z )Y (z ) Combining with (11.7), we nd that the transfer functions H (z ) and G(z ) must satisfy the relation H (z )G(z ) = 1 Obviously, for this equality to hold, the z transforms H (z ) and G(z ) must have overlapping ROCs, i.e., there must exist some common region in the complex plane over which both H (z ) and G(z ) are well dened. If this is the case, then an inverse system exists and it is given by 1 G(z ) = ( 1 1 .8 ) H (z ) In particular, note that the zeros of H (z ) become poles of G(z ) and the poles of H (z ) become zeros of G(z ). One difculty that arises in inverting LTI systems is that we are often interested in realizable inverse systems, G(z ). This condition requires the ROC of G(z ) to be of the fo rm ROC = {|z | > } for some 0 < 1 ( 1 1 .9 ) Since realizable inverses G(z ) must have their poles inside the unit circle, we conclude that a necessary condition for such inverses to exist is to require the zeros of H (z ) to lie inside the unit circle. 285 SECTION 11.8 Example 11.13 (Inversion of a stable and causal LTI system) SYSTEM INVERSION Consider the system z 0.25 , |z | > 0.5 z 0.5 The transfer function of the inverse system is given by H (z ) = G(z ) = z 0.5 z 0.25 Now note that the ROC of the transfer function G(z ) can be either |z | > 0.25 or |z | < 0.25. Since H (z ) and G(z ) must have overlapping ROCs, we conclude that the inverse system of H (z ) is G(z ) = z 0.5 , z 0.25 |z | > 0.25 Observe that this inverse is a realizable system. Example 11.14 (Inversion of an unstable and noncausal LTI system) Consider now the system z 0.25 , |z | < 0.5 z 0.5 where we only changed the direction of the ROC relative to the previous example. This system is unstable since its ROC does not include the unit circle; the system is also noncausal since its ROC is the inside of a disc and, therefore, its impulse response sequence is left-sided. The transfer function of the inverse system is given by z 0.5 G(z ) = z 0.25 The ROC of the transfer function G(z ) can be either |z | > 0.25 or |z | < 0.25. Both possibilities lead to an ROC for G(z ) that overlaps with the ROC of H (z ). We therefore have two valid inverse systems in this case: z 0.5 , |z | > 0.25 G1 (z ) = z 0.25 or z 0.5 G2 (z ) = , |z | < 0.25 z 0.25 However, only G1 (z ) is a realizable inverse system. H (z ) = Example 11.15 (Inversion of a noncausal but stable LTI system) Consider now the system z3 , |z | < 2 z2 This system is stable since its ROC includes the unit circle; the system is nevertheless noncausal since its ROC is the inside of a disc and, therefore, its impulse response sequence is left-sided. The transfer function of the inverse system is given by H (z ) = G(z ) = z2 z3 286 CHAPTER 11 The ROC of the transfer function G(z ) can be either |z | > 3 or |z | < 3. Since H (z ) and G(z ) must have overlapping ROCs, we conclude that the inverse system of H (z ) is TRANSFER FUNCTIONS G(z ) = z2 , z3 |z | < 3 The inverse system is stable since its ROC includes the unit circle; it is however noncausal. 11.9 APPLICATIONS TO BE ADDED Practice Questions: 1. 2. 11.10 PROBLEMS Problem 11.1 Find the transfer functions, and the corresponding ROCs, of the LTI systems described by the following impulse response sequences: (a) h(n) = (b) h(n) = 1 n1 2 u(n 3). 2 u(n). 1 n1 (c) h(n) = n (d) h(n) = 1 2n1 2 1 n1 2 u(n 2). cos 3 n u(n). Problem 11.2 Find the transfer functions, and the corresponding ROCs, of the LTI systems described by the following impulse response sequences: (a) h(n) = 1 2n+1 3 (b) h(n) = 1 n 3 (c) h(n) = (n 1) (d) h(n) = 1 n1 3 u(n). u(n + 2). 1 n3 3 sin 3 u(n 1). n 2 3 u(n). Problem 11.3 Find the impulse response sequences of the LTI systems with the following transfer functions: z2 (a) H (z ) = , |z | > 1/2. (z 1/2)(z + 1/3) 1 , |z | < 1/2. (b) H (z ) = 2 (z + 1/4 (c) H (z ) = (d) H (z ) = (e) H (z ) = z + 1/3 , (z 1/2)(z + 1/4) z + 1/3 , (z 1/2)(z + 1/4) z + 1/3 , (z 1/2)(z + 1/4) |z | < 1/4. 1/4 < |z | < 1/2. |z | > 1/2. (f) H (z ) = z + 1/3 , (z 2)(z + 4) |z | < 2. PROBLEMS Problem 11.4 Find the impulse response sequences of the LTI systems with the following transfer functions: z 1 (a) H (z ) = , |z | > 1/4. (z + 1/4)(z + 1/6) (b) H (z ) = 1 + z 1 , (z 2 + 1/9 (c) H (z ) = z + 1/6 , (z + 1/2)(z 1/8) (d) H (z ) = (e) H (z ) = (f) H (z ) = |z | > 1/3. z + 1/6 , (z + 1/2)(z 1/8) z + 1/6 , (z + 1/2)(z 1/8) z + 1/6 , (z + 2)(z 8) 287 SECTION 11.10 |z | < 1/8. 1/8 < |z | < 1/2. |z | > 1/8. |z | > 8. Problem 11.5 Find difference equations for the LTI systems described by the impulse response sequences of Prob. 11.1. Problem 11.6 Find difference equations for the LTI systems described by the impulse response sequences of Prob. 11.2. Problem 11.7 Find difference equations for the LTI systems described by the transfer functions of Prob. ??. Problem 11.8 Find difference equations for the LTI systems described by the transfer functions of Prob. ??. Problem 11.9 Find the poles, modes, and zeros of the LTI systems described by the impulse response sequences of Prob. 11.1. Problem 11.10 Find the poles, modes, and zeros of the LTI systems described by the impulse response sequences of Prob. 11.2. Problem 11.11 Find the poles, modes, and zeros of the LTI systems described by the transfer functions of Prob. 11.47. Problem 11.12 Find the poles, modes, and zeros of the LTI systems described by the transfer functions of Prob. 11.48. Problem 11.13 For each of the LTI systems described by the impulse response sequences of Prob. 11.1, determine whether it is stable? causal? realizable? Problem 11.14 For each of the LTI systems described by the impulse response sequences of Prob. 11.2, determine whether it is stable? causal? realizable? Problem 11.15 For each of the LTI systems described by the transfer functions of Prob. 11.47, determine whether it is stable? causal? realizable? Problem 11.16 For each of the LTI systems described by the transfer functions of Prob. 11.48, determine whether it is stable? causal? realizable? Problem 11.17 Find the inverse of each of the LTI systems described by the impulse response sequences of Prob. 11.1. 288 CHAPTER 11 TRANSFER FUNCTIONS Problem 11.18 Find the inverse of each of the LTI systems described by the impulse response sequences of Prob. 11.2. Problem 11.19 Find the inverse of each of the LTI systems described by the transfer functions of Prob. 11.47. Problem 11.20 Find the inverse of each of the LTI systems described by the transfer functions of Prob. 11.48. Problem 11.21 Find the responses of the LTI systems described by the impulse response sequences of Prob. 11.1 to the following input sequences (a) x(n) = 1 n2 2 (b) x(n) = n 1 n 2 u(n). u(n 1). Problem 11.22 Find the responses of the LTI systems described by the impulse response sequences of Prob. 11.2 to the input sequences given in Prob. 11.21. Problem 11.23 Find the responses of the LTI systems described by the transfer functions of Prob. 11.47 to the input sequences given in Prob. 11.21. Problem 11.24 Find the responses of the LTI systems described by the transfer functions of Prob. 11.48 to the input sequences given in Prob. 11.21. Problem 11.25 Find the transfer function of the moving average system y (n) = 1 [x(n) + x(n 2)] 2 Is the system linear? causal? time-invariant? stable? Problem 11.26 Find the transfer function of the moving average system with exponential weighting M 1 k x (n k ) y (n) = M +1 k=0 where || < 1. Is the system linear? causal? time-invariant? stable? Problem 11.27 The transfer function of an LTI system is given by H (z ) = z+3 (z 1/2)(z 2)(z 3) Which of the following statements is correct? (a) H (z ) can be the transfer function of four different systems: one causal and BIBO stable, one causal but not stable, one stable but not causal, and one neither causal nor stable. (b) H (z ) can be the transfer function of four different systems. Three of these systems are not causal and three of them are not stable. (c) H (z ) can be the transfer function of four different systems. Since all the poles are positive and real, all four systems are causal and BIBO stable. (d) Since the system is LTI, H (z ) uniquely determines the system. Problem 11.28 Which statement is correct? (a) If an LTI system is causal and BIBO stable, then all its poles must be inside the unit circle. (b) If all the poles of an LTI system are inside the unit circle, then the system must be causal and BIBO stable. 289 (c) Both (a) and (b) are correct. SECTION 11.10 (d) Neither (a) nor (b) are correct. PROBLEMS Problem 11.29 Find the transfer function, and a difference equation description, for the LTI systems with the input-output pair: 1 2 x(n) = n u(n), y (n) = n1 1 3 u(n 2) and with the properties below: (a) System is stable and causal. (b) System is stable and non-causal. (c) System is unstable. Is it causal? Problem 11.30 Find the transfer function, and a difference equation description, for the LTI systems with the input-output pair: x(n) = n 1 2 2n1 u(n 1), y (n) = 1 4 n+1 u(n 3) and with the properties below: (a) System is stable and causal. (b) System is stable and non-causal. (c) System is unstable. Is it causal? Problem 11.31 True or False? An LTI system is realizable if, and only if, all its poles lie inside the unit circle. Problem 11.32 True or False? An LTI system has a realizable inverse if, and only if, all its zeros lie inside the unit circle. Problem 11.33 An input-output response pair of a relaxed causal and stable LTI system is given by n n1 1 1 x(n) = u(n), y (n)n u(n 1) 2 2 (a) Determine the transfer function of the system and indicate its ROC. (b) Determine the poles and zeros of the system. (c) Determine a difference equation relating any input sequence x(n) to the corresponding output sequence y (n). (d) Draw a block diagram realization for the system using a minimum number of delay elements. (e) If the system were not initially relaxed, but with initial conditions y (1) = 1 and y (k) = 0 n for k < 1, what would have been its response to x(n) = 1 u(n)? 2 Problem 11.34 The transfer function of a stable and causal LTI system is H (z ) = z z 1 3 + 4z 1 1 16 z 3 (z 1 )2 2 (a) What is the region of convergence of H (z )? Justify your answer. n (b) Is the response to x(n) = 21 u(n) equal to y (n) = 1 n 2 without explicitly computing the response of the system. 1 H ( 2 )u(n)? Justify your answer 290 CHAPTER 11 T RA NS F E R FUNCTIONS (c) What are the poles of H (z )? Are all the zeros of H (z ) nite? How many are there? (d) Determine the response of the system to the input sequence x(n) = 1 2 (n) 1 4 (2n 4). (e) Write down a constant-coefcient linear difference equation that relates the input and output sequences of the above system. Problem 11.35 Refer Fig. 11.3. Let S denote an LTI system with the input-output pair x(n) = 1 2 n u(n 1), x ( n) y (n ) n2 u(n 3) y (n ) S ? S 1 3 y (n) = ? S x ( n) FIGURE 11.3 System congurations used for Prob. 11.35. (a) If we apply y (n) to the input of S , what would the response of S be? (b) If x(n) were observed at the output of S , which input sequence would have generated it? Problem 11.36 Refer to Fig. 11.4. It shows a system with transfer function H 1 (z ) = 1 z+ 3 2 , |z | < 3/2 cascaded with an unknown LTI system. The output of H1 (z ) is multiplied by the sequence (1)n and fed into the unknown system. (1)n 1n 2 u(n) + FIGURE 11.4 H1 (z ) X LTI ? 1 n2 2 u ( n 1) A cascade of two systems with feedback interconnection for Prob. 11.36. (a) Is the overall system LTI? (b) Find the transfer function of the unknown LTI system. Problem 11.37 An input-output response pair of a relaxed, causal, and stable rst-order LTI system is given by n2 n 1 1 u(n 1), y (n) = n u(n 2) x(n) = 4 4 Now assume that the system is not initially relaxed, but has initial condition y (1) = 2. Find its complete response to the input sequence x(n) = 0.5n u(n 2) + (n 5) Plot the samples of y (n) for n = 6, 7, 8. Problem 11.38 Find the inverse of the LTI system whose impulse response sequence is given by h(n) = 0.5n u(n) 2(0.5)n1 u(n 1) Problem 11.39 Consider a rational transfer function H (z ) with a real-valued impulse response sequence h(n). Show that the poles and zeros of H (z ) occur in conjugate pairs. That is, if z = po is a pole then so is z = p . Likewise, if z = zo is a zero then so is z = zo . o Problem 11.40 If H (z ) is a rational transfer function that is causal and stable, what can you say about H (z 1 ) and H (z )? Problem 11.41 Consider a signal of the form x(n) = { 0 , 1, 1}. When the signal x(n) is applied to a causal LTI system, the observed output is y (n). The odd part of y (n) is known to be yo (n) = (1/4)n1 u(n 2) + (1/3)n u(n 1) for n 0. (a) Find the impulse response sequence of the system. (b) Find the transfer function of the system. (c) Find the energy of the impulse response sequence. (d) Find the power of the impulse response sequence. Problem 11.42 The even part of the impulse response sequence of a causal LTI system is given by he (n) = 1 2 n 1 4 u(n 1) n2 u(n) (a) Find the transfer function of the system. (b) Find the unit-step response of the system. (c) Find a constant-coefcient difference equation describing the system. (d) Draw a block diagram representation for the system. Problem 11.43 Consider four LTI systems {S1 , S2 , S3 , S4 }. The following information is available: (i) System S1 is described by the constant-coefcient difference equation y (n) 1 1 y (n 1) y (n 2) = x(n) 6 6 with initial conditions y (2) = 0 and y (1) = 6. (ii) System S2 is causal and BIBO stable with transfer function 1 z 1 z+ z2 z + 1 4 H 2 (z ) = 1 4 (iii) System S3 has impulse response sequence h3 (n) = 1 2 n1 u(n 2) 291 SECTION 11.10 PROBLEMS 292 CHAPTER 11 (iv) The output of the stable and causal system S4 in response to the input sequence u(n 1) is TRANSFER FUNCTIONS y4 (n) = 1 4 3 1 4 n3 u(n 2) The four systems are interconnected as shown in the block diagram of Fig. 11.5. All systems in the gure are relaxed except for S1 . Systems S1 and S4 are connected in series. Additionally, a switch and a nonlinear system (NL) are also shown in the gure. The input-output characteristics of the nonlinear device (NL) is the following: s(n) = p(n), 0, if p(n) > 2 otherwise The switch is initially open and the signal y (n) is therefore disconnected from the lower part of the circuit. At a large enough time instant No , the switch is closed and the signal y (n) then drives the lower circuit. The value of No is such that the output of S1 can be assumed to have reached steady-state. The input x(n) to the circuit is taken to be the step sequence, x(n) = u(n). (a) Determine the sequence y (n) and its steady-state value. (b) Determine the sequences q (n) and d(n). (c) Determine the sequences p(n) and s(n). (d) Determine the sequence v (n). (e) Determine the sequence r (n). (f) Determine the sequence w(n). (g) How would your answers to the previous questions change if the initial conditions of S1 were modied to y (2) = 6 and y (1) = 0? x ( n) y (n) S1 S4 + r (n ) switch closed at time No q ( n) z 1 p(n) + + NL d(n) s(n) S2 S3 FIGURE 11.5 Block diagram for Prob. 11.43. w(n) v (n ) Problem 11.44 Consider the block diagram shown in Fig. 11.6. The input-output relation of system S1 is described by the difference equation 1 1 1 y1 (n) = y1 (n 1) + y1 (n 2) + x(n) x(n 1) 4 8 3 with initial conditions y1 (1) = and y1 (2) = . System S2 is LTI and its step-response is given by the sequence n 1 u(n) hstep (n) = 2 2 The output of S2 is passed through a system that squares every sample and the resulting sequence is subsequently multiplied by (1)n . The output of the overall block diagram is y (n) = y1 (n) + y2 (n) Find the values of the initial conditions and such that y (n) = 0 for all n 0 when x(n) = (n). y1 (n) S1 y (n ) x(n) S2 ()2 y2 (n) (1)n FIGURE 11.6 Block diagram for Prob. 11.44. Problem 11.45 Consider the second-order LTI system that is described by the difference equation y (n) + ay (n 2) = bx(n) for some real scalar coefcient a. Find conditions on {a, b} for the system to be realizable. Problem 11.46 Consider a second-order LTI system that is described by the difference equation y (n) + a1 y (n 1) + a2 y (n 2) = bx(n) for some real scalar coefcients {a1 , a2 , b}. Find conditions on {a1 , a2 , b} for the system to be realizable. Plot the region in the plane a1 a2 that corresponds to realizable lters. Problem 11.47 Consider the two cascades shown in Fig. 11.7 where the order of the downsampler and upsampler blocks is switched in one case relative to the other. Find the transfer function of each cascade and compare them. Problem 11.48 Consider the system shown in Fig. 11.8 with input x(n) and output y (n). Find its transfer function. 293 SECTION 11.10 PROBLEMS 294 CHAPTER 11 TRANSFER FUNCTIONS x(n) x(n) FIGURE 11.7 2 2 2 2 y ( n) w ( n) Two separate cascades of upsampling and downsampling blocks for Prob. 11.47. x(n) 2 2 2 y ( n) 2 z 1 FIGURE 11.8 Block diagram representation of the system for Prob. 11.48. CHAPTER 12 Unilateral z-Transform In Chapters 7 and 8 we developed techniques for determining the complete solution of constant-coefcient difference equations over the interval n 0. It turns out that the z transform provides a powerful (and often more general and more convenient) way for solving these same difference equations. The purpose of this chapter is to illustrate how to use the z transform for such purposes, and to motivate the introduction of the unilateral z transform, which is particularly suited for solving difference equations with initial conditions. 12.1 Z-TRANSFORM AND DIFFERENCE EQUATIONS We rst explain how the z transform can be used to determine the complete solution of difference equations, and use the discussion to motivate the introduction of the more convenient unilateral z transform. This is best illustrated by means of an example. Example 12.1 (Using the z transform) Consider the constant-coefcient difference equation y (n) = 1 y (n 1) + x(n), 2 y (1) = 2 We would like to determine its complete solution over n 0 in response to the input sequence x(n) = u(n). We already know from the discussion in Sec. 8.6 that the complete solution can be represented in the form y (n) = yzi (n) + yzs (n) as the sum of the zero-input response and the zero-state response. Now, the zero-input response , yzi (n), can be found by solving the homogeneous equation y (n) 1 y (n 1) = 0, 2 y (1) = 2 The characteristic equation is given by 1 =0 2 so that the homogeneous solution has the form yh (n) = C 1 2 n , for all n 295 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 296 CHAPTER 12 UNILATERAL z-TRANSFORM Using the initial condition y (1) = 2 we conclude that the constant C is equal to 1 and, consequently, the zero-input solution over the desired interval n 0 is given by yzi (n) = 1 2 n , n0 The zero-state response, on the other hand, can be obtained by determining the response of the relaxed system 1 yzs (n) = yzs (n 1) + x(n) (relaxed) 2 over n 0. Obviously, when the system is assumed to be relaxed, then the above difference equation characterizes an LTI system. We can then determine the response to x(n) = u(n) by working in the z transform domain. Recall from Sec. 11.4 that the input-output transform pair of an LTI system is related via the transfer function of the system, namely. Yzs (z ) = X (z )H (z ) In the current example, the transfer function is given by H (z ) = 1 , z 1/2 |z | > 1/2 and the ROC is the exterior of a disc because the LTI system is causal (and, consequently, its impulse response sequence is right-sided). Using x(n) = u(n) or, equivalently, X (z ) = we get Yzs (z ) = so that z , z1 |z | > 1 z z z 2z = + , z 1 z 1/2 z 1/2 z1 1 2 yzs (n) = 2u(n) |z | > 1 n u(n) Combining this response with yzi (n) we arrive at y (n) = yzi (n) + yzs (n) = 2u(n) There is an alternative way for solving constant-coefcient difference equations over the interval n 0 without the need to consider the zero-input and zero-state responses separately. This method relies on using the so-called unilateral z -transform. 12.2 UNILATERAL Z-TRANSFORM The unilateral z -transform of a sequence x(n) is denoted by X + (z ) and is dened by X + (z ) = x(n)z n (12.1) n=0 Observe that the index of the sum runs over n 0 only. In other words, only samples of x(n) over n 0 enter into the evaluation of X + (z ). We say that only the causal part of the sequence x(n) is used, and we ignore the samples that exist at negative time instants. Clearly, for sequences that are zero for negative time, both the bilateral z transform and 297 the unilateral z transform coincide: SECTION 12.2 X (z ) = X + (z ) for causal sequences, i.e., when x(n) = 0 for n < 0 (12.2) On the other hand, for a generic sequence x(n), we shall denote its causal part by x+ (n), namely, x+ (n) is a right-sided sequence that contains all the samples of x(n) for n 0 and is zero for n < 0 see Fig. 12.1: x+ (n) = x(n) 0 for n 0 otherwise (12.3) In other words, x+ (n) = x(n)u(n) (12.4) where u(n) is the unit-step sequence. We therefore see that the unilateral z transform of a sequence x(n) coincides with the bilateral z transform of its causal sequence, x+ (n). We can denote this observation by the following notation Z + [x(n)] = Z [x+ (n)] = Z [x(n)u(n)] (12.5) where Z refers to the bilateral z -transformation while Z + refers to the unilateral z transformation. x(n) 2 3 2 1 1 3 n x+ (n) 2 3 2 1 1 3 n FIGURE 12.1 A sequence x(n) and its causal part, x+ (n). As was the case with bilateral z transforms, we similarly associate regions of convergence (ROC) with unilateral z transforms. Thus, the ROC of a unilateral z transform is UNILATERAL z-TRANSFORM 298 CHAPTER 12 UNILATERAL z-TRANSFORM dened as the set of all values z in the complex plane for the which the series X + (z ) is absolutely summable: ROC = z C such that n=0 |x(n)z n | < (12.6) Observe that the ROC of the unilateral z transform of x(n) coincides with the ROC of the bilateral z transform of x+ (n): ROC {Z + [x(n)]} = ROC {Z [x+ (n)]} (12.7) Note further that since the unilateral z transform deals only with right-sided sequences, its ROC will always be the exterior of a disc. Example 12.2 (Unilateral and bilateral transforms) The bilateral and unilateral z -transforms of the sequence x(n) = n u(n) coincide and are given by X (z ) = z = X + (z ), z |z | > || On the other hand, the bilateral and unilateral z -transforms of the sequence x(n) = n+1 u(n + 1) are different and are given by X (z ) = z2 , z X + (z ) = z , z |z | > || For the latter case, we simply note that the sample at n = 1 is ignored and for n 0, the samples of x(n) can be described in terms of the following causal sequence x+ (n) = ()n u(n) We further note that x+ (n) is a causal sequence so that its bilateral z transform coincides with its unilateral z transform and, hence, X + (z ) = z , z |z | > || Alternatively, we can evaluate X + (z ) directly from rst principles as follows: X + (z ) = = = n=0 n=0 x(n)z n ()n+1 u(n + 1)z n ()n+1 z n n=0 = z 1 n=0 = 1 z 1 n 299 provided that |z 1 | < 1. Therefore, X + (z ) = z , z SECTION 12.3 |z | > || 12.3 PROPERTIES OF THE UNILATERAL Z-TRANSFORM The unilateral z transform has several important properties that can be easily veried by invoking its denition. A summary of these properties is given in Table 12.1 with the corresponding regions of convergence. For example, the rst two lines of the table start from two generic sequences x(n) and y (n) and the ROCs of their unilateral z transforms, denoted by Rx+ = { |z | > r }, Ry+ = { |z | > r } respectively. The sequences x(n) and y (n) need not be right-sided or causal; only in line 8 of the table (dealing with linear convolution), the sequences need to be causal. The subsequent lines in the table provide the unilateral z transforms of combinations and transformations of these sequences, and their ROCs. TABLE 12.1 Properties of the unilateral z -transform. sequence unilateral z -transform ROC 1. x(n) X + (z ) Rx+ = { |z | > r } 2. y (n) Y + (z ) Ry + = { |z | > r } 3. ax(n) + by (n) aX + (z ) + bY + (z ) {Rx+ Ry + } plus possibly z = 0 linearity property 4. x(n 1) z 1 X + (z ) + x(1) Rx+ time delay 5. x(n + 1) zX + (z ) zx(0) Rx+ time advance 6. an x(n) X + (z/a) |z | > |a|r 7. nx(n) z 8. x(n) and y (n) causal: n x (k )y (n k ) k=0 + dX + (z ) dz + X (z )Y (z ) Rx+ exponential modulation linear modulation {Rx+ Ry + } plus possibly z = 0 convolution PROPERTIES OF THE UNILATERAL z-TRANSFORM 300 CHAPTER 12 UNILATERAL z-TRANSFORM 12.3.1 Linearity Consider, for instance, the third line of the table. It states that the unilateral z transform of a linear combination of two sequences, namely, ax(n) + by (n) for any two numbers a and b, is given by the same linear combination of their unilateral z transforms, i.e., ax(n) + by (n) aX + (z ) + bY + (z ) (12.8) But what about the ROC of the combination? Obviously, both X + (z ) and Y + (z ) need to exist in order for the combination aX + (z ) + bY + (z ) to be well-dened. This means all points z Rx+ Ry+ should belong to the ROC of aX + (z ) + bY + (z ). The ROC of the combination can be larger than Rx+ Ry+ since the point z = 0 may be included as well. Proof: Let w(n) = ax(n) + by (n). Then W + (z ) = = = w(n)z n n=0 [ax(n) + by (n)]z n n=0 a x(n)z n + b n=0 = y (n)z n n=0 aX + (z ) + bY + (z ) for all values of z Rx+ Ry + . The ROC of W (z ) may include z = 0, for example, when w(n) evaluates to a constant sequence due to cancelations. An alternative argument can be pursued by relying on the relation between the bilateral and unilateral z transforms. Thus note that Z + [ ax(n) + by (n) ] = = = Z [ ax(n)u(n) + by (n)u(n) ] , (by denition) aZ + [ x(n) ] + bZ + [ y (n) ] , (by denition) aZ [ x(n)u(n) ] + bZ [ y (n)u(n) ] , (by linearity) Similar arguments, which exploit the relation between the unilateral and bilateral z transforms, can be used to establish the other properties in Table 12.1. Example 12.3 (Combining two sequences) Consider the sequences x(n) = (n) 2 (n 1) X + (z ) = 1 2z 1 with Rx+ = { z = 0 } and y (n) = 3 (n + 1) + 5 (n) + 2 (n 1) Y + (z ) = 5 + 2z 1 with Ry + = { z = 0 } Consider now the linear combination w(n) = x(n) + y (n), which evaluates to w(n) = 3 (n + 1) + 6 (n) 301 Its unilateral z transform is given by SECTION 12.3 W + (z ) = 6 with ROC = { entire complex plane } UNILATERAL z-TRANSFORM It is seen that the ROC of W + (z ) is larger than Rx+ Ry + since Rx+ Ry + = { z = 0 } which excludes z = 0, while z = 0 is not excluded from the ROC of W + (z ); this is because when x(n) and y (n) are added together, the terms 2z 1 and 2z 1 in X + (z ) and Y + (z ) cancel each other. 12.3.2 Time Shifts Consider now the fourth line in Table 12.1. It establishes the transform pair x(n 1) z 1 X + (z ) + x(1) (12.9) In other words, if the original sequence x(n) is shifted by one time instant to the right, then the corresponding unilateral z transform is modied by multiplying it by z 1 and adding x(1)to the result. The ROC of the time-shifted sequence, x(n 1), will coincide with the ROC of the original sequence x(n). Clearly, if the sequence x(n) is causal to begin with (i.e., x(n) = 0 for n < 0), then the term x(1) would be zero and relation (12.9) would simplify to x(n 1) z 1 X + (z ) (when x(n) is causal) Proof: Let w(n) = x(n 1). Then W + (z ) = = n=0 n=0 = w(n)z n x(n 1)z n x(1) + x(0)z 1 + x(1)z 2 + x(2)z 3 + . . . = x(1) + z 1 x(0) + x(1)z 1 + x(2)z 2 + . . . = x(1) + z 1 = x(1) + z 1 X + (z ) x(n)z n n=0 for all values of z Rx+ . Actually, the argument leading to (12.9) can be generalized for higher time-shifts, namely, it is straightforward to verify that the following transform pair holds for all k 0: x(n k ) z k X + (z ) + x(1)z k+1 + x(2)z k+2 + . . . + x(k ) (12.10) where the ROC coincides with Rx+ . The case k = 1 leads to (12.9), while k = 2 leads to x(n 2) z 2 X + (z ) + z 1 x(1) + x(2) (12.11) 302 CHAPTER 12 UNILATERAL z-TRANSFORM and so forth. Likewise, the following transform pair holds for all k 0: x(n + k ) z k X + (z ) x(0)z k x(1)z k1 + . . . x(k 1)z (12.12) where the ROC coincides with Rx+ excluding possibly the point z = . In particular, x(n + 1) zX + (z ) zx(0) 2 + (12.13) 2 x(n + 2) z X (z ) z x(0) zx(1) (12.14) Example 12.4 (Two-sided sequence) Consider the two-sided sequence 1 2 x(n) = n u(n + 2) (3)n u(n + 2) The sequence x(n) consists of two sub-sequences. The sub-sequence x1 (n) = 1 2 n u(n + 2) is exponentially decaying; it starts at n = 2 and is right-sided. On the other hand, the sub-sequence x2 (n) = (3)n u(n + 2) is also exponentially decaying; it starts at n = 2 and is left-sided. It follows that the causal part of x(n) is given by 1 2 x+ (n) = n u(n) (n) 3 (n 1) 9 (n 2) and, consequently, the unilateral z transform of x(n) is given by X + (z ) = z z 1 2 1 3z 1 9z 2 , |z | > 1/2 where we used the fact that the sequences { (n), (n 1), (n 2)} are causal and, therefore, their bilateral and unilateral z transforms coincide. Let us now use property (12.9) to deduce the unilateral z transform of x(n 1). Using x(1) = 5/3 we get x(n 1) = = z 1 X + (z ) + x(1) 5 z z 1 1 3z 1 9z 2 + 3 z1 2 5 1 z 1 3z 2 9z 3 + 3 z 1 2 with ROC given by |z | > 1/2. 12.3.3 Exponential Modulation Consider the fth line in Table 12.1. It establishes the transform pair an x(n) X + (z/a) (12.15) In other words, if the original sequence x(n) is multiplied by the exponential sequence an , for some nonzero constant a, then the corresponding unilateral z transform is modied by replacing the independent variable z by z/a. The ROC of the exponentially-weighted sequence, an x(n), is given by ROC = {z C such that |z | > |a|r } Proof: Let w(n) = an x(n). Then W + (z ) = n=0 = n=0 = n=0 = w(n)z n an x(n)z n x(n)(z/a)n x(n)(z )n , using z = z/a n=0 + X (z ) = for all values of z Rx+ . Example 12.5 (Alternating signs) Consider a sequence x(n) and denote the ROC of its unilateral z transform, X + (z ), by Rx+ = {|z | > r1 }. Let us determine the unilateral z transform of the sequence (1)n x(n). This sequence amounts to reversing the signs of all odd-indexed samples of x(n). Using property (12.15), we nd that (1)n x(n) X + (z ), with ROC= Rx+ (12.16) Example 12.6 (Sinusoidal sequences) The unilateral z transform of the sequence x(n) = cos(o n)u(n) coincides with its z transform from Example 9.11 since the sequence is causal: cos(o n)u(n) 1 z 1 cos o , 1 2z 1 cos o + z 2 for |z | > 1 z 1 sin o , 1 2z 1 cos o + z 2 for |z | > 1 Similarly, we can verify that sin(o n)u(n) 303 SECTION 12.3 UNILATERAL z-TRANSFORM 304 Example 12.7 (Exponential modulation of sinusoidal sequences) CHAPTER 12 UNILATERAL z-TRANSFORM Likewise, the bilateral and unilateral z transforms of the sequence x(n) = an cos(o n)u(n) coincide with each other since the sequence is causal. From Example 9.12 we therefore have an cos(o n)u(n) 1 az 1 cos o , for |z | > |a| 1 2az 1 cos o + a2 z 2 an sin(o n)u(n) az 1 sin o , for |z | > |a| 1 2az 1 cos o + a2 z 2 Likewise, 12.3.4 Linear Modulation Consider the seventh line in Table 12.1. It establishes the transform pair nx(n) z dX + (z ) dz (12.17) In other words, if the original sequence x(n) is multiplied by the linear sequence n, then the corresponding unilateral z transform is modied by replacing it by its derivative with respect to z multiplied by z . The ROC of the linearly modulated sequence, nx(n), is Rx+ . Proof: Let w(n) = nx(n) and recall rst the denition of X + (z ): X + (z ) = x(n)z n n=0 for all values of z Rx+ . The series X + (z ) is absolutely summable over Rx+ . Thus, differentiating it with respect to z we can write dX + (z ) dz = n=0 = n=0 so that z x(n) d z n dz x(n) nz n1 z 2n dX + (z ) = nx(n)z n = W + (z ) dz n=0 And the ROC of W + (z ) coincides with the ROC of X + (z ). 305 Example 12.8 (Linearly-modulated exponential sequence) SECTION 12.3 The bilateral and unilateral z transforms of the sequence x(n) = nn u(n) coincide since the sequence is causal. We therefore conclude from Example 9.14 that nn u(n) z 1 z = , (1 z 1 )2 (z )2 for |z | > || 12.3.5 Linear Convolution Consider the eighth line in Table 12.1, where it is now assumed that the sequences x(n) and y (n) are causal, i.e., x(n) = 0 and y (n) = 0 for n < 0 (12.18) Then the following transform pair relation holds: x(n) y (n) X + (z )Y + (z ) (12.19) In other words, convolution of two causal sequences in the time domain amounts to multiplication in the transform domain. The ROC of the linear convolution is Rx+ Ry+ plus possibly z = 0. Proof: Let w(n) = x(n) y (n) = k= x (k )y (n k ) n = k=0 x (k )y (n k ) where the last equality is because both sequences x(n) and y (n) are assumed to be causal (have zero samples over n < 0). It follows that w(n) is also a causal sequence, w(n) = 0 for n<0 Therefore, the bilateral and unilateral z transforms of w(n) coincide, W + (z ) = W (z ) Now, the bilateral z transform for w(n) satises W (z ) = X (z )Y (z ) since w(n) is the linear convolution of x(n) and y (n). Moreover, since x(n) and y (n) are themselves causal sequences, it holds that X + (z ) = X (z ), Y + (z ) = Y (z ) We therefore conclude that W + (z ) = X + (z )Y + (z ) as desired, for all z Rx+ Ry + plus possibly z = 0. UNILATERAL z-TRANSFORM 306 Example 12.9 (Convolution of two sequences) CHAPTER 12 UNILATERAL z-TRANSFORM Let us evaluate the linear convolution of the two exponential sequences x(n) = 1 2 n u(n), n 1 3 y (n) = u(n) Both sequences are causal and therefore their bilateral and unilateral z transforms agree, namely, X (z ) = X + (z ) = z z Y (z ) = Y + (z ) = z z and 1 2 1 3 , |z | > 1/2 , |z | > 1/3 Let w(n) = x(n) y (n). Then w(n) is also a causal sequence and W (z ) = W + (z ) = X + (z )Y + (z ) = z z 1 2 z z 1 3 , |z | > 1/2 Using partial fractions we can express W + (z ) in the form W + (z ) = B A 1+ z 2 z 1 3 where the constants {A, B } can be determined from the residue relations: z2 = 3/2 z 1/3 z =1/2 A = W + (z )(z 1/2)z =1/2 = B = W + (z )(z 1/3)z =1/3 = z2 = 2/3 z 1/2 z =1/3 That is, W + (z ) = 3 1 z 2 so that w(n) = z z 1/2 3 2 1 2 n1 2 1 z 3 2 3 1 3 z z 1/3 n1 , |z | > 1/2 u(n 1) 12.4 INITIAL AND FINAL VALUE THEOREMS The initial value theorem of Sec. 9.6 still holds for the unilateral z transform, especially since the theorem is only valid for causal sequences. Thus, the unilateral z transform also allows us to recover the value of the original sequence x(n) at time 0 without the need to perform inverse-transformation. Specically, assume that x(n) is a causal sequence, namely, x(n) = 0, for n < 0 so that x+ (n) = x(n). Then, X (z ) = X + (z ) and, in view of the result we established earlier in (9.28), it still holds that lim X + (z ) = x(0) z (12.20) where the ROC of X + (z ) needs to include the point z = so that the limit in (12.20) is well-dened. 307 We now establish a second result known as the nal value theorem. If SECTION 12.4 INITIAL AND FINAL VALUE THEOREMS lim x(N ) N exists, then it holds that lim x(N ) = lim (z 1)X + (z ) z 1 N (12.21) The limits exist if the ROC of (z 1)X + (z ) includes the unit circle. Proof: We consider the unilateral z transform of the sequence w(n) = x(n + 1) x(n): W + (z ) = n=0 [ x(n + 1) x(n) ]z n N = = lim N lim N n=0 [ x(n + 1) x(n) ]z n x(0) + (1 z 1 )x(1) + . . . + (1 z 1 )z (N 1) x(N ) + x(N + 1)z N Taking the limit of W + (z ) as z 1 we nd that lim W + (z ) = z 1 lim [ x(0) + x(N + 1) ] N = x(0) + lim x(N + 1) N = x(0) + lim x(N ) N On the other hand, using the properties of the unilateral z transform we have that W + (z ) = = zX + (z ) zx(0) X + (z ) (z 1)X + (z ) zx(0) so that lim W + (z ) = lim (z 1)X + (z ) x(0) z 1 z 1 We arrived at two expressions for the limit of W + (z ) as z 1. Equating the expressions we conclude that the following result holds: lim (z 1)X + (z ) = lim x(N ) z 1 N Example 12.10 (Initial and nal values) Consider the unilateral z transform X + (z ) = 0.5z , z 2 1.5z + 0.5 |z | > 1 Taking the limit as z we nd that lim X + (z ) = 0 z so that x(0) = 0. Likewise, taking the limit of (z 1)X + (z ) as z 1 we get lim (z 1)X + (z ) = lim z 1 z 1 0.5z =1 z 0.5 308 CHAPTER 12 so that x() = 1. Let us conrm these results by inverse transforming the strictly proper rational function X + (z ) by means of partial fractions, say UNILATERAL z-TRANSFORM 0.5 A B X + (z ) = = + z (z 1)(z 0.5) z1 z 0.5 where A and B are found from the residue relations A = 0.5 (z 1) (z 1)(z 0.5) z =1 B = 0.5 = 1 (z 0.5) (z 1)(z 0.5) z =0.5 =1 Therefore, z z1 X + (z ) = and z z 0.5 x(n) = 1 1 2 , |z | > 1 n u(n) Thus, note that x(0) = 0 and x() = 1, as expected. 12.5 SOLVING DIFFERENCE EQUATIONS Let us now illustrate how the unilateral z -transform can be used to solve constant-coefcient difference equations without the need to consider the zero-input and the zero-state responses separately, as was done in Example 12.1. We reconsider the same example. Example 12.11 (Using the unilateral z transform) Consider the constant-coefcient difference equation y (n) 1 y (n 1) = x(n), y (1) = 2 2 and let us again determine its response to the input sequence x(n) = u(n) whose unilateral z transform is z , |z | > 1 X + (z ) = z1 Applying the unilateral z transform to both sides of the difference equation, and using the time-shift property from Table 12.1, we obtain Y + (z ) 1 1 + z Y (z ) + y (1) = X + (z ) 2 Solving for Y + (z ) we get Y + (z ) = y (1) z 2 z 1 2 + X + (z ) z z 1 2 Thus, note that the expression for Y + (z ) consists of two terms: the rst term on the right-hand side contains the contribution of the initial condition y (1), and the second term on the right-hand side contains the contribution of the input sequence, x(n). We therefore say that the rst-term corresponds to the zero-input response and the second-term corresponds to the zero-state response. 309 Using the values for X + (z ) and y (1) = 2, we nd that Y + (z ) z z = 1 2 + z z z1z Yzi (z ) SECTION 12.7 APPLICATIONS 1 2 Yzs (z ) where we are identifying the transforms that correspond to the zero-input contribution and the zerostate contribution. Expanding the zero-state term into partial fractions gives Y + (z ) = = z 2z z + + 1 z1 z 1 z 2 2 2z , |z | > 1 z1 By inverse transformation of Y + (z ) we obtain a causal sequence and it is given by y (n) = 2u(n) 12.6 APPLICATIONS TO BE ADDED Practice Questions: 1. 2. 12.7 PROBLEMS Problem 12.1 Find the unilateral z transforms and ROCs of the following sequences: (a) x(n) = (b) x(n) = 1 n2 2 u(n 4). 2 u(n). 1 n2 (c) x(n) = n 1 n2 2 u(n + 2). 2 1 n+2 (d) x(n) = n 2 u(n + 1). Problem 12.2 Find the unilateral z transforms and ROCs of the following sequences: (a) x(n) = (n 1) (b) x(n) = 1 n (c) x(n) = n 2 1 n+1 2 u(n 1). u(n 2). 1 n1 2 (d) x(n) = n(n 1) u(n + 3). 1 n 2 u(n + 2). Problem 12.3 Find the unilateral z transforms and ROCs of the following sequences: (a) x(n) = n cos 3 (b) x(n) = (n 2) cos (c) x(n) = (n 1) u(n + 2). (n 1) sin n 3 n 1 sin n 2 6 3 3 (n 1) u(n 3). u(n + 1). Problem 12.4 Find the unilateral z transforms and ROCs of the following sequences: 310 CHAPTER 12 UNILATERAL z-TRANSFORM (a) x(n) = cos (b) x(n) = n (c) x(n) = 6 n u(n 1). 1 n1 2 1 2n2 2 sin 3 n cos 3 2 3 u(n + 3). n u(n + 2). Problem 12.5 Determine the unilateral z transforms of each of the following sequences and indicate their regions of convergence: (a) x(n) = (n 1)u(n + 1). (b) x(n) = 1 + n2 n2 u(n + 31). (c) x(n) = |n| , with > 0. (d) The impulse response sequence of the relaxed causal system y (n) 3 y (n 1)+ 1 y (n 2) = 4 8 x(n 1). Problem 12.6 Determine the unilateral z transforms of each of the following sequences and indicate their regions of convergence: (a) x(n) = n2 u(n + 2). (b) x(n) = 1 n2n2 u(n 1). (c) x(n) = |n| , with > 0. (d) The impulse response sequence of the relaxed causal system y (n) 1 y (n 1) 1 y (n 2) = 4 8 2x(n 2). Problem 12.7 Find the unilateral z transform of the sequence x(n) = nu(n + 1) + 1 2 n u(n + 3) Problem 12.8 Find the unilateral z transform of the sequence x(n) = n2 u(n + 2) + 1 4 n+2 u(n 1) Problem 12.9 Let x(n) = n 1 2 u(n 1), 2n 1 3 h(n) = u(n 3) Use the unilateral z transform technique to evaluate the following sequences: (a) x(n) h(n). (b) x(n 2) 1 n 4 h(n). (c) x(n) h(n 1) 1 n 4 u(n). Problem 12.10 Let 1 3 x(n) = n n u(n), h(n) = 1 4 n1 u(n 2) Use the unilateral z transform technique to evaluate the following sequences: (a) x(n) h(n). (b) x(n 1) (c) x(n) sin 1 n1 3 3 h(n 2). n h(n 1). Problem 12.11 Invert the transform X + (z ) = 1 (z 1/8)(z + 1/5) 311 What is its ROC? Determine the limiting value x() in two ways. SECTION 12.7 PROBLEMS Problem 12.12 Invert the transform X + (z ) = 1 (z + 1/8)(z 1/4) What is its ROC? Determine the limiting value x() in two ways. Problem 12.13 Invert the transform X + (z ) = 1 (z + 1/8)2 (z + 1/3) What is its ROC? Determine the limiting value x() in two ways. Problem 12.14 Invert the transform X + (z ) = 1 z 2 + 1/4 What is its ROC? Determine the limiting value x() in two ways. Problem 12.15 Invert the transform X + (z ) = 1 z 2 + 1/9 What is its ROC? Determine the limiting value x() in two ways. Problem 12.16 Invert the transform X + (z ) = 1 (z 1/2)(z 2 + 1/25) What is its ROC? Determine the limiting value x() in two ways. Problem 12.17 Invert the transform X + (z ) = 1 2 z 3 + z 1 + z 1 z2 6 z 1 6 1 2 Determine the limiting value x() in two ways. Problem 12.18 Invert the transform X + (z ) = z2 z 2 1 4z 1 8 Determine the limiting value x() in two ways. Problem 12.19 A causal system is described by the difference equation y (n) y (n 1) + 1 y (n 2) = x(n 1), 4 y (1) = 0, y (2) = 7/2 Use the unilateral z transform technique to determine its complete response when x(n) = 1 n+1 2 u(n). Problem 12.20 A causal system is described by the difference equation y (n) 1 1 y (n 1) y (n 2) = x(n 1), 8 8 y (1) = 0, y (2) = 1 Use the unilateral z transform technique to determine its complete response when x(n) = 1 4 n u(n). 312 Problem 12.21 Consider a causal system that is described by the difference equation CHAPTER 12 UNILATERAL z-TRANSFORM y (n) = 5 1 y (n 1) y (n 2) + x(n 2), 6 6 y (2) = 0, y (1) = 1. Use the unilateral z transform to determine its complete response to the sequence x(n) = (n 1) 1 4 n2 u(n 1). Problem 12.22 Consider a causal system that is described by the difference equation y (n) = 1 1 y (n 1) + y (n 2) + x(n 1), 4 8 y (2) = 1, y (1) = 0. Use the unilateral z transform to determine its complete response to the sequence x(n) = n 1 3 2n2 u(n 2). Problem 12.23 A causal system is described by the difference equation y (n) y (n 1) + 1 y (n 2) = x(n), 4 y (1) = 0, Use the unilateral z -transform to nd its complete response to x(n) = y (2) = 4. 1 2n 2 u(n 1). Problem 12.24 A causal system is described by the difference equation y (n) + 2y (n 1) + 2y (n 2) = x(n), y (1) = 0, Use the unilateral z -transform to nd its complete response to x(n) = y (2) = 1. 1 n 3 u(n 1). Problem 12.25 Consider the constant-coefcient difference equation y (n) 1 1 y (n 1) y (n 2) = x(n 1) 6 6 with initial conditions y (2) = 0 and y (1) = 6. Use the z transform technique to nd the answers to parts (a)-(c): (a) The zero-input response. (b) The zero-state response to x(n) = u(n). (c) The complete response using the unilateral z transform. (d) Check that your answer to part c) is the sum of the answers to parts (a) and (b). (e) Now determine the answers to parts (a)-(c) by using the time-domain techniques you learned earlier for solving constant-coefcient difference equations by working with the modes of the system. Compare your answers to those obtained by using the z transform technique. n (f) Find the response of the system to x(n) = 1 u(n 2) in three different ways. 3 Problem 12.26 A causal system is composed of the series cascade of two LTI subsystems with n n impulse response sequences given by h1 (n) = 1 u(n) and h2 (n) = 1 u(n 1). 2 3 (a) Determine a description for the system in terms of a constant-coefcient difference equation. Denote its input and output sequences by x(n) and y (n), respectively. (b) Draw a block-diagram representation for the system using only two delay elements. (c) Assume the system is relaxed, determine its impulse response and transfer function. (d) Is the system stable? What are its modes? (e) Determine an input sequence such that only the largest mode appears at the corresponding output sequence. (f) Assume the system is not relaxed, determine initial conditions y (1) and y (2) such that only the smallest mode appears at the impulse response of the system. CHAPTER 13 Discrete-Time Fourier Transform In the earlier chapters we characterized the behavior of signals and systems both in the time-domain and in the transform domain. For example, we studied properties of signals and systems in the time-domain (such as periodicity, causality, stability, solutions of difference equations). We also studied signals and systems in the z transform domain (such as transform representations of signals and transfer functions for LTI systems). We related both domains of studying systems and showed how to move back and forth between the time domain and the transform domain. In this chapter, we show how the transform domain representation of signals (in terms of their z transforms) and systems (in terms of their transfer functions) can be used to motivate yet another useful characterization in the frequency domain. The concepts that will be described in this chapter, and in subsequent chapters, will enable us to describe the frequency content of a signal and the frequency response of a system. The rst step towards this goal is to introduce the Discrete-Time Fourier Transform (DTFT) of a sequence and to study its properties. 13.1 DEFINITION OF THE DTFT Consider an arbitrary sequence x(n) and let X (z ) denote its bilateral z transform: x(n)z n X (z ) = (13.1) n= Let ROC denote the region of convergence of X (z ), namely, ROC is the set of all points z in the complex plane where the dening series of X (z ) converges absolutely: ROC of X (z ) = z C such that n= x(n)z n < (13.2) Assume, for the time being, that the ROC of X (z ) includes the unit circle. That is, assume it includes all points z satisfying |z | = 1. Then it must hold that the sequence x(n) itself is absolutely summable, i.e., n= |x(n)| < (13.3) For such sequences, we can evaluate X (z ) at any point on the unit circle, i.e., at any point z of the form z = ej for any angular frequency see Fig. 13.1. Usually, we limit to the intervals w [, ] or [0, 2 ]. As varies over either interval, the variable ej 313 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 314 covers the entire unit circle. If we substitute z in (13.1) by z = ej we get CHAPTER 13 DISCRETE-TIME FOURIER TRANSFORM X (ej ) = x(n)ejn (13.4) n= The quantity X (ej ) so-dened is called the Discrete-Time Fourier transform (DTFT) of the sequence x(n). We express the DTFT of x(n) as a function of ej and write X (ej ), instead of X ( ), in order to emphasize the fact that the DTFT amounts to evaluating the z transform of x(n) on points that lie on the unit circle. Im z = ej 1 1 FIGURE 13.1 1 Re Any point z on the unit circle can be expressed as z = ej for some [, ]. Observe that the DTFT of a sequence is a function of a real-valued variable . As explained in Sec. 3.3, the variable in the exponential sequence ejn that appears in (13.4) plays the role of a frequency variable and it is measured in radians/sample. Moreover, although can in principle assume any value in the range (, ), as mentioned above, we shall often limit to the 2 -wide intervals [, ] or [0, 2 ] for reasons that will become clear as we progress in the discussion (in particular, we are going to see that X (ej ) is periodic in of period 2 and, therefore, it is sufcient to specify its behavior over a 2 -wide interval). The DTFT of an absolutely summable sequence x(n) can therefore be computed in one of two ways: (1) Find its z transform, X (z ), and replace the variable z by ej to get X (ej ). (2) Evaluate X (ej ) directly the dening series (13.4). Example 13.1 (Finite duration sequence) Consider the sequence x(n) = 0.5 (n + 1) + (n) + 0.5 (n 1) It consists of three nonzero samples at time instants n = 1, 0, 1 see Fig. 13.2. Using the denition (13.4) for the DTFT we get 315 SECTION 13.1 DEFINITION OF THE DTFT x( n ) 1 0.5 1 1 n FIGURE 13.2 A sequence x(n) with 3 nonzero samples at n = 1, 0, 1. X (ej ) = 0.5ej + 1 + 0.5ej which is a well-dened function of [, ]. If we further call upon Eulers relation (3.11) we can rewrite X (ej ) in the equivalent form X (ej ) = 1 + cos( ), [, ] Figure 13.3 shows a plot of X (ej ) over the interval [, ]. In this example, X (ej ) assumes real values between 0 and 2. Observe further that the DTFT in this case is a continuous function of . 2 1.8 1.6 1.4 j X(e ) 1.2 1 0.8 0.6 0.4 0.2 0 FIGURE 13.3 3 2 1 0 1 (radians/sample) 2 3 A plot of the DTFT X (ej ) = 1 + cos( ) over the interval [, ]. Example 13.2 (Unit-sample sequence) The DTFT of the unit-sample sequence x(n) = (n) 316 is obviously X (ej ) = 1 CHAPTER 13 Here again, the DTFT is a real-valued function of ; it assumes the constant value 1 over [, ]. In this case, we say that the DTFT is at over [, ] . Figures 13.4 and 13.5 illustrate this situation. x( n ) 1 1 1 n FIGURE 13.4 A plot of the unit-sample sequence x(n) = 1. 2 1.8 1.6 1.4 1.2 j X(e ) DISCRETE-TIME FOURIER TRANSFORM 1 0.8 0.6 0.4 0.2 0 3 2 1 0 1 (radians/sample) 2 3 FIGURE 13.5 A plot of the DTFT X (ej ) = 1 over [, ] . Example 13.3 (Delayed unit-sample sequence) Consider the delayed unit-sample sequence x(n) = (n no ) for some integer value no (it can be positive or negative). Using (13.4), the DTFT of x(n) is easily seen to be X (ej ) = ejno , [, ] In this case, we nd that the DTFT is a complex-valued function of . For each , the value of X (ej ) is a complex number whose magnitude is one and whose phase is no . Let us examine the phase of the DTFT more closely in this example. Assume no = 2 so that X (ej ) = e2j and the phase is given by X (ej ) = 2 It is seen that the phase of X (ej ) varies linearly. Plotting the phase variation over [, ] we see in Fig. 13.6 that it decreases from 2 at = down to 2 at = . phase plot 6 4 X(ej) 2 0 2 4 6 3 2 1 0 1 (radians/sample) 2 3 FIGURE 13.6 A plot of the phase of X (ej ) = ej 2 over the interval [, ]. Recall, however, from the discussion in Sec. 2.1 that we can always limit the phase angle of a complex number to the interval [, ]. If the phase angle of a number lies outside this interval, then we can modify it by adding suitable integer multiples of 2 in order to replace the phase angle by an equivalent angle representation within the interval [, ]. For example, the following two polar representations 5 ej 3 and e j 3 are equivalent: the rst one has phase angle 5/3 (outside [, ]), while the second one has phase angle /3 (inside [, ]). The equivalence between both representations can be seen from the following manipulation 5 5 ej 3 = ej ( 3 2) = ej 3 since ej 2k = 1, for any integer k We use this explanation to motivate an alternative way to present the phase plot of a DTFT; we shall adopt this alternative representation in all our subsequent discussions. Figures 13.7 and 13.8 show the plots that correspond to the situation x(n) = (n 2), where no = 2 for illustration purposes. Observe that now we are using two plots in Fig. 13.8 to represent X (ej ): one plot is used to illustrate its magnitude values over [, ] and a second plot is used to illustrate its phase values over the same interval (when X (ej ) is real, we only need one plot, as was the case with Figs. 13.3 and 13.5). Comparing with Fig. 13.6, we observe that the phase plot of X (ej ) in Fig. 13.8 now exhibits an interesting behavior; each time the value of the phase angle is about to leave the interval [, ], the angle is modied by 2 so that the plot remains within [, ]. For example, consider the plot of the phase starting at = 0. As increases towards /2, the value of the phase angle decreases towards . At w = /2, we add 2 to the phase angle so that its value jumps to from where it starts to decrease again as continues to increase towards . 317 SECTION 13.1 DEFINITION OF THE DTFT 318 CHAPTER 13 x(n) = (n 2) DISCRETE-TIME FOURIER TRANSFORM 1 n 2 1 1 FIGURE 13.7 A plot of the delayed unit-sample sequence x(n) = (n 2). magnitude plot phase plot 2 3 2 X(ej) |X(ej)| 1.5 1 0.5 0 3 1 0 1 2 2 1 0 1 2 (rad/sample) 3 3 3 2 1 0 1 2 (rad/sample) 3 /2 FIGURE 13.8 A plot of the magnitude (left) and phase (right) of the complex-valued DTFT X (ej ) = ej 2 over [, ] . Example 13.4 (Exponential sequence) Consider the exponential x(n) = n u(n) Using the denition (13.4), its DTFT is given by X (ej ) = n=0 (ej )n which involves the sum of the terms of a geometric sequence with ratio ej and rst term equal to 1. Consequently, 1 , || < 1 X (ej ) = 1 ej provided that || < 1. In other words, the DTFT of an exponential sequence exists for values of that are inside the open unit disc. Alternatively, we can arrive at the same conclusion by starting from the z transform of the exponential sequence. We already know from Sec. 9.3 that the z transform of x(n) is given by X (z ) = z , z |z | > || with the ROC dened as the set of all points z satisfying |z | > ||. Replacing z by ej we obtain the above DTFT. However, for this substitution to be valid we need to guarantee that the ROC of X (z ) includes the unit circle. This will be possible when || < 1 since then the condition |z | > || will include all points |z | = 1. Thus, note that the DTFT of the exponential sequence n u(n) is dened only for || < 1. In contrast, the z transform of the same sequence is more general and is dened for any and for values of z satisfying |z | > ||. Similarly, consider the exponential sequence x(n) = n u(n 1) Using the denition (13.4), its DTFT is given by X (ej ) = = 1 (ej )n n= (1 ej )n n=1 which involves the sum of the terms of a geometric sequence with ratio 1 ej and rst term equal to 1 ej . Consequently, X (ej ) = 1 , 1 ej || > 1 provided now that || > 1. Example 13.5 (Rectangular pulse) Consider the rectangular pulse sequence dened as x(n) = 1, 0, 0 n L1 otherwise In other words, the sequence x(n) assumes the value 1 over the interval 0 n L 1 and is zero elsewhere. We say that the width of the rectangular pulse is L samples. Using denition (13.4), the 319 SECTION 13.1 DEFINITION OF THE DTFT 320 DTFT of x(n) is given by CHAPTER 13 DISCRETE-TIME FOURIER TRANSFORM X (ej ) = L1 ejn n=0 = = = 1 ejL 1 ej (using the sum of geometric terms from Example 2.11) ejL/2 ejL/2 ejL/2 (extracting the terms ejL/2 and ej/2 ) ej/2 (ej/2 ej/2 ) sin (L/2) ej(L1)/2 (using Eurlers relation (3.12)) sin (w/2) We thus arrive at the following important DTFT pair: x(n) = 1, 0, 0nL1 otherwise DTFT X (ej ) = L, e j (L1) 2 sin L 2 , . sin 2 when = 0 otherwise The value of X (ej ) at = 0 is obtained by applying LHospitals rule to the ratio sin (L/2) sin (/2) Specically, lim 0 sin (L/2) sin (/2) = lim 0 L cos (L/2) 2 1 cos (/2) 2 =L In this example, the magnitude of X (ej ) is given by sin (L/2) sin (/2) |X (ej )| = The phase of X (ej ), on the other hand, is dictated by the linear factor (L 1) 2 and by the sign of the term sin (L/2) sin (/2) When the above term is positive, the phase of X (ej ) is simply (L 1)/2. When the sign of the above factor is negative then we need to correct the term (L 1)/2 by adding to it. Which sign we choose for is not really relevant, except that it is customary to choose that sign for that keeps the plot of the phase of X (ej ) within the interval [, ]. Figures 13.9 and 13.10 illustrate this situation for the case L = 5. 13.2 UNIFORM CONVERGENCE The DTFT of a sequence x(n) was motivated in Sec. 13.1 by specializing its z transform to the unit-circle, z = ej . A such, the sequence x(n) was required to be absolutely summable, i.e., n= |x(n)| < (13.5) 321 SECTION 13.2 x ( n) UNIFORM CONVERGENCE 1 1 0 2 1 3 4 5 6 n FIGURE 13.9 A plot of the rectangular pulse x(n) with width L = 5. magnitude plot phase plot 2 X(e ) 3 j j 3 4 |X(e )| 5 2 1 0 1 2 2 1 0 1 2 (rad/sample) 3 3 3 sin( L/2)/sin(/2) 0 3 1 2 1 0 1 2 (rad/sample) 3 2 1 0 1 2 (rad/sample) 3 4.5 3 1.5 0 1.5 3 FIGURE 13.10 A plot of the magnitude (top left) and phase (top right) of DTFT of the rectangular pulse of width L = 5. The bottom right plot shows the variation in the sign of the ratio sin(L/2)/ sin(/2) over [, ] . Observe that whenever this ratio changes sign (from positive to negative or from negative to positive), a factor of is added to the phase plot. in order to ensure that the unit circle, |z | = 1, belongs to the ROC of X (z ). The condition of an absolutely summable sequence x(n) guarantees that the series (13.4) dening the DTFT converges in a desirable sense known as uniform convergence. What this notion of convergence means is the following. Let N > 0 be a nite integer and consider the partial sum N x(n)ejn XN (ej ) = (partial sum) (13.6) n=N This sum amounts to limiting the series (13.4) to the samples of x(n) that lie between the time instants n = N and n = N . Then, the uniform convergence of the series (13.4) dening X (ej ) means that, for large enough N , we can use XN (ej ) as a good approximation for X (ej ). More explicitly, the following three properties hold: 322 CHAPTER 13 DISCRETE-TIME FOURIER TRANSFORM (a) First, uniform convergence means that no matter which value of we pick in the interval [, ], then we can always nd a small enough number > 0 and a large enough integer No > 0 such that XN (ej ) X (ej ) , for every N > No (13.7) In other words, the nite sum XN (ej ) is a good approximation for X (ej ) for sufciently large N . Even more importantly, the sum XN (ej ) is a good approximation for all [, ]. The qualication uniform in uniform convergence is used to emphasize that the error bound is the same for all . Hence, at any , the approximation XN (ej ) will be close to X (ej ); it will not hold that at some the approximation will be much worse than at other values of . Instead, the nite sum approximation will be of similar uniform quality (and satisfy the same error bound) for all [, ]. (2) Second, uniform convergence implies point-wise convergence at each . That is, it holds that lim XN (ej ) = X (ej ) N (13.8) 1. Third, uniform convergence implies that X (ej ) is a continuous function of . This is because, as indicated by property (13.7), the DTFT X (ej ) can be viewed as the limiting function of the uniformly convergent sequence of continuous functions in , {XN (ej )}. And it is known that when a sequence of continuous functions converges uniformly, then their limit is a continuous function as well. Therefore, we conclude that the DTFT, X (ej ), of an absolutely summable sequence, x(n), is necessarily a continuous function of . Example 13.6 (Exponential sequence) Consider the exponential sequence from Example 13.4, namely, x(n) = n u(n) We already know that this sequence is absolutely summable for || < 1 and, accordingly, its DTFT converges uniformly and is given by X (ej ) = 1 , 1 ej || < 1 For illustration purposes let us assume that is real-valued in this example. Consider now the nite sum approximation UNIFORM CONVERGENCE N XN (ej ) x(n)ejn = n=N N n u(n)ejn = n=N N n ejn = n=0 N n=0 = n ej = N +1 1 ej 1 ej We can evaluate how close this approximation is to X (ej ) as follows: = ej N +1 1 ej = j j XN (e ) X (e ) ||N +1 |1 ej | = = = = Thus, observe that the difference ||N +1 |1 cos( ) + j sin( )| ||N +1 (1 cos( ))2 + ( sin( ))2 1+ 2 cos2 ( ) ||N +1 2 cos( ) + 2 sin2 ( ) ||N +1 1 + 2 2 cos( ) j j XN (e ) X (e ) decays exponentially with N due to the factor ||N +1 in the numerator and, hence, lim XN (ej ) = X (ej ) N Moreover, the convergence is uniform as can be seen from the following argument. First note that the function 1 + 2 cos( ) is always positive since || < 1 and cos( ) assumes values between 1 and 1. Let > 0 denote the minimum value of this function: = min [, ] 323 SECTION 13.2 1 + 2 cos( ) For any desired error bound > 0, select No such that ||No +1 < CHAPTER 13 Now since || < 1 and, usually, < 1, the above condition implies DISCRETE-TIME FOURIER TRANSFORM log ( ) log || No + 1 > so that ||N +1 < for any N > No . Consequently, in view of the denition of , we have ||N +1 = , for all N > No < 1 + 2 cos( ) j j XN (e ) X (e ) < , It follows that for all N > No j j and we conclude that the convergence of XN (e ) to X (e ) is uniform. Figure 13.11 plots the difference XN (ej ) X (ej ) over the interval [, ] for increasing values of N and using = 1/2. The plot on the left uses a linear scale while the plot on the right uses a dB scale and displays the values of 20 log 10 XN (ej ) X (ej ) (dB) It is seen that as N increases, the size of the difference decreases and the approximation becomes better. 3 linear scale x 10 dB scale 2.2 55 N=8 2 N=8 1.8 60 1.4 N=9 1.2 j j |XN(e )X(e )| 1.6 |X (ej)X(ej)| (dB) 324 N 1 0.8 0.6 65 N=10 70 N=10 75 N=11 0.4 2 N=11 N=12 N=12 0.2 3 N=9 1 0 1 2 (rad/sample) 80 3 2 1 0 1 2 (rad/sample) 3 3 FIGURE 13.11 A plot of the difference XN (ej ) X (ej ) for the exponential sequence x(n) = (0.5)n u(n) over the interval [, ] and for increasing values of N . The plot on the left uses a linear scale while the plot on the right uses a dB scale. 325 13.3 INVERSE DTFT SECTION 13.3 There is a useful inversion formula that allows us to recover a sequence x(n) from knowledge of its DTFT. To see this, we start from the dening relation X (ej ) = x(k )ejk (13.9) k= and assume, for the time being, that the sequence {x(n)} is absolutely summable so that the above series converges uniformly to X (ej ). We multiply both sides of (13.9) by ejn to get X (ej )ejn = x(k )ej(nk) k= Integrating over any interval of length 2 , say, over [, ], we obtain 1 2 X (ej )ejn d = 1 2 x(k )ejk k= = 1 2 x(k ) k= ej(nk) d (13.10) where we exchanged the integration and summation signs on the right-hand side of the above equality by virtue of the assumed uniform convergence of the series (13.9). Let us now examine the integral expression on the right-hand side of (13.10). Assume initially that k = n then, obviously, 1 2 ej(nk) d = 1 2 d = 1 On the other hand, when k = n, we have 1 2 ej(nk) d = 1 1 ej(nk) 2 j (n k ) = 0, k = n = Therefore, it holds that 1 2 ej(nk) d = 0 1 k=n k=n (13.11) Substituting into the right-hand side of (13.10), we conclude that the following inversion formula must hold x(n) = 21 X (ej )ejn d (13.12) Actually, the same argument shows that the inversion formula holds when the integration is carried over any 2 -wide interval, and not only [, ]. For example, we can also write x(n) = 1 2 2 X (ej )ejn d 0 (13.13) INVERSE DTFT 326 In order to emphasize this fact, we shall write more generically CHAPTER 13 DISCRETE-TIME FOURIER TRANSFORM x(n) = 1 2 2 X (ej )ejn d (13.14) where the 2 under the integration symbol, , is used to refer to any 2 long interval. The above arguments show that it is sufcient for us to know X (ej ) over a 2 -wide interval in order to recover x(n). Now, although expressions (13.12)(13.14) were derived under the assumption of an absolutely summable sequence x(n) and, hence, continuous X (ej ), we shall nevertheless apply these inverse expressions to other more general sequences that may not be absolutely summable for the reasons explained in the sequel starting in the next section. Loosely, this is because the inversion formulas (13.12)(13.14) can be applied under weaker notions of convergence for the series (13.9) than uniform convergence. Example 13.7 (Low-pass DTFT) Let us use the inversion formula (13.14) to recover the sequence x(n) whose DTFT over the interval [, ] is given by 1, 0, j X (e ) = | | < c c | | (13.15) That is, the DTFT is equal to one over the interval [c , c ] and is zero elsewhere see Fig. 13.12. In this case, we say that the DTFT is limited to a low-pass interval of angular frequencies; recall from the discussion that led to Fig. 3.8 earlier that values of close to 0 are qualied as low frequencies while values of close to are qualied as high frequencies. We shall have more to say about this terminology in a later chapter. X (ej ) 1 c c (rad/sample) FIGURE 13.12 A plot of the DTFT (13.15) over [, ]. Note that X (ej ) is not a continuous function of in this example because of the discontinuities at = c . Therefore, the corresponding inverse sequence, x(n), cannot be absolutely summable and the series (13.9) dening X (ej ) could not have converged uniformly. Still, we are going to use the inversion formula (13.12) to nd that x(0) = 1 2 c d = c c 327 and, for n = 0, x(n) = = = = SECTION 13.4 c 1 ejn d 2 c 1 jn c 1 e 2 jn c 1 1 jc n e ejc n 2 jn sin(c n) , n=0 n INVERSE DTFT In summary, we get c /, c sin(c n) , c n x(n) = n=0 (13.16) n=0 where we are multiplying and dividing the expression for x(n) by c when n = 0 in order to present it in a form that brings us closer to sinc functions, as discussed in the next example. Example 13.8 (Sinc function) The inverse transform in Example 13.7 is in terms of a common and useful function known as the sinc function, which is dened as follows: sinc() = sin (13.17) where is generally a continuous variable. Using the sinc notation, the sequence (13.16) can be rewritten in the form c x(n) = sinc(wc n) (13.18) The function sinc() is such that it attains its maximum value of one at = 0, as can be seen by applying LHospitals rule: lim sinc() = lim 0 0 cos() sin = lim =1 0 1 Moreover, the function sinc() is equal to zero whenever the argument is an integer multiple of , namely, sinc(k ) = 0 for any integer k We can use the sinc notation to dene sequences. For example, the notation sinc 4 n refers to the sequence sin( n) 4 n 4 Figure 13.13 shows a plot of the function sinc() for values of over the interval [20, 20]. The same gure shows a plot of the sequence sinc(n/4) for values of n in the range 20 n 20; this sequence evaluates to zero at multiples of 4. 328 continuoustime plot 1 CHAPTER 13 0.8 sinc() 0.6 0.4 0.2 0 0.2 20 15 10 5 0 5 discretetime plot 15 10 5 10 15 20 10 15 20 1 0.8 sinc( n/4) DISCRETE-TIME FOURIER TRANSFORM 0.6 0.4 0.2 0 0.2 20 FIGURE 13.13 0 n 5 Plots of the function sinc() (top) and the sequence sinc 4 n (bottom). 13.4 MEAN-SQUARE CONVERGENCE The result of Example 13.7 raises an important issue. As anticipated, the resulting sequence x(n), which was found to be wc /, n=0 wc sin(c n) x(n) = (13.19) , n=0 c n is not absolutely summable. Therefore, the series dening its DTFT in (13.4) does not converge uniformly and one wonders about the interpretation of the transform pair obtained in Example 13.7. Is it a valid transform pair? There are many important sequences x(n) that are not absolutely summable. Strictly speaking, for such sequences, their DTFTs cannot be dened as the power series x(n)ejn X (ej ) = n= since these series do not converge uniformly any more. However, there are weaker notions of convergence that are useful for our purposes and which allow us to dene the DTFT even for sequences that are not absolutely summable. By resorting to these other notions of convergence, instead of restricting ourselves to uniform convergence, we are able to extend the denition of the DTFT to a larger class of sequences. This is what is happening with the result of Example 13.7. Thus, consider a sequence x(n) that has nite energy, as opposed to being absolutely summable, namely, x(n) satises n= |x(n)|2 < (13.20) We say that x(n) is square-summable as opposed to absolutely summable. For such squaresummable sequences we will continue to associate a DTFT with them by calling upon another notion of convergence called mean-square convergence, which is motivated as follows. Consider again the partial sums N XN (ej ) = x(n)ejn (13.21) n=N for integers values N > 0. We say that this sequence of partial sums converges in the mean-square sense if, and only if, there exists some function X (ej ) such that lim N 1 2 XN (ej ) X (ej ) 2 d =0 (13.22) In other words, the area under the square-error-curve over the interval [, ] should approach zero. This is a weaker notion of convergence than requiring XN (ej ) to converge point-wise to X (ej ), as was guaranteed earlier by assuming uniform convergence of the sequence of functions {XN (ej )} see (13.8). Mean-square convergence only guaran2 tees that the area under the squared-error curve, XN (ej ) X (ej ) , converges to zero; it does not guarantee that the error itself, XN (ej ) X (ej ), will converge to zero (since there can exist, for example, some discrete frequency points at which both functions do not converge to each other and yet the area under the square-error curve is zero). The mean-square convergence condition (13.22) implies that there exists a large enough No and a small enough such that 1 2 XN (ej ) X (ej ) 2 d < , for all N > No (13.23) This bound does not guarantee that at every the function XN (ej ) will be close to X (ej ), as was the case with uniform convergence in (13.7); the function XN (ej ) can be closer to X (ej ) at some values and further away from it at other values. But the overall effect will be that the area under the square-error curve will be less than . Mean-square convergence is a weaker notion of convergence than uniform convergence. Specically, uniform convergence implies mean-square convergence but the converse is not necessarily true. Now, it is known that for square-summable sequences, x(n), the partial sums {XN (ej )} in (13.21) converge in the mean-square sense to a function X (ej ), which we shall therefore take to represent the DTFT of the sequence. Moreover, we can resort to the same inverse expression (13.12) to determine which sequence can be associated with the given DTFT, as was already illustrated in Example 13.7. Example 13.9 (Finite energy sequence) Consider again the sequence from Example 13.7, namely, x(n) = c sinc(c n) or, equivalently, x(n) = wc /, wc sin(c n) , c n n=0 n=0 329 SECTION 13.4 MEAN-SQUARE CONVERGENCE 330 The sequence x(n) is square-summable since CHAPTER 13 DISCRETE-TIME FOURIER TRANSFORM Ex = n= |x(n)|2 2 wc +2 2 = n=1 2 wc 2 +2 2 < sin2 (c n) 2 n2 n=1 1 n2 where we used the fact that the series {1/n2 } converges; actually, n=1 1 2 = 2 n 6 (13.24) Therefore, the sequence x(n) is square-summable and its DTFT exists in the mean-square sense. What this means is the following. If we form the partial sums N c sinc(c n) ejn XN (ej ) = n=N Then, as N , these partial sums will converge in the mean-square sense to the (low-pass) function shown in Fig. 13.12 over [, ], namely, 1, 0, j X (e ) = and 1 2 lim N |w| < wc wc |w| 2 j j XN (e ) X (e ) d =0 Example 13.10 (Gibbs phenomenon) Let us continue to examine the partial sums of Example 13.9 and how they converge to X (ej ). Thus note that N XN (ej ) = n=N c sinc(c n) ejn = = = c 1+ N n=N,n=0 N c 1+ c 1+2 n=1 sin(c n) jn e c n sin(c n) jn e + ejn c n N n=1 sin(c n) cos(n) c n Hence, XN (ej ) is a real-valued function of . It is also an even function of since XN (ej ) = XN (ej ). Figure 13.14 shows plots of XN (ej ) over the interval [, ], for increasing values of N , superimposed on the rectangular pulse describing X (ej ) and using c = /2. For increasing values of N , we expect XN (ej ) to provide increasingly better ts for X (ej ). The gure shows that this is indeed the case. However, since the convergence is not uniform, there are some annoying discrepancies that persist in the form of ripples that occur around the discontinuities at c regardless of the value of N . Moreover, the peak value of these ripples does not seem to decrease with increasing N . This is known as Gibbs phenomenon (named after the mathematician J. Gibbs who explained it around 1899). Gibbs showed that the size of the peak is independent of N (the maximum value is 1.09, which corresponds to a 9% overshoot). Gibbs also showed that, for every N , the value of XN (ej ) at each point of discontinuity is the average value of X (ej ) at the point. In this example, we have two such points at c , with average value equal to 1/2. The practical implication of these facts is that any truncated approximation of a discontinuous pulse like X (ej ) will exhibit high frequency ripples near the discontinuities. This suggests that a sufciently large N should be used in order to guarantee that the total energy of the ripples is sufciently small. N=1 N=3 1 1 0.5 0.5 0 0 2 0 2 2 N=5 0 2 N=10 1 1 0.5 0.5 0 0 2 0 2 2 N=20 0 2 N=50 1 1 0.5 0.5 0 0 2 0 (rad/sample) 2 2 0 (rad/sample) 2 FIGURE 13.14 Plots of X (ej ) and XN (ej ) for several values of N . The plots illustrate the occurrence of Gibbs phenomenon. Example 13.11 (Convergence in the distributional sense) Let us determine the sequence x(n) whose DTFT over the interval [ , ] is described by X (ej ) = 2 ( o ), [ , ] for some value o [ , ]. The function (w) in the above expression denotes the impulse function of a continuous variable . Recall that in continuous-time, the impulse function (t) is dened by the following properties: (t)dt = 1, f (t ) (t t o )d t = f (t o ) 331 SECTION 13.4 MEAN-SQUARE CONVERGENCE 332 CHAPTER 13 DISCRETE-TIME FOURIER TRANSFORM for any function f (t) that is well dened at t = to . The second property is known as the sifting property; it extracts the value of the function at the location of the impulse, t = to . Using the inverse transform relation (13.14) we therefore get x(n) 1 2 1 2 = = = e jo n X (ej )ejn d 2 ( o )ejn d In other words, we arrive at the transform pair ejo n DTFT 2 ( o ), [, ] (13.25) when o [, ]. Observe here that the sequence x(n) = ejo n is neither absolutely summable nor square-summable. Therefore, the corresponding DTFT series, X (ej ) = ejo n ejn = n= e j ( o )n n= does not converge uniformly or even in the mean-square sense. In this case, we need a weaker sense of convergence to justify the transform pair we arrived at. We shall not delve into the technical details here except to say that the series e j ( o )n n= converges in a so-called distributional sense to another series that is given by 2 k= (w o 2k ) That is, ej (o )n = 2 n= k= (w o 2k ) (13.26) Observe that the series on the right is periodic with period 2 , and that the X (ej ) that we started with corresponds to the value of this series over the interval [, ]. Example 13.12 (Sinusoidal sequences) Let us now determine the sequence x(n) whose DTFT over the interval [, ] is described by X (ej ) = [ ( o ) + ( + o )] , [, ] for some o [, ]. Using the inverse transform relation (13.14) we nd that x(n) = = = 1 X (ej )ejn d 2 1 jo n e + ejo n 2 cos(o n) 333 TABLE 13.1 Some useful DTFT pairs over the interval [, ]. sequence x(n) INVERSE DTFT BY PARTIAL FRACTIONS DTFT X (ej ) x(n) = (n) SECTION 13.5 X (ej ) = 1 x(n) = 1, 0, 0nL1 otherwise L, X (ej ) = e j =0 (L1) 2 x(n) = n u(n), || < 1 X (ej ) = X (ej ) = otherwise 1 1 ej x(n) = n u(n 1), || > 1 sin (L/2) . , sin (/2) 1 1 ej c sinc(c n) x(n) = X (e ) = x(n) = ejo n X (ej ) = 2 (w o ) x(n) = cos(o n), o [, ] X (ej ) = [ (w 0 ) + (w + 0 )] x(n) = sin(o n), o [, ] X (ej ) = j [ (w 0 ) (w + 0 )] j 1, 0, |w| < wc wc |w| In other words, we arrive at the transform pair cos(o n) DTFT [ ( o ) + ( + o )] , [, ] (13.27) where o [, ]. Likewise, sin(o n) DTFT j [ ( o ) ( + o )] , [, ] (13.28) For ease of reference, Table 13.1 lists several transform pairs that were motivated in the earlier discussions. 13.5 INVERSE DTFT BY PARTIAL FRACTIONS When the DTFT of a sequence x(n) is a rational function of ej , we can invert it by partial fractions just like we did for z transforms. This procedure is best illustrated by means of an example. Consider the DTFT X (ej ) = 4 3 3 ej 1 5 ej + 1 e2j 6 6 334 CHAPTER 13 DISCRETE-TIME FOURIER TRANSFORM The denominator can be factored as 5 1 1 ej + e2j = 6 6 1 1 ej 3 1 1 ej 2 We can then determine constants A and B to satisfy the partial fractions expansion 1 4 3 3 ej 5 j + 1 e2j 6e 6 = A B + 1 1 1 ej 1 3 ej 2 By comparing coefcients of powers of ej in the numerators on both sides of the above equality we nd that A = 1 and B = 2. Therefore, 1 4 3 3 ej 5 j + 1 e2j 6e 6 = 1 2 + 1 1 2 ej 1 1 ej 3 By inverse transforming we obtain x(n) = 1 2 n +2 1 3 n u(n) Alternatively, we can replace ej by z in the expression for X (ej ) and write rst X (z ) = 4 3 3 z 1 1 1 5 z 1 + 6 z 2 6 We then choose a ROC for this z -transform that includes |z | = 1. In this case, the appropriate ROC should be |z | > 1/2 since the poles are at z = 1/2 and z = 1/3. We subsequently invert X (z ) by partial fractions by noting that 3 4 z 1 z 3 = 5 1 6 z 1 + 1 z 2 z 6 which leads to the same sequence, x(n), as above. 1 2 + 2z 1 z 3 335 13.6 APPLICATIONS SECTION 13.7 APPLICATIONS TO BE ADDED Practice Questions: 1. 2. 13.7 PROBLEMS Problem 13.1 Find the DTFT of x(n) = j (n 1) j (n + 1) Is X (ej ) real-valued? Plot its magnitude and phase over [, ]. Problem 13.2 Find the DTFT of x(n) = j (n 4) + (n 2) + (n + 2) j (n + 4) Is X (ej ) real-valued? Plot its magnitude and phase over [, ]. Problem 13.3 Find the DTFT of the sequence x(n) = |n| where || < 1. Problem 13.4 Find the DTFT of the sequence x(n) = |2n| where || < 1. Problem 13.5 Find the DTFT of x(n) = 2, 1, 0, n=0 1n5 otherwise Plot its magnitude and phase over [, ]. Problem 13.6 Find the DTFT of x(n) = 1, 2, 1, 0, n=0 n=1 2n6 otherwise Plot its magnitude and phase over [, ]. Problem 13.7 Find the DTFT of x(n) = 1, 1, 0, n = 0, 1, 2 n = 3, 4, 5 otherwise Plot its magnitude and phase over [, ]. Problem 13.8 Find the DTFT of x(n) = 1, 1, 0, n = 0, 2, 4 n = 1, 3, 5 otherwise 336 CHAPTER 13 DISCRETE-TIME FOURIER TRANSFORM Plot its magnitude and phase over [, ]. Problem 13.9 Find the DTFTs of the following sequences: (a) x(n) = (b) x(n) = 1 n1 2 u(n + 1). 1 2n1 3 (c) x(n) = u(n 1). 1 n2 4 u(n 1). In each case, nd expressions for the magnitude and phase of the DTFT. Problem 13.10 Find the DTFTs of the following sequences: (a) x(n) = 1 3n+2 2 (b) x(n) = (c) x(n) = u(n 3). 1 n+1 3 1 n2 4 u(n + 1). u(2n). In each case, nd expressions for the magnitude and phase of the DTFT. Problem 13.11 Find the DTFTs of the following sequences: (b) x(n) = (c) x(n) = (d) x(n) = n sin n . 3 3 cos 3 n 23 . cos n + 2j sin n . 3 6 cos n cos n . 3 6 (a) x(n) = cos In each case, plot the magnitude and phase of the DTFT. Problem 13.12 Find the DTFTs of the following sequences: (b) x(n) = (c) x(n) = (d) x(n) = (n 1) sin (n 4 4 sin 4 (n + 2) . sin n + cos n . 4 3 sin n sin n . 4 3 (a) x(n) = cos 1) . In each case, plot the magnitude and phase of the DTFT. Problem 13.13 Find the DTFTs of the following sequences: (a) x(n) = (b) x(n) = 1 n3 2 1 n1 4 (c) x(n) = cos u(n) + 1 n 3 u(n) + cos u(n 1). 3 n. n + (n 1) + (n + 1). 4 In each case, nd expressions for the magnitude and phase of the DTFT. Problem 13.14 Find the DTFTs of the following sequences: (a) x(n) = (b) x(n) = 1 2n+2 4 1 n3 3 (c) x(n) = cos 4 u(n 1) + 1 n+1 6 u(n + 2) + sin 3 u(2n 1). (n 1) . (n + 1) + j (n 2) + j (n + 2). In each case, nd expressions for the magnitude and phase of the DTFT. Problem 13.15 Find the DTFTs of the sequences whose z transforms are given below: z (a) X (z ) = , |z | > 1/2. z 1/2 z 3 , |z | > 1/2. z 1/2 z 1 , 1/2 < |z | < 3. (c) X (z ) = z 1/2 z 3 (b) X (z ) = 1 1 + , |z | > 1/2. z 1/2 z 1/3 Indicate in each case whether the DTFT is uniformly convergent. (d) X (z ) = Problem 13.16 Find the DTFTs of the sequences whose z transforms are given below: z2 , |z | > 1/2. z + 1/2 1 , |z | > 1/2. (b) X (z ) = z (z 1/2) (a) X (z ) = (c) X (z ) = z 1/3 1 , 1/2 < |z | < 2. z 1/2 z 2 z 1 z2 + , |z | > 1/3. z 1/4 z + 1/3 Indicate in each case whether the DTFT is uniformly convergent. (d) X (z ) = Problem 13.17 Verify whether each of the following sequences is absolutely summable or square summable or both: (a) x(n) = 1 n u(n). 2 (b) x(n) = 1 n2 (c) x(n) = 1 |n| (d) x(n) = (e) x(n) = 2 u(n 1). . 2 1 u(n). n+1 sin 3 n n . (f) x(n) = cos 6 n u(n). n+1 Problem 13.18 Verify whether each of the following sequences is absolutely summable or square summable or both: (a) x(n) = (b) x(n) = (c) x(n) = 1 2n1 3 1 n+1 4 1 n2 2 u(n). u(2n 1). . 1 (d) x(n) = 2 u(n). n +1 sin n (e) x(n) = 2 3 . n +1 cos n (f) x(n) = 6 u(n). n+1 Problem 13.19 Consider the DTFT function j H (e ) = 1 e j 2 , 0, | | < c c | | Can H (ej ) be the DTFT of the impulse response sequence of a stable LTI system? Problem 13.20 Consider the DTFT function j H (e ) = 1 e j 3 , 0, | | > c c | | Can H (ej ) be the DTFT of the impulse response sequence of a stable LTI system? 337 SECTION 13.7 PROBLEMS 338 Problem 13.21 Find the DTFTs of the following sequences: CHAPTER 13 DISCRETE-TIME FOURIER TRANSFORM (a) x(n) = (b) x(n) = sin n 3 n sin . (n 1) . n1 3 Problem 13.22 Find the DTFTs of the following sequences: sin (n 2) . (a) x(n) = n sin 6 n 3 ) (b) x(n) = . n+1 4 Problem 13.23 Invert the following DTFTs: (a) X (ej ) = cos( ). 2 (b) X (ej ) = 1 . 1 1 ej 2 (c) X (ej ) = cos( ) sin( ). 3 3 (d) X (ej ) = cos2 ( ). 6 (e) X (ej ) = sin( ) cos2 ( ). 3 4 Problem 13.24 Invert the following DTFTs: (a) X (ej ) = cos2 ( ). 2 (b) X (ej ) = 1 . 1 + 1 ej 3 (c) X (ej ) = sin2 ( ). 3 (d) X (ej ) = cos2 ( ) + sin2 ( ). 6 4 (e) X (ej ) = sin2 ( ) cos( ). 3 4 Problem 13.25 Invert the following DTFTs: (a) X (ej ) = 1, 1, 0, /4 /2 /2 < /4 otherwise (b) X (ej ) = 1, 1, 0, 3/4 3/4 otherwise (c) X (ej ) = 2 e j 2 , 1 e j 3 , 0, 1 /3 2/3 2/3 /3 otherwise Problem 13.26 Invert the following DTFTs: (a) X (ej ) = 1, 2, 1, 2, 0, (b) X (ej ) = 1, 2, 0, /4 /2 /2 3/4 /2 < /4 3/4 /2 otherwise 3/4 3/4 otherwise 1 j (c) X (e ) = 2 e j 2 , 1 e j 4 , 0, 339 0 /4 /2 /4 otherwise SECTION 13.7 PROBLEMS Problem 13.27 Use partial fractions to recover the sequence x(n) for the given DTFT: X (ej ) = 1+ 7 12 ej 1 j 1 e 12 e2j 12 Problem 13.28 Use partial fractions to recover the sequence x(n) for the given DTFT: X (ej ) = ej e2j 2 1 + 3 ej + 1 e2j 9 Problem 13.29 Consider the step-sequence x(n) = u(n). It is neither absolutely summable nor square-summable. (a) Determine a closed-form expression for the nite sum N XN (ej ) = x(n)ejn n=N (b) Plot the magnitude and phase of XN (ej ) for increasing values of N , say N = 1, 2, 5, 10, 20, 70, 100. Problem 13.30 Argue that the DTFT of the step sequence, x(n) = u(n), is given by U (ej ) = 1 + 1 ej k= (w 2k) Problem 13.31 Argue that the DTFT of the sequence x(n) = 1 for all n is given by X (ej ) = k= 2 ( 2k) Problem 13.32 Show that an absolutely summable sequence always has nite energy. Problem 13.33 Figure 13.15 shows the magnitude DTFT of a certain sequence x(n). Determine the sequence x(n) for each of the phase plots shown in Fig. 13.16? |X (ej )| 1 1/2 FIGURE 13.15 2 4 4 2 Plot of the magnitude DTFT of a sequence for Probs. 13.33 and 13.34. 340 X (ej ) CHAPTER 13 DISCRETE-TIME FOURIER TRANSFORM X (ej ) X (ej ) /2 2 4 4 2 FIGURE 13.16 Three phase plots for Prob. 13.33. Problem 13.34 Consider the same magnitude plot of Fig. 13.15. Determine the sequence x(n) for each of the phase plots shown in Fig. 13.17? Problem 13.35 The DTFTs of two sequences {x(n), y (n)} are shown in Fig. 13.18. Determine the sequences. Find also their energies. Problem 13.36 The DTFTs of a sequence x(n) is shown in Fig. 13.19. Determine the energy of the sequence. 341 SECTION 13.7 PROBLEMS X (ej ) X (ej ) 2 2 X (ej ) 4 2 2 4 FIGURE 13.17 Three phase plots for Prob. 13.34. X (ej ) 2 1 4 8 8 4 (rad/sample) 4 (rad/sample) Y (ej ) 2 4 FIGURE 13.18 DTFT plot for Prob. 13.35. 342 CHAPTER 13 DISCRETE-TIME FOURIER TRANSFORM |X (ej )| 1 1/2 2 4 4 2 4 2 X (ej ) /2 2 FIGURE 13.19 4 Plots of the magnitude and phase of the DTFT of the sequence for Prob. 13.36. CHAPTER 14 Properties of the DTFT T he Discrete-Time Fourier Transform (DTFT) has several useful properties, which can facilitate the evaluation of the DTFT without having to resort each time to evaluating the dening series. This chapter establishes some of these properties and provides illustrative examples. 14.1 PERIODICITY OF THE DTFT We start from the denition of the DTFT of a sequence x(n), namely, X (ej ) = x(n)ejn (14.1) n= and recall that the complex exponential sequence is periodic with period 2 , i.e., ej = ej (+2) It follows that X (ej ) is also periodic with period 2 , X (ej ) = X ej (+2) (14.2) It is for this reason that we have been displaying the magnitude and phase plots of the DTFT over 2 -wide intervals and, often, over the interval [, ]. Example 14.1 (Two equivalent plots) We shall limit our representation of the DTFT of a sequence either to the interval [, ] or to the interval [0, 2 ]. Fig. 14.1 illustrates several periods of a DTFT and the corresponding representations over the intervals [, ] and [0, 2 ]. The two representations shown in the middle and bottom plots over the 2 long intervals are equivalent and they represent the same sequence x(n). 343 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 344 CHAPTER 14 X (ej ) (multiple periods) PROPERTIES OF THE DTFT 1 2 c c 2 (rad/sample) X (ej ) over [, ] 1 c c (rad/sample) X (ej ) over [0, 2 ] 1 c 2 (rad/sample) 2 c FIGURE 14.1 Multiple periods of a DTFT X (ej ) (top plot) followed by the equivalent representations of the same DTFT over the periods [, ] (middle plot) and [0, 2 ] (bottom plot). Example 14.2 (Finite duration sequence) Let us reconsider the sequence of Example 13.1, x(n) = 0.5 (n + 1) + (n) + 0.5 (n 1) whose DTFT we already found to be X (ej ) = 1 + cos( ) Figures 14.2 and 14.3 display the sequence x(n) and its DTFT over the period [, ]. Since X (ej ) is periodic of period 2 , we illustrate in Fig. 14.4 several periods of X (ej ). The plot in Fig. 14.3 shows only one period over the interval [, ]. However, we can as well display X (ej ) over another 2 long interval, say over [0, 2 ]. This situation is illustrated in Fig. 14.5. The plots in Figs. 14.3 and 14.5 represent the same DTFT because if these plots are repeated periodically, then they would result in the same DTFTs as in Fig. 14.4. 14.2 USEFUL PROPERTIES The DTFT shares several properties with the bilateral z -transform. A summary of these properties is given in Table 14.1 further ahead. The rst two lines of the table start from 345 SECTION 14.2 x( n ) USEFUL PROPERTIES 1 0.5 1 1 n FIGURE 14.2 A sequence x(n) with 3 nonzero samples at n = 1, 0, 1. 2 1.8 1.6 1.4 j X(e ) 1.2 1 0.8 0.6 0.4 0.2 0 FIGURE 14.3 3 2 1 0 1 (radians/sample) 2 3 A plot of the DTFT X (ej ) = 1 + cos( ) over the interval [, ]. two generic sequences x(n) and y (n) and the subsequent lines provide the DFTT of combinations and transformations of these sequences. 14.2.1 Linearity Consider, for instance, the third line of the table. It states that the DTFT of a linear combination of two sequences is given by the same linear combination of their DTFTs, namely, ax(n) + by (n) aX (ej ) + bY (ej ) for any two scalars a and b. (14.3) 346 j X(e ) over the interval [4, 4] 2 CHAPTER 14 PROPERTIES OF THE DTFT 1.8 1.6 1.4 j X(e ) 1.2 1 0.8 0.6 0.4 0.2 10 5 0 (radians/sample) 5 10 FIGURE 14.4 A plot showing several periods of the DTFT X (ej ) = 1 + cos( ) over the interval [4, 4 ]. 2 1.8 1.6 1.4 j X(e ) 1.2 1 0.8 0.6 0.4 0.2 0 1 2 3 4 (radians/sample) 5 6 FIGURE 14.5 A plot of the DTFT X (ej ) = 1 + cos( ) over the interval [0, 2 ]. The plots in Figs. 14.3 and 14.5 represent the same DTFT. Proof: Let w(n) = ax(n) + by (n). Then W (ej ) = w(n)ejn n= = [ax(n) + by (n)]ejn n= x(n)ejn = a = aX (ej ) + bY (ej ) n= +b y (n)ejn n= 347 TABLE 14.1 Several properties of the DTFT. SECTION 14.2 sequence DTFT 1. x(n) X (ej ) 2. y (n) Y (ej ) 3. ax(n) + by (n) aX (ej ) + bY (ej ) linearity 4. x(n n0 ) ejn0 X (ej ) time-shifts 5. ejo n x(n) X ( e j ( o ) ) frequency shifts 6. cos(o n)x(n) 1 X 2 sin(o n)x(n) 1 X 2j 7. x(n) X (ej ) 8. nx(n) j 9. x(n) y (n) X (ej )Y (ej ) convolution 10. x(n)y (n) X (ej ) Y (ej ) multiplication 11. x (n) 12. property 1 e j ( o ) + 2 X e j ( + o ) e j ( o ) 1 X 2j e j ( + o ) time reversal dX (ej ) dw linear modulation X (ej )] x(n)y (n) 1 2 n= 2 modulation conjugation X (ej ) Y (ej ) d Parsevals relation Example 14.3 (Illustrating the linearity property) Consider the sequence x(n) that is shown in the top plot of Fig. 14.6 and let us determine its DTFT. We note that the sequence x(n) can be regarded as the sum of the two rectangular pulses shown in the middle and bottom plots of the same gure, x(n) = x1 (n) + x2 (n) where x1 (n) has duration L = 2: 1, 0 x1 (n) = 0, n 1 otherwise 1, 0, 0n3 otherwise and x2 (n) has duration L = 4: x2 (n) = USEFUL PROPERTIES 348 x(n) CHAPTER 14 PROPERTIES OF THE DTFT 2 1 1 2 3 n 2 3 n 2 3 n x1 (n) 1 1 x2 (n) 1 1 FIGURE 14.6 The sequence x(n) in the top plot can be expressed as the sum of the two rectangular pulses in the middle and bottom plots. We already know from the discussion in Example 13.5 that the DTFTs of the rectangular pulses x1 (n) and x2 (n) are given by X1 (ej ) = 2, e j 2 when = 0 sin ( ) , . sin 2 otherwise and X2 (ej ) = 4, e j 32 when = 0 sin (2 ) , . sin 2 otherwise Using the trigonometric relation sin(2) = 2 sin() cos() we conclude that j X (e ) = 6, 2ej 2 cos 1 + 2ej cos( ) 2 =0 otherwise Obviously, we could have also arrived at this result directly from the denition (13.4), which in this case gives X (ej ) = 2 + 2ej + ej 2 + ej 3 We instead opted to illustrate the linearity property (14.3). The magnitude and phase plots of the resulting X (ej ) are displayed in Fig. 14.7 over [, ]. 349 magnitude plot phase plot 1 4 0.5 j X(e ) 1.5 5 |X(ej)| 6 3 2 USEFUL PROPERTIES 0 0.5 1 1 3 2 FIGURE 14.7 from Fig. 14.6. SECTION 14.2 1 0 12 (rad/sample) 1.5 3 2 3 1 0 1 2 (rad/sample) 3 The magnitude (top) and phase (bottom) plots of the DTFT of the sequence x(n) 14.2.2 Time Shifts Consider now the fourth line in Table 14.1. It establishes the transform property x(n no ) ejno X (ej ) (14.4) In other words, if the original sequence x(n) is shifted in time by an amount no (where no can be positive or negative), then the phase of the corresponding DTFT is modied by the factor ejno . Observe that the magnitude of the DTFT is not modied since both functions ejno X (ej ) and X (ej ) have the same magnitude for every . We therefore say that shifting in the time-domain corresponds to phase change in the frequency domain and vice-versa. Proof: Let w(n) = x(n no ). Then W (ej ) = w(n)ejn n= = n= = x(n no )ejn x(k)ej(k+no ) , k= = ejno = using k = n no ejno X (ej ) x(k)ejk k= Example 14.4 (Illustrating the time-shift property) Consider the sequence x(n) = 1 sinc n 4 4 350 We already know from Table 13.1 that the DTFT of x(n) is given by CHAPTER 14 PROPERTIES OF THE DTFT 1, 0, X (ej ) = | | 4 otherwise The DTFT of x(n) is real-valued and it is shown in the top plot of Fig. 14.8. Now assume that we shift x(n) by one unit sample to the right and consider the sequence y (n) = x(n 1) According to (14.4), the DTFT of y (n) is related to the DTFT of x(n) as follows: Y (ej ) = ej X (ej ) where we are using no = 1. We therefore nd that Y (ej ) has the same magnitude plot as X (ej ), while the phase of Y (ej ) varies linearly according to Y (ej ) = , | | /4 The magnitude and phase plots of Y (ej ) are shown in the bottom plots of Fig. 14.8. X (ej ) 1 4 4 (rad/sample) |Y (ej )| = |X (ej )| 1 4 4 (rad/sample) Y (ej ) = /4 /4 (rad/sample) FIGURE 14.8 Illustration of the time-shift property for the data in Example 14.4. The top plot shows the DTFT of the sequence x(n) in the example, and the bottom plots show the magnitude and phase plots of the DTFT of the sequence y (n) = x(n 1). 351 SECTION 14.2 14.2.3 Frequency Shifts USEFUL PROPERTIES Consider now the fth line in Table 14.1. It establishes the transform property ejo n x(n) X e j ( o ) (14.5) In other words, if the phase of the original sequence x(n) is modied by adding a linear component to it, in the form of o n, then the corresponding DTFT is obtained by shifting the DTFT of the original sequence by o . We therefore say that phase change in the timedomain corresponds to shifting in the frequency domain and vice-versa. This property is the dual of the time-shift property. Proof: Let w(n) = ejo n x(n). Then W (ej ) = w(n)ejn n= = ejo n x(n)ejn n= = x(n)ej (o )n n= = X ( e j ( o ) ) Example 14.5 (Illustrating the frequency shift property) Consider again the sequence x(n) = 1 sinc n 4 4 where 1, 0, j X (e ) = | | /4 otherwise The DTFT of x(n) is real-valued and is shown in the top plot of Fig. 14.9. Now consider the sequence y1 (n) = ej 2 n x(n) = (j )n x(n) According to (14.5), the DTFT of y1 (n) is related to the DTFT of x(n) as follows: Y1 (ej ) = X ej ( 2 ) where we are using o = /2. We therefore nd that Y1 (ej ) has the same plot as X (ej ) but is shifted to the right and centered at the point = /2. This situation is illustrated in the center plot of Fig. 14.9. Consider further the sequence y2 (n) = ejn x(n) = (1)n x(n) According to (14.5), the DTFT of y2 (n) is related to the DTFT of x(n) as follows: Y2 (ej ) = X ej () 352 CHAPTER 14 PROPERTIES OF THE DTFT where we are now using o = . We therefore nd that Y2 (ej ) has the same plot as X (ej ) but is shifted to the right by an amount that is equal to . However, since we are limiting the display of the DTFT to the range [, ], then the portion of Y2 (ej ) that overows beyond , appears on the left-hand-side between [, 34 ]. This situation is illustrated in the bottom plot of Fig. 14.9. X (ej ) 1 4 4 (rad/sample) (rad/sample) (rad/sample) Y1 (ej ) 1 4 4 3 4 2 Y2 (ej ) 1 3 4 3 4 FIGURE 14.9 Illustration of the frequency-shift property for the data in Example 14.5. The top plot shows the DTFT of the sequence x(n) in the example, and the bottom plots show the DTFTs of y1 (n) = ej 2 n x(n) and y2 (n) = ejn x(n). 14.2.4 Modulation Consider now the sixth line in Table 14.1. It establishes the transform property cos(o n)x(n) 1 2 X e j ( o ) + X e j ( + o ) (14.6) In other words, if the sequence x(n) is modulated by a cosine sequence, then the DTFT is scaled by 1/2 and shifted left and right to the locations o , which are the locations dictated by the angular frequency of the sinusoidal sequence. 353 Proof: Let w(n) = cos(o n)x(n). Using Eulers relation (3.11) we have SECTION 14.2 w(n) = 1 jo n 1 e x(n) + ejo n x(n) 2 2 USEFUL PROPERTIES Invoking the linearity and frequency-shift properties (14.3) and (14.5) we conclude that 1 X ( e j ( o ) ) + X ( e j ( + o ) ) 2 W (ej ) = Likewise, it holds that sin(o n)x(n) 1 X e j ( o ) 2j X e j ( + o ) (14.7) where the proof now requires that we employ the alternative form (3.12) for Eulers relation. Example 14.6 (Illustrating the modulation property) Consider again the sequence x(n) = 1 sinc n 4 4 where j X (e ) = 1, 0, | | /4 otherwise The DTFT of x(n) is real-valued and is shown in the top plot of Fig. 14.10. Now consider the sequence y1 (n) = n x(n) 2 cos According to (14.6), the DTFT of y1 (n) is related to the DTFT of x(n) as follows: Y1 (ej ) = 1 X e j ( 2 ) 2 + 1 X e j ( + 2 ) 2 where we are using o = /2. We therefore nd that Y1 (ej ) is obtained from X (ej ) by shifting the plot of the latter to the left and to the right by /2 and by scaling the magnitude by 1/2. This situation is illustrated in the center plot of Fig. 14.10. Consider further the sequence y2 (n) = n x(n) 4 cos According to (14.6), the DTFT of y2 (n) is related to the DTFT of x(n) as follows: Y2 (ej ) = 1 X e j ( 4 ) 2 + 1 X e j ( + 4 ) 2 where we are now using o = /4. We therefore nd that Y2 (ej ) is obtained from X (ej ) by shifting the plot of the latter to the left and to the right by /4 and by scaling the magnitude by 1/2. This situation leads to the bottom plot in Fig. 14.10. Let us now consider the sequence y3 (n) = cos n x(n 1) 2 We already know from Example 14.4 how the DTFT of x(n 1) relates to the DTFT of x(n); this is shown in the middle and bottom plots of Fig. 14.8. The sequence y3 (n) is obtained by multiplying 354 X (ej ) CHAPTER 14 PROPERTIES OF THE DTFT 1 (rad/sample) (rad/sample) 4 4 (rad/sample) Y1 (ej ) 1/2 4 3 4 4 3 4 Y2 (ej ) 1/2 2 2 FIGURE 14.10 Illustration of the modulation property for the data in Example 14.6. The top plot shows the DTFT of the sequence x(n) in the example, and the bottom plots show the plots of the DTFTs of y1 (n) = cos( n)x(n) and y2 (n) = cos( n)x(n). 2 4 x(n 1) by cos( n). Therefore, the magnitude and phase plots of Y3 (ej ) are obtained by shifting 2 the magnitude and phase plots of the DTFT of x(n 1) to the right and to the left by /2, and by scaling the magnitude plot by 1/2. This construction leads to the plots shown in Fig. 14.11. 14.2.5 Time Reversal Consider the seventh line in Table 14.1. It establishes the transform property x(n) X (ej ) (14.8) In other words, if the original sequence x(n) is reversed in time (i.e., ipped around the vertical axis), then the corresponding DTFT is reversed in frequency. 355 SECTION 14.2 |Y3 (ej )| USEFUL PROPERTIES 1/2 4 3 4 3 4 (rad/sample) 4 (rad/sample) Y3 (ej ) /4 3/4 /4 3 4 /4 FIGURE 14.11 Illustration of the modulation property for the data in Example 14.6. The gure shows the magnitude and phase plots of the DTFT of the sequence y3 (n) = cos( n)x(n 1). 2 Proof: Let w(n) = x(n). Then W (ej ) = w(n)ejn n= = n= = x(n)ejn x(k)ejk , k= = using k = n X (ej ) Example 14.7 (Illustrating the time-reversal property) Consider the sequence x(n) = 1 sinc n 4 4 where 1, 0, X (ej ) = | | /4 otherwise The DTFT of x(n) is real-valued and is shown in the top plot of Fig. 14.12. We illustrated in the middle and bottom plots of Fig. 14.8 the magnitude and phase plots of the delayed sequence x(n 1). Now consider the sequence y1 (n) = ej 8 n x(n 1) 356 CHAPTER 14 PROPERTIES OF THE DTFT According to (14.5), the magnitude and phase plots of the DTFT of y1 (n) are obtained by shifting the magnitude and phase plots of x(n 1) by /8 to the right. This situation is illustrated in the bottom plots of Fig. 14.12. X (ej ) 1 4 4 (rad/sample) (rad/sample) |Y1 (ej )| 1 8 3 8 Y1 (ej ) = ( ) 8 /4 8 (rad/sample) /4 FIGURE 14.12 Illustration of the frequency shift property for the data in xample 14.7. The top plot shows the DTFT of the sequence x(n) in the example, and the bottom plots show the plots of the DTFTs of y1 (n) = ej 8 n x(n 1). Consider now the time-reversed version of y1 (n), namely, y2 (n) = y1 (n) = ej 8 n x(n 1) According to (14.8), the DTFT of y2 (n) is related to the DTFT of y1 (n) as follows: Y2 (ej ) = Y1 (ej ) In other words, the magnitude and phase plots of Y1 (ej ) from Fig. 14.12 should be ipped around the vertical axis. This step leads to the plots shown in Fig. 14.13. 357 SECTION 14.2 |Y2 (ej )| USEFUL PROPERTIES 1 3 8 (rad/sample) 8 Y2 (ej ) = + 8 /4 /4 (rad/sample) 8 FIGURE 14.13 Illustration of the time-reversal property for the data in Example 14.7. The gure shows the magnitude and phase plots of the sequence y2 (n) = ej 8 n x(n 1). 14.2.6 Linear Modulation [Linear Modulation] Consider the eighth line in Table 14.1. It establishes the transform property nx(n) j dX (ej ) d (14.9) In other words, if the original sequence x(n) is modulated by the linear sequence n, then the corresponding DTFT is replaced by its derivative with respect to and multiplied by j. Proof: Let w(n) = nx(n) and recall rst the denition of X (ej ): X (ej ) = x(n)ejn n= Differentiating with respect to we have dX (ej ) d = n= = n= x(n) dejn d jnx(n) ejn 358 so that CHAPTER 14 j PROPERTIES OF THE DTFT dX (ej ) = d nx(n)ejn = W (ej ) n= Example 14.8 (Illustrating the linear modulation property) Consider the sequence 1 sinc n 4 4 We already know from Table 13.1 that the DTFT of x(n) is given by the rectangular pulse: x(n) = j X (e ) = 1, 0, | | /4 otherwise Now consider the sequence y (n) = nx(n) According to (14.9), the DTFT of y (n) is obtained by differentiating the DTFT of x(n) with respect to and multiplying the result by j . This calculation leads to the expression Y (ej ) = j + 4 j 4 In other words, Y (ej ) consists of two impulses located at = /4. This result is consistent with the DTFT of a sinusoidal sequence from Table 13.1 where we have the transform pair sin n 4 j + 4 j 4 Indeed, observe that the expression for y (n) reduces to a sinusoidal sequence since y (n) = = = = nx(n) 1 n sinc n 4 4 1 sin 4 n n 4 n 4 1 sin n 4 Fig. 14.14 illustrates the DTFT of y (n). 14.2.7 Linear Convolution Consider the ninth line in Table 14.1. It establishes the transform property x(n) y (n) X (ej )Y (ej ) (14.10) In other words, convolution in the time domain amounts to multiplication in the transform domain. Proof: Let w(n) = = x(n) y (n) k= x (k )y (n k ) 359 SECTION 14.2 USEFUL PROPERTIES |Y (ej )| 1 4 4 (rad/sample) (rad/sample) Y (ej ) /2 4 4 /2 FIGURE 14.14 Illustration of the linear modulation property for the data in Example 14.8. The top gure shows the magnitude plot of Y (ej ) and the bottom plot shows the corresponding phase plot using the sequence y (n) = nx(n). Then W (ej ) = w(n)ejn n= = n= k= = k= n= = x(k)y (n k)ejn x (k ) n= k= = x(k)y (n k)ejn x(k)ejk n= k= = x (k )e jk k= = y (n k)ejn y (n k)ejn ejk y (n )e jn n = , using n = n k X (ej )Y (ej ) Example 14.9 (Illustrating the linear convolution property) Consider the two sequences x1 (n) = 1 sinc n, 4 4 x2 (n) = 1 jn e 8 sinc n 4 4 360 CHAPTER 14 The corresponding DTFTs are real-valued and are shown in the two top plots of Fig. 14.15. We are interested in evaluating the linear convolution of x1 (n) and x2 (n), namely, the sequence PROPERTIES OF THE DTFT y (n) = x1 (n) x2 (n) According to the property (14.10), the DTFT of y (n) is obtained by multiplying the DTFTs of x1 (n) and x2 (n). Doing so results in the third plot in Fig. 14.15; the plot shows a rectangular pulse that assumes the value one over the interval [/8, /4]. In order to recover the sequence y (n), we can proceed, for example, by using the inversion formula y (n) = = = = = = = 1 2 /4 1 2 1 2 1 2 1 2 1 2 Y (ej )ejn d ejn d /8 1 jn 1 jn 1 jn 1 jn /4 ejn /8 e jn 4 e j 8 n 3 3 ej 16 n ej 16 n ej 16 n ej 16 n 2j sin 3 ej 16 n sinc 16 3 n 16 3 n 16 Alternatively, and more directly, we can use the properties of the DTFT to receover y (n) from its DTFT, Y (ej ). To do so, we observe that if we shift Y (ej ) to the left by /16 we obtain a perfectly centered rectangular pulse over the interval 3 , 3 . Let Y2 (ej ) denote this new DTFT see 16 16 bottom plot of Fig. 14.15. Then Y (ej ) = Y2 ej ( 16 ) Now invoking the frequency-shift property (14.5) we conclude that y (n) = ej 16 n y2 (n) And we know from Table 13.1 that y2 (n) = so that y (n) = 3 sinc 16 3 n 16 3 ej 16 n sinc 16 3 n 16 as expected. 14.2.8 Multiplication in the Time Domain Consider the tenth line in Table 14.1. It states that the DTFT of the product of two sequences is given by the expression below x(n)y (n) 1 2 2 X (ej )Y (ej () )d (14.11) 361 j X1 ( e ) SECTION 14.2 USEFUL PROPERTIES 1 (rad/sample) (rad/sample) 4 (rad/sample) 4 (rad/sample) X2 (ej ) 1 3 8 8 Y (ej ) 1 4 8 Y2 (ej ) 1 3 16 3 16 FIGURE 14.15 Illustration of the linear convolution property for the data in Example 14.9. The top two plots show the DTFTs of the sequences x1 (n) and x2 (n). The last two plots show the DTFTs of y (n) and y2 (n). where the integration on the right-hand side is carried over an interval of width 2 , say, over [, ] or [0, 2 ]. Proof: Let R(ej ) = 1 2 X (ej )Y (ej () )d 2 Using the inverse DTFT expression (13.14) we can recover the sequence r (n) as follows: 362 CHAPTER 14 PROPERTIES OF THE DTFT r (n) = = = = = = 1 2 1 2 R(ej )ejn d 2 2 X (ej )Y (ej () )d ejn d 2 1 2 2 1 2 2 2 X (ej )ejn Y (ej () )ej ()n d d 2 2 X (ej )ejn Y (ej )ej n d d, 2 2 1 X (ej )ejn d 2 2 x(n)y (n) 1 2 (using = ) Y (ej )ej n d 2 as desired. Evaluation of Continuous-Time Convolutions Before proceeding in our discussions, it is important to comment on the nature of the integral expression that appears on the right-hand side of (14.11); it has the form of a convolution integral over the continuous variable with two distinctive features: (a) First, the functions that are being convolved, namely, X (ej ) and Y (ej ), are periodic functions of with period 2 . (b) Second, the integration is being performed over an interval of length 2 , say over [, ] or [0, 2 ]. We refer to the convolution integral in (14.11) as circular convolution in order to to distinguish it from the operation of linear convolution, which is explained below. We denote the circular convolution operation by the symbol and write X (ej ) Y (ej ) = 1 2 2 X (ej )Y (ej () )d (14.12) Linear convolution in continuous-time is instead dened as follows. Consider two arbitrary (not necessarily periodic) signals, x(t) and h(t). Their linear convolution is the function y (t) that results from the following operation: y (t) = x(t) h(t) = x( )h(t )d (linear convolution) (14.13) which involves evaluating the area under the curve x( )h(t ) for every t. It is useful to observe the analogy with the denition (5.6) of the convolution sum of two sequences, x(n) and h(n), namely, y (n) = x(n) h(n) = k= x(k )h(n k ) (linear convolution) As was the case with convolution sums in Sec. 6.2, it is possible to interpret the linear convolution integral (14.13) graphically. Specically, the signal y (t) can be evaluated graphically as follows (the steps are illustrated in Fig. 14.16): (a) First, we plot the signals h( ) and x( ) . Note that we are denoting the independent variable by . Therefore, the horizontal axis will be the axis. [(b) Then we plot h( ). In other words, we ip the signal h( ) around the vertical axis to obtain h( ). (c) We subsequently compute the area under the product curve x( )h( ) to obtain y (0): y (0) = x( )h( )d (d) Next, we shift h( ) by t units of time in order to obtain h(t ). We then compute the area under the curve x( )h(t ) to nd y (t): y (t) = x( )h(t )d and so on. x( ) h( ) x( ) o x( ) h( ) h(t ) o t + o FIGURE 14.16 Graphical evaluation of the linear convolution of two signals x(t) and h(t). The top row shows the signals x( )) and h( ) . The middle row shows x( ) again and the last row shows h( ) on the left and its shifted version, h(t ) on the right. The area that is common to x( ) and h( ) on the left, as well as the area that is common to x( ) and h(t ) on the right, are marked with dashed lines. Now, note that the expression on the right-hand side of (14.11) cannot be interpreted as the linear convolution of the signals X (ej ) and Y (ej ); this is because the integration 363 SECTION 14.2 USEFUL PROPERTIES 364 CHAPTER 14 PROPERTIES OF THE DTFT is limited to an interval of width 2 and the functions X (ej ) and Y (ej ) are both periodic of period 2 . The same graphical construction described above to evaluate linear convolutions can be used to evaluate circular convolutions as well. To do so, we simply keep in mind during the shift operations that the functions X (ej ) and Y (ej ) are periodic and, therefore, when shifts occur, the entire functions are shifted (including all their repeated periods) to the left or to the right. Subsequently, the area under the product curve X (ej )Y (ej () ) is evaluated but only over a single period (as opposed to over the entire interval (, )). Example 14.10 (Modulation via convolution) We can use the circular convolution property to re-derive the modulation result (14.6). Thus, recall that the DTFT of cos o n over [, ] is given by cos o n ( o ) + ( + o ). Therefore, cos(o n)x(n) = 1 [ ( o ) + ( + o )] X (ej () )d 2 2 1 1 X ( e j ( o ) ) + X ( e j ( + o ) ) 2 2 Example 14.11 (Illustrating multiplication in the time domain) Consider the two sequences x(n) = 1 sinc n 4 4 and y (n) = 1 sinc n 2 2 The corresponding DTFTs are real-valued and are shown in the two top plots of Fig. 14.17. We are interested in evaluating the DTFT of the product sequence, r (n) = x(n)y (n). According to (14.11), the DTFT of r (n) is obtained by computing the circular convolution R(ej ) = 1 2 X (ej )Y (ej () )d 2 We are going to evaluate this circular convolution in two ways: analytically by using the integral expression and graphically. Analytical method. Using the fact that X (ej ) = 1 over [/4, /4] and is zero elsewhere, we get R(ej ) = 1 2 /4 Y (ej () )d /4 Now, note from Fig. 14.17 that the function Y (ej () ) is equal to one for all values of and that satisfy 2 2 or, equivalently, for values of that lie inside the interval + 2 2 365 We consider several possibilities according to how the boundaries /2 compare with /4: 1. 2 = = = 2 USEFUL PROPERTIES . In this case /4 and the expression for R(ej ) becomes 4 R(ej ) 2. + SECTION 14.2 . 4 /4 1 2 1 2 3 8 2 d + 4 2 1 2 In this case /4 and the expression for R(ej ) becomes R(ej ) = = = 3. 2 . In this case /4 and the expression for R(ej ) becomes 4 R(ej ) 4. + 2 + 2 1 d 2 /4 1 + + 2 2 4 3 1 + 8 2 . 4 = 1 2 /4 d = 1/4 /4 In this case /4 and the expression for R(ej ) becomes R(ej ) = 1 2 /4 d = 1/4 /4 In this case 3/4 and R(ej ) = 0. 5. 2 6. + 2 . In this case 3/4 and R(ej ) = 0. 4 . 4 The last row in Figure 14.17 shows the resulting R(ej ). Graphical method. Evaluating R(ej ) graphically is far more immediate in this example. If we ip Y (ej ) around the vertical axis we obtain the same plot back. If we now shift Y (ej ) to the left and to the right and evaluate the common area with X (ej ) (and divide the result by 2 ), we can easily deduce the form of R(ej ) shown in Fig. 14.17. 14.2.9 Conjugation Consider the eleventh line in Table 14.1. It establishes the following property: x (n) X (ej ) (14.14) That is, if the sequence x(n) is conjugated, which amounts to replacing its individual terms by their complex conjugates, then the DTFT of x(n) is obtained by replaced by in X (ej ) and then conjugating the result. 366 X (ej ) CHAPTER 14 PROPERTIES OF THE DTFT 1 (rad/sample) 4 4 (rad/sample) (rad/sample) Y (ej ) 1 2 2 R(ej ) 1/4 3 4 4 3 4 4 FIGURE 14.17 Illustration of the multiplication property for the data in Example 14.11. The top two plots show the DTFTs of the sequences x(n) and y (n). The bottom plot shows the DTFT of r (n) = x(n)y (n). Proof: Let w(n) = x (n). Using the denition (13.4) of the DTFT we have W (ej ) = w(n)ejn n= = x (n)ejn n= = x(n)ejn n= = x(n)ejn n= = X (ej ) Example 14.12 (Illustrating the conjugation property) Consider the complex-valued sequence x(n) = (n) + j (n 1) 367 By denition, its DTFT is given by SECTION 14.2 X (ej ) x(0) + x(1)ej = USEFUL PROPERTIES j = 1 + je = 1 + j (cos( ) j sin( )) = (1 + sin( )) + j cos( ) Consider now the conjugated sequence y (n) = x (n) = (n) j (n 1) By denition, its DTFT is given by Y (ej ) = y (0) + y (1)ej = 1 jej = = 1 j (cos( ) j sin( )) (1 sin( )) j cos( ) Now note that if we simply conjugate the expression for X (ej ) we do not get Y (ej ) since X (ej ) = (1 + sin( )) j cos( ) Instead, we rst need to replace by in the expression for X (ej ) to get X (ej ) = = (1 + sin( )) + j cos( ) (1 sin( )) + j cos( ) and then conjugate X (ej ) to arrive at X (ej ) = (1 sin( )) j cos( ) which agrees with Y (ej ). 14.2.10 Real Sequences For a real-valued sequence x(n), the magnitude and phase components of the DTFT have the following properties: |X (ej )| is an even function of (14.15) X (ej ) is an odd function of In other words, the magnitude and phase plots satisfy the symmetry properties |X (ej )| = |X (ej )| and X (ej ) = X (ej ) (14.16) so that |X (ej )| is symmetric about the vertical axis and X (ej ) is symmetric about the origin. This result suggests that for real sequences, it is sufcient to plot the magnitude and phase of the DTFT over the smaller interval [0, ], since the plot over [, 0] can be deduced from the symmetry properties. Likewise, the real and imaginary parts of the 368 DTFT satisfy similar symmetry properties: CHAPTER 14 PROPERTIES OF THE DTFT Real part of X (ej ) is an even function of (14.17) Imaginary part of X (ej ) is an odd function of Proof: Using the denition (13.4) of the DTFT, and Eulers relation (3.9), we have X (ej ) = x(n)ejn n= = n= x(n)[cos(n) j sin(n)] Therefore, since x(n) is real, the real and imaginary components of X (ej ) are given by n XR (ej ) = x(n) cos(n) n= n XI (ej ) = x(n) sin(n) n= where XR and XI denote the real and imaginary components of X (ej ), respectively. It is now clear that XR (ej ) = XR (ej ) and XI (ej ) = XI (ej ) It follows that |X (ej )| = |X (ej )| X (ej ) = X (ej ) and Example 14.13 (Illustrating the symmetry properties) Consider the real-valued sequence y (n) = 1 cos n sinc (n 1) 4 2 4 We already evaluated its DTFT in Example 14.6 (as the sequence y3 (n) in that example). The DTFT of y (n) is reproduced in Fig. 14.18. It is seen that the magnitude plot is symmetric about the vertical axis, while the phase plot is symmetric about the origin. 14.2.11 Parsevals Relation Consider the twelfth line in Table 14.1. It establishes the following equality, which is known as Parsevals relation, x(n)y (n) = n= 1 2 2 X (ej ) Y (ej ) d (14.18) The sum on the left-hand side is in terms of products of time-domain samples of the form x(n)y (n), which involve the conjugated terms of the sequence y (n). The integral expression on the right-hand side involves the area under the frequency-domain curve 369 |Y (ej )| SECTION 14.2 USEFUL PROPERTIES 1/2 4 3 4 4 (rad/sample) 3 4 (rad/sample) Y (ej ) /4 3 /4 /4 3 4 /4 FIGURE 14.18 Illustration of the symmetry properties for real-valued sequences as in Example 14.13. Note that the magnitude plot is an even function of while the phase plot is an odd function of . X (ej ) Y (ej ) over an interval of duration 2 ; this curve involves the conjugated DTFT of the same sequence y (n) (and the area is normalized by 1/2 ). Therefore, Parsevals relation is an equality between a time-domain computation and a frequency-domain computation; the relation allows us to move back and forth between the time and frequency domains. Note in particular the useful special case that arises when we select the sequence y (n) to be x(n). In this case, Parsevals relation reduces to |x(n)|2 = n= 1 2 2 2 X (ej ) d (14.19) On the left-hand side we have the energy of the sequence x(n). We therefore nd that the energy of a sequence can be evaluated in the frequency domain by determining the area under the curve |X (ej )|2 and normalizing the result by 2 . It should be noted that the quantity |X (ej |2 , which is equal to the square of the magnitude of the DTFT of the sequence, is known as the spectrum of the sequence: spectrum of x(n) = |X (ej )|2 (14.20) Thus, we nd that the energy of a sequence coincides with the normalized area under its spectrum (the normalization is obtained by dividing by 2 ). Proof: We now establish Parsevals relation (14.18). We already know from the complex conjugation property (14.14) that y (n) Y (ej ) Let r (n) denote the product sequence r (n) = x(n)y (n) 370 and recall the denition (13.4) of the DTFT of a sequence, namely, CHAPTER 14 PROPERTIES OF THE DTFT R(ej ) = r (n)ejn n= j It follows that the value of R(e ) at = 0 is equal to the sum of the samples of the sequence r (n), i.e., R(ej ) = =0 r (n) n= This is a general and useful result. Applying this fact to the current context we see that we should evaluate R(ej 0 ) since R (e j 0 ) = x(n)y (n) n= in view of the denition r (n) = x(n)y (n). Now we know from property (14.11) regarding the multiplication of sequences in time that R(ej ) is given by the circular convolution 1 2 R(ej ) = Therefore, R (e j 0 ) = X (ej ) Y (ej (+)) d 2 1 2 X (ej ) Y (ej () ) d 2 and we arrive at the equality x(n)y (n) = n= 1 2 X (ej ) Y (ej () ) d 2 as desired. Example 14.14 (Illustrating Parsevals relation) Consider the two sequences x(n) = (n) (n 1) and y (n) = 2 (n) + j (n 1) with two samples each. In particular, the sequence y (n) is complex-valued. Obviously, S = = = = x(n)y (n) n= x(0)y (0) + x(1)y (1) (1 2) + (1) (j ) 2+j Let us now arrive at this same result by means of Parsevals relation, which performs the calculations in the frequency domain. First note that X (ej ) = 1 ej , Y (ej ) = 2 + jej 371 and, hence, S 1 2 = SECTION 14.2 X (ej ) Y (ej ) USEFUL PROPERTIES d = 1 (1 ej ) (2 + jej ) d 2 1 (1 ej ) (2 jej )d, (the two terms j and ej are conjugated) 2 1 (2 jej 2ej + j )d 2 1 (2 + j ) ej 2jej 2 = (2 + j ) + 0 + 0 = (2 + j ) = = = = as expected. Example 14.15 (Evaluating integrals and series) Consider the DTFT of the rectangular pulse as established in Example 13.5: x(n) = 1, 0, 0nL1 otherwise DTFT L, X (ej ) = e j (L1) 2 sin L 2 , . sin 2 when = 0 otherwise According to Parsevals relation (14.19) the following equality holds: n= |x(n)|2 = 1 2 2 j X (e ) d 2 Using the fact that x(n) is a rectangular pulse of width L we have that its energy evaluates to n= |x(n)|2 = L1 (1)2 = L n=0 At the same time, the spectrum of x(n) is given by 2 sin2 L j 2 X (e ) = 2 sin 2 and we arrive at the following result: 1 2 sin2 (L/2) d = L sin2 (/2) In other words, Parsevals relation provides a useful way for evaluating some integral expressions by using the duality between the time and frequency domains. In a similar vein, let us consider the sinc sequence studied in Example 13.7, namely, x(n) = c /, c sin(c n) , c n n=0 n=0 DTFT j X (e ) = 1, 0, | | < c c | | 372 The energy of the sequence x(n) is given by CHAPTER 14 PROPERTIES OF THE DTFT c 2 = c 2 = Ex c 2 = + c n=,n=0 + c 2 sin2 (c n) 2 c n2 n=,n=0 c +2 2 2 n=1 sin2 (c n) 2 c n2 sin2 (c n) 2 c n2 At the same time, the spectrum of x(n) is given by 2 j X (e ) = 1 so that 1 2 over (c , c ) 2 j X (e ) d = c 1 2 d = c / c Using Parsevals relation (14.19) we arrive at the equality c 2 +2 c 2 n=1 sin2 (c n) 2 c n2 = c or, more compactly, n=1 sin2 (c n) 2 c n2 = ( c ) 2c In this case, Parsevals relation provides a useful way for evaluating some series expressions by using again the duality between the time and frequency domains. 14.3 UPSAMPLING AND DOWNSAMPLING We end this chapter by revisiting the discussion on upsampling and downsampling from Sec. 9.7 and by examining the effect of these operations on the DTFTs of the original sequences. 14.3.1 Upsampling Recall that starting from a sequence x(n), we may upsample it by a positive integer factor L and dene the sequence see Fig. 14.19: y (n) = x(n/L) 0 if n/L is integer otherwise (14.21) This operation amounts to inserting L 1 zeros between successive samples of x(n). We established earlier in Sec. 9.7 the z transformation result Y (z ) X zL (14.22) so that if we replace z by ej we arrive at the DTFT result Y (ej ) X ejL (14.23) 373 SECTION 14.3 x(n) y ( n) L UPSAMPLING AND DOWNSAMPLING FIGURE 14.19 Block diagram representation of upsampling by a factor of L. We therefore conclude that the DTFT of the upsampled sequence is compressed in frequency by a factor of L. In order to illustrate this effect, we consider the case L = 2 and refer to the DTFT X (ej ) that is shown in the top part of Fig. 14.20; the DTFT is displayed over an extended range of frequencies in order to highlight the presence of the images that are centered around 2 due to the 2 periodicity of the DTFT. Observe how the DTFT of the upsampled sequence, y (n), is compressed by a factor of 2 and, as a result, the images that were originally centered around 2 are now centered around . In this way, the DTFT of the upsampled sequence will exhibit new components within [, ] relative to the DTFT of the original sequence. X (ej ) 1 2 c c 2 (rad/sample) 2 (rad/sample) Y (ej ) 1 2 c 2 c 2 FIGURE 14.20 Illustration of the effect of upsamling on the DTFT of a sequence for the case L = 2. Observe how images are added within the range [, ] in the DTFT of the upsampled signal, y (n). The dotted lines highlight the portions of the DTFTs that lie within the range [, ]. Example 14.16 (Illustrating upsampling) Consider the sequence x(n) = 2 (n) + 2 (n 1) + (n 2) + (n 3) which was studied in Example 14.3 and shown in the top plot of Fig. 14.6. The magnitude and phase plots of the DTFT X (ej ) were displayed in Fig. 14.7 over the interval [, ]. We now 374 upsample the sequence x(n) by a factor of L = 2 to generate CHAPTER 14 y (0) = y (1) = 0 y (2) = x(1) = 2 y (3) = 0 y (4) = x(2) = 1 y (5) = 0 y (6) = x(3) = 1 y (7) = 0 y (8) . . . PROPERTIES OF THE DTFT x(0) = 2 = 0 . . . = Figure 14.21 shows the original and upsampled sequences x(n) and y (n) over the interval 0 n 14. All other samples of both sequences are zero. x(n) 2 1 0 0 1 2 3 4 5 6 7 n y(n) 8 9 10 11 12 13 14 0 1 2 3 4 5 6 7 n 8 9 10 11 12 13 14 2 1 0 FIGURE 14.21 The original sequence x(n) (top) and the upsampled sequence y (n) by a factor of L = 2 (bottom) over 0 n 14. Figure 14.22 shows the DTFT of x(n) and y (n) over the range [3, 3 ]. In Fig. 14.23 we limit the plots to the interval [, ]. Thus, observe how the plots that correspond to the upsampled sequence, y (n), are compressed relative to the original plots. In particular observe how, due to the compression that occurs in the frequency domain, parts of the periodic images of X (ej ) that are centered around = 2 appear now within the range [, ] in the DTFT of Y (ej ). Observe also that, in this example, the DTFT of x(n) extends between [, ] while its compressed image extends between [ L , L ], which for L = 2 corresponds to the interval [ , ]. 22 14.3.2 Downsampling magnitude plot 0.5 j X(e ) j 1 4 3 2 0 9 6 UPSAMPLING AND DOWNSAMPLING 0 0.5 1 1 3 0 3 6 (rad/sample) magnitude plot 1.5 9 6 9 6 3 0 3 6 (rad/sample) phase plot 9 3 0 3 6 (rad/sample) 9 1.5 1 4 0.5 j Y(e ) 5 j SECTION 14.3 1.5 5 |X(e )| 6 |Y(e )| 375 phase plot 3 2 0 0.5 1 1 9 6 3 0 3 6 (rad/sample) 1.5 9 6 9 FIGURE 14.22 The top gure shows the magnitude and phase plots of x(n) over [3, 3 ], while the bottom gure shows the resulting magnitude and phase plots when the sequence x(n) is upsampled by a factor of L = 2 to generate y (n). Recall further that starting from a sequence x(n), we may downsample it by a positive integer factor M and dene the sequence see Fig. 14.24: y (n) = x(M n) This operation amounts to retaining only samples of x(n) that occur at multiples of M and discarding all other samples. We established earlier in Sec. 9.7 the z transformation result Y (z ) = 1 M M 1 k X WM z 1/M (14.24) k=0 where WM denotes the M th root of unity, i.e., WM = ej 2/M (14.25) If we replace z by ej we arrive at the DTFT result Y (ej ) 1 M M 1 Xe j (2k) M (14.26) k=0 We therefore conclude that the DTFT of the downsampled sequence is expanded in frequency by a factor M . 376 magnitude plot 1.5 1 4 0.5 j X(e ) j |X(e )| 5 3 2 0 0.5 1 1 3 2 1 0 12 (rad/sample) magnitude plot 1.5 3 2 3 6 3 1 0 1 2 (rad/sample) 3 1 4 0.5 j Y(e ) j 1 0 12 (rad/sample) phase plot 1.5 5 |Y(e )| PROPERTIES OF THE DTFT phase plot 6 CHAPTER 14 3 2 0 0.5 1 1 3 2 1 0 1 2 (rad/sample) 3 1.5 3 2 FIGURE 14.23 The top gure shows the magnitude and phase plots of x(n) over [, ], while the bottom gure shows the resulting magnitude and phase plots when the sequence x(n) is upsampled by a factor of L = 2 to generate y (n). In the special case M = 2, the result specializes to Y (ej ) = = = 1 X ej/2 2 1 X ej/2 2 1 X ej/2 2 x(n) M + X ej/2 + X ej (+2)/2 + X ej (/2+) (14.27) y ( n) FIGURE 14.24 Block diagram representation of downsampling by a factor of M . In order to illustrate the effect of downsampling in the frequency domain, we consider the case L = 2 and refer to the DTFT X (ej ) that is shown in the top part of Fig. 14.25; the DTFT is displayed over an extended range of frequencies in order to highlight the presence of the images that are centered around 2 due to the 2 periodicity of the DTFT. The DTFT of the downsampled sequence is obtained by using (14.27). Observe how the DTFT of the downsampled sequence, y (n), is expanded by a factor of 2. 377 SECTION 14.4 X (ej ) APPLICATIONS 1 2 c c 2 (rad/sample) 2 (rad/sample) Y (ej ) 1/2 2 2 c 2c FIGURE 14.25 Illustration of the effect of downsampling on the DTFT of a sequence for the case L = 2. The dotted lines highlight the portions of the DTFTs that lie within the range [, ]. Example 14.17 (Illustrating downsampling) Consider the sequence x(n) = 2 (n) + 2 (n 1) + (n 2) + (n 3) which was studied in Example 14.3 and shown in the top plot of Fig. 14.6. The magnitude and phase plots of the DTFT X (ej ) were displayed in Fig. 14.7 over the interval [, ]. We now downsample the sequence x(n) by a factor of L = 2 to generate y (0) = x(0) = 2 y (1) = x(2) = 1 y (2) = x(4) = 0 Figure 14.26 shows the original and the downsampled sequences x(n) and y (n) over the interval 0 n 8. All other samples of both sequences are zero. Figure 14.27 shows the DTFT of x(n) and y (n) over the extended range [3, 3 ]. In Fig. 14.28 we limit the plots to the interval [, ]. Thus, observe that since the DTFT of x(n) extends over the entire range [, ], in this example we obtain interference among adjacent images while forming the combination (14.27) to arrive at Y (ej ). For this reason, the DTFT of y (n) over [, ] is not simply an expanded version of the DTFT of x(n) (as was the case with the illustration in Fig. 14.25) but rather a distorted version of it. 14.4 APPLICATIONS TO BE ADDED Practice Questions: 1. 378 x(n) CHAPTER 14 2 PROPERTIES OF THE DTFT 1 0 0 1 2 3 4 n y(n) 5 6 7 8 0 1 2 3 4 n 5 6 7 8 2 1 0 FIGURE 14.26 over 0 n 8. The original sequence x(n) (top) and the downsampled sequence y (n) (bottom) 2. 14.5 PROBLEMS Problem 14.1 Find the DTFTs of the following sequences: (a) x(n) = sin 3 n n . sin n 4 . n sin 6 n (c) w(n) = ej 4 n . n (d) z (n) = x(n)y (n) from parts (a) and (c). (b) y (n) = e j 4 (e) r (n) = x(n)y (n) from parts (a) and (c). (f) s(n) = x(n) y (n) from parts (a) and (c). Problem 14.2 Find the DTFTs of the following sequences: (a) (b) (c) (d) (n 1) x(n) = . n1 sin 6 (n 1) . y (n) = ej 4 n1 sin 8 n . w(n) = ej 3 n n z (n) = x(n)y (n) from parts (a) and (c). sin 3 (e) r (n) = x(n)y (n) from parts (a) and (c). (f) s(n) = x(n) y (n) from parts (a) and (c). magnitude plot 0.5 j j 1 4 SECTION 14.5 1.5 5 X(e ) 6 |X(e )| 379 phase plot 3 2 0 0.5 1 1 9 6 PROBLEMS 3 0 3 6 (rad/sample) magnitude plot 1.5 9 6 9 3 3 0 3 6 (rad/sample) phase plot 9 3 0 3 6 (rad/sample) 9 0.5 j Y(e ) |Y(ej)| 2.5 2 0 1.5 1 9 6 3 0 3 6 (rad/sample) 9 0.5 9 6 FIGURE 14.27 The top gure shows the magnitude and phase plots of x(n) over [3, 3 ], while the bottom gure shows the resulting magnitude and phase plots when the sequence x(n) is downsampled by a factor of L = 2 to generate y (n). In this example, since the DTFT of x(n) extends over the entire range [, ], we nd that interference occurs among adjacent images while forming the combination (14.27) to arrive at Y (ej ). Problem 14.3 Use Parsevals relation to determine the following quantities for the sequences in Prob. 14.1: (a) (b) (c) (d) (e) (f) n= n= n= n= n= n= |x(n)|2 . |w(n)|2 . |z (n)|2 . z (n). r (n). |s(n)|2 . Problem 14.4 Use Parsevals relation to determine the following quantities for the sequences in Prob. 14.2: (a) (b) (c) (d) (e) (f) n= n= n= n= n= n= |x(n)|2 . |w(n)|2 . |z (n)|2 . z (n). r (n). |s(n)|2 . Problem 14.5 Consider the same sequences given in Prob. 14.1. Find the DTFTs of the following variations: (a) x(2n). 380 magnitude plot phase plot 6 CHAPTER 14 PROPERTIES OF THE DTFT 1.5 1 4 0.5 j X(e ) j |X(e )| 5 3 2 0 0.5 1 1 3 2 1 0 1 2 (rad/sample) magnitude plot 1.5 3 2 3 3 1 0 1 2 (rad/sample) phase plot 3 1 0 1 2 (rad/sample) 3 0.5 j Y(e ) |Y(ej)| 2.5 2 0 1.5 1 3 2 1 0 1 2 (rad/sample) 3 0.5 3 2 FIGURE 14.28 The top gure shows the magnitude and phase plots of x(n) over [, ], while the bottom gure shows the resulting magnitude and phase plots when the sequence x(n) is downsampled by a factor of L = 2 to generate y (n). (b) y (2n). (c) w(3n). (d) z (2n). (e) cos 3 n n x(2n). (f) (1) y (2n). (g) sin 4 n n y (n). Problem 14.6 Consider the same sequences given in Prob. 14.2. Find the DTFTs of the following variations: (a) x(2n). (b) y (2n). (c) w(3n). (d) z (2n). (e) cos 3 n n x(2n). (f) (1) y (2n). (g) sin 4 n n y (n). Problem 14.7 Consider the same sequences given in Prob. 14.1. Find the DTFTs of the following variations: (a) upsample x(n) by a factor of 2 to get x (n). (b) upsample y (n) by a factor of 2 to get y (n). (c) upsample w(n) by a factor of 2 to get w (n). 381 (d) upsample z (n) by a factor of 2 to get z (n). SECTION 14.5 (e) x (n)y (n). Compare with (d). PROBLEMS Problem 14.8 Consider the same sequences given in Prob. 14.2. Find the DTFTs of the following variations: (a) upsample x(n) by a factor of 2 to get x (n). (b) upsample y (n) by a factor of 2 to get y (n). (c) upsample w(n) by a factor of 2 to get w (n). (d) upsample z (n) by a factor of 2 to get z (n). (e) x (n)y (n). Compare with (d). Problem 14.9 Let x(n) = e j n 3 sin 8 n n Find the DTFTs of the following sequences: (a) x(3n). (b) (1)n x(2n). (c) nx(2n). (d) x(n). (e) x(2n). (f) (1)n+1 x(n 2) cos 4 (n 1) . Problem 14.10 Let sin (n 1) 8 n x(n) = cos 4 n1 Find the DTFTs of the following sequences: (a) x(4n). (b) (1)n2 x(3n). (c) n2 x(2n). (d) x(n + 1). (e) x(3n). (f) (1)n1 x(n + 2) sin 2 (n 1) . Problem 14.11 Use the properties of the DTFT to establish the transform pair (n + 1)n u(n), || < 1 1 (1 ej )2 Problem 14.12 Establish the validity of the following DTFT relation x(2n + 1) 1 X (ej ) X (ej () 2 Problem 14.13 Let x(n) = sinc(n/3). Plot the DTFT of y (n) = (1)n x(n + 2) cos n 6 3 Problem 14.14 Determine the DTFT of the sequence x(n) = n sinc (n 1) 4 382 CHAPTER 14 PROPERTIES OF THE DTFT in two different ways: (a) by using the differentiation property of the DTFT and (b) by using the linearity and time-shift properties of the DTFT. Problem 14.15 Find and plot the DTFTs of the following sequences: 1 (a) x(n) = 8 sinc (b) y (n) = n 8 + 1 sinc 8 n 16 1 sinc2 n cos n 2 8 4 cos 1 4 3n 16 sinc . n 4 . (c) x(n)y (n). Problem 14.16 Find and plot the DTFTs of the following sequences: sin n 2 . (a) x1 (n) = (1)n n 2 sin 8 n . (b) x2 (n) = n (c) ej 2 n x2 (n) x1 (n 2). (d) x2 (n) cos 3 n. Problem 14.17 Let x(n) be a real-valued sequence. Show that its DTFT satises the symmetry property X (ej ) = X (ej () ) Problem 14.18 Show that the DTFT of the the sequence y (n) = x(n) x (n) is equal to the spectrum of x(n), which is dened as Y (ej ) = |X (ej )|2 Problem 14.19 Consider a sequence x(n) and let X (ej ) denote its DTFT. Establish the validity of the symmetry properties listed in Table 14.2. TABLE 14.2 Additional symmetry properties for the DTFT. sequence x(n) DTFT X (ej ) real-valued and even imaginary and odd real-valued and odd imaginary and even real-valued and even real-valued and odd imaginary and odd imaginary and even Problem 14.20 Can you express the DTFT of x(3n + 2) in terms of the DTFT of x(n)? Problem 14.21 Figure 14.29 shows the magnitude and phase plots of the DTFT of a real sequence x(n). Plot the DTFTs of the following sequences: (a) cos (b) cos 2 2 n n x(n). n+ 3 x(n). (c) (1) x(n). (d) xe (n), even part of the sequence x(n). (e) xo (n), odd part of the sequence x(n). Determine also the energy of the sequence x(n). Problem 14.22 The DTFT of a sequence x(n) is shown in Fig. 14.30. Answer the following questions without determining x(n). 383 X (ej ) SECTION 14.5 PROBLEMS 4 4 2 4 2 (rad/sample) FIGURE 14.29 DTFT plot for Prob. 14.21. (a) Find (b) Find n= x(n). n= (1) n x(n). (c) Find the energies of x(n) and nx(n). (d) Find x(0). (e) Find n= x(n) cos( n). 4 (f) Plot the DTFT of (1)n nx(n) sin 2 n. |X (ej )| 2 1 34 2 4 4 2 3 4 (rad/sample) X (ej ) 2 34 2 4 4 2 3 4 (rad/sample) 2 FIGURE 14.30 DTFT plot for Probs. 14.22, 14.23 and 14.24. Problem 14.23 For the same DTFT in Fig. 14.30, determine x(n). Plot also the DTFT of x(n) over the interval [0, 2 ] rather than [, ]. 384 CHAPTER 14 PROPERTIES OF THE DTFT Problem 14.24 Using the same DTFT in Fig. 14.30, plot the magnitude and phase responses of the modied DTFT: X (ej ) = ej (2+ 3 ) X (ej ). Is the corresponding inverse transform x (n) a real sequence? Problem 14.25 Consider the sequence x(n) = (0.5)n u(n). Evaluate the following quantities without nding X (ej ): (a) X (ej 0 ). (b) X (ej ). (c) 1 2 (d) 1 2 X (ej )d . |X (ej )|2 d . Problem 14.26 Find the sequence x(n) whose DTFT is given by X (ej ) = ej 1 1 2 ej 50 Problem 14.27 Evaluate the following series by using properties of the DTFT: n=1 cos n 4 and n2 n=2 sin n 8 n 2 Problem 14.28 Evaluate the following integral and series using properties of the DTFT: 0 sin (4 ) sin (3 ) d 1 cos2 2 and n=1 sin n 4 n 3 Problem 14.29 Let x(n) = n u(n) with || < 1. Evaluate the following ratio by using the properties of the DFTF: n2 x(n) n =0 n=0 x(n) Problem 14.30 Let x(n) = 2n u(n 1) with || < 1. Evaluate the following ratio by using the properties of the DFTF: 2 n=0 n x(n) n=0 nx(n) Problem 14.31 Consider the signal x(n) = cos[(1 2 )n] cos[(1 + 2 )n] 2 2 n2 where 1 = 3/4 and 2 = /2 (both measured in radians/sample). (a) Plot the DTFT of x(n). (b) Evaluate the sum S = n= (1) n x(n). CHAP T E R 15 Frequency Response S equences and systems can be studied in the frequency domain as opposed to the time domain and z -transform domains. In this chapter we explain what is meant by the frequency content of a sequence and the frequency response of an LTI system. In doing so, it will become clear that the DTFT plays a pivotal role in characterizing the frequency representations of signals and systems. Specically, we shall see that the DTFT of a sequence conveys important information about the frequency content of the sequence, while the DTFT of the impulse response sequence of a stable LTI system conveys important information about the frequency response of the system. 15.1 FREQUENCY CONTENT OF A SEQUENCE We rst explain how the DTFT of a sequence, x(n), conveys information about the frequency content of the sequence. Thus, consider a sequence x(n) and let X (ej ) denote its DTFT. Using the inversion formula (13.14) we know that x(n) and X (ej ) are related as follows: x(n) = 1 2 X (ej )ej n d ( 1 5 .1 ) We now approximate the integral expression on the right-hand side by means of a nite sum. We divide the interval [ , ] into 2N subintervals of width each where (see Fig. 15.1): = 2 = radians 2N N ( 1 5 .2 ) and N is large enough for to be sufciently small. 0 (rad/sample) FIGURE 15.1 The interval [ , ] is subdivided into small intervals of width each. 385 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 386 Then we can write CHAPTER 15 FREQUENCY RESPONSE x(n) 1 2 N X (ejk )ejkn k = N N = k = N 1 X (ejk ) ejkn 2 (15.3) where and d in (15.1) has been replaced by k and , respectively. Expression (15.3) indicates that the sequence x(n) can be approximated as a linear combination of exponential sequences of the form ejkn ; each with angular frequency k . The scaling coefcients of the linear combination are given by 1 X (ejk ), k = N, . . . , 0, . . . , N 2 (15.4) Each of the factors in (15.4) provides an indication of the strength of the contribution of the corresponding exponential sequence to the formation of x(n). We therefore say that the DTFT of x(n) provides information about the frequency content of x(n): angular frequencies with large magnitude values |X (ej )| contribute more strongly to the sequence x(n) than angular frequencies with smaller magnitude values |X (ej )|. Example 15.1 (Illustrating the frequency content of a sequence) Consider the sequence 1 sinc n 4 4 We already know from Table 13.1 that the DTFT of x(n) is given by x(n) = j X (e ) = 1, 0, | | /4 otherwise The DTFT of x(n) is real-valued and is shown in Fig. 15.2 over the range [, ]. We observe that over this range of frequencies, only angular frequencies that lie within [ , ] contribute to the 44 formation of x(n), as is also evident from the inversion formula x(n) = 1 2 /4 ejn d /4 In this situation, all exponential sequences of the form ejn , for values of [ , ], contribute 44 at the same strength level towards x(n). Now recall from the discussion that led to Fig. 3.8 that angular frequencies close to are termed high frequencies, while angular frequencies close to 0 are termed low frequencies. We therefore say that the sequence x(n) in this example is a low-frequency content sequence. This is because most of its DTFT is concentrated closer to the lower frequency range. Consider further the sequence y (n) whose DTFT is illustrated in Fig. 15.3 over the range [p, ]. It is seen from the gure that angular frequencies in the range [ , ] contribute equally to the 44 frequency content of y (n). On the other hand, angular frequencies in the range [ , 34 ] contribute 4 less heavily and with diminishing relevance to the frequency content of y (n); likewise for the angular frequencies in the range [ 34 , ]. We therefore say that the frequency content of the sequence 4 y (n) is concentrated in the range [ 34 , 34 ], with higher emphasis for the range [ , ]. 44 387 SECTION 15.1 X (ej ) FREQUENCY CONTENT OF A SEQUENCE 1 4 4 (rad/sample) 1 FIGURE 15.2 Frequency content of the sequence x(n) = 4 sinc 4 n. Y (ej ) 1 3 4 4 3 4 4 (rad/sample) FIGURE 15.3 Frequency content of a sequence y (n). Example 15.2 (Exponential sequence) Consider the exponential sequence x(n) = n u(n), || < 1 According to Table 13.1, its DTFT is given by X (ej ) = 1 1 ej This DTFT is a complex-valued function of ; it has both real and imaginary parts. To determine these parts, we assume for simplicity that is real-valued. Then we can write X (ej ) = = = = 1 1 ej j 1 e 1 ej j 1 e 1 + 2 2 cos 1 cos j sin 1 + 2 2 cos 1 cos sin j 1 + 2 2 cos 1 + 2 2 cos so that the real and imaginary components of X (ej ) are given by XR (ej ) = 1 cos , 1 + 2 2 cos XI ( ) = sin 1 + 2 2 cos Consequently, the magnitude and phase components of X (ej ) are given by CHAPTER 15 |X (ej )| FREQUENCY RESPONSE |XR (ej )|2 + |XI (ej )|2 1 1 + 2 2 cos = = and = arctan XI (ej ) XR (ej ) = X (ej ) arctan sin 1 cos The resulting plots are shown in Fig. 15.4 for the case = 1/2. It is seen that the exponential sequence x(n) = (0.5)n u(n) is mainly a low-frequency content signal since lower angular frequencies contribute more heavily to the formation of x(n). magnitude plot phase plot |X(ej)| 2 0.5 1.5 X(ej) 388 1 0.5 3 2 1 0 1 2 (rad/sample) 0 0.5 3 2 3 1 0 1 2 (rad/sample) 3 FIGURE 15.4 Plots of the magnitude and phase of the DTFT of x(n) = (0.5)n u(n). 15.2 FREQUENCY RESPONSE OF AN LTI SYSTEM The DTFT is also useful in characterizing the so-called frequency response of stable LTI systems. Thus, let h(n) denote the impulse response sequence of a stable LTI system. We dened earlier in Sec. 11.1 the transfer function of the system as the z transform of h(n), namely, h(n)z n H (z ) = (15.5) n= over all values of z belonging to the corresponding ROC of H (z ). Since the system is assumed to be BIBO stable, its ROC must include the unit circle, |z | = 1. Therefore evaluating H (z ) at any point z = ej on the unit circle gives the DTFT of h(n): H (ej ) = h(n)ejn (15.6) n= We refer to H (ej ) as the frequency response of the LTI system. Alternatively, we say that the frequency response of a stable LTI system is the DTFT of its impulse response sequence. As such, the frequency response and the transfer function of any stable LTI system are related via H (ej ) = H (z )|z=ej (15.7) The reason for the name frequency response is motivated as follows. Assume we excite the LTI system with some exponential sequence, say, x(n) = ejo n (15.8) at some angular frequency o [, ]. Then the resulting output sequence will be given by the convolution sum: y (n) = k= h(k )x(n k ) h(k )ejo (nk) = k= = ejo n h(k )ejo k k= = ejo n H (ejo ) (15.9) This result shows that the same exponential sequence, ejo n , appears at the output of the LTI system; albeit scaled by the value of the frequency response at = o see Fig. 15.5. This conclusion is a special case of the result we obtained earlier in (11.2) while discussing the concept of eigenfunctions of LTI systems. The value H (ejo ) represents the amount of scaling that the LTI system performs on the exponential input sequence whose angular frequency is o . For instance, if H (ej ) happens to be zero at = o , then the output sequence, y (n), will be zero. Likewise, if H (ejo ) = 0.5ej 4 , then the output sequence, y (n), will be obtained by scaling x(n) = ejo n by 1/2, and adding /4 to its phase so that y (n) = 1 j (o n + ) 1 j 4 , when H (ejo ) = e e4 2 2 ejo n H (ej ) H (ejo ) ejo n FIGURE 15.5 An exponential sequence at the angular frequency o is scaled by the value of the frequency response at this same frequency, H (ejo ), as its passes through a stable LTI system. We therefore say that the frequency response of a stable LTI system at any particular angular frequency determines how the system responds to an exponential input sequence at that same frequency. In general, the scaling factor H (ejo ) is complex-valued and, accordingly, the input sequence x(n) = ejo n will not only have its magnitude modied but its phase as well, as illustrated in the above example. Let us express H (ejo ) in polar form as jo (15.10) H (ejo ) = |H (ejo )| ej H (e ) 389 SECTION 15.2 FREQUENCY RESPONSE OF AN LTI SYSTEM 390 Then CHAPTER 15 FREQUENCY RESPONSE y (n) = H (ejo n ) ejo n jo = |H (ejo )| ej H (e ) ejo n jo = |H (ejo )| ej (o n + H (e )) (15.11) That is, the response of the stable LTI system to ejo n is given by ejo n |H (ejo )| ej (o n+H (e jo )) (15.12) so that both the magnitude and phase of the input sequence ejo n are modied. In the sequel, we shall refer to the functions |H (ej )| and H (ej ) as the magnitude and phase responses of the system: |H (ej )| j H (e ) = magnitude response (15.13) = phase response (15.14) These functions are also generally specied over 2 -wide intervals such as [, ]. Stable LTI Systems We remark that the concept of a frequency response is being dened here for stable LTI systems, i.e., for systems with absolutely summable impulse response sequences, h(n), for which the DTFT in (15.6) converges uniformly. Although, as we saw earlier in Sec. 13.4, the DTFT can be dened for sequences h(n) that are not necessarily absolutely summable (e.g., square-summable sequences h(n) will do), these sequences do not correspond to BIBO stable LTI systems. Most of our discussions will focus on stable LTI systems, although at times we shall consider square-summable impulse-response sequences as well (e.g., when studying ideal lter responses see Example 15.5 ). It is worth noting here that the concept of transfer functions of LTI systems is more general than the concept of frequency responses since the former can be used to describe both stable and unstable LTI systems. Example 15.3 (Sinusoidal input) Consider a stable LTI system with a real-valued impulse response sequence, h(n), and frequency response, H (ej ). Assume the system is excited with the sinusoidal signal x(n) = cos(o n + o ) Using Eulers relation we can write x(n) = 1 1 j (o n+o ) e + ej (o n+o ) 2 2 x(n) = 1 jo jo n 1 ee + ejo ejo n 2 2 or, equivalently, (15.15) 391 It follows, by linearity and from (15.12), that the response of the system is given by y (n) = jo jo 1 1 jo jo n ) ee |H (ejo )| ej H (e ) + ejo ejo n |H (ejo )| ej H (e 2 2 This expression can be further simplied by using the fact that h(n) is real-valued. In this case, we know that |H (ej )| is an even function of and H (ej ) is an odd function of (recall (14.17)). That is, it holds that |H (ejo )| = |H (ejo )| and H (ejo ) = H (ejo ) so that, by grouping terms in the expression for y (n) and applying Eulers relation again, y (n) = |H (ejo )| cos o n + o + H (ejo ) (15.16) In other words, we obtain the same sinusoidal sequence at the output of the system with its amplitude scaled by |H (ejo )| and its phase adjusted by H (ejo ). To illustrate this result, consider a stable LTI system with impulse response sequence h(n) = 1 1 (n + 1) + (n 1) 2 2 Its frequency response is given by H (ej ) = 0.5ej + 0.5ej = cos The response of this system to the input sequence x(n) = cos n 3 is therefore 1 cos n 2 3 since H (ej/3 ) = cos(/3) = 1/2. On the other hand, the response to y (n) = x(n) = cos n + is y (n) = cos n + + 4 4 = cos n + 5 4 since H (ej ) = cos( ) = 1 = ej . Finally, by linearity, the response to x(n) = cos is n + cos n + 3 4 5 1 n + cos n + y (n) cos 2 3 4 SECTION 15.2 FREQUENCY RESPONSE OF AN LTI SYSTEM 392 CHAPTER 15 FREQUENCY RESPONSE Example 15.4 (Filtering) We showed earlier in (15.3) that a sequence x(n) with DTFT X (ej ) can be approximated as a linear combination of complex exponentials as follows: x(n) N 1 X (ejk ) ejkn 2 k = N (15.17) where = /N . Now consider a stable LTI system with frequency response H (ej ). Each input complex exponential sequence of the form ejkn , k = N, . . . , 0, . . . , N generates a response of similar form when it is fed into H (ej ), namely, ejkn ejkn H (ejk ) If we express the frequency response at k in polar form, say, jk H (ejk ) = |H (ejk )| ej H (e ) then we have that the exponential sequence ejkn is mapped into ejkn jk |H (ejk )| ej (kn + H (e )) Let us now examine what happens when the sequence x(n) is fed into the system H (ej ). Since x(n) is approximated in (15.17) as a linear combination of the exponential sequences ejkwn , then by invoking the linearity of the LTI system, we nd that x(n) will be mapped into the output sequence: y (n) N k = N jk )+ X (ejk )) |X (ejk )| |H (ejk )| ej (kn+ H (e 2 (15.18) where we introduced the polar representation jk X (ejk ) = |X (ejk )| e X (e ) Construction (15.18) shows that the output sequence is composed of a combination of exponential sequences whose magnitudes are scaled by the coefcients |X (ejk )| |H (ejk )| 2 and whose phases are adjusted by the values H (ejk ) + X (ejk ) We conclude that a stable LTI system modies each frequency component, ejkn , of the input signal via scaling and phase-change, and then combines all components together to arrive at y (n). This construction provides a useful frequency-domain interpretation for the operation of a system and we refer to the mapping from x(n) into y (n) as a ltering operation. In order to illustrate this point, consider the sequence x(n) = 1 sinc n 2 2 whose DTFT is shown in the top plot of Fig. 15.6. Now assume we feed this sequence through an LTI system whose frequency response is the one indicated in the middle plot of the same gure. 393 Obviously, the output sequence is given by the linear convolution SECTION 15.2 y (n) = x(n) h(n) and, as expected, the frequency content of y (n) is obtained from multiplying the individual DTFTs: Y (ej ) = H (ej )X (ej ) The corresponding plot is the bottom plot in Fig. 15.6. In particular, observe that while the frequency content of x(n) is at over the range [ , ], these same frequency components in y (n) appear 42 with different scalings as evidenced by the linear inclination in the graph of Y (ej ) over [ , ]. 42 We remark in passing that in this example, if desired, the sequence y (n) can be recovered from the inversion formula 1 y (n) = Y (ej )ejn d 2 which can be evaluated by dividing the integral into several integrals over smaller intervals as follows: y (n) = 1 2 /4 /2 + 3 4 1 2 ejn d + /2 3 4 /4 + (rad/sample) 1 2 /4 (rad/sample) (rad/sample) ejn d + /4 jn e d 2 and the evaluation completed to nd y (n). X (ej ) 1 2 2 H (ej ) /2 3 4 4 3 4 4 Y (ej ) /2 /4 2 2 FIGURE 15.6 DTFT of the output sequence (bottom plot) for a stable LTI system whose frequency response is described by the middle plot and input sequence is described by the top plot. FREQUENCY RESPONSE OF AN LTI SYSTEM 394 CHAPTER 15 FREQUENCY RESPONSE Example 15.5 (Low-pass lter) Consider the DTFT shown in Fig. 15.7 over [ , ]: 1, 0, j H (e ) = |w| < wc wc |w| In the gure, the DTFT is equal to one over the interval [c , c ] and is zero elsewhere. This DTFT cannot be the frequency response of a stable LTI system. Indeed, if the system were stable, then its impulse response sequence would need to be absolutely summable. When this happens, the DTFT would be uniformly convergent and, from the discussion in Sec. 13.2, the DTFT would need to be a continuous function of . Since the DTFT in Fig. 15.7 is discontinuous at c we conclude that the corresponding LTI system is not BIBO stable. Nevertheless, we shall refer to H (ej ) as the frequency response of an ideal low-pass lter. This is because the frequency components of any input sequence, x(n), that lie outside the range [c , c ] are ltered out by H (ej ) and will not appear in the output sequence, y (n). H (ej ) 1 c c (rad/sample) FIGURE 15.7 A plot of the DTFT for Example 15.5. Example 15.6 (Steady-state response to sinusoidal excitations) Let us examine the response of a system that is not LTI but is described by a constant-coefcient difference equation. Thus, consider a causal system that is described by the difference equation y (n) ay (n 1) = x(n), n 0, y (1) = and assume |a| < 1. As we already know (see, e.g., the discussion in Sec. 4.9), this difference equation does not describe an LTI system because of the initial condition. We now excite the system with the exponential sequence x(n) = ej o n u(n) where the step sequence, u(n), ensures that the input sequence is applied over the interval n 0 over which the system is dened. We proceed to determine the response of the system. Recall from Sec. 8.6 that the output sequence can be expressed as the sum of the zero-input response and the zero-state response of the system, namely, y (n) = yz i (n) + yz s (n) Recall further that the zero-input response is described in terms of the modes of the system. In this case, the system has a single mode at = a. Therefore, the zero-input response has the form yzi (n) = Can for some constant C to be determined in order to satisfy the initial condition yzi (1) = . This leads to C = a so that yzi (n) = an+1 , n 1 Let us now determine the zero-state response. To do so, we assume for this step that the system is relaxed and, hence, LTI. Then, the zero-state response can be found by using the z -transform representation: Yzs (z ) = H (z )X (z ) where H (z ) = z , za X (z ) = z , z ejo and Therefore, |z | > |a| |z | > 1 z2 , (z a)(z ejo ) Using partial fractions expansion we obtain Yzs (z ) = Yzs (z ) = z a ejo |z | > 1 a ejo za z ejo so that, by inverse transformation, the sequence yzs (n) over n 0 is given by yzs (n) = 1 1 an+1 u(n) ejo (n+1) u(n) a ejo a ejo Combining with the result for yzi (n) we arrive at the desired expression for the output sequence over n 0: 1 an+1 ejo (n+1) , n 0 y (n) = an+1 + a ejo which is equivalent to y (n) = + 1 an+1 u(n) + H (ejo )ejo n u(n) a ejo where ejo ejo a Observe that the expression for y (n) consists of two terms. The rst term on the right-hand side is a transient term that dies out as n since |a| < 1. The second term on the right-hand side determines the steady-state response of the system, namely, H (ej ) = H (z )|z =ejo = yss (n) = lim y (n) = H (ejo )ejo n n In comparison with (15.9), we now nd that H (ejo )ejo n has the interpretation of being the steadystate response of the system after the transient component has died out. For illustration purposes, the same conclusion can be obtained by resorting to the unilateral z transform technique. Indeed, using y (1) = and starting from the given difference equation, we can write a X + (z ) + , |z | > |a| Y + (z ) = 1 az 1 1 az 1 Using z X + (z ) = , |z | > 1 z ejo 395 SECTION 15.2 FREQUENCY RESPONSE OF AN LTI SYSTEM 396 CHAPTER 15 FREQUENCY RESPONSE we get z2 az , + (z a ) (z e j o ) za which by partial fractions is equal to Y + (z ) = Y + (z ) = z a e j o z z za z e j o |z | > 1 + az za It then follows by inverse transformation that y (n) = an+1 + 1 an+1 ej o (n+1) a e j o , n0 which is equivalent to y (n) = + 1 an+1 + H (ej o )ej o n a e j o and the argument continues as before. Example 15.7 (Geometric Interpretation) It is useful to get some further insight into the frequency response of a stable LTI system by examining its pole-zero diagram. To see this, let us consider a simple example that is described by the transfer function z z1 H (z ) = z p1 with a zero at z1 and a pole at p1 . Since this is a rational transfer function, we know that the ROC is either |z | > |p1 | or |z | < |p1 |. However, by the assumption of stability, the ROC must include the unit circle. Therefore, if we assume that |p1 | < 1, then the ROC is given by |z | > |p1 |. Im ejo x ej1 X y p1 z1 Re FIGURE 15.8 Vectors x and y for two different angular frequencies o and 1 . Now for any value of in the range [ , ], the complex number ej represents a point on the unit circle at an angle relative to the positive horizontal axis. Let us pick any o and let x and y denote the vectors connecting the points z1 and p1 to the point ejo , respectively. The frequency response at ejo is then given by ejo z1 |x|ej x H (ejo ) = jo = e |y |ej y p1 so that |H (ejo )| = |x| |y| and H (ejo ) = x y In other words, the magnitude response at o is seen to be the ratio of the magnitude of x to the magnitude of y . Likewise, the phase response at o is seen to be the phase of x minus the phase of y. This construction suggests that the magnitude response of the LTI system will be relatively small for points o that are close to the location of its zero, since in that case the vector x will generally have small magnitude compared to the vector y. Likewise, the magnitude response will be large for points o that are close to the location of the pole. This conclusion also holds for more general transfer functions with multiple zeros and poles. Decibel Plots It is common to plot the magnitude response of an LTI system by using a log magnitude scale known as decibels (abbreviated dB). In this case, the plot would show the quantity 20 log10 |H (ej )| (dB) (15.19) versus the frequency variable in radians/sample. Table 15.1. lists some of the correspondences between the linear and dB scales. TABLE 15.1 Some values of |H (ej )| and their dB values. |H (ej )| 1 2 2 1/ 2 1/2 10 dB value 0 dB 3 dB 6 dB 3 dB 6 dB 20 dB Example 15.8 (Exponential sequence) Consider a stable LTI system with impulse response sequence x(n) = n u(n), || < 1 From the argument in Example 15.2 we know that the magnitude response is given by 1 |H (ej )| = 2 2 cos( ) 1+ Figure 15.9 plots this magnitude response using both the linear scale and the dB scale for = 1/2. 397 SECTION 15.3 FREQUENCY RESPONSE OF AN LTI SYSTEM 398 linear scale dB scale 2 1.5 j |H(e )| FREQUENCY RESPONSE 6 |H(ej)| (dB) CHAPTER 15 1 4 2 0 2 0.5 3 2 1 0 1 2 (rad/sample) 3 4 3 2 1 0 1 2 (rad/sample) 3 FIGURE 15.9 Plots of the magnitude response of an LTI system using the linear scale (left) and the dB scale (right) for H (ej ) = 1/(1 0.5ej ). 15.3 LINEAR TIME-INVARIANT SYSTEMS As was the case with transfer functions in Chapter 11, the frequency response of LTI systems that are described by constant-coefcient difference equations can be deduced directly from the difference equations without determining rst the corresponding impulse response sequences. Example 15.9 (Finding a frequency response) Consider a relaxed and causal system that is described by the difference equation y (n) 1 y (n 1) = x(n) 2 Since the system is relaxed, and since this is a constant-coefcient difference equation, we know that the system is LTI. We also know that the system is stable and we evaluated its transfer function earlier in Example 11.2: 1 H (z ) = , |z | > 1/2 1 1 z 1 2 The ROC is {|z | > 1/2} since it must be the exterior of a disc by causality, must include the unit circle by stability, and must exclude the pole at z = 1/2. We can now nd the frequency response of the system by evaluating H (z ) at z = ej , which results in H (ej ) = 1 1 1 2 ej Alternatively, we can proceed directly from the difference equation. We evaluate the DTFTs of all terms on both sides of the equation, and use the properties of the DTFT, to obtain the following algebraic equation: 1 Y (ej ) ej Y (ej ) = X (ej ) 2 Here, Y (ej ) denotes the DTFT of the sequence y (n) and X (ej ) denotes the DTFT of the sequence x(n). The sequences {x(n), y (n)} denote an arbitrary input-output pair satisfying the difference equation. The useful fact to note is that the original constant-coefcient difference equation has now been transformed into a purely algebraic equation in the transform domain. The algebraic equation can be solved to yield an expression for Y (ej ) in terms of X (ej ), namely, Y (ej ) 1 = 1 X (ej ) 1 2 ej This ratio holds for any input-output pair {Y (ej ), X (ej )}. As such, we claim that the ratio Y (ej )/X (ej ), of the output DTFT divided by the input DTFT, should coincide with the frequency response H (ej ) of the LTI system. To see this, assume x(n) = (n) then, by denition, y (n) = h(n). Hence, if X (ej ) = 1 then Y (ej ) = H (ej ). Substituting into the above relation gives H (ej ) = 1 1 1 2 ej as expected. The above example suggests an alternative way for determining the impulse response sequence of an LTI system that is described by a constant-coefcient difference equation: we use the difference equation to determine the frequency response, H (ej ), and then inverse transform H (ej ) to nd h(n). Example 15.10 (Finding an impulse response sequence) Consider the same causal LTI system from the previous example, which is described by the relaxed equation 1 y (n) y (n 1) = x(n) 2 We already determined its frequency response as H (ej ) = 1 1 1 2 ej The inverse DTFT is the impulse response sequence and, from Table 13.1, it is given by h(n) = (0.5)n u(n) Example 15.9 also suggests a method for determining a description for an LTI system in terms of a constant-coefcient difference equation from knowledge of its impulse response sequence or, equivalently, its frequency response. 399 SECTION 15.3 LINEAR TIME INVARIANT SYSTEMS 400 Example 15.11 (Determining a difference equation) CHAPTER 15 FREQUENCY RESPONSE Consider the causal LTI system with frequency response H (ej ) = 1 1 1 2 ej and let us determine an input-output description for the system in terms of a constant-coefcient difference equation. We know that the DTFTs of any input-output pair {x(n), y (n)} should satisfy the relation Y (ej ) 1 = 1 X (ej ) 1 2 ej Cross-multiplying we get Y (ej ) 1 1 j = X (ej ) e 2 and using the properties of the DTFT we arrive via inverse transformation at the difference equation y (n) 1 y (n 1) = x(n) 2 The system is assumed relaxed to ensure it is LTI. Also, the difference equation runs forward in time to ensure causality. We can also use the frequency response of an LTI system to determine its response to arbitrary input sequences. Thus, let x(n) denote the input sequence to an LTI system with impulse response sequence h(n). We already know from Sec. 5.1 that the response sequence, say y (n), is determined via the convolution sum y (n) = x(n) h(n) = k= x(k )h(n k ) (15.20) so that from the convolution property (14.10) of the DTFT we have Y (ej ) = X (ej )H (ej ) (15.21) The result states that the response of the LTI system can be determined via inverse transformation of the product X (ej )H (ej ). Example 15.12 (Evaluating the response sequence) Consider again the same causal and relaxed system from Example 15.9 and let us determine its response to the input sequence x(n) 1 3 = = 1 3 n u(n 1) 1 3 n1 u(n 1) We already know that the frequency response of the system is given by H (ej ) = 1 1 1 2 ej 401 On the other hand, the DTFT of the input sequence is SECTION 15.4 X (ej ) = 1 3 ej 1 1 ej 3 IDEAL FILTERS It follows that the DTFT of the output sequence is 1 1 j 1 2e Y (ej ) = X (ej )H (ej ) = 1 1 j e 3 1 3 ej We can inverse-transform Y (ej ) by using the partial fractions method (recall Sec. 13.5). We determine constants A and B to satisfy the partial fractions expansion Y (ej ) = A B + 1 1 1 2 ej 1 3 ej By comparing coefcients of powers of ej in the numerators on both sides of the above equality we nd that A = 2 and B = 2. Therefore, Y (ej ) = 2 2 1 1 1 2 ej 1 3 ej By inverse transforming we obtain y (n) = 2 1 2 n 1 3 n u(n) 15.4 IDEAL FILTERS We end the chapter by dening the class of ideal lters. As anticipated earlier in Example 15.5, the frequency responses outlined below will not correspond to stable LTI systems. However, these lters generally serve as references for lter design and will be used extensively later in Chapters 2628. Ideal Low-Pass Filter An ideal low-pass lter is an LTI system whose frequency response is assumed to be of the form: Hlp (ej ) = Aejko , 0, | | c otherwise (15.22) where c < is called the cutoff frequency. It is seen that the magnitude response is constant and equal to A over the interval [c , c ], while the phase response is linear over the same interval with slope dictated by the value of ko . The range of frequencies [c , c ] is called the passband region, and the interval over which the magnitude of the frequency response is zero is called the stopband region. We therefore nd that an ideal low-pass lter attenuates high frequency components and leaves intact, apart from a delay, low frequency components. The frequency response of an ideal low-pass lter is illustrated in Fig. 15.10. 402 CHAPTER 15 |Hlp (ej )| FREQUENCY RESPONSE A c c (rad/sample) Hlp (ej ) = ko c c (rad/sample) slop e ko FIGURE 15.10 The magnitude and phase responses of an ideal low-pass lter assuming ko > 0. The slope of the phase plot is ko over | | c . Example 15.13 (Impulse response of an ideal low-pass lter) Let us determine the impulse response sequence of the ideal low-pass lter Hlp (ej ) dened by (15.22). For this purpose, we recall from Table 13.1 the DTFT pair sin c n x(n) = n j X (e ) = 1, 0, | | c otherwise Therefore, by invoking the time-delay property (14.4) of the DTFT we conclude that Hlp (ej ) h(n) = A sin c (n ko ) ( n ko ) Observe that h(n) is a noncausal sequence and, therefore, is physically unrealizable. Moreover, the sequence h(n) is square-summable but not absolutely summable. Hence, the ideal low-pass lter is not a BIBO stable system. Ideal High-Pass Filter In a similar vein, an ideal high-pass lter is an LTI system whose frequency response is assumed to be of the form: Hhp (ej ) = Aejko , 0, c | | otherwise (15.23) where c < is again called the cutoff frequency. It is seen that the magnitude response is constant and equal to A over the intervals [, c] and [c , ], while the phase response is linear over these intervals with slope dictated by the value of ko . The interval | | c is called the passband region. We therefore nd that an ideal high-pass lter attenuates low frequency components and leaves intact, apart from a delay, high frequency components. The frequency response of an ideal high-pass lter is illustrated in Fig. 15.11. |Hhp (ej )| A c c (rad/sample) Hhp (ej ) = ko c c (rad/sample) slop e ko FIGURE 15.11 The magnitude and phase responses of an ideal high-pass lter assuming ko > 0. The slope of the phase plot is ko over | | c . Ideal Band-Pass Filter An ideal band-pass lter is an LTI system whose frequency response is assumed to be of the form Aej ko , 1 | | 2 Hbp (ej ) = ( 1 5 .2 4 ) 0, otherwise where {1 < } and {2 < } are called the cut-off frequencies. It is seen that the magnitude response is constant and equal to A over the intervals [1 , 2 ] and [2 , 1 ], while the phase response is linear over these intervals with slope dictated by the value of ko . The interval 1 | | 2 is called the passband region. We therefore nd that an ideal band-pass lter leaves intact, apart from a delay, frequency components that lie within its passband region. The frequency response of an ideal band-pass lter is illustrated in Fig. 15.12. Ideal Band-Stop Filter Finally, an ideal band-stop lter is an LTI system whose frequency response is assumed to be of the form Hbp (ej ) = Aej ko , 0, | | 1 and 2 | | otherwise ( 1 5 .2 5 ) where {1 < } and {2 < } are called the cut-off frequencies. It is seen that the magnitude response is constant and equal to A over the intervals [1 , 1 ], [ , 2 ], and [2 , ], while the phase response is linear over these intervals with 403 SECTION 15.4 IDEAL FILTERS 404 CHAPTER 15 FREQUENCY RESPONSE |Hbp (ej )| A 2 1 1 2 (rad/sample) Hbp (ej ) = ko 1 2 2 1 (rad/sample) slop e ko FIGURE 15.12 The magnitude and phase responses of an ideal band-pass lter assuming ko > 0. The slope of the phase plot is ko over 1 | | 2 . |Hbs (ej )| A 2 1 1 2 (rad/sample) Hbs (ej ) = ko 1 2 1 2 (rad/sample) slop e ko FIGURE 15.13 The magnitude and phase responses of an ideal band-stop lter assuming ko > 0. The slope of the phase plot is ko over the intervals | | 1 and | | 2 . slope dictated by the value of ko . The frequency response of an ideal band-stop lter is illustrated in Fig. 15.13. 405 SECTION 15.5 Example 15.14 (Location of poles and zeros) REALIZABLE FILTERS From the earlier geometric interpretation of the frequency response of an LTI system in Example 15.7 we can conclude that the poles of an ideal low-pass lter should be located close to = 0, while its zeros should be located close to = . Likewise, the poles of a high pass lter should be located close to = , while its zeros should be located close to = 0. 15.5 REALIZABLE FILTERS Ideal lters will serve as useful points of reference for practical lter design (as will be discussed later at some length in Chapters 2628). In practice we are mainly interested in designing lters that correspond to realizable LTI implementations. This means that we would like the resulting lters to be LTI systems that are both stable and causal. The stability property ensures that the lter output remains bounded for bounded inputs. And the causality property ensures that the lter output does not depend on future input samples. Now, recall that an LTI system is stable if, and only if, its impulse response sequence, h(n), is absolutely summable. Recall further that the absolute summability of h(n) ensures the uniform convergence of its DTFT, H (ej ). As such, and according to the discussion in Sec. 13.2, the uniform convergence of H (ej ) implies that the frequency response of stable LTI systems must be a continuous function of . Therefore, the ideal lter responses described in the previous section for low-pass, high-pass, band-pass, and band-stop characteristics, cannot correspond to stable lters; this is because their ideal frequency responses exhibit sharp discontinuous transitions. Still, as we shall see in Chapters 2628, these ideal responses can serve as useful starting points for designing implementable lters whose frequency responses will not be idea, but will be good approximations for the ideal case. Figure 15.14 compares an ideal frequency response with a realizable frequency response; the latter exhibits smooth transitions. H (ej ) (ideal) H (ej ) (approximation) 1 1 c c c c FIGURE 15.14 An illustration of an ideal low-pass lter response (left) and an approximate lowpass lter response (right) with smooth transitions around c . Moreover, the causality requirement for realizable lters means that the impulse response sequence, h(n), should be causal, i.e., h(n) = 0 over n < 0. When this condition is coupled with the stability requirement, then the two conditions (of causality and stability) translate into a requirement on the frequency response of a realizable system known as the Paley-Wiener condition. The condition states that the frequency response, H (ej ), of 406 a realizable lter should satisfy: CHAPTER 15 FREQUENCY RESPONSE ln |H (ej | d < (Paley-Wiener condition) (15.26) That is, the integral of the absolute log of the magnitude response is bounded over the interval [, ]. It therefore follows from the Paley-Wiener condition that while the frequency response can assume zero values at some isolated (discrete) frequencies, it cannot be zero over a continuous range of frequencies. This is because the function ln |H (ej | would be divergent over that range of frequency and the condition (15.26) will then be violated. With regards to the transfer function, H (z ), of a stable and causal LTI system we note that stability means that the ROC must include the unit circle, |z | = 1, while causality means that the ROC must be the outside of a disc (since h(n) is a right-sided sequence). Therefore, the ROC of a realizable system must be of the form: ROC = {|z | > } for some 0 < 1 (15.27) Now since the ROC must exclude all poles of H (z ), we conclude that all poles of a realizable H (z ) must lie inside the unit circle. 15.6 APPLICATIONS TO BE ADDED Practice Questions: 1. 2. 15.7 PROBLEMS Problem 15.1 Find the frequency components that are present in each of the following sequences: (a) x(n) = sin (b) x(n) = (c) x(n) = (d) x(n) = n + 2 cos 6 sin n + + 6 4 sin2 6 n . 4 sin4 n . 6 3 n. 2 cos 3 n+ 6 . Problem 15.2 Find the frequency components that are present in each of the following sequences: (a) x(n) = sin (b) x(n) = sin (c) x(n) = (d) x(n) = 6 n cos n+ 3 3 4 cos2 n . 6 4 cos4 6 n . n. 2 cos 4 n+ 6 2 . Problem 15.3 Determine the frequency response of the LTI system whose impulse response sequence is given by h(n) = (n 10)+ (n+10). Identify both the magnitude and phase components of the frequency response over the range [, ]. Problem 15.4 Determine the frequency response of the LTI system whose impulse response sequence is given by h(n) = 1 + (n 1). Identify both the magnitude and phase components of the frequency response over the range [, ]. Problem 15.5 Determine the frequency response of the LTI system whose impulse response sequence is given by h(n) = 1 + (n 2). Identify both the magnitude and phase components of the frequency response over the range [, ]. Problem 15.6 Determine the frequency response of the LTI system whose impulse response sequence is given by h(n) = (n + 2) + 1 + (n 2). Identify both the magnitude and phase components of the frequency response over the range [, ]. Problem 15.7 Figure 15.15 shows the frequency response of an LTI system. (a) Is the system BIBO stable? (b) Is the system realizable? (c) For each of the input sequences in Prob. 15.1, nd the corresponding output sequence. (d) Find the energy of the impulse response sequence of the system. (e) Find the impulse response sequence of the system. |H (ej )| 1 1/2 2 4 4 2 4 2 H (ej ) /2 2 4 FIGURE 15.15 Frequency response plot for Prob. 15.7. Problem 15.8 Figure 15.16 shows the frequency response of an LTI system. (a) Is the system BIBO stable? (b) Is the system realizable? (c) For each of the input sequences in Prob. 15.2, nd the corresponding output sequence. (d) Find the energy of the impulse response sequence of the system. 407 SECTION 15.7 PROBLEMS 408 CHAPTER 15 |H (ej )| FREQUENCY RESPONSE 1 1/2 2 4 2 4 4 2 H (ej ) /2 2 4 FIGURE 15.16 Frequency response plot for Prob. 15.8. (e) Find the impulse response sequence of the system. Problem 15.9 Can an LTI system produce frequency components in the output sequence that are not present in the input sequence? Explain or give a counter-example when necessary. Problem 15.10 Can a nonlinear system produce frequency components in the output sequence that are not present in the input sequence? Explain or give a counter-example when necessary. Problem 15.11 Consider a causal LTI system that is described by the difference equation y (n) 3 1 y (n 1) + y (n 2) = x(n 1) 4 8 (a) Find the transfer function of the system. Find its zeros and poles. (b) Find the frequency response, H (ej ). (c) Find the impulse response sequence, h(n). (e) Find the steady-state response to x(n) = (f) Find the steady-state response to x(n) = (g) Find the steady-state response to x(n) = n+ . 6 4 sin 3 n . 8 sin2 n + . 6 4 cos n u(n). 6 (d) Find the steady-state response to x(n) = cos Problem 15.12 Consider a causal LTI system that is described by the difference equation y (n) 7 1 1 y (n 1) + y (n 2) = x(n) + x(n 1) 12 12 2 (a) Find the transfer function of the system. Find its zeros and poles. (b) Find the frequency response, H (ej ). (c) Find the impulse response sequence, h(n). (d) Find the steady-state response to x(n) = cos (e) Find the steady-state response to x(n) = (f) Find the steady-state response to x(n) = (g) Find the steady-state response to x(n) = 409 3 n SECTION 15.7 . PROBLEMS 6 sin 4 n + . 3 cos2 6 n . 4 sin n u(n). 3 Problem 15.13 Which of the following lters is realizable? z , |z | > 1/2. (a) H (z ) = (z 1/2)(z 1/3) z (b) H (z ) = , 1/3 < |z | < 2. (z 2)(z 1/3) (c) Causal LTI system described by y (n) y (n 1) + 1 y (n 2) = x(n). 4 Problem 15.14 Which of the following lters is realizable? z (a) H (z ) = , |z | > 1/4. (z + 1/4)(z 1/8)2 (b) H (z ) = z 10 , 1/2 < |z | < 4. (z + 1/2)(z 4) (c) Causal LTI system described by y (n) 3 y (n 1) + 1 y (n 2) = x(n) x(n 1). 4 8 Problem 15.15 Consider the LTI system whose impulse response sequence is given by h(n) = (n 10) + (n + 10). Does it satisfy the Paley-Wiener condition? Problem 15.16 Consider the LTI system whose frequency response is H (ej = 1 + e2j . Does it satisfy the Paley-Wiener condition? Problem 15.17 Given the four pole-zero distributions shown in Fig. 15.17, which ones correspond to low-pass, high-pass, band-pass, or band-stop lters? (a) (b) (c) (d) FIGURE 15.17 Four pole-zero distributions for Prob. 15.17. Problem 15.18 Given the four pole-zero distributions shown in Fig. 15.18, which ones correspond to low-pass, high-pass, band-pass, or band-stop lters? Problem 15.19 Consider the frequency response j H (e ) = j, j, 0< < < 0 410 CHAPTER 15 FREQUENCY RESPONSE (b) (a) (c) (d) FIGURE 15.18 Four pole-zero distributions for Prob. 15.18. which corresponds to a 90o phase shifter. Show that the corresponding impulse response sequence is given by 2/n, n=0 h(n) = 0, otherwise Is the phase shifter a stable system? Problem 15.20 Consider an arbitrary phase shifter j H (e ) = 1 , 2 , 0< < < 0 where 1 and 2 denote phase angles in radians. Find the corresponding impulse response sequence. Problem 15.21 Find the impulse response sequence of the ideal high-pass lter (15.23). Problem 15.22 Find the impulse response sequence of the ideal band-pass lter (15.24). Problem 15.23 Find the impulse response sequence of the ideal band-stop lter (15.25). Problem 15.24 Let h(n) denote the impulse response sequence of a low-pass lter with frequency response H (ej ). Dene h (n) = (1)n h(n). (a) Verify that H (ej ) = H (ej () ). (b) Conclude that the lter with impulse response sequence h (n) is of the high-pass type. Problem 15.25 Find the frequencies that are present in the sequences x(3n), x(n/2), and x2 (n) when x(n) = cos(o n). Problem 15.26 Find the frequencies that are present in the sequences x(3n), x(n/2), and x2 (n) when x(n) = cos2 (o n). Problem 15.27 Give two examples of frequency responses that would generate the output sequence y (n) = ejn/8 when excited with x(n) = ejn/8 . Problem 15.28 Find a constant-coefcient difference equation to describe an LTI system whose impulse response sequence is given by h(n) = 1 2 n1 What is the frequency response of the system? sin n u(n 2) 4 Problem 15.29 A stable LTI ARMA system is described by the difference equation 411 SECTION 15.7 M N y (n) = k =1 a k y (n k ) + k =0 PROBLEMS bk x (n k ) Let h(n) denote the impulse response sequence of the system. Find the difference equation that corresponds to the system with impulse response sequence h (n) = (1)n h(n). Problem 15.30 Find a constant-coefcient difference equation to describe an LTI system whose frequency response is H (ej ) = 1/ tan . Problem 15.31 Figure 15.19 shows the interconnection of two LTI systems with frequency responses H (ej ) and G(ej ). The input sequence of the overall system is x(n) and the output sequence is y (n). Show that the frequency response of the system mapping x(n) to y (n) is given by F (e j ) = x(n) G(ej ) 1 G(ej )H (ej ) y (n ) G(ej ) + H (ej ) FIGURE 15.19 Feedback interconnection of two LTI systems. Problem 15.32 Consider the block diagram shown in the top row of Fig. 15.20 and where the transfer functions H (z ) and G(z ) are given by H (z ) = 1 z 1 2 , G(z ) = 1 1 1 z 2 These transfer functions denote stable and causal LTI systems. Let {Y (ej ), X (ej ), E (ej )} denote the DTFTs of the signals indicated in the gure. Let also H (ej ) and G(ej ) denote the frequency responses of the above systems. (a) The DTFTs of the signals {x(n), e(n)} are shown in the bottom rows of the same gure. Compute the energies of these sequences. Compute also the signal-to-noise energy ratio at the input of the system, which is dened as S NR = energy of x(n) energy of e(n) (b) Show that Y (e j ) = H (ej )G(ej ) 1 X (e j ) + E (e j ) = X (e j ) + E (e j ) 1 G(ej ) 1 G(ej ) X (ej ) E (ej ) 412 CHAPTER 15 e(n) FREQUENCY RESPONSE x(n) H (z ) G(z ) + y (n ) + X (ej ) 2 1 84 4 (rad/sample) E (ej ) 2 4 4 (rad/sample) FIGURE 15.20 Block diagram for Prob. 15.32. where X (ej ) refers to the contribution of the input signal x(n) at the output, while E (ej ) refers to the contribution of the interfering signal e(n) at the output. (c) Compute the signal-to-noise energy ratio at the output of the system, which is dened as SNR = energy of x (n) energy of e (n) (d) Assume instead that x(n) = cos n, 3 e(n) = sin n+ 4 6 Compute the steady-state response yss (n). Problem 15.33 Consider an LTI system with a real-valued impulse response sequence h(n). Let H (ej ) denote the frequency response of the system with real and imaginary parts HR (ej ) and HI (ej ), respectively. Show that HR (ej ) is the DTFT of the even part of h(n), i.e., he (n) HR (ej ) Problem 15.34 Consider an LTI system with a real-valued and causal impulse response sequence h(n). The real-part of its frequency response is given by HR (ej ) = 1 + cos( ) sin( ) Determine h(n) and the complete frequency response. Problem 15.35 Consider a stable and causal LTI system with a real-valued impulse response sequence, h(n). Let H (ej ) denote the frequency response of the system with real and imaginary parts HR (ej ) and HI (ej ), respectively. (a) Argue that H (ej ) is completely determined from knowledge of its real-part alone. (b) Show that HI (ej ) is related to HR (ej ) through the following convolution relation: HI (ej ) = 1 2 HR (ej ) d tan 2 which has the form of a Hilbert transform. Problem 15.36 Consider an FIR lter with a real-valued impulse response sequence h(n) of length L, i.e., the nonzero samples of h(n) extend over the interval 0 n L 1. Assume L is odd and that h(n) is anti-symmetric, namely, its samples satisfy h(n) = h(L 1 n) Show that the frequency response must satisfy H (ej )d = 0 Problem 15.37 A sixth-order comb lter is described by the constant-coefcient difference equation y (n) = 6 y (n 6) + x(n) + x(n 6) (a) Determine the lter transfer function. (b) Determine the location of the zeros and poles of the lter. (c) Plot the frequency response of the lter. Problem 15.38 Find and plot the frequency response of the moving average system with exponential weighting M 1 y (n) = k x (n k ) M + 1 k=0 where 0 < < 1. Problem 15.39 Consider the sequence h(n) = 2n1 [u(n) u(n M )] (a) Find its DTFT in two different ways: using the denition and the properties of the DTFT. (b) What are the values of the integral expressions shown below? 0 |H (ej )|2 d 2 and H (ej )d 0 (c) Find the difference equation of a causal LTI system with impulse-response sequence h(n) and draw a block diagram representation for it. Under what conditions on will the system be stable? (d) Find the steady-state response of the system to the input sequence x(n) = when = 1 u(n) cos n+ 2 3 4 1 ej/6 . 2 (e) Plot the inverse DTFT of H (ej ) cos(M ) for = 1/2. 413 SECTION 15.7 PROBLEMS 414 CHAPTER 15 FREQUENCY RESPONSE Problem 15.40 The signal x(n) of Prob. 14.21 is fed into the system shown in Fig. 15.21. The signal is rst low-pass ltered through an ideal lter with cutoff frequency at /8 radians/sample. The result is then modulated by cos( n) and further scaled by 2(1)n . The display is supposed to 8 show the energy of the resulting sequence. What value would it show? cos( 8n ) x(n) lowpass lter 2(1)n X X energy measurement display FIGURE 15.21 DTFT plot for Prob. 15.40. Problem 15.41 Consider an LTI system with impulse response sequence given by h(n) = cos[(1 2 )n] cos[(1 + 2 )n] 2 2 n2 where 1 = 3 /4 and 2 = /2, both measured in radians/sample. (a) Is the system BIBO stable? (b) Determine and plot the frequency response of the system. (c) Evaluate the following expressions: (c.1) (c.2) n= (1) n= n h(n) n h(n) cos( 4 ) (d) Find the steady-state response of the system to the input sequence x(n) = 1 sin n+ 4 2 4 (e) Plot the frequency response of the LTI system whose impulse response sequence is h(2n + 1). (f) Plot the DTFT of the response of the system when the input sequence is x(n) = (1)n sin n cos n n 3 4 CHAPTER 16 Minimum and Linear Phase Systems In this chapter we invoke the frequency response characterization of LTI systems in order to provide further insight into the behavior of such systems. We also introduce important subclasses of stable LTI systems: linear phase systems, minimum-phase systems, and allpass systems. These subclasses of systems play an important role in the analysis, design, and implementation of discrete-time lters. 16.1 GROUP DELAY We start our exposition by dening the group delay of a stable LTI system. The group delay is measured in units of time and is dened as the negative derivative of the phase response of the system with respect to the angular frequency, , namely, ( ) = dH (ej ) d (16.1) The group delay is a function o the angular frequency and we use the notation ( ) to refer to it. To illustrate the concept, consider an LTI system whose phase response depends in an afne manner on , i.e., H (ej ) = a + b (16.2) for some constants a and b. Applying the denition (16.1), we see that the group delay in this case assumes a constant value and is given by ( ) = a (16.3) Example 16.1 (Exponential sequence) Consider the exponential sequence h(n) = n u(n), || < 1 We already know from Example 15.2 that the magnitude and phase responses are given by |H (ej )| = H (ej ) = 1 1 + 2 2 cos sin arctan 1 cos 415 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 416 Differentiating the phase component with respect to leads to the group delay CHAPTER 16 ( ) = cos 2 1 + 2 2 cos Figure 16.1 shows the magnitude, phase, and group delay plots for the case = 1/2. magnitude plot phase plot 2 0.5 1.5 j H(e ) |H(ej)| 1 0.5 3 2 1 0 1 2 (rad/sample) 3 0 0.5 3 2 1 0 1 2 (rad/sample) group delay 3 1 0 1 2 (rad/sample) 3 1 0.5 () MINIMUM AND LINEAR PHASE SYSTEMS 0 3 2 FIGURE 16.1 Magnitude (top left), phase (top right), and group delay (bottom) plots for the exponential sequence h(n) = (0.5)n u(n). Example 16.2 (Rectangular pulse) Consider the LTI system whose impulse response sequence, h(n), is the rectangular pulse h(n) = 1, 0, 0nL1 otherwise (16.4) We know from the discussion in Example 13.5, and from Table 13.1, that its frequency response is given by L, =0 (16.5) H (ej ) = j (L1)/2 sin (L/2) , otherwise e . sin (/2) Recall further that the phase of H (ej ) is given by (L 1)/2 up to a correction factor that depends on the sign of the ratio sin(L/2)/ sin(/2). No correction is needed when the ratio is positive, and a correction of is used when the sign is negative. Whether we use or in the latter case is not relevant except to guarantee that the resulting value for the phase lies between [, ] in accordance with our convention for plotting phase graphs (recall Example 13-3). Figures 16.2 and 16.3 illustrate these results for the case L = 5. Observe from the phase plot in the latter gure that, in this example, a correction of + is made whenever the ratio sin(L/2)/ sin(/2) changes sign. 417 SECTION 16.1 h( n ) GROUP DELAY 1 1 0 2 1 3 4 5 6 n FIGURE 16.2 A plot of the rectangular pulse h(n) with width L = 5. magnitude plot phase plot 2 H(e ) 3 2 1 0 1 2 2 1 0 1 2 (rad/sample) 3 3 3 sin( L/2)/sin(/2) 0 3 1 j j 3 4 |H(e )| 5 2 1 0 1 2 (rad/sample) 3 2 1 0 1 2 (rad/sample) 3 4.5 3 1.5 0 1.5 3 FIGURE 16.3 A plot of the magnitude (top left) and phase (top right) of the DTFT of the rectangular pulse of width L = 5. The bottom right plot shows the variation in the sign of the ratio sin(L/2)/ sin(/2) over [, ] . Observe that whenever this ratio changes sign (from positive to negative or from negative to positive), a factor of is added to the phase plot. We may express the phase of H (ej ) in the form H (ej ) = (L 1) + I ( ) 2 where I ( ) is the indicator function dened as follows: I ( ) = 0, 1, when sin (L/2) / sin (/2) 0 otherwise From the plot of sin(L/2)/ sin(/2) we see that I ( ) is zero everywhere except when the ratio is negative, where it will have the form of two rectangular pulses. It is evident from the denition of I ( ) and from Fig. 16.3 that the transitions in I ( ) between the levels of 0 and 1 occur at the angular frequencies where H (ej ) = 0. The derivative of I ( ) with respect to is zero at all points 418 CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS except at the frequencies where the vertical transitions occur. We shall ignore these transition frequencies since they correspond to values where H (ej ) = 0. It then follows that the group delay of the system under consideration is given by ( ) = L1 = constant 2 (16.6) 16.2 LINEAR PHASE CHARACTERISTICS We now provide a physical interpretation for the group delay of a system. To begin with, the group delay, ( ), of an LTI system generally varies with frequency. The value of ( ) at any particular angular frequency o provides a measure of the amount of delay that a complex exponential signal at frequency o will undergo as it passes through the system (assuming ejo n is not annihilated by H (ej ). This interpretation is straightforward to examine in the case of systems with linear phase characteristics. Thus, consider a stable LTI system with frequency response H (ej ) and assume its phase response is linear in , say, of the form H (ej ) = no (16.7) for some no > 0. The corresponding group delay in this case will be ( ) = no = a constant (16.8) x(n) = ejo n (16.9) Now choose the input sequence and apply it to the system. Then, according to the discussion in Sec. 15.2, the resulting output sequence will be y (n) = ejo n H (ejo ) jo = ejo n |H (ejo )| ej H (e ) = ejo n |H (ejo )| ejno o = ejo (nno ) |H (ejo )| (16.10) We see that, apart from scaling by |H (ejo )|, the input sequence ejo n appears at the output of the system delayed by no units of time (which is the value of the group delay). Observe further that if o were such that H (ejo ) = 0, then y (n) = 0 fr all n and we say that the input sequence ejo n has been annihilated by the system. The same conclusion will hold for any other choice of the angular frequency in this case. Example 16.3 (Rectangular pulse) Consider the LTI system of Example 16.2 with frequency response H (ej ) = L, ej(L1)/2 . =0 sin (L/2) , sin (/2) otherwise 419 We already know that its group delay is given by SECTION 16.2 ( ) = L1 = constant 2 LINEAR PHASE CHARACTERISTICS Let us now select a nonzero angular frequency, o , where H (ejo ) = 0 (for example, select an o L/2) for which sin(oo /2) > 0). Then, using (16.10), the output sequence that results in response to the sin( input sequence x(n) = ejo n will be = ejo (n L 1 2 = y (n) ejo (n L 1 2 ) |H (ejo )| ) sin (o L/2) sin (o /2) Example 16.4 (Frequency-dependent group delay) When the group delay of an LTI system varies with , then exponential sequences of different angular frequencies will undergo different delays when they are processed by the system. Consider, for example, the LTI system whose frequency response is illustrated in Fig. 16.4. The phase response of the system consists of two linear regions with different slopes. One of the regions extends over [a , a ], while the other region extends over [b , a ] [a , b ]. In the region [a , a ], the phase variation is linear and passes through the origin so that it takes the form H (ej ) = no , [a , a ] where no > 0. Over the region [a , b ], the phase variation is afne in and takes the form H (ej ) = n1 + b, [a , b ] for some nonzero constant b (since the line does not pass through the origin) and where n1 > 0. Likewise, over the region [b , a ] we have H (ej ) = n1 + b , [b , a ] for some b = b. It follows from the expressions for H (ej ) that the group delay of the system has two level values at no and n1 : ( ) = no , n1 , [a , a ] [b , a ] [a , b ] Now choose an input sequence that is a combination of two exponential sequences, say, x(n) = ejo n + ej1 n (16.11) where the angular frequency o lies within the range of frequencies where the slope is no , while the angular frequency 1 lies within the range of frequencies where the slope is n1 (see Fig. 16.4). Then, by linearity, and using (16.10), the response sequence will be a combination of the form y (n) = Aejo (nno ) + Aejb ej1 (nn1 ) (16.12) If the group delay were a constant for all , say, ( ) = no , then the output sequence would have been y (n) = A ejo (nno ) + ej1 (nno ) In this second case, the exponential sequences would be delayed by the same amount and the output sequence would consequently be a delayed version of the input sequence (16.11). However, when 420 CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS |H (ej )| A 1 o (rad/sample) (rad/sample) H (ej ) b a b a slope no slope n1 ( ) no n1 FIGURE 16.4 (rad/sample) The magnitude and phase responses of an LTI system for Example 16.4. the group delay is dependent on , as is the case with the situation illustrated in Fig. 16.4, then the exponential sequences at the input will be delayed differently and the output sequence will be a distorted version (and not simply a delayed version) of the input sequence, as shown by (16.12). We see from this example that it is generally preferable for a system to have a constant group delay (or, equivalently, linear phase characteristics). In the next section we examine in greater detail which classes of FIR lters possess linear phase properties. Example 16.5 (LTI systems with nonlinear phase characteristics) Consider now a stable LTI system whose phase response exhibits some nonlinear dependency on . For simplicity of notation, let us denote the phase response by ( ) instead of H (ej ). We pick some angular frequency o and linearize the phase response in the proximity of o , by means of a Taylor series expansion, say, as: ( ) ( o ) + d ( o ) d =o (16.13) 421 Using the denition of the group delay, we can write instead SECTION 16.3 ( ) = ( o ) ( o ) ( o ) ( o ) + b (16.14) for some constant b that aggregates the other terms that depend on o . The linear approximation (16.14) of the phase response is valid for values of that are sufciently close to o . For this reason, we can still interpret the group delay (o ) as the delay that an exponential sequence, ejo n , will undergo when it passes through the system, i.e., x(n) = ejo n is transformed approximately to y (n) |H (ejo )| ejb ejo (n (o )) (16.15) 16.3 LINEAR PHASE FIR FILTERS The LTI system studied in Example 16.2, with an h(n) that is described by a rectangular pulse, is a nite-impulse response (FIR) lter. It was seen in that example that the lters frequency response exhibits linear phase characteristics. More general FIR lters, other than rectangular pulses, can also deliver (piecewise) linear phase characteristics as long as their impulse response sequences satisfy certain symmetry properties. To motivate the discussion, we start with a simple example. Example 16.6 (A second-order FIR lter) Consider a second-order FIR lter with transfer function H (z ) = 1 + 2z 1 + z 2 The corresponding impulse response sequence has duration L = 3 (and odd number of samples) and is given by h(n) = (n) + 2 (n 1) + (n 2) Note that the sequence h(n) is symmetric about n = 1. A sequence of algebraic manipulations allows us to write the frequency response of the lter as follows: H (ej ) = 1 + 2ej + ej 2 = (1 + ej 2 ) + 2ej = ej (ej + ej ) + 2ej = 2ej cos( ) + 2ej = 2ej [1 + cos( )] Consequently, the associated magnitude and phase responses are |H (ej )| = 2 |1 + cos( ) | and H (ej ) = since 1 + cos( ) 0 for any . We therefore nd that the phase response is linear, as illustrated in Fig. 16.5. LINEAR PHASE FIR FILTERS 422 magnitude plot CHAPTER 16 phase plot 4 3 2 H(ej) 3 |H(ej)| MINIMUM AND LINEAR PHASE SYSTEMS 2 1 0 FIGURE 16.5 1 0 1 2 3 2 0 2 (rad/sample) 2 0 2 (rad/sample) The magnitude and phase responses of the FIR lter H (z ) = 1 + z 1 + z 2 . The argument used in Example 16.6 can be extended to more general FIR lters with symmetry properties in order to bring forth their linear phase properties. There are four types of FIR lters to consider depending on the type of symmetry they exhibit and on the length of their impulse response sequences (whether even or odd). 16.3.1 Type-I FIR Filters Type-I FIR lters are characterized by causal and symmetric real-valued impulse response sequences with an odd number of samples, L, i.e., h(n) satises h(n) = h(L 1 n), 0 n L 1, L odd (Type I) (16.16) As illustrated in Fig. 16.6, the samples of h(n) for type-I lters are symmetric about the point n = (L 1)/2. Let, for simplicity, Ls = (L 1)/2 denote the index of the point of symmetry. Then the samples of h(n) that occur between 0 n Ls 1 coincide with the samples that occur between Ls + 1 n L 1. We may therefore re-express the symmetry property (16.16) in the equivalent form: h(Ls 1 m) = h (m + Ls + 1) , for 0 m Ls 1 (16.17) It can be veried that the frequency response of a type-I FIR lter takes the form: H (ej ) = ej(L1)/2 ( ) (Type I) (16.18) where ( ) is a real-valued function given by ( ) = g (0) = g (m) = L 1 2 g (m) cos(m ) m=0 h L 1 2 2h m + (16.19) L 1 2 , m = 1 , 2 , . . . , L 1 2 so that the phase response of the lter is piece-wise linear and characterized by: H (ej ) = L1 , 2 L1 , 2 when ( ) 0 when ( ) < 0 (16.20) 423 SECTION 16.3 Type I FIR lter L: number of samples L odd h(n) symmetric n=0 n=L1 n= L1 2 FIGURE 16.6 For a type-I FIR lter, the samples of h(n) are symmetric about n = (L 1)/2 and the number of samples, L, is odd. The samples to the left of the symmetry point n = (L 1)/2 coincide with the samples to the right of the symmetry point. The rectangular boxes are meant to indicate the location of the samples and the dotted lines illustrate which samples relate to each other. Proof: The frequency response of the lter (16.16) is given by: H (ej ) = Ls 1 h(n)ejn + h (Ls ) ejLs + n=0 L1 h(n)ejn n=Ls +1 Introduce the change of variables m = n Ls 1 and apply it to the rightmost term of the above expression. Recalling that L = 2Ls + 1, this step gives H (ej ) = Ls 1 h(n)ejn + h (Ls ) ejLs + n=0 Ls 1 h(m + Ls + 1)ej(m+Ls +1) m=0 Using (16.17) we get H (ej ) = Ls 1 h(n)ejn + h (Ls ) ejLs + n=0 Ls 1 m=0 h(Ls 1 m)ej(m+Ls +1) We now introdue another change of variables, n = Ls 1 m, and apply it to the last term to get H (ej ) = Ls 1 n=0 h(n)ejn + h (Ls ) ejLs + Ls 1 n=0 h(n)ej(n2Ls ) LINEAR PHASE FIR FILTERS 424 It follows that CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS H (ej ) = h (Ls ) ejLs + Ls 1 h(n) ejn + ej(n2Ls ) n=0 = = = = ejLs h (Ls ) + ejLs Ls 1 ejLs h (Ls ) + ejLs h (Ls ) + 2 ejLs h (Ls ) + 2 ejLs h (Ls ) + 2 ejLs h (Ls ) + 2 Ls 1 h(n) ejn + ej(n2Ls ) n=0 h(n) ej(nLs ) + ej(nLs ) n=0 Ls 1 n=0 Ls 1 n=0 h(n) cos[(n Ls ) ] h(n) cos[(Ls n) ] Ls = h(Ls m) cos(m ) , using m = Ls n h(m + Ls ) cos(m ) , m=1 using (16.16) (16.17) Ls = m=1 If we now introduce the sequence g (0) = h(Ls ), g (m) = 2h(m + Ls ), m = 1, 2, . . . , Ls then we can write Ls H (ej ) = ejLs g (m) cos(m ) m=0 as desired. Example 16.7 (Type-I lter) The result of Example 16.6 is a special case of (16.18)(16.19) with L = 3, g (0) = 2, g (1) = 2, ( ) = 2 + 2 cos Moreover, in this case, ( ) 0 for all and (16.20) trivializes to H (ej ) = . 16.3.2 Type-II FIR Filters Type-II FIR lters are characterized by causal and symmetric real-valued impulse response sequences with an even number of samples, L, i.e., h(n) satises h(n) = h(L 1 n), 0 n L 1, L even (Type II) (16.21) In this case, as illustrated in Fig. 16.7, the samples of h(n) for type-II lters are symmetric about the fractional point (L 1)/2. Let now Ls denote the integer value Ls = L/2. Then the samples of h(n) that occur between 0 n Ls 1 coincide with the samples that occur between Ls n L 1. We can therefore re-express the symmetry property (16.21) in the equivalent form h(Ls 1 m) = h (m + Ls ) , for 0 m Ls 1 (16.22) Type II FIR lter L: number of samples L even h(n) symmetric n=0 n=L1 L1 2 (fractional) FIGURE 16.7 For a type-II FIR lter, the samples of h(n) are symmetric about the fractional point (L 1)/2 and the number of samples, L, is even. The samples to the left of the symmetry point coincide with the samples to the right of the symmetry point. The rectangular boxes are meant to indicate the location of the samples and the dotted lines illustrate which samples relate to each other. As before, it can be veried (see Prob. 16.38) that the frequency response of a type-II FIR lter takes the form: H (ej ) = ej(L1)/2 ( ) (Type II) (16.23) where ( ) is now the real-valued function dened by L/2 ( ) = g (m) cos m=1 g (m) = 2h m + L 2 m 1 2 (16.24) 1 , m = 1, 2, . . . , L 2 so that the phase response of the lter is piecewise linear and characterized by: H (ej ) = L1 , 2 L1 , 2 when ( ) 0 when ( ) < 0 (16.25) 425 SECTION 16.3 LINEAR PHASE FIR FILTERS 426 CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS Example 16.8 (Type-II lter) Consider the FIR lter with transfer function H (z ) = 1 + 2z 1 + 2z 2 + z 3 The samples of the impulse response sequence satisfy the type-II condition (16.21) with L = 4. Therefore, according to (16.23)(16.24), the corresponding frequency response is given by 3 H (ej ) = ej 2 ( ) where ( ) = 4 cos 2 + 2 cos 3 2 16.3.3 Type-III FIR Filters Type-III FIR lters are characterized by causal and anti-symmetric real-valued impulse response sequences with an odd number of samples, L, i.e., h(n) satises h(n) = h(L 1 n), 0 n L 1, L odd (Type III) (16.26) As illustrated in Fig. 16.8, the samples of h(n) for type-III lters are anti-symmetric about the point n = (L 1)/2 and the sample at n = (L 1)/2 must be zero. This is because property (16.26) requires h L1 2 = h L1 2 which is only possible when h(L 1/2) =. Let Ls = (L 1)/2 denote the index of the point of symmetry. Then, we can express the anti-symmetry property in the equivalent form: h(Ls 1 m) h(Ls ) = h (m + Ls + 1) , =0 for 0 m Ls 1 (16.27) It can be veried (see Prob. 16.39) that the frequency response of a type-III FIR lter has the form H (ej ) = jej(L1)/2 ( ) (Type III) (16.28) where ( ) is a real-valued function dened by (L1)/2 ( ) = g (m) sin(m ) m=1 g (m) = 2h m + L 1 2 (16.29) , m = 1 , 2 , . . . , L 1 2 so that the phase response of the lter is piecewise linear and characterized by: H (ej ) = L 1 2 2 , L 1 3 2 2 , when ( ) 0 when ( ) < 0 (16.30) 427 SECTION 16.3 LINEAR PHASE FIR FILTERS Type III FIR lter L: number of samples L odd h(n) anti-symmetric n=L1 n=0 n= L1 2 FIGURE 16.8 For a type-III FIR lter, the samples of h(n) are anti-symmetric about n = (L 1)/2 and the number of samples, L, is even. The samples to the left of the symmetry point n = (L 1)/2 are the opposite of the samples to the right of the symmetry point. The sample at time n = 0 is necessarily zero. The rectangular boxes are meant to illustrate the location of the samples and the dotted lines indicate which samples relate to each other. Example 16.9 (Type-III lter) Consider the FIR lter with transfer function H ( z ) = 1 z 2 The samples of the impulse response sequence satisfy the type-III condition (16.26) with L = 3. Therefore, according to (16.28)(16.29), the corresponding frequency response is given by H (ej ) = ej ( ) where ( ) = 2 sin( ) 16.3.4 Type-IV FIR Filters Type-IV FIR lters are characterized by causal and anti-symmetric real-valued impulse response sequences with an even number of samples, L, i.e., h(n) satises h(n) = h(L 1 n), 0 n L 1, L even (Type IV) (16.31) As illustrated in Fig. 16.9, the samples of h(n) for type-IV lters are symmetric about the fractional point (L 1)/2. Let Ls = L/2. Then, we can express the anti-symmetry property in the equivalent form: h(Ls 1 m) = h (m + Ls ) , for 0 m Ls 1 (16.32) 428 CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS Type IV FIR lter L: number of samples L even h(n) anti-symmetric n=L1 n=0 L1 2 (fractional) FIGURE 16.9 For a type-IV FIR lter, the samples of h(n) are anti-symmetric about the fractional point (L 1)/2 and the number of samples, L, is even. The samples to the left of the symmetry point relate to the samples to the right of the symmetry point. The rectangular boxes are meant to illustrate the location of the samples and the dotted lines indicate which samples relate to each other. It can be veried (see Prob. 16.40) that the frequency response of a type-IV FIR lter has the form: H (ej ) = jej(L1)/2 ( ) (Type IV) (16.33) where ( ) is the real-valued function dened by L/2 ( ) = g (m) sin m=1 g (m) = 2h m + L 2 m 1 2 (16.34) 1 , m = 1, 2, . . . , L 2 so that the phase response of the lter is piecewise linear and characterized by: j H (e ) = 2 3 2 L 1 2 , L 1 2 , when ( ) 0 (16.35) when ( ) < 0 Table 16.1 summarizes the results concerning the frequency responses of FIR lters of types I, II, III, and IV. 429 TABLE 16.1 Types I through IV FIR lters with piecewise linear phase characteristics. The impulse response sequence of each lter has samples over the range 0 n L 1. Number of Type I real-valued odd H (ej ) e symmetric j L1 2 ( ) ( ) = (L1)/2 g (m) cos(m ) m =0 g (0) = h L1 2 ( ) g (m) = 2h m + II III IV LINEAR PHASE FIR FILTERS h(n) samples L SECTION 16.3 even odd even e symmetric anti-symmetric anti-symmetric j L1 2 ( ) = ( ) j ej L 1 2 j ej L 1 2 L/2 g (m) cos m=1 g (m) = 2h m + ( ) = ( ) (L1)/2 g (m) = 2h m + ( ) = L/2 L 2 , m=0 m 1 2 1 L1 2 g (m) sin m=1 g (m) sin(m ) m =1 ( ) L1 2 g (m) = 2h m + L 2 m 1 2 1 Example 16.10 (Type-IV lter) Consider the FIR lter with transfer function H (z ) = 1 + 2z 1 2z 1 z 3 The samples of the impulse response sequence satisfy the type-IV condition (16.31) with L = 4. Therefore, according to (16.33)(16.34), the corresponding frequency response is given by 3 H (ej ) = ej 2 ( ) where ( ) = 4 sin 2 2 sin 3 2 430 Example 16.11 (FIR lters with piecewise linear phase characteristics) Figures 16.1016.12 plot the impulse response sequences, magnitude responses, and phase responses, of four FIR lters of types I, II, III, and IV. The impulse response sequences of the type I and III lters have 5 samples each, while the impulse response sequences of the type II and IV lters have 4 samples each. Observe the piecewise linear phase characteristics of the lters, as expected from the prior results and analysis. Type I (L=5) Type II (L=4) 1 0.5 h(n) 0.75 h(n) 0.5 0.25 0.25 0 0 1 2 3 n Type III (L=5) 0 4 0.5 0.25 1 2 n Type IV (L=4) 3 0.25 0 0.25 0.5 FIGURE 16.10 0 0.5 h(n) MINIMUM AND LINEAR PHASE SYSTEMS h(n) CHAPTER 16 0 0.25 0 1 2 n 3 4 0.5 0 1 2 3 n Examples of impulse response sequences of types I, II, III, and IV FIR lters. Type I (L=5) 431 Type II (L=4) SECTION 16.3 1.6 1.6 LINEAR PHASE FIR FILTERS |H(ej)| j |H(e )| 2.4 2.4 0.8 0 3 2 1 0 1 2 (rad/sample) Type III (L=5) 0.8 0 3 3 3 2 1 0 1 2 (rad/sample) 3 1.6 |H(ej)| 1.6 1 0 1 2 (rad/sample) Type IV (L=4) 2.4 j |H(e )| 2.4 2 0.8 0 3 2 1 0 1 2 (rad/sample) 3 0.8 0 3 FIGURE 16.11 Magnitude responses of the FIR lters of Fig. 16.10 over the range [, ]. Observe how the magnitude responses of the lters of types III and IV are zero at = 0. Observe also how the magnitude responses of the lters of types II and III are zero at = . These are general properties and are proven in the sequel when the location of the zeros of FIR lters of types I through IV are discussed. 16.3.5 Location of Zeros The locations of the zeros of FIR lters of types I, II, III, and IV exhibit certain symmetry propertiesas well. To begin with, for FIR lters of types I and II, we know from (16.16) and (16.21) that h(n) = h(L 1 n), 0 n L 1 (types I and II) (16.36) It follows that the transfer functions of these types of FIR lters can be written as H (z ) = = h(0) + h(1)z 1 + . . . + h(L 2)z (L2) + h(L 1)z (L1) h(L 1) + h(L 2)z 1 + . . . + h(1)z (L2) + h(0)z (L1) where the second expression can be readily identied as z (L1)H (z 1 ). Therefore, for FIR lters of types I and II, it holds that their transfer functions satisfy the relation: H (z ) = z (L1) H (z 1 ) (types I and II) (16.37) Similarly, for FIR lters of types III and IV, we can verify that H (z ) = z (L1) H (z 1 ) (types III and IV) (16.38) It follows from the relations (16.37) and (16.38) that if z = zo is a zero of H (z ) then z = 1/zo is also a zero of the same transfer function. In other words, the zeros of H (z ) 432 Type I (L=5) 2 1 1 j H(e ) H(ej) 3 2 0 1 2 0 1 2 3 3 2 1 0 1 2 (rad/sample) Type III (L=5) 3 3 3 1 0 1 2 (rad/sample) Type IV (L=4) 3 2 1 0 1 2 (rad/sample) 3 2 1 2 3 2 1 j H(e ) 3 H(ej) MINIMUM AND LINEAR PHASE SYSTEMS Type II (L=4) 3 CHAPTER 16 0 1 0 1 2 2 3 3 2 1 0 1 2 (rad/sample) 3 3 3 FIGURE 16.12 Phase responses of the FIR lters of Fig. 16.10 over the range [, ]. Observe how the lters exhibit piecewise linear phase characteristics. occur in reciprocal pairs. Moreover, since h(n) is real-valued, if z = zo is a complex valued zero of H (z ), then its complex conjugate point, z = zo , should also be a zero of 1 H (z ). This is because H (z ) is a polynomial in z and it is well-known that the roots of polynomials with real coefcients occur in complex conjugate pairs. Consequently, for a complex-valued zero z = zo , the points z = 1/zo , z = zo , and z = 1/zo are also zeros of H (z ). As for the occurence of zeros at the special points z = 1, we can invetigate this possibility by evaluating the relations (16.37) and (16.38) at z = 1. Thus, note from (16.37) that lters of types I and II satisfy H (1) = (1)(L1) H (1) (types I and II) (16.39) This equality implies that the point z = 1 must be a zero when L is even because only then the identify H (1) = H (1) can be satised. We therefore conclude that type-II FIR lters must have zeros at z = 1. Now since 1 = ej , we nd that H (ej ) = =0 (type II) (16.40) so that the frequency reponse, H (ej ), of a type-II lter is zero at = . Likewise, we note from (16.38) that lters of types III and IV satisfy H (1) = (1)(L1)H (1) (types III and IV) (16.41) This equality implies that the point z = 1 must be a zero when L is odd and we conclude that type-III FIR lter must have zeros at z = 1. Moreover, since 1 = ej , we nd that H (ej ) = =0 (type III) (16.42) so that the frequency response of a type-III lter is zero at = . Relation (16.38) also implies that lters of types III and IV satisfy H (1) = H (1) (types III and IV) (16.43) so that these ltes must have a zero at z = 1 or, equivalently, H (ej ) =0 =0 (types III and IV) (16.44) The plots in Fig. 16.11 illustrate these properties. Table 16.2 summarizes the results concerning the location of zeros of FIR lters of types I, II, III, and IV. Figure 16.13 illustrates the typical locations of the zeros of these lters. TABLE 16.2 Location of zeros of types I through IV FIR lters with linear phase characteristics. The impulse response sequence of each lter has samples over the range 0 n L 1. Number of h(n) Type samples L real-valued z = zo I odd II symmetric z = +1 ? z = 1 ? even symmetric ? zero {zo , 1/zo , 1/zo } are also zeros III odd anti-symmetric zero zero {zo , 1/zo , 1/zo } are also zeros IV even anti-symmetric zero ? {zo , 1/zo , 1/zo } are also zeros is a general zero {zo , 1/zo , 1/zo } are also zeros 16.4 ALL-PASS SYSTEMS We move on to describe two other subclasses of stable LTI systems with rational transfer functions, namely, all-pass systems and minimum-phase systems. It will be seen that the group delay of minimum-phase systems has a useful property. It will also be seen that general rational and stable LTI systems can always be decomposed into a cascade combination of all-pass and minimum-phase systems. An all-pass system is dened as a causal and stable (i.e., realizable) LTI system whose rational transfer function, H (z ), satises the condition H (z ) [H (1/z )] =1 (16.45) where the term [H (1/z )] amounts to replacing the argument z by 1/z and conjugating the result. In particular, if we set z = ej we nd that [H (1/z )] z =ej = H (1/ej ) = H (ej ) H (ej ) (16.46) so that the frequency response of an all-pass system must satisfy |H (ej )|2 = 1 (16.47) 433 SECTION 16.4 ALL-PASS SYSTEMS 434 CHAPTER 16 Im MINIMUM AND LINEAR PHASE SYSTEMS 1/zo zo 1/z1 z1 1 1 Re zo 1/zo FIGURE 16.13 Location of zeros of FIR lters of types I, II, III, and IV. If zo is a complex zero, then zo , 1/zo , and 1/zo are also zeros. If z1 is a real zero, then 1/z1 is also a zero. Also, the point z = 1 is a zero for types III and IV and the point z = 1 is a zero for types II and III. |H (ej )| 1 FIGURE 16.14 range. (rad/sample) The magnitude response of an all-pass LTI system is at over the entire frequency We therefore say that an all-pass system has unit magnitude response over the entire frequency range [, ], as illustrated in Fig. 16.14. The requirement of causality translates into requiring the impulse-response sequence of the all-pass system to be a right-sided sequence. It follows that the ROC of H (z ) must be the outside of a circular region. Moreover, the requirement of BIBO stability translates into requiring the ROC of H (z ) to include the unit circle see Fig. 16.15. Collecting these observations together, we conclude that the poles of all-pass systems must lie strictly inside 435 SECTION 16.4 ALL-PASS SYSTEMS Im ROC 1 Re FIGURE 16.15 The ROC of all-pass rational transfer functions is the outside of a circular region that includes the unit circle. All poles must lie strictly inside the unit circle the unit circle. Useful Application One useful application of all-pass systems is the following. Consider a discrete-time system with transfer function G(z ) and let us cascade it with an all pass system, H (z ), as shown in Fig. 16.16. The magnitude response of the cascade will coincide with the magnitude response of the original system since |G(ej ) H (ej )| = |G(ej )| |H (ej )| = |G(ej )| (16.48) On the othre hand, the phase response of the cascade is given by G(ej ) H (ej ) = G(ej ) + H (ej ) (16.49) We therefore see that cascading G(z ) with an all-pass system maintains the magnitude response of G(z ) unchanged but modies its phase response. This result indicates that all-pass systems can be used to adjust the phase response and group delay characteristics of other systems without modifying their magnitude responses. For instance, if a system G(z ) has some undesirable phase response, then cascading it with an all-pass system can help address this deciency by adjusting the phase response of the cascade and bringing it closer to the desired response. 16.4.1 First-Order All-Pass Sections The simplest examples of all-pass systems are H (z ) = 1 (16.50) 436 CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS x( n ) G(z ) H (z ) y ( n) all-pass FIGURE 16.16 The cascade of a stable LTI system, G(z ), with an all-pass system, H (z ), has the same magnitude response as the original system, G(z ). In this way, the all-pass system can be used for phase and group delay compensation. and H (z ) = z d (pure delays with integers d > 0) (16.51) More generally, it follows from the normalization requirement (16.45) that if H (z ) has a pole at z = a, then H (z ) must have a zero at z = 1/a so that the condition H (a)[H (1/a )] = 1 is possible. Therefore, a rst-order all-pass rational transfer function must be of the form: H (z ) = ej z 1 a 1 a z = ej , 1 az 1 za |a| < 1, |z | > |a| (16.52) where ej is a unit-magnitude scaling complex coefcient; usually, we have = 0. In this rst-order case, the transfer function has a single pole inside the unit circle at the point z = a, and a single zero outside the unit circle at the point z = 1/a . The case a = 0 reduces to H (z ) = ej z 1 , which has a pole at z = 0 and a zero at z = . The magnitude response of (16.52) can be easily seen to be one over the entire frequency range. Indeed, |H (ej )| = = = = = = 1 a ej ej a ej a ej j e a ej a ej ej a j e a ej a (ej a) ej a 1 |ej | since the expressions in the numerator and denominator are complex conjugates of each other. The phase response of (16.52), on the other hand, can be veried to be H (ej ) = 2 arctan r sin( ) 1 r cos( ) (16.53) where we introduced the polar representation of a as a = rej . Figure 16.17 displays the magnitude and phase responses of the rst-order all-pass section (16.52) for a = 1/2 and = 0. magnitude plot phase plot 1.5 j H(e ) j |H(e )| 2 1 0 2 0.5 3 2 1 0 1 2 (rad/sample) 3 3 2 1 0 1 2 (rad/sample) 3 FIGURE 16.17 The magnitude and phase responses of the rst-order all-pass section (16.52) for a = 1/2 and = 0. The group delay of (16.52) is obtained by differentiating the phase response (16.53) with respect to to arrive at ( ) = 1 r2 1 + r2 2r cos( ) (16.54) Note that since r < 1, it holds that the group delay is necessarily positive at all . Figure 16.18 plots the group delay of the rst-oder section (16.52) for = 0 and a = 1/2 (i.e., r = 1/2 and = 0). group delay 3 () 2.5 2 1.5 1 0.5 3 FIGURE 16.18 2 1 0 (rad/sample) 1 2 3 Group delay of the rst-order all-pass section (16.52) for a = 1/2 and = 0. 437 SECTION 16.4 ALL-PASS SYSTEMS 438 CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS 16.4.2 Second-Order All-Pass Sections The series cascade of two rst-order all-pass sections results in a second-order all-pass transfer function. If we dene 1 a z 1 a z 2 1 , |a|1 < 1, |a|2 < 1, |z | > max{|a1 |, |a2 |} z a1 z a2 (16.55) for some complex scalar ej (usually, = 0), then H (z ) is also all-pass since H (z ) = ej |H (ej )| = |ej | 1 a ej 1 a ej 1 j 2 j a e e a2 1 =1 Furthermore, if we expand the product on the right-hand-side of (16.55), it can be seen that H (z ) can be expressed in the alternative form: H (z ) = ej z 2 + z + 1 2 1 z 2 + 1 z + 2 (second order) (16.56) where the coefcients {1 , 2 } are related to the poles {a1 , a2 } via 1 = (a1 + a2 ), 2 = a1 a2 (16.57) Expression (16.56) brings to light how the coefcients of the polynomials in the numerator and denominator of an all-pass system relate to each other. To highlight this fact, let us introduce the polynomials A(z ) = A# (z ) = z 2 + 1 z + 2 z 2 + z + 1 2 1 (denominator polynomial) (numerator polynomial) Then it is easy to see that A# (z ) = z 2 A 1 z (16.58) (16.59) (16.60) and the coefcients of A# (z ) are obtained by conjugating the coefcients of A(z ) and reversing their order. Moreover, it is worth noting that that the two roots of the denominator polynomial A(z ) must lie inside the unit circle since A(z ) is the product of two rst-order polynomials: A(z ) = (z a1 )(z a2 ) (16.61) and both a1 and a2 lie inside the unit circle. Likewise, the roots of the numerator polynomial A# (z ) must lie outside the unit circle since A# (z ) is the product of the two rst-order polynomials A# (z ) = (1 a z )(1 a z ) (16.62) 1 2 and both 1/a and 1/a lie outside the unit circle. 1 2 439 SECTION 16.4 16.4.3 Higher-Order All-Pass Sections ALL-PASS SYSTEMS More generally, recall again from the normalization requirement (16.45) that if H (z ) has a pole at z = a, then H (z ) must have a zero at z = 1/a . Therefore, a rational all-pass transfer function of order N that satises (16.45) must have the form H (z ) = ej 1 a z 1 a z 1 a z 2 1 N ... z a1 z a2 z aN (16.63) for some poles {a1 , a2 , . . . , aK }, including poles at zero, and for some complex scalar ej (usually, = 0). We see that the above H (z ) can be obtained by cascading multiple rst-order sections. If we let A(z ) denote the denominator polynomial of H (z ), then the same argument used in the previous section will show that H (z ) can be written as H (z ) = ej A# (z ) , A(z ) ROC = {|z | > }, for some 0 < 1 (16.64) where A(z ) is now a polynomial of degree N in z : A(z ) = z N + 1 z N 1 + 2 z N 2 + . . . + N (16.65) with roots inside the unit circle. And A# (z ) is the conjugate reversal polynomial of A(z ) given by A# (z ) = = zN A 1 z z N + . . . + z 2 + z + 1 2 1 N (16.66) That is, A# (z ) is obtained by conjugating the coefcients of A(z ) and reversing their order. Note again the useful property that if A(z ) has a zero at zo , then A# (z ) has a zero at 1/zo . In particular, since all the zeros of A(z ) lie inside the unit circle, then the zeros of # A (z ) must lie outside the unit circle. Moreover, since H (z ) in (16.63) is the product of elementary rst-order all-pass sections, we conclude that the phase response of H (z ) is the sum of the phase responses of the individual sections, say, H (ej ) = + H1 (ej ) + H2 (ej ) + . . . + HN (ej ) where each Hk (z ) denotes Hk (z ) = 1 a z k z ak (16.67) (16.68) Accordingly, differentiating both sides of (16.67), we nd that the group delay of H (z ) is given by ( ) = 1 ( ) + 2 ( ) + . . . + N ( ) (16.69) in terms of the individual group delays. We remarked earlier following (16.54) that k ( ) > 0 for all . It follows that general all-pass systems of the form (16.63) have positive group delays as well: ( ) > 0 (16.70) 440 Example 16.12 (All-pass section with real h(n)) CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS Consider a third-order all-pass system with transfer function H (z ) and real-valued impulse response sequence, h(n). Since h(n) is real-valued, it follows from the complex conjugation property (9.25) of the z transform that H (z ) should satisfy H (z ) = [H (z )] Therefore, if H (z ) has a pole at z = a, then H (z ) has a pole at z = a as well. In other words, when h(n) is real-valued, the poles of H (z ) must occur in complex conjugate pairs. Thus, let {a1 , a , a2 } denote the poles of the third-order transfer function H (z ) where {a1 , a } correspond 1 1 to the conjugate pair and a2 is real. Since H (z ) is an all-pass system, then H (z ) must have zeros at the locations {1/a , 1/a1 , 1/a2 }. Moreover, all poles of H (z ) must lie inside the unit circle. We 1 conclude that H (z ) may be written as H (z ) = 1 a z 1 a1 z 1 a2 z 1 , z a1 z a z a2 1 |a1 | < 1, |a2 | < 1 Figure 16.19 illustrates the conjugate reciprocal symmetry properties of the poles and zeros of the third-order all-pass system. Im 1/a 1 1/a2 a2 a1 Re a 1 1/a1 FIGURE 16.19 The plot illustrates the conjugate reciprocal symmetry of the poles and zeros of a third-order all-pass system with a real-valued impulse response sequence. 16.5 MINIMUM PHASE SYSTEMS The other subclass of systems that we wish to highlight corresponds tothe so-called minimum phase systems. A rational minimum-phase system is a stable and causal LTI system whose inverse is also a stable and causal LTI system. In other words, a minimum-phase system is a realizable system whose inverse is also realizable. Accordingly, the inverse of a minimum-phase system is itself minimum-phase. Let us examine the implications of these requirements on the pole-zero distribution of minimum-phase systems. Let H (z ) denote the transfer function of a stable and causal LTI system. We know from Sec. 11.8 that its inverse is dened by the transfer function G(z ) that is given by 1 G(z ) = H (z ) (16.71) and whose ROC is chosen such that the ROCs of both G(z ) and H (z ) have overlapping regions. Now, the realizability of H (z ) implies that its poles lie inside the unit circle. Likewise, the realizability of G(z ) implies that its poles should lie inside the unit circle. But since the poles of G(z ) coincide with the zeros of H (z ), we conclude that the poles and zeros of a minimum-phase system should both lie inside the unit circle. Characterization of minimum-phase systems. A realizable rational LTI system is minimum-phase (and therefore admits a realizable inverse) if, and only if, all its poles and zeros lie inside the unit circle. Proof: We argued before the statement that if H (z ) is realizable and minimum-phase then its zeros and poles must lie inside the unit circle. Conversely, assume the zeros and poles of a realizable system lie inside the unit circle and let us show that it has to be minimum-phase (i.e., it must have a realizable inverse). To begin with, the realizability of the system H (z ) implies that its ROC has the form ROC = {|z | > } for some 0 < 1 Let G(z ) = 1/H (z ) denote its inverse. The zeros and poles of G(z ) then lie inside the unit circle as well. Let |zmin | and |zmax | denote the smallest and largest magnitudes of the poles of G(z ) (i.e., zeros of H (z )). Since, by assumption, all poles of G(z ) lie inside the unit circle, we have that |zmin | < 1 and |zmax | < 1. Then, the ROC of G(z ) can be either |z | > |zmax | or |z | < |zmin |. Only the choice |z | > |zmax | leads to a realizable system G(z ) whose ROC overlaps with the ROC of H (z ). We therefore nd that the inverse of H (z ) is given by G(z ) = 1 , H (z ) |z | > |zmax | and this system is realizable since its ROC has the form ROC = {|z | > } for some 0 < 1 Characterization of the ROCs of minimum-phase systems. The ROCs of a minimum-phase system and its minimum-phase inverse are of the forms ROC of H (z ) = {|z | > } ROC of G(z ) = {|z | > } for some 0 < 1 for some 0 < 1 (16.72) (16.73) Example 16.13 (Non-minimum-phase system) The system (z 0.9)(z 0.8) , |z | < 0.5 (z 0.5)(z 0.6) is not minimum phase. Although its poles and zeros lie inside the unit circle, the system is nevertheless unstable since the ROC does not include the unit circle. H (z ) = 441 SECTION 16.5 MINIMUM PHASE SYSTEMS 442 Example 16.14 (Pole and zero distribution) CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS Consider the system (z 0.9)(z 0.8) , (z 0.5)(z 0.6) This system is realizable since its ROC has the form H (z ) = |z | > 0.6 ROC = {|z | > } for some 0 < 1 where = 0.6. Note further that the system has two zeros at z = 0.9 and z = 0.8, and two poles at z = 0.5 and z = 0.6. Thus, the zeros and poles of H (z ) lie inside the unit circle and, according to the characterization of minimum-phase systems, we conclude that H (z ) is minimum-phase. Let us now determine its causal and stable inverse. Note rst that the transfer function of the inverse system is given by G(z ) = (z 0.5)(z 0.6) (z 0.8)(z 0.9) The ROC of G(z ) can be either |z | > 0.9 or |z | < 0.8. Both possibilities lead to an ROC for G(z ) that overlaps with the ROC of H (z ). We therefore have two valid inverse systems in this case: G1 (z ) = (z 0.5)(z 0.6) , (z 0.8)(z 0.9) |z | > 0.9 G2 (z ) = (z 0.5)(z 0.6) , (z 0.8)(z 0.9) |z | < 0.8 or However, only G1 (z ) is a realizable inverse system. We therefore say that the realizable inverse of the realizable system H (z ) is the system G1 (z ). Example 16.15 (Non-minimum-phase system) The transfer function z2 , |z | > 1/4 z 1/4 does not correspond to a minimum-phase system since it has a zero at z = 2, which lies outside the unit circle. H (z ) = 16.6 FUNDAMENTAL DECOMPOSITION Not every stable and causal system is all-pass. Likewise, not every stable and causal system is minimum-phase. However, every stable and causal system can be expressed as the product of a minimum-phase system and an all-pass system. To see this, consider an arbitrary irreducible rational transfer function of a causal and stable LTI system, say, H (z ) = N (z ) , D(z ) ROC = {|z | > } for some 0 < 1 (16.74) where the roots of the denominator D(z ) lie inside the unit circle (by virtue of the causality and stability assumptions). On the other hand, the roots of N (z ) may lie either inside or outside the unit circle. If all of them lie inside the unit circle, then we would already be dealing with a minimum-phase system. So assume that N (z ) has at least one zero outside 443 the unit circle. We can then factor N (z ) as the product of two polynomials, say SECTION 16.6 N (z ) = N1 (z )N2 (z ) (16.75) with N1 (z ) having all its zeros inside the unit circle and N2 (z ) having all its zeros outside the unit circle. Then we can write H (z ) = # N1 (z )N2 (z ) N2 (z ) # D(z ) N2 (z ) (16.76) which is also equivalent to the decomposition H (z ) = # N2 (z ) N1 (z )N2 (z ) # D(z ) N2 (z ) minimum-phase (16.77) all-pass The transfer function Hmin (z ) = # N1 (z )N2 (z ) , D(z ) ROC = {|z | > } for some 0 < 1 is minimum-phase since the zeros of its numerator and denominator polynomials all lie inside the unit circle. Likewise, the transfer function Hap (z ) = N2 (z ) # N2 (z ) , ROC = {|z | > } for some 0 < 1 is all-pass since its poles lie inside the unit circle and its magnitude response evaluates to one over the entire frequency range. More compactly, we write (16.77) as H (z ) = Hmin (z ) Hap (z ) (16.78) Example 16.16 (Decomposition of systems) Consider the causal and stable LTI system with transfer function H (z ) = z4 , z 1/2 |z | > 1/2 Its fundamental decomposition takes the form H (z ) = 1 z4 1 4z 1 4 z 1 4z = z 1/2 1 4z z 1/2 z 1/4 so that Hmin (z ) = 1 4z , |z | > 1/2 z 1/2 and Hap (z ) = 1 1z 4 , |z | > 1/4 z 1/4 Likewise, consider the alternative causal and stable LTI system with transfer function H (z ) = 1 , z 1/2 |z | > 1/2 FUNDAMENTAL DECOMPOSITION 444 Its fundamental decomposition takes the form CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS H (z ) = so that Hmin (z ) = z z 1 z 1/2 z , |z | > 1/2 z 1/2 Hap (z ) = z 1 , z = 0 and 16.6.1 Minimum Group Delay Property The result (16.78) reveals that a transfer function H (z ) has the same magnitude response as its minimum-phase component, Hmin (z ), |H (ej )| = |Hmin (ej )| (16.79) H (ej ) = Hmin (ej ) + Hap (ej ) (16.80) Moreover, since we conclude that the respective group delays satisfy the relation H ( ) = min ( ) + ap ( ) (16.81) However, we argued earlier (16.70) that all-pass systems have positive group delays so that ap ( ) > 0. We conclude that H ( ) > min ( ) (16.82) so that among all systems with the same magnitude response, the minimum-phase system is the one with the smallest group delay! Minimum group delay property. Among all realizable LTI rational systems with the same magnitude response, the minimum-phase system has the smallest group delay. Example 16.17 (Illustrating the group delay property) Consider the causal and stable system H (z ) = 1 , z 1/2 |z | > 1/2 We already know from Example 16.16 that this system is not minimum phase since it includes a zero at . Its fundamental decomposition is given by H (z ) = z z 1/2 z1 minimumphase allpass Thus, the systems H (z ) = 1 , |z | > 1/2 z 1/2 and Hmin (z ) = z , z 1/2 |z | > 1/2 have the same magnitude response. However, only Hmin (z ) is minimum phase. Figure 16.20 compares the magnitude responses of both systems, as well as their group delays, over the interval [, ]. The group delay of Hmin (z ) is evaluated by specializing the expression derived earlier in Example 16.1 for the case = 1/2: min ( ) = 0.5 cos 0.25 1.25 cos Likewise, the group delay of H (z ) is evaluated by using H ( ) = min ( ) + ap ( ) Thus, note that Hap = z 1 so that Hap (ej ) = Differentiating with respect to gives ap ( ) = Therefore, H ( ) = dHap (ej ) =1 d 1 0.5 cos 1.25 cos magnitude plot magnitude plot 1.8 1.6 1.6 j |Hmin(e )| j |H(e )| 1.8 1.4 1.2 1.4 1.2 1 1 0.8 0.8 3 2 1 0 1 2 (rad/sample) 3 3 2 1 0 1 2 (rad/sample) 3 group delay 2 H(z) () 1.5 1 0.5 H (z) min 0 3 2 1 0 (rad/sample) 1 2 3 FIGURE 16.20 Magnitude responses of H (z ) = 1/(z 0.5) and Hmin (z ) = z/(z 0.5) (top) and their respective group delays (bottom). Observe that the group delay of Hmin (z ) is lower than that of H (z ). 16.6.2 Minimum Energy Delay Property Minimum phase systems exhibit another useful property in relation to all realizable LTI rational systems with the same magnitude response, namely, they have the smallest energy delay. To explain what this means, let hmin (n) denote the impulse response sequence of a minimum phase system Hmin (z ) and let h(n) denote the impulse response sequence of 445 SECTION 16.6 FUNDAMENTAL DECOMPOSITION 446 CHAPTER 16 MINIMUM A ND LINEAR P HA S E SYSTEMS an arbitrary realizable LTI system H (z ). We assume that H (z ) is obtained from Hmin (z ) by multiplying it by an all-pass transfer function. Then, obviously, both systems have the same magnitude response, |Hmin (ej )| = |H (ej )| ( 1 6 .8 3 ) Now we want to compare the energies of the corresponding impulse response sequences and establish that the following result holds: n k =0 |h(k )|2 n k =0 |hmin (k )|2 , for any n 0 ( 1 6 .8 4 ) The result means that the energy in the samples of hmin () up to time n will always exceed the energy in the samples of any other possible sequence h() up to the same time instant. Proof: Let us estbalish rst an auxiliary result. Consider a rst-order all-pass (and therefore, causal and stable) section of the form H a p (z ) = z 1 a 1 a z = , za 1 a z 1 |a| < 1, |z | > |a| and let x(n) denote an arbitrary causal input sequence and y (n) the corresponding causal output sequence, as illustrated in the top row of Fig. 16.21. The bottom row of the gure splits the implementation of the all-pass section into the series cascade of two subsections and denotes the output of 1/(1 az 1 ) by the causal sequence w(n). x(n) x(n) z 1 a 1az 1 1 1az 1 w (n) y (n ) z 1 a y (n ) FIGURE 16.21 A causal sequence x(n) is fed into an all-pass section (top); the same section is implemented as the series cascade of two sub-sections (bottom) and the intermediate signal is denoted by w(n). Using the z transform notation we have W (z ) = X (z ) 1 1 a z 1 and Y ( z ) = ( z 1 a ) W ( z ) and Y ( z ) = ( z 1 a ) W ( z ) or, equivalently, X ( z ) = W ( z ) ( 1 a z 1 ) These relations express X (z ) and Y (z ) in terms of the intermediate variable W (z ). Transforming back to the time domain we nd that the sequences x(n) and y (n) are related to w(n) through the relaxed difference equations x(n) = y (n) = w(n) aw(n 1) a w(n) + w(n 1) It follows that n k=0 n |x(k)|2 k=0 n |y (k)|2 n = k=0 |w(k) aw(k 1)|2 n k=0 |a w(k) + w(k 1)| |w(k)|2 |w(k 1)|2 = (1 |a|2 ) = 2 (1 |a|2 ) |w(n)|2 k=0 0 since |a| < 1. We therefore conclude that the partial energies of the input and output sequences (up to time n) of an all-pass section satisfy the relation n k=0 n |y (k)|2 k=0 |x(k)|2 (16.85) Now consider an arbitrary stable and causal system H (z ) and introduce its fundamental decomposition H (z ) = Hmin (z )Hap (z ) where Hmin (z ) is the minimum-phase component and Hap (z ) is an all-pass system. The above fundamental decomposition can be interpreted as applying the sequence hmin (n) into the all-pass system, Hap (z ), and generating the sequence h(n), as shown in the top row of Fig. 16.22. The bottom row in the same gure implements the all-pass system as a cascade of elementary rst-order all-pass sections, say Hap,i (n) for i = 1, 2, 3, . . . , m. hmin (n) hmin (n) Hap,1 (z ) w 1 (n ) Hap (z ) Hap,2 (z ) w2 (n) h( n ) Hap,m (z ) h( n ) FIGURE 16.22 The fundamental decomposition can be interpreted as applying the sequence hmin (n) into the all-pass system and generating the sequence h(n) (top). The bottom gure implements the all-pass system as a cascade of elementary rst-order all-pass sections. 447 SECTION 16.6 FUNDAMENTAL DECOMPOSITION 448 CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS We can now apply the conclusion (16.85) to each elementary all-pass section. Thus, note that from the rst section we get n n |w1 (k)|2 k=0 k=0 |hmin (k)|2 and from the second section we obtain n n k=0 |w2 (k)|2 k=0 |w1 (k)|2 Consequently, n n |w2 (k)|2 k=0 k=0 |hmin (k)|2 Continuing in this manner we arrive at the desired conclusion: n n k=0 |h(k)|2 k=0 |hmin (k)|2 , for any n 0 Example 16.18 (Illustrating the energy delay property) Consider the causal and stable system H (z ) = 1 , z 1/2 |z | > 1/2 We already know from Example 16.16 that this system is not minimum phase since it includes a zero at . Its fundamental decomposition is given by z z 1/2 H (z ) = z1 minimumphase allpass Thus, the systems H (z ) = 1 , |z | > 1/2 z 1/2 Hmin (z ) = and z , z 1/2 |z | > 1/2 have the same magnitude response. However, only Hmin (z ) is minimum phase. The corresponding impulse response sequences are h(n) = 1 2 n1 u(n 1), hmin (n) = 1 2 n u(n) Therefore, n n Eh (n) = k=0 |h(k)|2 = k=1 1 2 k 1 = n1 1 2 m=0 m = 1 0.5n = 2(1 0.5n ) 1 0.5 Likewise, n n Ehmin (n) = k=0 |hmin (k)|2 = k=0 1 2 k = 1 0.5n+1 = 2(1 0.5n+1 ) 1 0.5 449 and we see that Ehmin (n) > Eh (n) as expected. SECTION 16.8 APPLICATIONS 16.7 APPLICATIONS TO BE ADDED Practice Questions: 1. 2. 16.8 PROBLEMS Problem 16.1 Given H (z ) = ej 3 z 4 , nd its group delay and the response of the system to x(n) = ej 3 n + ej 6 n . Problem 16.2 Given H (ej ) = 1 + e2j , nd its group delay and the response of the system to x(n) = ej 4 n + ej 2 n . j Problem 16.3 Given H (e ) = cos( ), nd its group delay and the response of the system to x(n) = sin 6 n . Problem 16.4 Given H (ej ) = ej + e3j , nd its group delay and the response of the system to x(n) = (1)n + cos n . 6 Problem 16.5 Given H (z ) = sin2 n . 6 Problem 16.6 Given H (z ) = cos2 n + . 6 4 z 2 , z 1/3 nd its group delay and the response of the system to x(n) = z2 , z 1/2 nd its group delay and the response of the system to x(n) = Problem 16.7 Classify each of the following FIR lters as type-I, II, III, IV, or none: (a) H (z ) = 1 2 1 + 2z 1 + 2 z 2 . 1 (b) H (z ) = 2 + 2z 1 + 1 z 2 . 2 (c) H (z ) = (d) H (z ) = 1 2 1 2 1 + 2 z 2 . + 2z 1 + 2z 2 + z 3 . 1 (e) H (z ) = 2 + 2z 1 2z 2 + 1 z 3 . 2 1 (f) H (z ) = 2 + 2z 1 2z 2 1 z 3 . 2 Problem 16.8 Classify each of the following FIR lters as type-I, II, III, IV, or none: (a) H (z ) = (b) H (z ) = 1 3 1 4 1 2z 1 + 3 z 2 . 1 + z 1 4 z 2 . (c) H (z ) = 1 + z 4 . (d) H (z ) = 1 4 + 2z 1 2z 2 z 3 . 450 CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS 1 (e) H (z ) = 3 + 2z 1 + 2z 2 + 1 z 3 . 3 1 (f) H (z ) = 4 + 2z 1 2z 2 + 1 z 3 . 4 Problem 16.9 Determine the zero locations for each of the FIR transfer functions in Prob. 16.7. Problem 16.10 Determine the zero locations for each of the FIR transfer functions in Prob. 16.8. Problem 16.11 Determine the frequency responses for each of the FIR transfer functions in Prob. 16.7. Problem 16.12 Determine the frequency responses for each of the FIR transfer functions in Prob. 16.8. Problem 16.13 Let H (z ) denote the transfer function o a type-III FIR lter with one zero at zo = 1 j e 4 . What is the smallest order H (z ) with this property? Find H (z ) assuming the energy of its 2 impulse response sequence is normalized to one. Problem 16.14 Let H (z ) denote the transfer function o a type-II FIR lter with one zero at zo = 1 j e 4 . What is the smallest order H (z ) with this property? Find H (z ) assuming the energy of its 2 impulse response sequence is normalized to one. Problem 16.15 Determine a third-order type-IV FIR lter with a zero at zo = 1/2. Problem 16.16 Determine the value of the smallest order that types-I and III FIR lters can assume when they have zeros at the locations indicated below: (a) zo = 1/2. (b) z = 1 ej 4 . 2 (c) zo = 1/4, z1 = 2, and z2 = 1 ej 3 . 2 Problem 16.17 Give transfer functions of two second-order all-pass systems with poles at a1 = 1/2 and a2 = 1/3. Problem 16.18 Give the expression of a third-order all-pass transfer function with poles at a1 = 1/2, a2 = 1/3, and a3 = 1/4. Find its group delay. Find also the associated third-order polynomials A3 (z ) and A# (z ). 3 Problem 16.19 Determine a difference equation describing a third-order all-pass transfer function 1 with poles at a1 = 1/2, a2,3 = 3 (1 j ). Problem 16.20 Give the expression of a fourth-order all-pass transfer function with poles at a1 = 1/2, a2 = 1/3, and a3,4 = 1 (1 j ). Find its group delay. Find also the associated fourth-order 2 polynomials A3 (z ) and A# (z ). 3 Problem 16.21 Let H (z ) = (a) Determine its group delay, ( ). 1 1 + 1z 1 + 1j 1 2j 4 3 1 1 1 z + 4 z 3j z + 2j (b) Determine the corresponding third-order polynomials A3 (z ) and A# (z ). 3 (c) Determine a difference equation describing the system. Problem 16.22 Let H (z ) = 1 1 1 2e 4 1 1 z 1 2 e j 3 2 1 1 j 1 j z 2 z 2e 3 z 2e 4 (a) Determine its group delay, ( ). (b) Determine the corresponding third-order polynomials A3 (z ) and A# (z ). 3 (c) Determine a difference equation describing the system. Problem 16.23 What is the smallest-order all-pass system that satises the following two condi 1 tions: (a) h(n) is real-valued and (b) H (z ) has a pole at 2 ej 4 . Is H (z ) unique? Give one valid expression for H (z ). Problem 16.24 What is the smallest-order all-pass system that satises the following two condi 1 1 tions: (a) h(n) is real-valued and (b) H (z ) has poles at 2 ej 4 and 3 ej 3 . Is H (z ) unique? Give one valid expression for H (z ). Problem 16.25 Which of the following LTI systems are minimum-phase? 1 1 z 3 z 4 , |z | > 1/2 (a) H (z ) = 1 1 z 2 z 8 1 1 z 3 z 4 , |z | < 1/8. (b) H (z ) = 1 1 z 2 z 8 1 1 z 3 z 4 , 1/8 < |z | < 1/2. 1 1 z 2 z 8 (c) H (z ) = (d) H (z ) = z z 1 3 1 2 z 1 8 , |z | > 1/2. Problem 16.26 Which of the following LTI systems are minimum-phase? 1 1 z 4 z 6 , |z | > 1/3 (a) H (z ) = 1 1 z 3 z 5 1 1 z 4 z 6 , |z | < 1/5. 1 1 z 3 z 5 (b) H (z ) = 1 1 z 4 z 6 , 1/5 < |z | < 1/3. 1 1 z 3 z 5 (c) H (z ) = (d) H (z ) = z z 1 4 1 3 z 1 5 , |z | > 1/3. Problem 16.27 Which of the following LTI systems are minimum-phase? 1 (a) H (z ) = , |z | > 1/2. z1 2 (b) H (z ) = (c) H (z ) = z 2 , |z | > 1/2. z1 2 z2 , |z | > 1/2. z1 2 Problem 16.28 Which of the following LTI systems are minimum-phase? 1 (a) H (z ) = 2 , |z | > 1/2. z2 + 1 4 z 2 (b) H (z ) = z2 + z2 (c) H (z ) = z2 + , 12 4 |z | > 1/2. , 12 4 |z | > 1/2. Problem 16.29 Determine, when they exist, realizable inverses for the systems in Prob. 16.25. Problem 16.30 Determine, when they exist, realizable inverses for the systems in Prob. 16.26. Problem 16.31 Find the fundamental decomposition of the following causal and stable systems into all-pass and minimum-phase components: 451 SECTION 16.8 PROBLEMS 452 (a) H (z ) = z CHAPTER 16 MINIMUM AND LINEAR PHASE SYSTEMS z3 , |z | > 1/2. 1 1 z 4 2 z (z 3) , |z | > 1/2. 1 1 z 2 z 4 (b) H (z ) = z 1 (z 3) , |z | > 1/2. 1 1 z 2 z 4 (c) H (z ) = 1 (d) H (z ) = z 1 2 z 1 4 , |z | > 1/2. Problem 16.32 Find the fundamental decomposition of the following causal and stable systems into all-pass and minimum-phase components: z2 (a) H (z ) = , |z | > 1/2. 12 1 z 2 z+6 z (z 2) (b) H (z ) = 12 2 1 z z (c) H (z ) = z (d) H (z ) = z z+ (z 2) 12 2 1 12 2 z+ z+ 1 6 1 6 1 6 , |z | > 1/2. , |z | > 1/2. , |z | > 1/2. Problem 16.33 Consider the causal and stable system H (z ) = z 1 z1 4 Let Hmin (z ) be its minimum-phase component. (a) Find h(n) and hmin (n). (b) Find the energies of h(n) and hmin (n). Compare the energies. (c) Compare the group delays of H (z ) and Hmin (z ). (d) Find the steady-state response of each of the systems to x(n) = ej 3 n . Compare the energies of the responses. Problem 16.34 Consider the causal and stable system H (z ) = 1 z+ 1 3 Let Hmin (z ) be its minimum-phase component. (a) Find h(n) and hmin (n). (b) Find the energies of h(n) and hmin (n). Compare the energies. (c) Compare the group delays of H (z ) and Hmin (z ). (d) Find the steady-state response of each of the systems to x(n) = ej 4 n . Compare the energies of the responses. Problem 16.35 Prove that the product of two minimum-phase transfer functions is also minimum phase. Problem 16.36 Find a minimum-phase system with squared magnitude response given by 2 25 j H (e ) = 16 26 5 cos 17 8 cos Problem 16.37 Derive the frequency response expression (16.23) for a type II FIR lter. Problem 16.38 Consider the frequency response of a type-II FIR lter from Table 16.1. (a) Establish the trigonometric identity m cos 1 2 PROBLEMS + cos m+ 1 2 = 2 cos cos(m ) 2 (b) Use part (a) to show that H (ej ) can be expressed in the alternative form H (ej ) = ej L 1 2 2 cos L/2 c(m) cos(m ) m=0 for some coefcients c(m), m = 0, 1, . . . , L/2. (c) Relate the coefcients {g (m)} and {c(m)}. Problem 16.39 Consider the frequency response of a type-III FIR lter from Table 16.1. (a) Establish the trigonometric identity sin [(m + 1) ] sin [(m 1) ] = sin( ) cos(m ) (b) Use part (a) to show that H (ej ) can be expressed in the alternative form H (ej ) = ej ( L 1 + 2 2 ) sin ( ) (L1)/2 c(m) cos(m ) m=0 for some coefcients c(m), m = 0, 1, . . . , (L 1)/2. (c) Relate the coefcients {g (m)} and {c(m)}. Problem 16.40 Consider the frequency response of a type-IV FIR lter from Table 16.1. (a) Establish the trigonometric identify sin m+ 1 2 sin 1 2 m = 2 sin cos(m ) 2 (b) Use part (a) to show that H (ej ) can be expressed in the alternative form H (ej ) = ej ( 453 SECTION 16.8 L 1 + 2 2 ) sin 2 L/2 c(m) cos(m ) m=0 for some coefcients c(m), m = 0, 1, . . . , L/2. (c) Relate the coefcients {g (m)} and {c(m)}. Problem 16.41 Consider the rst-order all-pass section (16.52). Show that its impulse response sequence is given by h(n) = a (n) + (1 |a|2 )an1 u(n 1) Problem 16.42 Consider the rst-order all-pass section (16.52). Find the energy of its impulse response sequence. Problem 16.43 The impulse response of a causal and stable LTI system S is given by h(n) = 1 2 n u(n) Find the impulse response of another causal and stable LTI system L with a zero at the point z = 3 and such that the magnitude responses of both S and L are identical. How do the phase responses compare to each other? 454 CHAPTER 16 MINIMUM A ND LINEAR P HA S E SYSTEMS Problem 16.44 The impulse response of a causal and stable LTI system S is given by h(n) = n 1 3 n1 u(n 2) Find the impulse response of another causal and stable LTI system L with a zero at the point z = 2 and such that the magnitude responses of both S and L are identical. How do the phase responses compare to each other? Problem 16.45 The DTFT of a sequence x(n) has the triangular form shown in Fig. 16.23 over the interval [ , ]. The sequence x(n) is transmitted over a channel (or system) that consists of a 1 series cascade of three relaxed sub-systems: an FIR system with transfer function z 2 2 z 1 , an j LTI system with frequency response H (e ), and a single pole IIR system. The output of the last subsystem is further modulated by the sequence (1)n in order to generate y (n). H (ej ) 1 x(n) 1/2 z 2 1 z 1 2 2 2 y (n ) + X z 1 (1)n 1/2 X (ej ) (rad/sample) FIGURE 16.23 A sequence x(n) with the indicated DTFT, X (ej ), is transmitted over the system depicted in top part of the gure for Prob. 16.45. (a) Plot |Y (ej )| over [ , ]. Is y (n) a real sequence? Hint. Recall the form of a rst-order all-pass lter. (b) How would your answer to part (a) change if the roles of H (ej ) and X (ej ) are interchanged? (c) How would your answer to part (a) change if the modulator is moved from the end to the beginning of the system? That is, x(n) is rst modulated by (1)n before being fed into the cascade of three sub-systems. [The output of the last sub-subsystem now becomes y (n).] (d) Determine the energy of the impulse response sequence of the overall system shown in the gure. (e) Is the system time-invariant? linear? causal? (f) Give an example of a DTFT plot, X (ej ), that would result in a zero output sequence y (n). Problem 16.46 Consider the block diagram shown in Fig. 16.24 where x(n) and y (n) are the input and output sequences, respectively, and H1 and H2 are two LTI systems with frequency responses H1 (ej ) and H2 (ej ). In the upper branch, the sequence x(n) is rst multiplied by (1)n , ltered by H1 , and then multiplied by (1)n . In the lower branch, the sequence x(n) is ltered by H2 . The output sequence y (n) is the sum of the sequences obtained at the outputs of both branches. Let H (ej ) denote the frequency response of the overall system, i.e., Y (e j ) = H (e j )X (e j ) for any input-output pair {x(n), y (n)}. (1)n X (1)n H1 (ej ) X x(n) + y (n ) H2 (ej ) FIGURE 16.24 Block diagram for Prob. 16.46. (a) Prove that H (ej ) is equal to H ( e j ) = H 1 e j ( ) + H 2 ( e j ) (b) Plot H (ej ) (both magnitude and phase) in the range [ , ] when H1 is an ideal low-pass lter with cutoff frequency /4 and unit magnitude in the passband (including the frequencies /4 and /4), while H2 is a low-pass lter with cutoff frequency /3 and unit magnitude in the passband (including the frequencies /3 and /3). Both lters have linear phases in their passbands with group delays that are equal to 2. (c) Assume H1 is the same as above, while H2 is now a high-pass lter with cutoff frequency at /2, unit magnitude in the pass band, and group delay that is equal to 4. Determine the steady-state response of the system to x(n) = cos 3 n+ 4 3 Problem 16.47 Consider the feedback conguration shown in Fig. 16.25. The impulse response sequence, h(n), of a causal system is indicated by the rectangular box. The value of the sample at the time instant n = 1 is unknown and denoted by , which can assume an arbitrary real value contrary to what the gure might suggest. (a) Find the transfer function of the discrete-time system indicated by the rectangular box, i.e., nd G(z ). Indicate the corresponding region of convergence. What is the order of the system? Is it stable? Is it minimum phase? What are the poles of G(z )? Do they depend on the value of ? What are the zeros of G(z )? Do they depend on ? (b) Find the transfer function, H (z ), of the feedback system that maps x(n) to y (n). How do the zeros of H (z ) compare to the zeros of G(z )? What about the poles? What is the order of H (z )? Find an for which H (z ) is unstable and verify your answer. Is there any for which H (z ) is minimum phase? (c) Find a set of conditions that should satisfy if H (z ) were to be stable and verify whether a solution exists. 455 SECTION 16.8 PROBLEMS 456 CHAPTER 16 MINIMUM A ND LINEAR P HA S E SYSTEMS h(n) x(n) y (n ) + FIGURE 16.25 A feedback conguration for Prob. 16.47. Problem 16.48 Consider an elementary causal and stable all-pass function with a real pole at a, B (z ) = z 1 a , 1 a z 1 |a| < 1 (a) Argue that B (ej ) is a monotonically decreasing function that starts at B (ej 0 ) = 0 and attains B (ej ) = . That is, the change in phase as goes from 0 to is . (b) Now consider an all-pass function of order M with real poles, viz., a product of M elementary sections as follows A (z ) = z 1 a M z 1 a 1 z 1 a 2 ... 1 1 a z 1 1 a1 z 1 a M z 1 2 Prove that the phase response A(ej ) is also a monotonically decreasing function that starts at A(ej 0 ) = 0 and attains A(ej ) = M . That is, the change in phase as goes from 0 to is M . In particular, what is the value of A(ej )? (c) Consider the lter structure shown in Fig. 16.26 where A(z ) is chosen as a second-order (M = 2) all-pass function as above. The transfer function from x(n) to y (n) is denoted by G(z ) and is equal to 1 G(z ) = [A(z ) + 1] 2 Argue that there should exist an angular frequency 0 < 0 < such that G(ej 0 ) = G(ej ) = 1 and G(ej 0 ) = 0. Remark. This lter structure can be used to remove the single-frequency component at 0 from the input signal x(n), by properly choosing a1 and a2 to satisfy A(ej 0 ) = . x(n) A (z ) + y (n ) FIGURE 16.26 A digital notch lter for Prob. 16.48. CHAPTER 17 Discrete Fourier Transform T he discrete-time Fourier transform (DTFT) is a useful frequency-domain representation that associates a function X (ej ) of with every sequence x(n). The angular frequency is a continuous real-valued variable that assumes values over a 2 -wide interval such as [, ] or [0, 2 ]. Thus, note that while the sequence x(n) is dened only for discrete (integer) values of n, its DTFT is dened over continuous (real) frequencies . Storing and manipulating such frequency representations by digital processors can be problematic unless an analytical expression is available for X (ej ) in terms of a nite number of parameters. These remarks serve as motivation for introducing the Discrete Fourier Transform (DFT), where the qualication discrete-time in the DTFT is now replaced by the qualication discrete in the DFT. The DFT will associate with every sequence x(n) another sequence in the frequency domain, denoted by X (k ), with discrete frequencies indexed by the variable k . In this way, both x(n) and X (k ) end up being sequences with a nite number of samples. By dealing with discretized sequences in the time and frequency domains, the signals become amenable to manipulations (such as storage and processing) that are particularly suited for digital computing devices. 17.1 MOTIVATION Consider a sequence x(n) and let X (ej ) denote its DTFT, X (ej ) = x(n)ejn (17.1) n= We already know that the DTFT is periodic with period 2 . We can therefore focus our attention on a 2 long interval, say, either [0, 2 ] or [, ]. As the discussion will reveal, when studying the DFT of a sequence it is more convenient to focus on the interval [0, 2 ] as opposed to the interval [, ], which was our practice in the previous chapters. Thus, consider the interval [0, 2 ] and assume we divide it into N smaller sub-intervals of width 2/N each, as illustrated in Fig. 17.1. This construction results in N discrete angular frequencies at the endpoint locations of the sub-intervals: 0, 2 4 6 2 (N 1) , , , ..., NNN N (17.2) We represent these discrete frequencies as k = 2k , k = 0, 1, . . . , N 1 N (17.3) 457 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 458 CHAPTER 17 DISCRETE FOURIER TRANSFORM Note that we are excluding the discrete frequency that corresponds to the location = 2 (which would result from setting k = N ); this is because the value of X (ej ) at = 2 coincides with the value of X (ej ) at = 0 due to the 2 -periodicity of the DTFT. That is, the information that is represented by X (ej ) at = 2 is already represented by the value of X (ej ) at = 0 and we can therefore ignore it. 2 N 2 0 (rad/sample) N sub-intervals of width 2/N each 0 N 1 2 1 k axis N discrete points FIGURE 17.1 Dividing the interval [0, 2 ] into N subintervals of width 2 /N each gives rise to the N discrete frequency points dened by (17.3) with indices k = 0, 1, . . . , N 1. Now consider the DTFT of x(n) over the one-period interval [0, 2 ]. We sample X (ej ) every 2 /N radians/sample at the discrete frequency locations (17.3) to obtain the N samples X (k ) = X (ej ) = 2Nk , k = 0, 1, . . . , N 1 ( 1 7 .4 ) This construction is illustrated in Fig. 17.2; sampling one period of X (ej ) results in N samples X (k ). Obviously, since the DTFT is periodic of period 2 , had we sampled it instead at all multiples of 2 /N , and not only over k = 0, 1, . . . , N 1, then we would have obtained a sequence X (k ) that is periodic of period N (instead of only the N samples represented by (17.4)), namely, X (k ) = X (ej ) = 2Nk , k = . . . , 2, 1, 0, 1, 2, . . . ( 1 7 .5 ) This construction is illustrated in Fig. 17.3. The DFT sequence X (k ) dened via (17.5) inherits the periodic nature of X (ej ) since its samples repeat themselves every period N , i.e., X (k ) = X (k + N ), for all integer k ( 1 7 .6 ) However, just as was the case with the study of the DTFT transform, it is sufcient for analysis and design purposes to focus only on one period of X (k ), as was already anticipated in (17.4). 459 j SECTION 17.1 X (e ) 2 MOTIVATION 2 (rad/sample) X (k ) k k=0 k =N 1 FIGURE 17.2 Sampling the DTFT of a sequence x(n) every 2/N radians/sample over the interval [0, 2 ] results in N samples X (k) for k = 0, 1, . . . , N 1. X (ej ) 2 2 (rad/sample) X (k ) k k = (N 1 ) k=0 k =N 1 FIGURE 17.3 Sampling the periodic DTFT of a sequence x(n) over the entire line at multiples of 2/N results in a periodic sequence X (k) of period N . Example 17.1 (Sampling the DTFT of a sequence) Let us reconsider the sequence of Example 14.2, x(n) = 0.5 (n + 1) + (n) + 0.5 (n 1) 460 whose DTFT we already found to be CHAPTER 17 X (ej ) = 1 + cos( ) Figures 17.4 and 17.5 display the sequence x(n) and its DTFT over the interval [0, 2 ]. x( n ) 1 0.5 1 1 n FIGURE 17.4 A sequence x(n) with 3 nonzero samples at n = 1, 0, 1. 2 1.8 1.6 1.4 1.2 j X(e ) DISCRETE FOURIER TRANSFORM 1 0.8 0.6 0.4 0.2 0 FIGURE 17.5 1 2 3 4 (rad/sample) 5 6 A plot of the DTFT X (ej ) = 1 + cos( ) over the interval [0, 2 ]. Let us now sample the DTFT of x(n) by using two different choices for N , say, N = 3 and N = 4. In the rst case, we divide the interval [0, 2 ] into 3 subintervals with discrete frequencies at the locations 2 4 0, , (N = 3) 3 3 while in the second case we divide the same interval into 4 subintervals with discrete frequencies at the locations 3 0, , , (N = 4) 2 2 461 The samples of X (k) that arise from choosing N = 3 are SECTION 17.1 X (0) = X (1) = X (2) = 1 + cos(0) = 2 2 = 0.5 1 + cos 3 1 + cos 4 3 MOTIVATION = 0.5 while the samples of X (k) that arise from choosing N = 4 are X (0) = X (1) = X (2) = X (3) = 1 + cos(0) = 2 1 + cos =1 2 1 + cos ( ) = 0 3 1 + cos =1 2 These samples are illustrated in Figs. 17.6 and 17.7. We therefore see that different choices for N lead to different DFT sequences. That is why we usually quality the DFT by explicitly mentioning the value of N that it relates to. We usually use the terminology N point DFT to emphasize that the DFT is being computed based on N points. In the current example, we evaluated 3point and 4point DFTs. X(ej) and its samples X(k) for k=0, 1, 2 2 X(0) 1.8 1.6 1.4 j X(e ) 1.2 1 0.8 X(1) 0.6 X(2) 0.4 0.2 0 1 2 3 4 (rad/sample) 5 6 FIGURE 17.6 A plot of the DTFT X (ej ) = 1 + cos( ) over the interval [0, 2 ] and its sampled version, X (k) for k = 0, 1, 2. The samples are computed at intervals that are multiples of 2/3. 462 X(ej) and its samples X(k) for k=0, 1, 2, 3 2 CHAPTER 17 X(0) DISCRETE FOURIER TRANSFORM 1.8 1.6 1.4 j X(e ) 1.2 X(1) 1 X(3) 0.8 0.6 0.4 0.2 X(2) 0 1 2 3 4 (radians/sample) 5 6 FIGURE 17.7 A plot of the DTFT X (ej ) = 1 + cos( ) over the interval [0, 2 ] and its sampled version, X (k) for k = 0, 1, 2, 3. The samples are computed at intervals that are multiples of /2. 17.2 RELATION TO ORIGINAL SEQUENCE The sequence X (k ) in (17.4) was obtained by sampling the DTFT, X (ej ), of the sequence x(n) at N discrete frequencies, k , for k = 0, 1, . . . , N 1. Two questions are in order and deserve closer investigation. Question A: Is it possible to obtain the N values of X (k ) directly from the time-domain sequence, x(n), without having to go through the intermediate step of determining X (ej ) rst and then sampling it? Answer: The answer will be in the afrmative. As we are going to see, the procedure will generally involve transforming x(n) into a periodic sequence xp (n) and then using xp (n) to determine the values of X (k ) see (17.18) further ahead. Question B: Given the N point DFT values, X (k ) over k = 0, 1, . . . , N 1, is it possible to recover the original time-domain sequence x(n) from these values (just like it was possible to recover x(n) from knowledge of its DTFT, X (ej ))? Answer: The answer will be negative unless the sequence x(n) is causal with niteduration L N . Recall that we can always recover a sequence x(n) from knowledge of its DTFT over [0, 2 ] by means of the inversion formula x(n) = 1 2 2 X (ej )ejn d (17.7) 0 However, by sampling X (ej ) at every 2/N radians/sample, and by retaining the sample values X (k ) for k = 0, 1, . . . , N 1, some information is generally lost. The discussion in the sequel will clarify for which sequences, x(n), the DFT can still be used to recover the sequence. The discussion will also reveal for which sequences x(n), the DFT will lead to loss of information due to aliasing-in-time (in which case, x(n) will not be recoverable from its DFT). Determining the DFT Directly from the Time-Domain Sequence We address the rst question, namely, the task of evaluating the sequence X (k ) directly from x(n). For this purpose, we start from the denition of the sequence X (k ) for all values of k , as given by (17.5): X (k ) = X (ej ) , k = . . . , 2, 1, 0, 1, 2, . . . k = 2N (17.8) As noted earlier, we are mainly interested in the N sample values X (k ) over the interval k = 0, 1, . . . , N 1. Nevertheless, to arrive at an expression for these values in terms of the samples of x(n), it is useful to examine the samples X (k ) over all possible integer values of k (both within the range 0 k N 1 and outside it). To begin with, we substitute into (17.8) the denition of X (ej ) to get x(n)ejn X (k ) = n= k = 2N x(n)ej = 2k Nn , k = . . . , 2, 1, 0, 1, 2, . . . n= (17.9) where has been replaced by the sample value 2k/N . In expression (17.9), each sample 2k x(n) is multiplied by the exponential sequence ej N n . Let us examine the summation more closely and nd out what is happening with the particular samples of x(n). Thus, note that the sample x(0), at time n = 0, inside the summation (17.9) is multiplied by 1 since e j 2k Nn n=0 =1 (17.10) Likewise, for any value of n that is an integer multiple of N , say n = mN , we nd that x(mN ) is also multiplied by the same value 1 since e j 2k Nn = 1, when n = mN (17.11) We therefore say that the sample n = 0 and all other samples of x(n) at multiples of N are processed equally by the summation (17.9). Now, consider the sample x(1), at time n = 1, inside the summation (17.9). It is multiplied by e j 2k Nn n=1 = e j 2k N (17.12) Likewise, for any value of n that is an integer multiple of N away from 1, say n = mN +1, we also nd that x(mN + 1) will be multiplied by the same factor ej 2k/N since e j 2k Nn = e j 2k N , when n = mN + 1 (17.13) We therefore say that the sample n = 1 and all other samples of x(n) that are at multiples of N away from n = 1 are processed equally by the summation (17.9). 463 SECTION 17.2 RELATION TO ORIGINAL SEQUENCE 464 CHAPTER 17 DISCRETE FOURIER TRANSFORM The argument continues similarly for all other samples of x(n) at the time instants n = 2, 3, . . . , N 1. Consider, for example, the sample x(N 1) at time n = N 1 inside the summation (17.9). This sample is multiplied e j 2k Nn n=N 1 = e j 2k(N 1) N For any value of n that is an integer multiple of N away from (N 1), say n = mN +(N 1), the corresponding sample x(n) will also be multiplied by the same factor ej 2k(N 1)/N since 2k(N 1) 2k , when n = mN + N 1 (17.14) e j N n = e j N We therefore say that the sample n = N 1 and all other samples of x(n) that are at multiples of N away from n = N 1 are processed equally by the summation (17.9). By examining what happens to the samples of x(n) over n = 0, 1, . . . , N 1, we have also been able to deduce what happens to all other samples of x(n) for all other values of n. This is because these other samples are located at multiples of N away from any of the initial samples at n = 0, 1, . . . , N 1. If we therefore group together all samples of x(n) that are multiplied by the same factor, we can equivalently rewrite the summation (17.9) into a sum of N separate rows as follows: X (k ) = [. . . + x(N ) + x(0) + x(N ) + x(2N ) + . . .] + [. . . + x(N + 1) + x(1) + x(N + 1) + x(2N + 1) + . . .] ej 2k N + k j 4N + [. . . + x(N + 2) + x(2) + x(N + 2) + x(2N + 2) + . . .] e . . . 2k(N 1) [. . . + x(1) + x(N 1) + x(2N 1) + x(3N 1) + . . .] ej N Each row in the above expression contains a sum of terms multiplied by a particular factor. There are N such factors and they are given by e j 2kn N , n = 0, 1, . . . , N 1 (17.15) Let us denote the sum of terms in the rst row by xp (0): xp (0) = . . . + x(N ) + x(0) + x(N ) + x(2N ) + . . . (17.16) Likewise, let us denote the sum of terms in the other rows by xp (1) = xp (2) = . .= . xp (N 1) = . . . + x(N + 1) + x(1) + x(N + 1) + x(2N + 1) + . . . . . . + x(N + 2) + x(2) + x(N + 2) + x(2N + 2) + . . . . . . (17.17) . . . + x(1) + x(N 1) + x(2N 1) + x(3N 1) + . . . Then, we can re-express X (k ) as X (k ) = xp (0) + xp (1)ej 2k N + xp (2)ej 4k N + xp (N 1)ej 2k(N 1) N 465 which we write more compactly as SECTION 17.2 RELATION TO ORIGINAL SEQUENCE N 1 xp (n)ej X (k ) = 2k Nn , k = . . . 2, 1, 0, 1, 2 . . . n=0 (17.18) This result tells us how to obtain the samples X (k ) directly from the time-domain sequence x(n). We rst use x(n) to form the N samples xp (n), n = 0, 1, . . . , N 1, and then use these samples to evaluate the X (k ) as in (17.18). Expressions (17.16)(17.17) show that the samples xp (n) can be evaluated through the following simple construction. We shift the sequence x(n) to the left and to the right by multiples of N and then add the shifted sequences. The resulting sequence will be periodic with period N : x(n + N ) xp (n) = (17.19) = When we evaluate the N point DFT of x(n) by means of the relation (17.18), we only need to use the N samples of xp (n) over the period n = 0, 1, . . . , N 1. Example 17.2 (Evaluating the DFT from the original time sequence) Let us reconsider the sequence of Example 17.1, x(n) = 0.5 (n + 1) + (n) + 0.5 (n 1) and select N = 4. Figure 17.8 shows x(n) and several shifted versions of it to the left and to the right by multiples of N = 4 samples. It is seen in this case that the value of N is large enough so that when we sum the shifted versions of x(n) their samples will not interfere with each other. Sometimes, however, the width of x(n) and the chosen value of N will be such that the various shifted versions of x(n) will have samples at common locations, and these samples end up interfering with each other. We illustrate this situation later in Example 17.4. If we now add up x(n) and all its shifted versions we obtain the sequence xp (n) that is shown in Fig. 17.9. Observe that xp (n) is periodic and has period N = 4. The samples of xp (n) over n = 0, 1, 2, 3 are given by xp (0) = 1 xp (1) = 0.5 xp (2) = 0 xp (3) = 0.5 Observe further that the samples of the original sequence x(n) over the same time interval are x(0) = 1 x(1) = 0.5 x(2) = 0 x(3) = 0 466 x( n ) CHAPTER 17 DISCRETE FOURIER TRANSFORM 1 0.5 n 1 1 x( n 4 ) 1 0.5 n 4 x(n + 4) 1 0.5 n 4 x(n 8) 1 0.5 8 n FIGURE 17.8 A sequence x(n) and several shifted versions of it to the left and to the right by multiples of N = 4 samples. Therefore, the samples of xp (n) and x(n) need not coincide with each other over the interval n = 0, 1, . . . , N 1. Now using the just determined values for xp (n), n = 0, 1, 2, 3, in expression (17.18) for X (k) we nd that 3 X (0) = xp (n) = 2 n=0 3 2 X (1) = 1 + 0.5 ej 2 + ej X (2) = 1 + 0.5 ej + ej 3 = 1 1 = 0 X (3) = 1 + 0.5 ej 3 2 + e j 9 2 =1+0=1 =1+0 =1 and we arrive at the same values that were illustrated earlier in Fig. 17.7. 467 SECTION 17.2 xp (n) RELATION TO ORIGINAL SEQUENCE 1 4 1 4 1 8 n FIGURE 17.9 The periodic sequence xp (n) that is obtained from adding all the shifted versions of the sequence x(n) shown in the rst row of Fig. 17.8. Example 17.3 (Constructing the periodic sequence) Figure 17.10 illustrates a causal sequence, x(n), with nonzero samples over n = 0, 1, 2,: x(n) = 0.5 (n) + (n 1) + 0.5 (n 2) Select again N = 4. The same gure shows x(n) and shifted versions of it to the left and to the right by multiples of N = 4 samples. It is seen in this case that the value of N is again large enough so that when we sum the shifted versions of x(n) their samples will not interfere with each other. If we now add up x(n) and all its shifted versions we obtain the sequence xp (n) that is shown in Fig. 17.11. Observe again that xp (n) is periodic with period N = 4. Observe further that the samples of xp (n) over n = 0, 1, 2, 3, now coincide with the samples of x(n): xp (0) xp (1) xp (2) xp (3) = = = = 0.5 1 0.5 0 = = = = x(0) x(1) x(2) x(3) Therefore, in this case, we can work directly with the samples of x(n) to obtain X (k) without the need to evaluate xp (n) rst. The fact that the samples of xp (n) and x(n) coincide over n = 0, 1, . . . , N 1, is due to two factors: 1. The sequence x(n) is causal (exists for n 0) and has nite-duration. 2. The duration L of x(n) satises L N . That is, the value of N is large enough so that no interferences happen when the sequence x(n) and all its shifted versions are summed up. In this way, the samples of x(n) over n = 0, 1, . . . , N 1, remain intact. Example 17.4 (Aliasing in time) Figure 17.12 illustrates the same causal sequence x(n) as in the previous example, with nonzero samples over n = 0, 1, 2,: x(n) = 0.5 (n) + (n 1) + 0.5 (n 2) However, we now select N = 2. The same gure shows x(n) and several shifted versions of it to the left and to the right by multiples of N = 2 samples. It is seen in this case that x(n) and x(n 2) share a sample at location n = 2. Likewise, x(n) and x(n + 2) share a sample at location n = 0. A similar observation holds for all other shifted sequences. Therefore, when we sum these 468 x( n ) CHAPTER 17 DISCRETE FOURIER TRANSFORM 1 0.5 1 n 2 x(n 4) 1 0.5 n 4 x(n + 4) 1 0.5 n 4 A causal sequence x(n) and shifted versions of it to the left and to the right by FIGURE 17.10 N = 4 samples. xp (n) 1 4 4 8 n FIGURE 17.11 The samples of the periodic sequence xp (n) and the causal sequence x(n) coincide over n = 0, 1, 2, 3. sequences together, interferences will occur at the common sample locations. We say that aliasing in time occurs. For instance, if we now add x(n) and all its shifted versions we obtain the sequence xp (n) that is shown in Fig. 17.13. Observe that in this example xp (n) assumes the value 1 for all n; the samples of xp (n) over n = 0, 1, are given by xp (0) = 1 xp (1) = 1 469 x( n ) SECTION 17.2 RELATION TO ORIGINAL SEQUENCE 1 0.5 1 n 2 x(n 2) 1 0.5 n 2 x(n 4) 1 0.5 4 n x(n + 2) 1 0.5 n 2 FIGURE 17.12 A causal sequence x(n) and several shifted versions of it to the left and to the right by multiples of N = 2 samples. It is seen that the value of xp (n) at n = 0 is a distorted version of the value of x(n) at n = 0; the distortion is due to the interference that occurs between the samples of x(n) and x(n + 2) at n = 0. Using the just determined values for xp (n), n = 0, 1, in the expression (17.18) for X (k) we nd that 1 X (0) = xp (n) = 2 n=0 X (1) = 1 + ej = 0 Example 17.5 (Different time sequences can lead to the same periodic sequence) From the result (17.18) we see that in order to nd the DFT of a sequence x(n) we rst embed it into a periodic sequence xp (n) and then use (17.18) to determine the values of X (k) for k = 0, 1, . . . , N 1. 470 xp (n) CHAPTER 17 DISCRETE FOURIER TRANSFORM 1 4 2 2 6 4 8 n FIGURE 17.13 The samples of the periodic sequence xp (n). Aliasing in time occurs, for example, at n = 0 and n = 2. The aliasing is due to the interference between the samples of x(n) and x(n + 2) at time n = 0, and between the samples of x(n) and x(n 2) at n = 2. Now, if the sequence x(n) happens to have a nite duration L, and if the value of N that we choose for the DFT is larger than or equal to L, then the samples of xp (n) in the interval 0 n N 1 will coincide with the samples of x(n) but the exact locations of the samples may in general be different. This situation was encountered in Figs. 17.8 and 17.9 where we had xp (0) = 1 xp (1) = 0.5 xp (2) = 0 xp (3) = 0.5 x(1) = 0.5 x(0) = 1 x(1) = 0.5 x(2) = 0 and The sample values are the same but they appear over different intervals: n [0, 3] for xp (n) and n [1, 2] for x(n). Can we use the samples of xp (n) to recover the exact locations of the samples of x(n)? The answer is negative. This is because different sequences x(n) can lead to the same values for xp (n) over 0 n 3. For example, consider the sequence x (n) = x(n 4) The sequence x(n 4) is shown in the second row of Fig. 17.8. Now take the sequence x (n) and shift it to the left and to the right by multiples of N = 4 and add up all resulting sequences. The corresponding periodic sequence will continue to be the same xp (n) that we obtained for x(n) and which was shown in Fig. 17.9. Thus, given the samples of xp (n) over n = 0, 1, 2, 3, we cannot tell whether they were generated from x(n) or x (n). However, assume the following two conditions are satised simultaneously: 1. The original sequence x(n) has some nite-duration L satisfying L N . 2. The sequence x(n) is causal, x(n) = 0 for n < 0. That is, the values of x(n) exist over 0 n L 1 and L N . Then, x(n) and xp (n) will coincide over n = 0, 1, . . . , N 1, and they dene each other uniquely: x(n) = xp (n) for 0 n N 1 Obviously, if N is smaller than L, then aliasing in time occurs while forming xp (n) and the samples of x(n) cannot be recovered completely from those of xp (n), as was illustrated in Example 17.4. 17.3 DISCRETE FOURIER TRANSFORM The discussion in the previous section shows that the N point DFT of a sequence x(n) is obtained in two steps as follows: (a) First, embed x(n) into a periodic sequence xp (n) of period N using (17.19). Specically, shift x(n) to the left and to the right by multiples of N and add up all sequences to obtain xp (n). Keep the samples of xp (n) that lie within the period 0 n N 1. (b) Compute the N point DFT samples by using the relation N 1 xp (n)ej X (k ) = 2k Nn , n=0 k = 0, 1, . . . , N 1 (17.20) This step results in N values X (k ), k = 0, 1, . . . , N 1. Causal and Finite-Duration Sequences However, the presentation in Examples 17.217.5 showed that when the sequence x(n) is causal and has duration L N , then the samples of x(n) and xp (n) coincide over 0 n N 1. In this case, we can evaluate the N point DFT directly from x(n) as follows: N 1 x(n)ej X (k ) = 2k Nn , n=0 k = 0, 1, . . . , N 1 (17.21) where we are replacing xp (n) by x(n). For convenience, the upper index in the summation is kept as N 1 rather than L 1 even though x(n) = 0 for n L. This is done in order to emphasize that we are dealing with an N point DFT. The case of a causal and nite-duration sequence x(n) with L N is the situation that we encounter most frequently in practice. It is for this reason that the N point DFT of a sequence is often dened directly as in (17.21); our discussion is more general and explains what happens when the sequence x(n) is not causal or has duration L > N . It should be understood though that the DFT sequence so dened (whether by using xp (n) or x(n)) is a periodic sequence of period N , and that the denitions (17.20)(17.21) provide the values of X (k ) over a single period, namely, over k = 0, 1, . . . , N 1. The fact that the DFT is periodic of period N was illustrated in Fig. 17.3 and can be easily seen from the above dening relations as well. For example, using (17.21) we get N 1 x(n)ej X (k + N ) = n=0 2 (k+N ) n N N 1 x(n)ej = 2k Nn = X (k ) (17.22) n=0 In addition, it should also be understood that the N point DFT is in effect the transform of a periodic sequence xp (n), which is obtained by periodically repeating x(n) every N samples and summing the repeated sequences as in (17.19). 471 SECTION 17.3 DISCRETE FOURIER TRANSFORM 472 CHAPTER 17 DISCRETE FOURIER TRANSFORM Example 17.6 (Unit-sample sequence) Consider the unit-sample sequence x(n) = (n) This is obviously a causal and nite-duration sequence (with duration L = 1). The N point DFT of x(n) is therefore given by expression (17.21): X (k ) = N 1 x(n)ej 2k n N (n)ej 2k n N n=0 = N 1 n=0 = 1, k = 0, 1, . . . , N 1 In other words, x(n) = (n) DFT X (k) = 1, k = 0, 1, . . . , N 1 Figure 17.14 shows x(n) and its N point DFT X (k). In this example, the samples X (k) are realvalued and, therefore, only their amplitudes need to be displayed. x( n ) X (k ) 1 1 n 1 2 N 1 k FIGURE 17.14 Plots of the unit-sample sequence (left) and its N point DFT (right). Example 17.7 (Rectangular pulse) Consider now the rectangular pulse x(n) = 1, 0, 0 n L1 otherwise (17.23) with nite-duration L. We select an integer N L and evaluate the N point DFT of x(n) using expression (17.21): X (k ) N 1 = x(n)ej DISCRETE FOURIER TRANSFORM 2kn N n=0 L1 e j 2kn N 1 e j = 2kL N (a geometric sum) n=0 = 1 e j e j = kL N e j k N 2k N ej kL N ej ejk(L1)/N = k N e j e j kL N k N sin (kL/N ) , sin (k/N ) k = 0, 1, . . . , N 1 so that L, X (k ) = e k=0 jk(L1)/N sin (kL/N ) , sin (k/N ) k = 1, . . . , N 1 (17.24) Recall that we determined the DTFT of the rectangular pulse x(n) earlier in Example 13.5, where we found that sin (L/2) X (ej ) = ej(L1)/2 , [0, 2 ] (17.25) sin (w/2) As expected, we see that the DFT samples X (k) in (17.24) correspond to sampling the DTFT (17.25) at the locations = 2k/N . In particular, observe that if we choose N = L, then the Lpoint DFT of the rectangular pulse trivializes to L, k=0 (17.26) X (k ) = 0, k = 1, . . . , L 1 In other words, X (k ) = L (k ), k = 0, 1, . . . , L 1 (Lpoint DFT) (17.27) The sequence X (k) = L (k) may not covey much information about the DTFT of x(n); however, it is sufcient to fully recover x(n) (as will be seen by using the inverse DFT expression of the next section see Example 17.9)! This situation is illustrated in Fig. 17.15. x (n ) X (k ) L 1 1 FIGURE 17.15 (right). 2 L1 473 SECTION 17.3 n k Plots of a rectangular pulse of duration L samples (left) and its Lpoint DFT Let us now plot the DFT of the rectangular pulse for values of N larger than L. For illustration purposes, we rst reproduce in Fig. 17.16 the magnitude and phase plots of the DTFT of x(n), which were derived earlier in Example 13.5; here we are showing the plots over the interval [0, 2 ]. 474 CHAPTER 17 Figures 17.17 and 17.18 show the magnitude and phase plots of the DFT of the rectangular pulse for L = 5 for both cases of N = 32 and N = 16. DISCRETE FOURIER TRANSFORM magnitude plot 5 |X(ej)| 4 3 2 1 0 1 2 3 4 (rad/sample) phase plot 5 6 0 1 2 3 4 (rad/sample) 5 6 3 X(ej) 2 1 0 1 2 3 FIGURE 17.16 Plot of the magnitude (top) and phase (top) of DTFT of a rectangular pulse of width L = 5 over [0, 2 ]. Example 17.8 (2-point DFT) Consider a sequence x(n) with L = 2 samples, x(0) and x(1). Its 2point DFT is given by 1 X (k ) x(n)ej = 2 kn 2 n=0 = x(0) + x(1)ejk , k = 0, 1 so that the two DFT coefcients are X (0) = x(0) + x(1) X (1) = x(0) x(1) Note that the DFT coefcients in this case are obtained by simply adding and subtracting the samples of x(n). We shall call upon this result later in Chapter 20 when we develop the Fast Fourier Transform (FFT) see Example 19.2. 475 32point DFT SECTION 17.4 5 INVERSE DFT |X(k)| 4 3 2 1 0 0 5 10 0 5 15 k phase plot 10 20 25 30 20 25 30 3 X(k) 2 1 0 1 2 15 k FIGURE 17.17 Plot of the magnitude (top) and phase (bottom) of the 32point DFT of a rectangular pulse of width L = 5. 17.4 INVERSE DFT Let us now address the question of recovering the original time-domain sequence x(n) from knowledge of its N point DFT. Thus consider a causal sequence x(n) with duration L N . Its N point DFT is given by N 1 x(m)ej X (k ) = 2k Nm , m=0 k = 0, 1, . . . , N 1 (17.28) where we are now using the symbol m to denote the time variable. Multiplying both sides of the above equality by ej 2kn/N we get N 1 X (k )ej 2k Nn x(m)ej = 2k N (mn) (17.29) m=0 Summing both sides over k = 0, 1, . . . , N 1 gives N 1 N 1 N 1 X (k )ej 2k Nn x(m)ej = 2k N (mn) k=0 m=0 k=0 N 1 N 1 e j x(m) = m=0 k=0 2k N (mn) (17.30) 476 16point DFT CHAPTER 17 5 DISCRETE FOURIER TRANSFORM |X(k)| 4 3 2 1 0 0 5 10 15 10 15 k phase plot 3 X(k) 2 1 0 1 2 3 0 5 k FIGURE 17.18 Plot of the magnitude (top) and phase (bottom) of the 16point DFT of a rectangular pulse of width L = 5. where we switched the order of the summations since x(m) is independent of k . Now note the useful identity: N 1 e j 2k N = k=0 N, 0, if = 0, N, 2N, . . . otherwise (17.31) In other words, the sum evaluates to N for values of that are multiples of N (this conclusion is obvious), and the sum is equal to zero otherwise. To justify this latter conclusion, consider, for example, the case = 1. Then the sum becomes N 1 e j 2k N k=0 which corresponds to adding N complex numbers on the unit circle, and which are located at the angles 2 4 6 2 (N 1) 0, , , , ..., NNN N These numbers cancel each other and the sum evaluates to zero, as illustrated in Fig. 17.19 for the cases N = 3 and N = 4. Applying the identity (17.31) to the sum that appears in (17.30) we have N 1 e j k=0 2k N (mn) = N, 0, if (m n) = 0, N, 2N, . . . otherwise (17.32) 477 N =3 N =4 Im Im 1 2 1 INVERSE DFT 1 Re FIGURE 17.19 and N = 4. SECTION 17.4 Re Location of the samples of the sequence ej 2k/N on the unit circle for N = 3 Now recall that both m and n vary over the range 0 n N 1. Therefore, the condition (m n) = 0, N, 2N, . . . can only be satised when m n = 0 and, hence, m = n. Returning to (17.32) we conclude that N 1 e j 2k N (mn) N 0 = k=0 when m = n for all m = n over 0 m N 1 (17.33) Consequently, the expression on the right-hand side of (17.30) collapses to N 1 N 1 e j x(m) m=0 2k N (mn) = N x(n) (17.34) k=0 and we arrive at the desired inverse DFT (IDFT) relation: x(n) = 1 N N 1 X (k )ej 2k Nn , k=0 n = 0, 1, . . . , N 1 (17.35) Aliasing in Time The derivation of the inverse DFT expression (17.35) assumed a causal and nite-duration sequence x(n) with L N for which the DFT is computed via (17.28). What if the original sequence x(n) is not causal or its duration exceeds N , in which case aliasing in time may occur? In this case, we would form rst the corresponding periodic sequence xp (n) and use it instead to determine the N point DFT via N 1 xp (n)ej X (k ) = n=0 2k Nn , k = 0, 1, . . . , N 1 (17.36) 478 CHAPTER 17 DISCRETE FOURIER TRANSFORM The same argument given above will then indicate that the inverse DFT formula will allow us to recover the samples of xp (n), as opposed to those of x(n), as follows: xp (n) = 1 N N 1 X (k )ej 2k Nn , n = 0, 1, . . . , N 1 k=0 (17.37) Example 17.9 (Rectangular pulse) Consider the Lpoint DFT X (k) = L (k), k = 0, 1, . . . , L 1 and let us determine its inverse DFT. Using the relation (17.35) we have x(n) 1 L = = 1 L = 1, L1 X (k )e j 2k n L k=0 L1 L (k)ej 2k n L k=0 n = 0, 1, . . . , L 1 We nd that the time-sequence is the rectangular pulse of width L, as anticipated earlier. 17.5 VECTOR REPRESENTATION Let WN denote the N th root of unity, i.e., the complex numberi.e., WN 2 = e j N = cos (17.38) 2 N 2 N j sin (17.39) Then evaluating the nk -th power of WN gives (WN )nk = ej 2k Nn so that the denition (17.21) for the N point DFT of a causal and nite-duration sequence, x(n), with L N , can be expressed as N 1 nk x(n)WN , X (k ) = n=0 k = 0, 1, . . . , N 1 (17.40) Observe from (17.40) that for each k , the value of X (k ) can be evaluated as the inner product of two vectors: 1 k WN 2 WNk 3 WNk (N 1)k . . . WN (17.41) 479 and x(0) x(1) x(2) . . . x(N 1) SECTION 17.5 VECTOR REPRESENTATION (17.42) In this way, if we collect the N DFT coefcients into a column vector as well, say, as X (0) X (1) X (2) (17.43) . . . X (N 1) then expression (17.40) gives the vector relation: 1 1 1 X (0) 1 2 WN WN X (1) 2 4 X (2) WN WN = 1 . . . . . . . . . X (N 1) 1 (N 1) WN 1 3 WN 6 WN 2(N 1) WN XN 3(N 1) . . . WN WN FN x(0) x(1) x(2) . . . x(N 1) xN ... 1 (N 1) . . . WN 2(N 1) . . . WN .. . (N 1)2 (17.44) If we introduce the N 1 vectors XN and xN , as dened above, as well as the N N matrix FN , then we can write (17.44) more compactly as XN = FN xN (17.45) This relation states that the N point DFT of the sequence x(n) can be evaluated by transforming the vector xN into the vector XN by means of the so-called N N DFT matrix FN whose (m, k )-th entry is given by [FN ]mk = ej 2mk N (N N ) (17.46) The matrix FN has a useful property. First, note that FN is a matrix with complex-valued entries. Thus, let FN denote the matrix that is obtained by complex conjugating the entries of FN followed by transposing the matrix. For example, let N = 4. Then 1 1 1 1 3 1 e j 2 ej ej 2 F4 = 1 ej ej 2 ej 3 3 9 1 ej 2 ej 3 ej 2 480 CHAPTER 17 DISCRETE FOURIER TRANSFORM If we complex-conjugate each entry of F4 we get the matrix 1 1 1 1 3 1 ej 2 ej ej 2 j j 2 j 3 1 e e e 3 9 1 ej 2 ej 3 ej 2 In order to arrive at F4 we transpose the above complex-conjugated matrix. However, since the matrix is already symmetric we get that it agrees with F4 and we therefore 1 1 1 1 3 1 ej 2 ej ej 2 F4 = 1 ej ej 2 ej 3 9 3 1 ej 2 ej 3 ej 2 Now it follows from the identity (17.32) that the matrix FN satises FN FN = N IN = FN FN where IN denotes the N N identity matrix 1 1 1 IN = .. . 1 (N N ) (17.47) (17.48) That is, the products FN FN and FN FN are diagonal matrices with diagonal entries equal to N . Likewise, the inverse DFT operation (17.35) can be expressed in matrix form as follows: xN = 1 F XN NN (17.49) in terms of the matrix FN . We can derive this result by either following the derivation that led to (17.44) or by starting from (17.45) and using (17.47). Indeed, multiplying both sides of (17.45) by FN from the left we get FN XN = FN FN xN = N xN =N IN from which (17.49) follows. 17.6 APPLICATIONS TO BE ADDED Practice Questions: 1. 2. 481 17.7 PROBLEMS SECTION 17.7 PROBLEMS Problem 17.1 Find the 4point DFTs of the sequences dened below over the interval 0 n 3 (all other samples are zero): (a) x(n) = 1 , 1, 1, 1 . (b) y (n) = (1)n x(n). (c) y (n) = ej 2 n x(n). (d) y (n) = cos 2 n x(n). In each case, plot |X (k)| and X (k). Problem 17.2 Find the 6point DFTs of the sequences dened below over the interval 0 n 5 (all other samples are zero): (a) x(n) = 1 , 0, 1, 0, 1, 0 . (b) y (n) = ejn x(n). (c) y (n) = ej 3 n x(n). (d) y (n) = sin 2 3 n x(n). In each case, plot |X (k)| and X (k). Problem 17.3 Let x(n) = (n + 2) (n) + (n 2). (a) Determine its DTFT. (b) Sample the DTFT to obtain the 6point DFT of x(n). (c) Obtain the same 6point DFT using (17.20). (d) Obtain the same 6point DFT using (17.21). Does aliasing in time occur? Problem 17.4 Let x(n) = (n + 1) + 2 (n) (n 1). (a) Determine its DTFT. (b) Sample the DTFT to obtain the 4point DFT of x(n). (c) Obtain the same 4point DFT using (17.20). (d) Obtain the same 4point DFT using (17.21). Does aliasing in time occur? Problem 17.5 Let x(n) = (n + 3) (n) + (n 3). (a) Determine its DTFT. (b) Sample the DTFT to obtain the 4point DFT of x(n). (c) Obtain the same 4point DFT using (17.20). (d) Obtain the same 4point DFT using (17.21). Does aliasing in time occur? Problem 17.6 Let x(n) = (n + 2) + (n 2). (a) Determine its DTFT. (b) Sample the DTFT to obtain the 4point DFT of x(n). (c) Obtain the same 4point DFT using (17.20). (d) Obtain the same 4point DFT using (17.21). Does aliasing in time occur? Problem 17.7 Find the inverse DFTs of the DFT sequences dened below over one period, 0 k 3: (a) X (k) = 1 , 1, 1, 1 . (b) Y (k) = (1)n X (k). 482 CHAPTER 17 DISCRETE FOURIER TRANSFORM (c) Y (k) = ej 2 k X (k). (d) Y (k) = cos 2 k X (k ). In each case, plot |x(n)| and x(n). Problem 17.8 Find the inverse DFTs of the DFT sequences dened below over one period, 0 k 6: (a) X (k) = 1 , 0, 1, 0, 1, 0 . (b) Y (k) = ejk X (k). (c) Y (k) = ej 3 k X (k). (d) Y (k) = sin 3 k X (k ). In each case, plot |x(n)| and x(n). Problem 17.9 Determine the 4point DFT of the rectangular pulse of width L = 5 from Example 17.7. Compare the answer with the 4point DFT of a rectangular pulse of width L = 4. Explain the results. Problem 17.10 Determine the 4 and 6point DFT of the following pulse x(n) = 2, 1, 0, 1, n=0 n=1 n=2 n=3 Problem 17.11 Let x(n) be a rectangular pulse of duration 4 (L = 4). (a) Determine its 8point DFT using (17.20). (b) Determine its 8point DFT using (17.45). Problem 17.12 Let X (k) = { 1, , 2, 1, 1}. (a) Find its inverse DFT using (17.35). (b) Determine its 8point DFT using (17.49). Problem 17.13 Determine and plot the N point DFT of the following sequences, which are all limited to the interval 0 n N 1: (a) x(n) = (n). (b) x(n) = u(n) u(n N ). (c) x(n) = cos 2nk 0 N , k0 < N . Problem 17.14 Determine and plot the N point DFT of the following sequences, which are all limited to the interval 0 n N 1: (a) x(n) = (n n0 ) + (n N + n0 ), n0 < N . (b) x(n) = (n n0 ) + (n N + n0 ), n0 < N . (c) x(n) = sin 2nk 0 N , k0 < N . Problem 17.15 Determine the N point DFT of the sequences (a) x(n) = cos2 (n). (b) x(n) = sin2 (n). Problem 17.16 Determine the N point DFT of the sequences (a) x(n) = sin(2n) cos2 (n). (b) x(n) = cos(n) sin2 (n). 483 Problem 17.17 Determine the N point DFT of the sequence x(n) = cos(o n), SECTION 17.7 0nN 1 PROBLEMS Simplify the result when o is a multiple of 2/N . Problem 17.18 Determine the N point DFT of the sequence x(n) = sin3 (o n), 0nN 1 Simplify the result when o is a multiple of 2/N . Problem 17.19 Figure 17.20 shows the magnitude and phase components of the DTFT of a sequence x(n). Determine the 4 and 8point DFTs of the sequence. |X (ej )| 1 1/2 2 4 4 2 4 2 X (ej ) /2 FIGURE 17.20 2 4 Magnitude and phase plots of the DTFT of a sequence x(n) for Prob. 17.19. Problem 17.20 Figure 17.21 shows the magnitude and phase components of the DTFT of a sequence x(n). Determine the 4 and 8point DFTs of the sequence. Problem 17.21 Figure 17.22 shows a 4point DFT. Give two sequences x(n) whose 4point DFTs agree with the gure. Problem 17.22 Figure 17.23 shows a 4point DFT. Give two sequences x(n) whose 4point DFTs agree with the gure. Problem 17.23 Consider two real-valued sequences x1 (n) and x2 (n), both of nite-duration N . Dene y (n) = x1 (n) + jx2 (n). Determine the N points DFTs X1 (k) and X2 (k) in terms of the N -point DFT Y (k). Remark. This problem shows how a complex-valued N point DFT can be used to determine two N point DFTs of real-valued sequences. Problem 17.24 Consider two periodic sequences x(n) and y (n) of periods Nx and Ny , respectively. Dene w(n) = x(n) + y (n). (a) Show that w(n) is periodic with period Nx Ny . 484 CHAPTER 17 |X (ej )| DISCRETE FOURIER TRANSFORM 1 1/2 2 4 4 2 4 2 X (ej ) /2 2 FIGURE 17.21 4 Magnitude and phase plots of the DTFT of a sequence x(n) for Prob. 17.20. X (k ) 1 1/2 1/2 2 1 3 k 1/2 FIGURE 17.22 4point DFT for Prob. 17.21. (b) Determine the N point DFT W (k) in terms of the N point DFTs X (k) and Y (k). Problem 17.25 Express the N point DFT of cos2 (o n) x(n) in terms of the N point DFT of x(n). Problem 17.26 Express the N point DFT of sin2 (o n) x(n 2) in terms of the N point DFT of x(n). Problem 17.27 Express the N point inverse DFT of (1)k cos2 (o k) X (k) in terms of the N point inverse DFT of X (k). 2 Problem 17.28 Express the N point inverse DFT of ej N k sin2 (o k) X (k) in terms of the N point inverse DFT of X (k). 485 SECTION 17.7 X (k ) PROBLEMS 1 1/2 2 1 3 k 1/2 FIGURE 17.23 4point DFT for Prob. 17.22. Problem 17.29 Let X (k) denote the N point DFT of a sequence x(n). Let y (n) denote the N point DFT (not inverse DFT) of the sequence X (k). Let Y (k) denote the N point DFT of the sequence y (n). Let w(n) denote the N point DFT (not inverse DFT) of the sequence W (k). Use (17.45) to relate the sequences w(n) and x(n). Problem 17.30 Consider a nite-duration sequence x(n), dened over 0 n L 1. Let X (k) denote its N point DFT, with L N . Let also X (z ) and X (ej ) denote its z transform and discrete-time Fourier transform (DTFT), respectively. (a) Show that X (z ) and X (k) are related as follows: X (z ) = 1 z N N N 1 X (k ) 1 ej k=0 2k N z 1 (b) Conclude that X (ej ) = 1 ejN N N 1 k=0 X (k ) 1 e j ( 2k ) N (c) Show further that the above expression is equivalent to X (ej ) = 1 N N 1 X (k )R e j ( 2k N ) k=0 j where R(e ) is the DTFT of a rectangular pulse of width N , i.e., R(ej ) = ej( N 1 2 ) sin (N/2) sin (/2) Remark. The expression in part (c) provides an interpolation formula that allows us to recover the DTFT of x(n) from its DFT sequence. We associate with each sample X (k) the sinc-like function R(ej ), which is centered at the location of X (k). We subsequently combine the contributions from all samples. Note that R(ej ) is periodic with period 2 . Problem 17.31 Consider the signal x(n) = |n| , where || < 1. (a) Compute the DTFT of x(n). (b) Let X (k) denote the 4-point DFT of x(n). Compute X (k) for k = 0, 1, 2, 3. (c) Compute the rst 4 values (n = 0, 1, 2, 3) of the periodic sequence x1 (n) = r = |n4r| . CHAPTER 18 Properties of the DFT T he Discrete Fourier Transform (DFT) has several useful properties. This chapter establishes some of these properties and provides illustrative examples. Thus, consider a causal sequence x(n) with duration L N . According to the denition (17.21), the N point DFT of x(n) is given by N 1 x(n)ej X (k ) = 2k Nn , n=0 k = 0, 1, . . . , N 1 (18.1) This expression takes N samples of x(n) (appended with zero samples if L < N ) and transforms them into N samples of X (k ). The case of causal and nite-duration sequences, x(n), is the situation that we encounter most frequently in practice. Remember, however, that we explained in Sec. 17.3 explained the procedure that we should follow to evaluate the N point DFT of a general sequence x(n), which may neither be causal nor have nite-duration. Specically, we follows these two steps: (a) We rst embed x(n) into a periodic sequence, xp (n), of period N using (17.19). This task is achieved by shifting x(n) to the left and to the right by multiples of N and by adding up all sequences to obtain xp (n). (b) We subsequently compute the N point DFT samples by using the relation N 1 xp (n)ej X (k ) = n=0 2k Nn , k = 0, 1, . . . , N 1 (18.2) with x(n) in (18.1) replaced by xp (n) in (18.2). This step uses only the N samples of xp (n) that are within the interval 0 n N 1. The calculation results in N values of X (k ), k = 0, 1, . . . , N 1. Nevertheless, we shall assume from now on that we are dealing with sequences x(n) that are causal and have nite-duration L N . Whenever this is not the case, we simply replace x(n) by the periodic sequence xp (n). 487 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 488 18.1 PERIODICITY OF THE DFT CHAPTER 18 PROPERTIES OF THE DFT Assume we evaluate the DFT of x(n) in (18.1) for all values of k and not only over k = 0, 1, . . . , N 1, namely, N 1 x(n)ej X (k ) = 2k Nn , k = . . . , 2, 1, 0, 1, 2, . . . n=0 (18.3) Then, it can be easily veried that the DFT sequence X (k ) is periodic with period N , i.e., X (k + N ) = X (k ) for all integers k (18.4) This property was illustrated earlier in the construction shown in Fig. 17.3, and was also established in (17.22). Proof: Note that the complex exponential sequence ej 2kN/n is periodic with period N over the variable k since 2 (k+N ) 2k 2k j ej N n = e2n ej N n = ej N n =1 Accordingly, we get X (k + N ) = N 1 x(n)ej 2 (k+N ) n N n=0 = N 1 x(n)ej 2 (k) n N n=0 = X (k ) Figure 18.1 illustrates the periodicity of the N point DFT; the gure plots the samples of a real-valued DFT. It is because of the periodicity property (18.4) that we usually display the magnitude and phase plots of the DFT over a one period interval. This interval is generally chosen as 0 k N 1. Example 18.1 (Periodicity in time and frequency) Consider the causal and nite-duration sequence (for which L = 4): x(n) = (n) + 0.5 (n 1) + 0.5 (n 3) Evaluating the 4point DFT of x(n) we get 3 X (0) = x(n) = 2 n=0 3 2 X (1) = 1 + 0.5 ej 2 + ej X (2) = 1 + 0.5 ej + ej 3 = 1 1 = 0 X (3) = 1 + 0.5 ej 3 2 + e j 9 2 =1+0=1 =1+0 =1 489 SECTION 18.2 X (k) (periodic) USEFUL PROPERTIES k k = (N 1) k=0 k =N 1 X (k) (one period) 0 N 1 k FIGURE 18.1 The N point DFT is periodic of period N . The top gure shows the periodic structure of the DFT while the bottom gure shows one period of the DFT. Recall that this 4point DFT is also the DFT of the periodic sequence, xp (n), which we obtain from x(n) by shifting the samples of x(n) to the left and to the right by multiples of N = 4 and adding all shifted sequences. The periodic sequence, xp (n), and the corresponding periodic 4point DFT sequence, X (k), are shown in Fig. 18.2. Therefore, we can view the N point DFT of a sequence as a transform that associates a periodic sequence X (k ) with a periodic sequence xp (n); both sequences have period N . Due to this periodicity, we often limit ourselves to working with samples that lie within one period of each sequence, namely, the N samples of X (k ) and xp (n) that lie within the intervals 0 n, k N 1. 18.2 USEFUL PROPERTIES The DFT shares several properties with the DTFT. A summary of these properties is given in Table 18.1. For example, the rst two lines of the table start from two generic causal sequences x(n) and y (n) of nite duration L N , and the subsequent lines provide the DFT of combinations and transformations of these sequences. 18.2.1 Linearity Consider the third line of the table. It states that the N point DFT of a linear combination of two sequences is given by the same linear combination of their N point DFTs, i.e., ax(n) + by (n) aX (k ) + bY (k ) (18.5) 490 x(n) CHAPTER 18 PROPERTIES OF THE DFT 1 1 2 n 3 xp (n) 1 4 4 8 n 4 1 1 8 k X (k ) 2 4 1 1 FIGURE 18.2 A causal and nite-duration sequence x(n) with L = 4 is shown in the top plot. Its periodic embedding, xp (n), is shown in the middle plot and the resulting 4point periodic DFT sequence X (k) is shown in the bottom plot. Note in this case that the samples of x(n) and xp (n) agree over the one-period interval 0 n N 1. for any scalars a and b. Proof: Let w(n) = ax(n) + by (n). Then W (k ) = N 1 w(n)ej 2k n N n=0 = N 1 [ax(n) + by (n)]ej 2k n N n=0 N 1 x(n)ej = a = 2k n N +b N 1 y (n)ej 2k n N aX (k) + bY (k) n=0 n=0 491 TABLE 18.1 Several properties of the N point DFT. The variables n and k lies within the intervals 0 n, k N 1. Causal sequences of duration L N N point DFT 1. x(n) X (k ) 2. y (n) Y (k ) 3. ax(n) + by (n) aX (k) + bY (k) 4. x[(n no ) mod N ] e j 5. ej 6. cos 7. Property 2ko n N X (k ) circular time shift X [(k ko ) mod N ] circular frequency shift 1 1 X [(k ko ) mod N ] + X [(k + ko ) mod N ] 2 2 modulation x(n mod N ) X (k mod N ) time reversal 8. x (n) X (k mod N ) conjugation in time 9. x (n mod N ) X (k ) conjugation in frequency 10. x(n) y (n) X (k )Y (k ) circular convolution 11. x(n)y (n) 1 (X (k) Y (k)) N product of sequences 1 N 1 X (k )Y (k ) N k=0 Parsevals relation 12. 2k N 1 x(n) 2no k N linearity o N n x(n) x(n)y (n) n=0 Example 18.2 (Combining two sequences) Consider the sequence x(n) that is shown in the top plot of Fig. 18.3 and let us determine its 4point DFT. While we can evaluate the 4point DFT of x(n) directly from the denition (18.1), we instead appeal to the linearity property (18.5) to illustrate it. Thus, note that the sequence x(n) can be regarded as the sum of the two rectangular pulses shown in the middle and bottom plots of Fig. 18.3: x(n) = x1 (n) + x2 (n) where x1 (n) has duration L = 2: 1, 0, x1 (n) = 0n1 otherwise 1, 0, 0n3 otherwise and x2 (n) has duration L = 4: x2 (n) = SECTION 18.2 USEFUL PROPERTIES 492 x(n) CHAPTER 18 PROPERTIES OF THE DFT 2 1 1 2 3 n 2 3 n 2 3 n x1 (n) 1 1 x2 (n) 2 1 1 FIGURE 18.3 The sequence x(n) in the top plot can be expressed as the sum of the two rectangular pulses in the middle and bottom plots. We already know from the discussion in Example 17.7, that the 4point DFTs of the rectangular pulses x1 (n) and x2 (n) are given by 2, X1 (k) = e k=0 jk/4 sin (k/2) , sin (k/4) k = 1, 2, 3 and X2 (k) = 4 (k), k = 0, 1, 2, 3 since the duration of x2 (n) agrees with the value of N . We conclude that 6, X (k ) = e k=0 jk/4 sin (k/2) , sin (k/4) k = 1, 2, 3 In other words, X (0) = 6 X (1) = X (2) = 1j = X (3) = 0 1+j = 2ej/4 2ej/4 493 The magnitude and phase plots of the resulting 4point DFT are shown in Fig. 18.4. SECTION 18.2 USEFUL PROPERTIES |X ( k ) | 6 4 2 2 1 2 2 3 k 3 k X (k ) 4 4 1 2 FIGURE 18.4 The magnitude (top) and phase (bottom) plots of the 4point DFT of the sequence x(n) from Fig. 18.3. 18.2.2 Circular Time Shifts Consider now the fourth line in Table 18.1. It relates to circular shifts in the time domain and their effect on the DFT of a sequence. Before establishing the property, we need to explain what circular shifts are and motivate the need for their use in the context of the DFT. Denition Consider a causal sequence x(n) with duration L N . We focus on the samples within the window 0 n N 1. The samples from n = L to n = N 1 will be equal to zero when L N . One such sequence is displayed in Fig. 18.5 (top plot) and will be used to illustrate circular shifts. When we delay the sequence x(n) by one sample, the traditional shift operation simply displaces all samples of x(n) to the right by one position; this operation results in the sequence x(n 1). The situation is illustrated in the bottom plot of Fig. 18.5. Observe, for example, how a new zero sample moves into location n = 0 and that the zero sample that used to occur at location n = 5 in x(n) has now moved to location n = 6. A circular operation, on the other hand, is an operation that keeps the samples of x(n) pinned within the window 0 n N 1. When we shift the samples of x(n) circularly to the right by one sample, the right-most sample at n = 5 that is about to leave the window from the right is wrapped around and moved back inside the window at location n = 0. Figure 18.6 illustrates the result of three successive circular shifts to the right of the sequence x(n). Observe how the samples leaving the window 0 n N 1 from the right are always wrapped around and stay always within the same window. In a similar fashion, Fig. 18.7 illustrates the result of three successive circular shifts of the same sequence x(n) albeit to the left. Now, the samples leaving the window 0 n N 1 from the left are wrapped around and enter the window from the right. 494 CHAPTER 18 PROPERTIES OF THE DFT x(n) 1 1 2 4 3 n 5 x(n 1) (traditional shift) 1 1 2 4 3 5 6 n FIGURE 18.5 Consider a sequence x(n) of length L = 4 and choose N = 4. The samples of x(n) lie within the window 0 n 5. The two zero samples at n = 4 and n = 5 are indicated explicitly with bullets. Different colors are used for the three bullets at zero in order to facilitate the tracking of their movement as circular shifts occur. How do Circular Shifts Arise? The main reason why circular shifts arise in the context of the N point DFT of a sequence is because standard shifts of the periodic sequence xp (n), correspond to circular shifts of the original sequence, x(n). Figure 18.8 shows a causal sequence x(n) (top plot) with L = 4 samples along with its periodic embedding, xp (n), with period N = 4 (middle plot). The samples of xp (n) within 0 n 3 are marked with a dotted box around them. The bottom plot shows the sequence xp (n) but shifted to the right by one sample. This is the traditional shift operation and all samples of xp (n) move to the right by one place. If we examine the samples that lie within the window 0 n 3 in xp (n 1) we nd that they could have been obtained by circularly shifting to the right the samples of x(n). Notation To denote a circular shift of k samples, we employ the notation x [(n k ) mod N ] in terms of the modulo N operation, which is dened as follows. Given two integer numbers, m and N , the notation m mod N refers to the remainder, r, that is obtained when dividing m by N . For example, 11 mod 6 = 5 4 mod 6 = 4 495 SECTION 18.2 USEFUL PROPERTIES x(n 1) (circular shift) 1 1 2 3 4 5 n x(n 2) (circular shift) 1 1 2 3 4 5 n x(n 3) (circular shift) 1 1 FIGURE 18.6 2 3 4 5 n Three successive circular shifts to the right of the sequence x(n) of Fig. 18.5. The result of the modulo operation is always an integer in the interval 0 r N 1. When m is larger than N , we subtract from m sufcient multiples of N until the remainder lies within this interval. Thus, note that 22 = (3 6) + 4 (18.6) 22 mod 6 = 4 (18.7) so that Sometimes, we shall encounter dividend values, m, that are negative integers. In such cases, we add to m sufcient multiples of N until the remainder lies within the interval 0 r N 1. For example 11 + 2 6 = 1 (18.8) so that 11 mod 6 = 1 (18.9) Using the denition of the modulo operation, let us now examine why an operation of the form x [(n 1) mod N ] 496 CHAPTER 18 PROPERTIES OF THE DFT x(n + 1) (circular shift) 1 1 2 3 4 n 5 x(n + 2) (circular shift) 1 1 2 3 4 n 5 x(n + 3) (circular shift) 1 1 FIGURE 18.7 2 3 4 n 5 Three successive circular shifts to the left of the sequence x(n) of Fig. 18.5. corresponds to a circular shift to the right by one position. Indeed, for illustration purposes, select N = 6 and let y (n) denote the resulting sequence y (n) = x [(n 1) mod 6] Then, the samples of y (n) over 0 n 5 are given by y (0) y (1) y (2) y (3) y (4) y (5) = = = = = = x(1 mod 6) x( 0 mod 6) x( 1 mod 6) x( 2 mod 6) x( 3 mod 6) x( 4 mod 6) = = = = = = x(5) x(0) x(1) x(2) x(3) x(4) and it is seen that the sample of y (n) at time n = 0 coincides with the sample of x(n) at time n = 5, as expected from a circular shift of x(n) by one position to the right. 497 SECTION 18.2 xp (n) USEFUL PROPERTIES 1 4 4 8 n xp (n 1) (traditional shift) 1 4 4 8 n FIGURE 18.8 A periodic sequence xp (n) with period N = 4 (top plot). The samples of xp (n) within 0 n 3 are marked with a dotted box around them. The bottom plot shows the same sequence but shifted to the right by one sample. This is the traditional shift operation and all samples of xp (n) move to the right by one place. Example 18.3 (Modulo operation) Let N = 6 and no = 2. Let us examine the range of values that the modulo operation (n no ) mod N assumes as n varies over the range 0 n N 1. Let r = (n 2) mod 6 Then simple calculations reveal that n=0 n=1 n=2 n=3 n=4 n=5 = = = = = = r=4 r=5 r=0 r=1 r=2 r=3 In other words, the remainder r assumes all values in the interval 0 r N 1 as n varies over the same interval. Let us repeat the same example for some value of no that is larger than N , say no = 9. Thus, let r = (n 9) mod 6, 0n5 498 Again, some simple calculations reveal that CHAPTER 18 n=0 PROPERTIES OF THE DFT n=1 n=2 n=3 n=4 n=5 = = = = = = r=3 r=4 r=5 r=0 r=1 r=2 and we again see that the remainder r assumes all values in the interval 0 r N 1 as n varies over the same interval. Circular Time-Shift Property Let us now return to the fourth line in Table 18.1. It establishes the transform property: x[(n no ) mod N ] e j 2no N k X (k ) (18.10) In other words, if the original sequence x(n) is circularly shifted in time by no samples (where no may be a positive or negative integer; it may also be smaller or larger than N in magnitude), then the phase of the corresponding DFT sequence is modied by the factor ej 2no k/N . Observe that the magnitude of the DFT is not modied since ej 2no k/N X (k ) and X (k ) have the same magnitude for every . We therefore say that circular shifts in the time-domain correspond to phase change in the frequency domain. Proof: For any integer n in the interval 0 n N 1, let us express n no in the form n no = aN + r for some integer a and where r denotes the result of the modulo operation: (n no ) mod N = r The values of a and r vary with the value of n. So, strictly speaking, we should write a(n) and r (n) instead of a and r to emphasize their dependency on n. However, this level of detail is unnecessary for our argument and is omitted for simplicity of notation. The values of r span the interval 0 r N 1 as n varies over the same interval. Thus, let w(n) = x[(n no ) mod N ]. Then W (k ) = N 1 w(n)ej 2k n N n=0 = N 1 n=0 = = e j e x[(n no ) mod N ] ej 2k n o N k j 2N no = e j 2k n o N = e j 2k n o N N 1 n=0 N 1 2k n N x[(n no ) mod N ] ej x ( r ) e j 2k (aN +r ) N x ( r ) e j 2k r N r =0 N 1 2k (nn ) o N , using r = (n no ) mod N r =0 X (k ) where in the third equality we multiplied and divided by the factor ej 2kno /N , and in the fourth equality we replaced (n no ) by aN + r and then used the fact that e j 2k (nn ) o N = e j 2k (aN +r ) N = e j 2k r N Example 18.4 (Illustrating the circular time-shift property) Consider the sequence x(n) that is shown in the top plot of Fig. 18.9. We already evaluated its 4point DFT in Example 18.2 and found that X (0) = X (1) = X (2) = X (3) = 6 2ej/4 0 2ej/4 The magnitude and phase plots of this DFT were shown in Fig. 18.4. Now assume that we circularly shift x(n) to the right by one sample and consider the resulting sequence y (n) = x[(n 1) mod 4] According to property (18.10), the 4point DFT of y (n) is related to the 4point DFT of x(n) as follows: k Y ( k ) = e j 2 X ( k ) , 0 k 3 Consequently, using the values for X (k), we get Y (0) = Y (1) = Y (2) = Y (3) = X (0) = 6 ej 2 X (1) = 2ej 3/4 ej X (2) = 0 3 ej 2 X (3) = 2ej 5/4 = 2ej 3/4 Figures 18.9 and 18.10 illustrate the sequences x(n) and y (n) and their respective 4point DFTs. 499 SECTION 18.2 USEFUL PROPERTIES 500 x(n) CHAPTER 18 PROPERTIES OF THE DFT 2 1 1 2 3 n y (n) = x[(n 1) mod 4] 2 1 1 2 3 n FIGURE 18.9 The sequence x(n) in the top plot is circularly shifted by one sample to the right in the bottom plot. 18.2.3 Circular Frequency Shifts Consider now the fth line in Table 18.1. It establishes the transform property: ej 2ko N n x(n) X [(k ko ) mod N ] (18.11) The result states that if the phase of the original sequence is modied by adding a linear component to it, in the form of 2nko /N , then the corresponding DFT is obtaining by circularly shifting the DFT of the original sequence by ko samples. We therefore say that phase change in the time-domain corresponds to circular shifts in the frequency domain and vice-versa. This property is the dual of the circular time-shift property (18.10). Proof: For any integer k in the interval 0 k N 1, let us express k ko in the form k ko = aN + r for some integer a and where r denotes the result of the modulo operation (k ko ) mod N = r Again, the values of a and r vary with k. So, strictly speaking, we should write a(k) instead of a and r (k) instead of r to emphasize their dependency on k. However, this level of detail is unnecessary for our argument and is omitted for simplicity of notation. The values of r span the interval 0 r N 1 as k varies over the same interval. Thus, let w(n) = ej 2ko n N x(n) 501 X (k ) |X ( k ) | SECTION 18.2 USEFUL PROPERTIES 6 4 2 2 1 2 2 4 3 k 1 2 4 3 k 3 k Y (k ) |Y (k )| 6 3 4 4 2 2 2 1 1 2 3 2 k 34 FIGURE 18.10 The magnitude and phase plots of the 4point DFTs of the sequences x(n) and y (n) = x[(n 1) mod 4] from Fig. 18.9. Then W (k ) = N 1 w(n)ej 2k n N , n=0 = N 1 ej 2n k o N n=0 = N 1 x(n) ej x(n) 0k N 1 e j 2k n N 2 (kko ) n N n=0 = N 1 x(n) ej 2n (aN +r ) N x(n) ej 2n r N x(n) ej 2n [(kk ) o N n=0 = N 1 n=0 = N 1 mod N ] n=0 = X [(k ko ) mod N ] 502 Example 18.5 (Illustrating the circular frequency-shift property) CHAPTER 18 PROPERTIES OF THE DFT Consider again the sequence x(n) that is shown in the top plot of Fig. 18.3. We already evaluated its 4point DFT in Example 18.2 and found that X (0) = X (1) = X (2) = X (3) = 6 2ej/4 0 2ej/4 The magnitude and phase plots of this DFT were shown in Fig. 18.4. Now let N = 4 and ko = 1 and introduce the sequence y (n) = ej 2nko N x(n) = ej n 2 x(n) whose samples are related to those of x(n) as follows: y (0) y (1) y (2) y (3) = = = = x(0) ej/2 x(1) ej x(2) ej 3/2 x(3) = = = = 2 2ej/2 ej ej/2 All other samples of y (n) are equal to zero. According to property (18.11), the 4point DFT of y (n) is related to the 4point DFT of x(n) as follows: Y (k) = X [(k 1) mod 4] In other words, the DFT of x(n) is circularly shifted to the right by one sample. Figures 18.11 and 18.12 illustrate the sequences x(n) and y (n) and their respective 4point DFTs. Note that since the samples of y (n) are now complex-valued, we are plotting both the magnitude and phase plots of y (n). x(n) 2 1 1 2 3 n |y (n)| y (n) 2 1 2 3 1 2 3 n 1 2 2 n FIGURE 18.11 The phase of the sequence x(n) in the top plot is modied to yield the sequence y (n) = ejn/2 x(n) in the bottom plot. 503 SECTION 18.2 X (k ) |X ( k ) | USEFUL PROPERTIES 6 4 2 2 1 2 2 3 4 k 1 2 4 3 k 3 k Y (k ) |Y (k )| 6 4 2 2 1 2 4 3 k 4 2 1 FIGURE 18.12 The magnitude and phase plots of the 4point DFTs of the sequences x(n) and y (n) = ejn/2 x(n) from Fig. 18.11. 18.2.4 Modulation Consider now the sixth line in Table 18.1. It establishes the transform property: 1 1 X [(k ko ) mod N ] + X [(k + ko ) mod N ] 2 2 (18.12) In other words, if the sequence x(n) is modulated by a cosine sequence, then its N point DFT is scaled by 1/2 and circularly shifted to the left and to the right by ko samples. cos 2ko Nn x(n) Proof: Let w(n) = cos 2ko n x(n) N Using Eulers relation (3.11) we have w(n) = n 2n 1 j 2N ko 1 x(n) + ej N ko x(n) e 2 2 Invoking the linearity and frequency-shift properties (18.5) and (18.11) we conclude that W (k ) = 1 1 X [(k ko ) mod N ] + X [(k + ko ) mod N ] 2 2 504 Likewise, it holds that CHAPTER 18 PROPERTIES OF THE DFT 2n ko x(n) N 1 1 X [(k ko ) mod N ] X [(k + ko ) mod N ] 2j 2j (18.13) where the proof now requires that we employ the alternative form (3.12) of Eulers relation. sin Example 18.6 (Illustrating the modulation property) Consider the sequence x(n) that is shown in the top plot of Fig. 18.3. We already evaluated its 4point DFT in Example 18.2 and found that X (0) = X (1) = X (2) = X (3) = 6 2ej/4 0 2ej/4 The magnitude and phase plots of this DFT were shown in Fig. 18.4. Now let N = 4, ko = 1, and introduce the sequence y (n) = sin 2ko n x(n) n x(n) = sin N 2 whose samples are related to those of x(n) as follows: y (0) y (1) y (2) y (3) = = = = 0 sin x(1) 2 sin( )x(2) 3 sin 2 x(3) = = = 2 0 1 All other samples of y (n) are equal to zero. Obviously, the sequence y (n) is rather trivial, with only two nonzero samples, and we can evaluate its 4point DFT directly from the denition (18.1). Here, however, we would like to illustrate the use of the modulation property (18.12). According to (18.12), the 4point DFT of y (n) is related to the 4point DFT of x(n) as follows: Y (k ) = 1 1 X [(k 1) mod 4] X [(k + 1) mod 4] 2j 2j In other words, the DFT of x(n) should be circularly shifted to the right and to the left by one sample and the results should be combined after scaling by 1/2j . Let us consider rst the operation Z1 (k) = 1 X [(k 1) mod 4] 2j and let us evaluate the samples of Z1 (k) in terms of those of X (k) over 0 k 3. Thus, note that the factor 1/2j can be expressed in polar form as 1 1 = j/2 = ej/2 2j 2 Using the values of X (k) we then get Z1 (0) Z1 (1) Z1 (2) Z1 (3) = = = = 1 X ( 1 2j 1 X (0 2j 1 X (1 2j 1 X (2 2j mod 4) mod 4) mod 4) mod 4) = = = = 1 j/2 e X (3) 2 1 j/2 e X (0) 2 1 j/2 e X (1) 2 1 = 2 ej/2 X (2) 505 2 j/4 e 2 3ej/2 2 j 3/4 e 2 = = = = SECTION 18.2 USEFUL PROPERTIES 0 Likewise, consider the second operation 1 X [(k + 1) mod 4] 2j Z2 (k) = Using the values of X (k) we get Z2 (0) Z2 (1) Z2 (2) Z2 (3) = = = = 1 X (1 2j 1 X (2 2j 1 X (3 2j 1 X (4 2j mod mod mod mod 4) 4) 4) 4) 1 j/2 e X (1) 2 1 j/2 e X (2) 2 1 j/2 e X (3) 2 1 j/2 e X (0) 2 = = = = = = = = 2 j 3/4 e 2 0 2 j/4 e 2 j/2 3e Now using Y (k) = Z1 (k) Z2 (k) we arrive at Y (0) = Y (1) Y (2) = = Y (3) = 2 ej/4 ej 3/4 2 3ej/2 0 2 ej 3/4 ej/4 2 j/2 0 3e = = = = 2 2 2 j/2 3e 2 2 2 j/2 3e = 1 = 1 = = ej 3ej/2 Figures 18.13 and 18.14 illustrate the sequences x(n) and y (n) and their respective 4point DFTs. 18.2.5 Circular Time Reversal The circular time reversal of a sequence is dened by the operation x(n mod N ) where, as usual, the result of the modulo operation lies within the interval 0 r N 1. Consider, for example, N = 4. Then the samples of the sequence y (n) = x(n mod N ) are related to the samples of x(n) as follows: y (0) = x(0 mod 4) = x(0) y (1) = x(1 mod 4) = x(3) y (2) = x(2 mod 4) = x(2) y (3) = x(3 mod 4) = x(1) Observe in particular that the sample at location n = 0 continues to be x(0). One convenient way to arrive at the circular time-reversal of a sequence x(n) is to start by placing markers on a circle going from one sample to another, say in a counterclockwise direction, from sample x(0) to x(1) to x(2) to x(3), and so forth, as illustrated in Fig. 18.15 for the case of a sequence with four samples. Then, to obtain the samples for the circularly time-reversed sequence, y (n), we simply start from x(0) and visit the samples in 506 x(n) CHAPTER 18 PROPERTIES OF THE DFT 2 1 1 2 3 y (n) = sin n n 2 x( n ) 2 1 3 1 2 n 1 FIGURE 18.13 The sequence x(n) in the top plot is modulated to yield the sequence y (n) = sin(n/2)x(n) in the bottom plot. the opposite direction (i.e., in the clockwise direction). In this example, we would end up visiting x(0), x(3), x(2) and x(1), in that order, and these samples constitute the samples of the sequence y (n). Figure 18.16 illustrates the circular time-reversal operation on a sequence x(n). The samples of x(n) are color-coded to facilitate tracking their location. Now consider the seventh line in Table 18.1. It establishes the transform property: x(n mod N ) X (k mod N ) (18.14) In other words, if the original sequence x(n) is reversed in time circularly, then the corresponding N point DFT is also reversed in frequency circularly. Proof: Let r = n mod N and write n = aN + r for some integer a. The values of r span the interval 0 r N 1 as n varies over the same interval. Now consider w(n) = x(n mod N ) 507 SECTION 18.2 X (k ) |X ( k ) | USEFUL PROPERTIES 6 4 2 2 1 2 2 4 3 k 1 2 4 3 k 3 k Y (k ) |Y (k )| 6 4 3 3 2 2 1 1 2 1 3 2 k 2 FIGURE 18.14 The magnitude and phase plots of the 4point DFTs of the sequences x(n) and y (n) = sin(n/2) x(n) from Fig. 18.13. Then W (k ) = N 1 w(n)ej 2k n N , n=0 = N 1 n=0 = N 1 0k N 1 x(n mod N ) ej x (r ) e j 2k (aN +r ) N x (r ) e j 2k r N r =0 = N 1 2k n N , using n = aN + r r =0 = N 1 x (r ) e j 2 (kN ) r N , r =0 = N 1 x ( r ) e j replacing k by k N 2 (N k) r N r =0 = = X (N k ) X (k mod N ) where the last equality is obviously true for all k in the range 1 k N 1 [with regards to k = 0, we recall that the DFT sequence, X (k), has period N and, hence, X (N ) = X (0)]. 508 x(1) CHAPTER 18 PROPERTIES OF THE DFT x(0) x(2) x(3) FIGURE 18.15 Markers are placed on a circle and the 4 samples of a sequence x(n) are visited in a counter-clockwise direction. By reading the samples in the opposite clockwise direction, we obtain the samples of the circularly time-reversed sequence y (n) = x(n mod 4). Example 18.7 (Illustrating the circular time-reversal property) Consider the sequence x(n) that is shown in the top plot of Fig. 18.3. We already evaluated its 4point DFT in Example 18.2 and found that X (0) = X (1) = X (2) = X (3) = 6 2ej/4 0 2ej/4 The magnitude and phase plots of this DFT were shown in Fig. 18.4. Now consider the time-reversed sequence y (n) = x(n mod 4) According to property (18.14), the 4point DFT of y (n) is related to the 4point DFT of x(n) via the relation Y (k) = X (k mod 4) Figure 18.17 illustrates the effects of the circular time-reversal operation on x(n) and the resulting magnitude and phase plots of Y (k). 18.2.6 Complex Conjugation in Time and Frequency Consider now rows eight and nine from Table 14.1. They deal with the complex conjugation property of sequences, both in time and frequency. The results establish the following transform property:s: x (n) X (k mod N ) (conjugation in time) (18.15) and x (n mod N ) X (k ) (conjugation in frequency) (18.16) 509 SECTION 18.2 x(n) 1 USEFUL PROPERTIES 2 3 n x(n) (traditional time-reversal) 3 2 1 1 2 3 n x(n mo d 4) (circular time-reversal) 1 2 3 n FIGURE 18.16 A sequence x(n) is reversed in time by ipping its samples around the vertical axis (middle plot). The sequence x(n) is circularly reversed in time by moving the samples of x(n) back to lie within the interval 0 n N 1 (bottom plot); this can be accomplished by shifting the samples of x(n) circularly to the right N times. The operation that goes from the top plot to the bottom plot is called circular time-reversal. Note that the sample at time n = 0 remains intact. In the above relations, the notation x (n) refers to complex conjugating the term x(n). Clearly, when x(n) is real-valued for some n, then x (n) = x(n) at that value of n. Likewise, X (k ) denotes the complex conjugation of X (k ). Result (18.16) states that if the samples of the time-domain sequence, x(n), are complex conjugated, then the samples of X (k ) are complex conjugated and, in addition, they are reversed circularly in frequency. A similar statement follows from (18.16). Specically, if the samples of the time-domain sequence, x(n) are complex-conjugated and reserved circularly in time, then the samples of X (k ) are complex-conjugated. 510 y (n) = x(n mod 4) CHAPTER 18 PROPERTIES OF THE DFT 2 1 1 2 3 n |Y (k )| 6 4 2 2 1 2 2 3 k Y (k ) 4 3 1 4 2 k FIGURE 18.17 The top plot shows the sequence that is obtained by circularly time-reversing the sequence x(n) from Fig. 18.3. The middle and bottom plots show the corresponding magnitude and phase plots of time-reversed sequence, y (n) = x(n mod 4). Proof: Let w(n) = x (n). Then W (k ) = N 1 w(n)ej 2k n N , 0k N 1 n=0 = N 1 x (n) ej 2k n N n=0 Conjugating both sides of the above equality gives W (k ) = N 1 x(n) ej 2k n N x(n) ej 2n (kN ) N n=0 = N 1 n=0 = N 1 x(n) ej 2n (N k) N n=0 = = X (N k ) X (k mod N ) since X (k) has period N , and where in the second equality we replaced k by (k N ) since, for any k, e n j 2N (kN ) = e j 2n e j 2kn N =e j 2kn N Therefore, conjugating again we get W (k) = X (k mod N ) as desired. A similar argument establishes (18.16). Let now w(n) = x (n mod N ). Then W (k ) = N 1 w(n)ej 2k n N , n=0 = N 1 n=0 0k N 1 x (n mod N ) ej 2k n N Conjugating both sides of the above equality gives W (k ) = N 1 n=0 = N 1 x(n mod N ) ej 2k n N x ( r ) e j 2k (aN +r ) N x ( r ) e j 2k r N , r =0 = N 1 using n = aN + r r =0 = X (k ) and, therefore, by conjugating again, W (k ) = X (k ) as desired. Example 18.8 (Illustrating the complex conjugation property) Consider the following sequence with complex-valued sample values, y (n) = 2 (n) + 2ej/2 (n 1) (n 2) + ej/2 (n 3) We encountered this sequence earlier in Example 18.5. The magnitude and phase plots of the sequence y (n) were shown in Fig. 18.11, while the magnitude and phase plots of the 4point DFT Y (k) were shown in Fig. 18.12. These plots are grouped together in Fig. 18.18. Let N = 4 and introduce the sequences z (n) = y (n) and w(n) = y (n mod 4) We are interested in determining the 4point DFTs of z (n) and w(n) in terms of Y (k). According to (18.15) and (18.16) we get Z (k) = Y (k mod 4) and W (k ) = Y (k ), 0k3 Using these relations, we display in Figs. 18.19 and 18.20 the magnitude and phase plots of Z (k) and W (k). 511 SECTION 18.2 USEFUL PROPERTIES 512 CHAPTER 18 PROPERTIES OF THE DFT |y (n)| y (n) 2 1 2 3 1 2 3 n 1 2 n 2 Y (k ) |Y (k )| 6 4 2 2 1 2 4 3 k 4 2 1 3 k FIGURE 18.18 The top row shows the magnitude and phase plots of the sequence y (n) from Example 18.8, while the bottom row shows the magnitude and phase plots of the corresponding 4point DFT, Y (k). 18.2.7 Circular Convolution When we deal with the DFT, it is useful to introduce a new notion of convolution known as circular convolution as opposed to linear convolution, which was studied extensively earlier in Chapters 5 and 6. The linear convolution operation was seen to be a fundamental tool in the study of linear time-invariant (LTI) systems; it enabled us to evaluate the response of an LTI system to an arbitrary input sequence through the computation of the linear convolution of the input sequence with the impulse response sequence of the system. In this section, we introduce another convolution operation known as circular convolution, and then show that the DFT technique provides an efcient way for evaluating circular convolutions. We further explain that linear convolutions can be evaluated by means of circular convolutions. In this way, we end up with efcient ways for computing linear convolutions as well. So let us start by dening what the circular convolution of two sequences is. It will become apparent that the steps involved in computing the circular convolution of two sequences are similar to the steps involved in computing the standard linear convolution of these same sequences except that traditional time-shift and time-reversal operations are now replaced by circular shift and circular reversal operations. Denition Consider two causal and nite-duration sequences, {x(n), h(n)}, of equal length N so that their nonzero samples exist over the interval 0 n N 1. If any of the sequences happens to have length less than N then we pad it with zeros and bring the length up to N ; it is important that both sequences have the same length N for circular convolutions. The circular convolution of x(n) and h(n) is then dened as another causal sequence, say, 513 SECTION 18.2 |z (n)| USEFUL PROPERTIES z (n) 2 2 1 1 1 2 3 n 2 3 n 3 k 2 Z (k) |Z ( k )| 6 4 2 2 1 2 4 3 k 4 1 2 FIGURE 18.19 These plots illustrate complex conjugation in the time domain. The top row shows the magnitude and phase plots of the sequence z (n) = y (n) from Example 18.8, while the bottom row shows the magnitude and phase plots of the corresponding 4point DFT, Z (k). y (n), also of length N , and is denoted by the notation: y (n) = x(n) h(n) (circular convolution) (18.17) with the symbol used as opposed to the symbol that we use for linear convolutions (recall (5.6)). The samples of y (n) over the interval 0 n N 1 are evaluated as follows: N 1 y (n) = x(m)h[(n m) mod N ] , n = 0, . . . , N 1 (18.18) m=0 Comparing this expression with the denition (5.11) for the linear convolution of causal sequences we see similarities in the expressions albeit with three striking differences: (a) First, the index of the sequence h() in (18.18) is (n m) mod N (using a modulo operation) and not (n m) alone. In this way, the time index of h() in (18.18) will always be a value r within the range 0 r N 1. (b) The time-shifts and the time-reversals that are involved in evaluating the term h[(n m) mod N ] are all circular in nature. (c) The circular convolution sequence, y (n), has N sample values and, therefore, all three sequences, {x(n), h(n), y (n)}, have the same duration. Recall that the linear 514 |w (n)| CHAPTER 18 PROPERTIES OF THE DFT w (n) 2 1 2 2 1 2 3 n 3 1 n 2 W (k ) |W (k ) | 6 4 2 2 1 2 4 3 k 4 1 2 3 k FIGURE 18.20 These plots illustrate complex conjugation in the frequency domain. The top row shows the magnitude and phase plots of the sequence w(n) = y (4 n) for Example 18.8, while the bottom row shows the magnitude and phase plots of the corresponding 4point DFT, W (k). convolution of two sequences, x(n) and h(n) of length N each, can be as long as 2N 1 samples. Graphical Method of Evaluation As was the case with linear convolutions, the circular convolution of two sequences can also be evaluated graphically by applying the steps outlined below; these steps are illustrated in the numerical example that follows: (a) First, we plot the sequences h(m) m and x(m) m over the interval 0 m N 1. Note that we are denoting the independent variable by m. Therefore, the horizontal axis will be the m axis. (b) Then we plot h(m mod N ). In other words, we circularly reverse the sequence h(m). (c) We subsequently compute the sequence x(m)h(m mod N ) by multiplying the sequences x(m) and h(m mod N ) sample-by-sample. We add the samples of the product sequence x(m)h(m mod N ). The resulting value would be y (0), namely, the value of the circular convolution sum at time n = 0. (d) Next, we circularly shift h(m mod N ) by one time unit to the right in order to obtain h[(1 m) mod N ]. We again compute the product sequence x(m)h[(1 m) mod N ] and add its sample values. This calculation provides y (1); the value of the circular convolution sum at time n = 1. (e) We repeat the above procedure by circularly shifting h(m mod N ) further to the right and computing the product sequences x(m)h(n m mod N ) each time, and adding the resulting samples. This calculation provides the values of y (n) for the various values of n inside the interval 0 n N 1. Example 18.9 (Circular convolution of two sequences) Let us evaluate the circular convolution the following two sequences: x(n) = 1 , 2, 0.5 and h(n) = 1 , 1, 2 for N = 3, where we are using the box notation to indicate the location of the sample at time n = 0. The sequences are illustrated in the left column of Fig. 18.21. y (m) x(m) 3.5 3 2 2 1 1 1/2 1 m 2 1 h( m ) m 2 h(m mod 3) 2 2 1 1 1 m 2 1 1 m 2 1 h[(1 m) mo d 3] h[(2 m) mo d 3] 2 2 1 1 1 2 2 1 m m 1 1 FIGURE 18.21 The gure illustrates the steps involved in evaluating the circular convolution of the sequences x(n) and h(n) from Example 18.9. The gure shows the plots of x(m), h(m), and the resulting circular convolution y (m). The gure also shows circularly shifted and reversed versions of h(m). 1. We rst circularly reverse h(m) to obtain h(m mod 3). This leads to h(m mod 3) = 1 , 2, 1 515 SECTION 18.2 USEFUL PROPERTIES 516 and the resulting sequence is shown in the second row of Fig. 18.21. CHAPTER 18 PROPERTIES OF THE DFT 2. We then multiply the samples of x(m) and h(m mod 3) and add the products to obtain y (0) = 1 + 4 + 0.5 = 3.5 3. We now shift h(m mod 3) circularly to the right by one sample to obtain h[(1 m) mod 3] = 1 , 1, 2 This sequence is shown in the last row of Fig. 18.21. Multiplying the samples of x(m) and h[(1 m) mod 3] and adding the products we obtain y (1) = 1 2 + 1 = 0 4. We further shift h[(1 m) mod 3] circularly to the right by one step to obtain h[(2 m) mod 3] = 2 , 1, 1 This sequence is shown in the last row of Fig. 18.21. Multiplying the samples of x(m) and h[(2 m) mod 3] and adding the products we obtain y (2) = 2 + 2 0.5 = 3.5 The top row of Fig. 18.21 plots the resulting sequence y (m) m. Circular Convolution Property Consider the tenth line in Table 18.1. It considers two causal and nite-duration sequences, x(n) and y (n), both with duration L N . The lengths of the sequences are extended to N samples each by padding a sufcient number of zeros. The circular convolution of x(n) and y (n) will again be a causal sequence with N samples. The tenth line of Table 18.1 relates the N point DFT of the circular convolution to the individual N point DFTs of the sequences, namely, x(n) y (n) X (k )Y (k ) (18.19) In other words, the N point DFT of the circular convolution sequence is obtained by multiplying, sample-by-sample, the individual N point DFTs. Proof: For any integers n and m, let r denote the result of the following modulo operation r = (n m) mod N Obviously, r varies within the range 0 r N 1. Moreover, we can write n m = aN + r for some integer a and residual r (that are dependent on n and m). Let also w(n) = x(n) y (n) = N 1 m=0 x(m)y [(n m) mod N ] 517 Then W (k ) = N 1 SECTION 18.2 w(n)ej 2k n N , n=0 = N 1 N 1 n=0 m=0 = N 1 N 1 m=0 n=0 = N 1 x(m)y [(n m) mod N ]ej 2k n N x(m)y [(n m) mod N ]ej 2k n N x (m ) m=0 = N 1 N 1 n=0 x ( m ) e j y [(n m) mod N ]ej N 1 2k m N m=0 = n=0 N 1 N 1 x ( m ) e j 2k m N m=0 = N 1 x ( m ) e j 2k m N N 1 y [(n m) mod N ]ej y ( r ) e j 2k (aN +r ) N y ( r ) e j 2k (nm) N 2k r N r =0 x ( m ) e j 2k m N m=0 = 2k n N r =0 N 1 m=0 = USEFUL PROPERTIES 0k N 1 N 1 y ( r ) e j 2k r N r =0 X (k )Y (k ) Example 18.10 (Illustrating the circular convolution property) Let reconsider the two sequences of Example 18.9, namely, x(n) = 1 , 2, 0.5 and h(n) = 1 , 1, 2 with N = 3. The circular convolution of these two sequences was computed by means of the graphical method in that example. The result was y (n) = 3.5 , 0, 3.5 That is, y (0) = 7/2 y (1) = 0 y (2) = 7/2 Let us rst evaluate the 3point DFT of y (n) directly from the denition and then we compare the result with the one obtained from application of the convolution property (18.19). Using the denition (18.1), with N = 3, we have 2 y (n)ej Y (k ) = n=0 2k n 3 , k = 0, 1, 2 518 Therefore, CHAPTER 18 2 PROPERTIES OF THE DFT Y (0) = y (n) = 7 n=0 Y (1) = = = = = Y (2) = = = = 2 y (0) + y (1)ej 3 + y (2)ej 4 7 7 + e j 3 2 2 7 7 1 3 + +j 2 2 2 2 7 1+j 3 4 7 j/3 e 2 y (0) + y (1)ej 4 3 + y (2)ej 4 3 8 3 1 7 3 7 j + 2 2 2 2 7 1j 3 4 7 j/3 e 2 Therefore, we nd that 7, Y (k ) = i.e., Y (k ) = 7, 7 j/3 7 j/3 e ,e 2 2 7 7 1+j 3 , 1j 3 4 4 Let us now employ the convolution property (18.19) to arrive at the same conclusion. To do so, we rst need to determine the 3point DFTs of x(n) and h(n). This can be done by resorting again to the denition (18.1). Indeed, for X (k) we have 2 x(n)ej X (k ) = n=0 2k n 3 , k = 0, 1, 2 519 Therefore, SECTION 18.2 2 X (0) = USEFUL PROPERTIES x(n) = 7/2 n=0 X (1) = = = = = X (2) = = = = = x(0) + x(1)ej + x(2)ej 4 3 1 j 43 e 2 1 1 1 3 3 1 + 2 j + +j 2 2 2 2 2 1 3 1 + 1 j 3 + + j 4 4 1 1 + j3 3 4 1 + 2ej 2 3 + x(0) + x(1)ej 4 3 + x(2)ej 8 3 1 j 83 e 2 1 1 1 3 3 1 + 2 +j + j 2 2 2 2 2 1 3 1 + 1 + j 3 + j 4 4 1 1 j3 3 4 1 + 2ej That is, 7/2 , X (k ) = 2 3 4 3 + 1 1 1 + j3 3 , 1 j3 3 4 4 Likewise, for H (k) we get 2 h(n)ej H (k ) = 2k n 3 , k = 0, 1, 2 n=0 Therefore, 2 H (0) h(n) = 2 = n=0 = h(0) + h(1)ej = H (1) 1 + e j = = h(0) + h(1)ej 1 + e j = 4 3 4 3 + h(2)ej 8 3 8 + 2ej 3 1 1 3 3 + 2 j 1 + + j 2 2 2 2 1 5+j 3 2 That is, H (k ) = 4 3 + 2ej 3 3 3 1 1 1 + j + 2 +j 2 2 2 2 1 5j 3 2 = = + h(2)ej 4 2 3 = H (2) 2 3 2, 1 1 5j 3 , 5+j 3 2 2 520 Multiplying the samples of X (k) and H (k) sample-by-sample leads to the following values CHAPTER 18 PROPERTIES OF THE DFT X (k )H (k ) = 7, 7 7 1+j 3 , 1j 3 4 4 which agree with the samples of the 3point DFT Y (k) that were computed earlier directly from the denition of the DFT. 18.2.8 Multiplication in the Time Domain Consider the eleventh line in Table 18.1. It again considers two causal and nite-duration sequences, x(n) and y (n), both with duration L N . The lengths of the sequences are extended to N samples each by padding a sufcient number of zeros. The result in the table states that the N point DFT of the element-wise product of two sequences is given by the expression below: x(n)y (n) 1 X (k ) Y (k ) N (18.20) in terms of the circular convolution of the sequences X (k ) and Y (k ). Proof: For any integers k and m, let us express (k m) = aN + r for some integer a and where r denotes the result of the modulo operation: r = (k m) mod N We already know that r varies over the interval 0 r N 1 as k and m vary over the same interval. Now let W (k) denote the scaled circular convolution: W (k ) = 1 X (k ) Y (k ), N k = 0, 1, . . . , N 1 Writing down the denition (18.18) of circular convolution in this case we have W (k ) = 1 N N 1 m=0 X (m)Y [(k m) mod N ] Using the inverse DFT relation (17.35) we can recover the sequence w(n) as follows: 521 w(n) = 1 N = 1 N = = = 2k n N , 1 N2 1 N 1 N k=0 N 1 N 1 m=0 X (m)Y [(k m) mod N ] ej N 1 X (m ) m=0 Y [(k m) mod N ]ej k=0 N 1 N 1 X (m ) m=0 N 1 USEFUL PROPERTIES n = 0, 1, . . . , N 1 k=0 1 N2 = W (k )e j N 1 1 N2 = N 1 SECTION 18.2 Y (r )e j 2k n N 2 (m+aN +r) n N , r =0 N 1 X (m ) m=0 N 1 Y (r )e j 2k n N using k m = aN + r 2 (m+r) n N r =0 X (m )e j 2m n N m=0 1 N N 1 Y (r )e j 2r n N r =0 x(n)y (n) as desired. Example 18.11 (Illustrating multiplication in time) Consider again the two sequences from Examples 18.9 and 18.10, namely, x(n) = 1 , 2, 0.5 and h(n) = 1 , 1, 2 with N = 3. The corresponding 3point DFTs are given by X (k ) = 7/2 , and H (k ) = 2, 1 1 1 + j3 3 , 1 j3 3 4 4 1 1 5j 3 , 5+j 3 2 2 Let y (n) denote the element-wise product of both sequences so that y (n) = 1 , 2, 1 Using denition (18.1), with N = 3, we can evaluate the 3point DFT of y (n) directly as follows: 2 y (n)ej Y (k ) = n=0 2k n 3 , k = 0, 1, 2 522 so that CHAPTER 18 PROPERTIES OF THE DFT 2 Y (0) = y (n) = 2 n=0 2 3 + y (2)ej 4 3 = y (0) + y (1)ej = Y (1) + e j 3 3 3 1 1 1 + 2 j + +j 2 2 2 2 3 1 1 + 1 j 3 + + j 2 2 1 5+j 3 2 = = = 1 + 2ej 4 2 3 4 3 8 3 = y (0) + y (1)ej = Y (2) + e j 3 1 1 3 3 1 + 2 + j + j 2 2 2 2 1 3 1 + 1 + j 3 + j 2 2 1 5j 3 2 = = = 1 + 2ej + y (2)ej 8 4 3 Therefore, we nd that Y (k ) = 2, 1 1 5+j 3 , 5j 3 2 2 Let us now evaluate the circular convolution of X (k) and H (k) in order to arrive at the same result for Y (k), as suggested by property (18.20). To do so, we employ the graphical method of evaluation. Let W (k) denote the circular convolution of the sequences X (k) and H (k): W (k ) = X (k ) H (k ) 1. We rst circularly reverse H (m) to obtain H (m mod 3). This leads to H (m mod 3) = 2, 1 1 5+j 3 , 5j 3 2 2 2. We then multiply the samples of X (m) and H (m mod 3) and add the products to obtain W (0) = 6 3. We now shift H (m mod 3) circularly to the right by one sample to obtain H [(1 m) mod 3] = 1 1 2 5 j 3 , 2, 5+j 3 2 Multiplying the samples of X (m) and H [(1 m) mod 3] and adding the products we obtain W (1) = 3 5+j 3 2 4. We further shift H [(1 m) mod 3] circularly to the right by one step to obtain H [(2 m) mod 3] = 1 1 5 + j 3 , 5j 3 , 2 2 2 Multiplying the samples of X (m) and H [(2 m) mod 3] and adding the products we obtain W (2) = That is, W (k ) = 6, 3 5j 3 2 USEFUL PROPERTIES 3 3 5+j 3 , 5j 3 2 2 According to property (18.20), the desired sequence Y (k) is related to W (k) via Y (k ) = 1 W (k ), 3 k = 0, 1, 2 If we divide the samples of W (k) by 3 we obtain the samples for Y (k), as expected. 18.2.9 Parsevals Relation Consider the twelfth line in Table 18.1. It again considers two causal and nite-duration sequences, x(n) and y (n), both with duration L N . The lengths of the sequences are extended to N samples each by padding a sufcient number of zeros. The result in the table is known as Parsevals relation and it states that N 1 n=0 x(n)y (n) 1 N 1 X (k )Y (k ) N k=0 (18.21) We can regard the computation on the left-hand side as the inner product of the samples of x(n): { x(0), x(1), x(2), . . . , x(N 1) } (18.22) with the conjugated samples of y (n): { y (0), y (1), y (2), . . . , y (N 1) } (18.23) At the same time, we can regard the computation on the right-hand side of (18.21) as the scaled inner product of the samples of X (k ): { X (0), X (1), X (2), . . . , X (N 1) } (18.24) with the conjugated samples of Y (k ): { Y (0), Y (1), Y (2), . . . , Y (N 1) } (18.25) Therefore, Parsevals relation is essentially a statement that computation of inner products can be performed either in the time-domain (by using the sequence samples) or in the frequency domain (by using the DFT samples). Note in particular the special case that arises when we select y (n) = x(n); in this case, Parsevals relation reduces to N 1 n=0 |x(n)|2 1 N 1 |X (k )|2 N k=0 523 SECTION 18.2 (18.26) On the left-hand side we have the energy of the sequence x(n). We therefore nd that the energy of a sequence can be evaluated in the frequency domain as well, by evaluating the 524 CHAPTER 18 PROPERTIES OF THE DFT energy of its N point DFT and scaling the result by 1/N . Proof: We already know from the complex conjugation property (18.16) that y (n) Y (k mod N ) Let w(n) denote the product sequence w(n) = x(n)y (n) We also know from property (18.20) regarding the multiplication of sequences in time that the N point DFT, W (k), is given by = 1 X (k) Y (k mod N ), N = W (k ) 1 N N 1 m=0 k = 0, 1, . . . , N 1 X (m)Y [(k m) mod N ] (18.27) (18.28) Now recall denition (18.1) of the N point DFT of a sequence, namely, W (k ) = N 1 w(n)ej 2k n N , k = 0, 1, . . . , N 1 n=0 It follows that the value of W (k) at k = 0 is equal to the sum of the samples of the sequence w(n), i.e., N 1 W (0) = w(n) (18.29) n=0 This is a general and useful result. Applying this fact to the current context we have that W (0) = N 1 x(n)y (n) (18.30) n=0 in view of the denition w(n) = x(n)y (n). At the same time, from (18.28) we have W (0) 1 N = N 1 X (m )Y (m ) (18.31) m=0 Equating with (18.30)we arrive at the desired conclusion that N 1 n=0 x(n)y (n) 1 N N 1 X (m )Y (m ) m=0 Example 18.12 (Illustrating Parsevals relation) Consider again the two sequences from Examples 18.9 and 18.10, namely, x(n) = 1 , 2, 0.5 and h(n) = 1 , 1, 2 with N = 3. The corresponding 3point DFTs are given by X (k ) = 7/2 , 1 1 1 + j3 3 , 1 j3 3 4 4 525 and 1 1 2, 5j 3 , 5+j 3 2 2 H (k ) = SECTION 18.4 APPLICATIONS Now note that 2 n=0 x(n)h (n) = (1 1) + (2 1) + (0.5 2) = 2 At the same time 2 X (k )H (k ) = k=0 7 2 2 1 + j3 3 5 j 3 1 + 8 so that 1 3 as desired. + 1 8 1 j3 3 5 + j 3 =6 2 X (k )H (k ) = 2 k=0 18.3 APPLICATIONS TO BE ADDED Practice Questions: 1. 2. 18.4 PROBLEMS Problem 18.1 Use the linearity property of the DFT to determine the 4point DFT of the following sequences whose nonzero samples occur only over the range 0 n 3; all other samples are zero: (a) x(n) = cos 2 n + sin (b) x(n) = cos (n) + sin 2 n. 2 n. (c) x(n) = cos (n) + sin (n). (d) x(n) = cos2 (n). Problem 18.2 Use the linearity property of the DFT to determine the 4point DFT of the following sequences whose samples are nonzero only over the range 0 n 3: 3 cos n 4 (a) x(n) = cos (b) x(n) = n + sin sin (c) x(n) = cos (n) sin (d) x(n) = sin2 (n). 4 n. 6 n. 3 n. 526 CHAPTER 18 PROPERTIES OF THE DFT Problem 18.3 Plot |X (k)| and X (k) for each of the DFTs in Prob. 18.1. Problem 18.4 Plot |X (k)| and X (k) for each of the DFTs in Prob. 18.2. Problem 18.5 Find the 4point DFTs of the following sequences whose samples are nonzero only over the range 0 n 3: (a) x(n) = cos (b) x(n) = (c) x(n) = (d) x(n) = (n 1) . 4 cos (n 1) mod 4 . 4 cos2 4 (n + 1) mod 4 . sin (n 1) mod 4 . 4 Problem 18.6 Find the 4point DFTs of the following sequences whose samples are nonzero only over the range 0 n 3: (a) x(n) = cos (b) x(n) = cos (c) x(n) = sin 4 4 (n 1) sin 3 4 4 (n 1) . (n 1) mod 4 . (n + 1) cos2 4 (n + 1) mod 4 . (d) x(n) = sin2 (n 1) mod 4 . 4 Problem 18.7 Find the 4point DFT of the following sequence whose samples over 0 n 3 are described below (all other samples are zero): n 2 x(n) = cos (n 3) mod 4 2 + sin sin2 n 4 Plot |X (k)| and X (k). Problem 18.8 Find the 4point DFT of the following sequence whose samples over 0 n 3 are described below (all other samples are zero): n 2 x(n) = cos2 Plot |X (k)| and X (k). Problem 18.9 Let x(n) = (n + 1) mod 4 2 sin 1 , 2, 1, 1/2 . (a) Find the 4point DFT of x(n). (b) Find the 4point DFT of x((n + 2) mod 4). (c) Find the 4point DFT of x((n 1) mod 4). (d) Find the 4point DFT of x(n 1). (e) Find the 4point DFT of x(n + 2). 1 , 0, 1/2, 2 . Problem 18.10 Let x(n) = (a) Find the 4point DFT of x(n). (b) Find the 4point DFT of x((n + 1) mod 4). (c) Find the 4point DFT of x((n 2) mod 4). (d) Find the 4point DFT of x(n 2). (e) Find the 4point DFT of x(n + 1). Problem 18.11 Let x(n) = 1 , 2, 1, 1/2 . (a) Find the 4point DFT of (1)n x(n). (b) Find the 4point DFT of ej 3 n 2 x(n). sin2 n 4 (c) Find the 4point DFT of ej 3 n cos 3 527 n x(n). SECTION 18.4 PROBLEMS 1 , 0, 1/2, 2 . Problem 18.12 Let x(n) = (a) Find the 4point DFT of (1)n x(n). (b) Find the 4point DFT of ej 4 n x(n). (c) Find the 4point DFT of ej 2 n sin 3 n x(n). Problem 18.13 Find the 4point DFT of the following sequences: (a) x(n) = (1)n cos (b) x(n) = (1)n cos (c) x(n) = (1)n cos n. 3 (n 2) mod 4 . 3 2 3 (n + 1) mod 4 . Problem 18.14 Find the 4point DFT of the following sequences: (a) x(n) = (1)n cos n mod 4 . 3 (b) x(n) = ej 2 n cos2 3 (n 2) mod 4 . (c) x(n) = (1)n ej 2 n cos2 3 (n + 1) mod 4 . Problem 18.15 The magnitude and phase components of a sequence x(n) are given by |x(n)| = 1 , 1, 2, 3/2 , x(n) = /2 , , 0, /4 Determine and plot the following DFTs: (a) 4point DFT of x(n). (b) 4point DFT of x (n). (c) 4point DFT of (1)n x(n). (d) 4point DFT of cos (e) 4point DFT of cos (f) 4point DFT of cos (g) 4point DFT of cos (h) 4point DFT of cos 2 n x (n). 2 n x(n). 2 n x(n mod 4). 2 n x (n mod 4). 2 n x ((n 1) mod 4). Problem 18.16 The magnitude and phase components of a sequence x(n) are given by |x(n)| = 1/2 , 0, 1, 2 , x(n) = /3 , /6, /6, /2 Determine and plot the following DFTs: (a) 4point DFT of x(n). (b) 4point DFT of x (n). (c) 4point DFT of (1)n x(n). (d) 4point DFT of cos (e) 4point DFT of cos (f) 4point DFT of cos (g) 4point DFT of cos (h) 4point DFT of cos 2 n x (n). 2 n x(n). 2 n x(n mod 4). 2 n x (n mod 4). 2 n x ((n 1) mod 4). Problem 18.17 Compute the circular convolution cos 2n N cos 4n N 528 CHAPTER 18 PROPERTIES OF THE DFT where both sequences are limited to the interval 0 n N 1. Problem 18.18 Compute the circular convolution 2n N sin2 (1)n cos 4n N where both sequences are limited to the interval 0 n N 1. Problem 18.19 Evaluate the expression S= N 1 ej 2n N cos n=0 2ko n N cos 2k1 N where ko and k1 are distinct integers in the interval 0 k N 1. Problem 18.20 Evaluate the expression S= N 1 ej 2n N n=0 sin 2ko n N cos2 2k1 N where ko and k1 are distinct integers in the interval 0 k N 1. Problem 18.21 What is the N point DFT of y (n) = x(n) + x((n N ) mod N ) in terms of the N point DFT of x(n)? Problem 18.22 What is the N point DFT of y (n) = cos 2ko n x(n) + (1)n x((n N ) mod N ) N in terms of the N point DFT of x(n) and where ko lies in the interval 0 ko N 1? Problem 18.23 Consider a sequence x(n) of length N . We embed x(n) into two new sequences of lengths 2N each in the following manner: x1 (n) = { x(0), x(1), . . . , x(N 1), 0, 0, . . . , 0 } N x2 (n) = zeros { 0, 0, . . . , 0, x(0), x(1), . . . , x(N 1) } N zeros That is, the rst N samples of x1 (n) coincide with those of x(n) while the last N samples are zeros. Likewise, the rst N samples of x2 (n) are zero while the last N samples coincide with those of x(n). Both x1 (n) and x2 (n) are dened over the interval 0 n 2N 1. Let X1 (k) and X2 (k) denote the 2N -point DFTs of the sequences x1 (n) and x2 (n), respectively. (a) Show that X1 (k) and X2 (k) are related as follows: X2 (k) = X1 (k), X1 (k), k even k odd for k = 0, 1, . . . , 2N 1. (b) If X (k) denotes the N -point DFT of x(n), how do you recover the N values of X (k) from the 2N values of X1 (k)? Problem 18.24 Consider a sequence x(n) of length N , where N is even. We embed x(n) into two new sequences of lengths 2N each in the following manner: x1 (n) = {0, 0, . . . , 0, x(0), x(1), . . . , x(N 1), 0, 0, . . . , 0 } x2 (n) = N /2 N /2 { 0, 0, . . . , 0, x(0), x(1), x(2), x(3), . . . , x(N 1) } N zeros That is, the leading and trailing N/2 samples of x1 (n) are zero, while the rst N samples of x2 (n) are zero. Additionally, the samples of x(n) in the sequence x2 (n) are multiplied by 1 in an alternating manner. The sequences x1 (n) and x2 (n) are dened over the interval 0 n 2N 1. Let X1 (k) and X2 (k) denote the 2N -point DFTs of x1 (n) and x2 (n), respectively. (a) Relate the samples of the sequences X1 (k) and X2 (k). (b) Let X (k) denote the N -point DFT of x(n). Show that X (k) can be obtained directly from the samples of X1 (k) without using any further DFT or inverse DFT operations. Repeat in terms of the samples of X2 (k). Problem 18.25 Consider a causal sequence x(n) of length N and let X (k) denote its N -point DFT. Dene the extended sequences x1 (n) = x2 (n) = {x(0), x(1), . . . , x(N 1), x(0), x(1), . . . , x(N 2), x(N 1)} {x(0), x(1), . . . , x(N 1), x(N 1), x(N 2), . . . , x(1), x(0)} (a) Determine the 2N -point DFT of x1 (n) in terms of X (k). (b) Determine the even-indexed terms of the 2N -point DFT of x2 (n) in terms of X (k). Problem 18.26 Consider a sequence x(n) of length N and let X (k) denote its N point DFT. Let y (n) further denote the N point DFT of the sequence X (k). Show that y (n) = N x(n mod N ). That is, show that y (n) is the circular reversal of x(n) (multiplied by N ). Problem 18.27 Consider a sequence x(n) of length N , where N is even. What is the result of the following succession of operations on x(n)? (1)k (1)n DFT DFT DFT x(n) ? That is, x(n) is rst transformed by an N point DFT, the result is modulated by the sequence (1)k , transformed by a second N point DFT, modulated again by (1)n , and transformed one more time. Answer the question for a generic sequence x(n). Then plot the resulting sequences at all intermediate steps when N = 4 and x(n) = cos(n) for n = 0, 1, 2, 3. Problem 18.28 Let X (k) denote the N point DFT of a causal nite-duration sequence x(n), 0 n N 1. Find the N point DFT (not inverse DFT) of the sequence X (k), 0 k N 1. How does the result compare to x(n)? Problem 18.29 Let X (k) denote the N point DFT of a causal nite-duration sequence x(n), 0 n N 1. Find the inverse DFT of Re(X (k)) in terms of the sequence x(n) and its complex conjugate. Problem 18.30 Consider the sequence x(n) whose DTFT is shown in Fig. 18.22. Dene the sequences r (n) = x(n + 16m), m= z (n) = x(n + 8m) m= (a) Determine the 16-point DFT of the circular convolution r (n) r (n). (b) Determine the 8-point DFT of z 2 (n). (c) Determine the values of x(1), r (1), and z (1). 529 SECTION 18.4 PROBLEMS 530 CHAPTER 18 PROPERTIES OF THE DFT X (ej ) 4 2 4 4 2 (rad/sample) FIGURE 18.22 Sequence x(n) for Prob. 18.30. CHAPTER 19 Computing Linear Convolutions T he circular convolution property (18.19) shows that the DFT can be used to evaluate the circular convolution of two causal sequences. Specically, if we multiply the respective N point DFTs and inverse transform the result, then we arrive at the circular convolution sequence: x(n) y (n) = IDFT { X (k )Y (k ) } (19.1) The purpose of the discussion in this chapter is to show how how the DFT can also be used to evaluate the linear convolution of two sequences. The main motivation for doing so is that linear convolutions are fundamental in the operation of LTI systems and, more importantly, the DFT will provide an efcient way for their evaluation (as we show later in Chapter 20). 19.1 RELATING LINEAR AND CIRCULAR CONVOLUTIONS To motivate our discussion, we start by examining the exact relationship between linear and circular convolutions for two arbitrary sequences. Thus, consider two causal sequences, x(n) and h(n), of same length N , i.e., their nonzero samples exist over the interval 0 n N 1. Let yc (n) denote their circular convolution, which is again an N point sequence: yc (n) = x(n) h(n) (circular convolution) n = m=0 x(m)h[(n m) mod N ], 0 n N 1 (19.2) Likewise, let y (n) denote the linear convolution of the same two sequences. Then, y (n) has length 2N 1 and its samples are given by (recall (5.11)): y (n) = x(n) h(n) (linear convolution) n = m=0 x(m)h(n m), 0 n 2N 1, (19.3) We are interested in examining the relation between the sequences yc (n) and y (n). Let yp (n) denote the sequence that results from the periodic repetition of y (n) as follows: yp (n) = = y (n N ) (19.4) 531 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 532 CHAPTER 19 COMPUTING LINEAR CONVOLUTIONS That is, the sequence y (n) is repeated at multiples of N and all shifted sequences are combined to yield yp (n); this is the same construction we encountered earlier in (17.19) while embedding a sequence x(n) into its periodic extension xp (n). Then we claim that the circular convolution sequence, yc (n), agrees with the samples of yp (n) over the interval 0 n N 1: yc (n) = yp (n), 0nN 1 (19.5) Proof: Let X (k), H (k), and Yc (k) denote the N point DFT coefcients of the sequences x(n), h(n), and yc (n), respectively. Then we know from the circular convolution property (18.19) that Y c (k ) = X (k )H (k ), 0k N 1 Let further X (ej ), H (ej ), and Y (ej ) denote the DTFTs of the sequences x(n), h(n), and y (n), respectively. Then we also know from the linear convolution property (14.10) that Y (ej ) = X (ej )H (ej ) Now recall that the DFT coefcients X (k) and H (k) are obtained by uniformly sampling the corresponding DTFTs of x(n) and h(n): X (k) = X (ej ) k = 2N , H (k) = H (ej ) k = 2N , k = 0, 1, , . . . , N 1 The element-wise product of the DFTs X (k) and Y (k) then provides N samples of the DTFT of y (n). That is, Yc (k) provides N samples of Y (ej ) at k = 2k , N k = 0, 1, . . . , N 1 However, we already know from the discussion in Sec. 17.2 that the N point DFT coefcients Yc (k) are the DFT coefcients of the periodic sequence yp (n) = = y (n N ) Accordingly, yc (n) = yp (n), 0 n N 1 19.2 COMPUTING LINEAR CONVOLUTIONS VIA THE DFT We now explain how relation (19.5) can be exploited to evaluate the linear convolution of two sequences by means of the DFT. At the onset, note that since the linear convolution sequence y (n) has length 2N 1, it is expected that aliasing in time will occur when the sequence is repeated at multiples of N to form the periodic sequence, yp (n). In this way, the samples of yp (n) over the interval 0 n N 1, which are of interest in (19.5), will generally suffer from aliasing and may not allow us to recover the desired samples of y (n). Nevertheless, as we now argue, it is still possible to use the DFT to evaluate the linear convolution of two sequences if we use sufcient zero-padding in order to avoid the occurrence of aliasing in time when yp (n) is formed. Specically, consider two causal sequences x(n) and h(n) of lengths Nx and Nh , respectively. That is, the domain of x(n) is 0 n Nx 1 and the domain of h(n) is 0 n Nh 1; the lengths of the sequences can now be arbitrary and they do not need to agree anymore. The linear convolution of x(n) and h(n) is the sequence y (n) dened by n y (n) = x(n) h(n) = m=0 x(m)h(n m) (19.6) The sequence y (n) will have length Nx + Nh 1. Let us choose an integer N that satises N Nx + Nh 1 (19.7) Motivated by the discussion so far, to evaluate y (n) by means of the DFT technique we proceed as follows: (a) We rst extend each sequence by padding enough zeros and obtain two new sequences x (n) and h (n) of same length N each, say, sequence x (n) = { x(0), x(1), . . . , x(Nx 1), 0, . . . , 0} (19.8) samples between n = 0 and N 1 sequence h (n) = { h(0), h(1), . . . , h(Nh 1), 0, . . . , 0} (19.9) samples between n = 0 and N 1 It is usually desirable to pad enough zeros to obtain a length N that is a power of 2; we select N as the closest power of 2 that satises (19.7). For example, if Nx = 12 and Nh = 7, then N can be selected as N = 32 = 25 . This is desirable because fast algorithms for evaluating the DFT, such as the Fast Fourier Transform (FFT) of Chapter 20, exploit the power-of-two property very effectively. Padding additional zeros to ensure a value of N that is a power-of-two does not affect the nal result; it will nevertheless enable more efcient computational schemes. (b) We next evaluate the circular convolution of the extended sequences x (n) and h (n): y (n) = x (n) h (n) (19.10) The resulting sequence y (n) will have length N ; its domain will be 0 n N 1. (c) We now argue that the samples of y (n) that lie within the interval 0 n Nx + Nh 1 will coincide with the samples of the desired linear convolution sequence y (n) from (19.6): y (n) = y (n), n = 0 , 1 , 2 , . . . , Nx + N h 1 (19.11) Proof: By padding x(n) and h(n) with zeros in order to attain length N , we do not change the DTFTs of these sequences. That is, the DTFTs of x(n) and x (n) are identical since Nx N X (ej ) = x (n)ejn = n=0 x(n)ejn = X (ej ) n=0 Likewise, the DTFTs of h(n) and h (n) are identical since Nh N h (n)ejn = H (ej ) = n=0 h(n)ejn = H (ej ) n=0 533 SECTION 19.2 Computing Linear Convolutions via the DFT 534 CHAPTER 19 Now, from the linear convolution property (14.10) of the DTFT, we know that the DTFT of y (n) is related to the DTFTs of x(n) and h(n) via the relation COMPUTING LINEAR CONVOLUTIONS Y (ej ) = X (ej )H (ej ) We therefore conclude initially that it also holds that Y (ej ) = X (ej )H (ej ) in terms of the DTFTs of the extended sequences. To proceed, let X (k) and H (k) denote the N point DFTs of x (n) and h (n), respectively. Then recall that these DFT coefcients are obtained by uniformly sampling the DTFTs of x (n) and h (n), respectively, at the N points k = 2k/N for k = 0, 1, . . . , N 1. Let Y (k) = X (k)H (k). Then Y (k) provides N samples of Y (ej ) at k = 2k , N k = 0, 1, . . . , N 1 The N DFT coefcients Y (k) are sufcient to uniquely recover the linear convolution sequence y (n). This is because y (n) is a causal sequence of length L = Nx + Nh 1 and L N . When we evaluate its N point DFT, no aliasing in time occurs over the interval 0 n N 1 (recall the discussion following (17.20)). We conclude that Y (k) should coincide with the N point DFT Y (k) of the linear convolution sequence y (n): Y (k ) = Y (k ), k = 0, 1, . . . , N 1 By inverse transforming Y (k) and keeping its samples over 0 n Nx + Nh 1, we can recover the desired linear convolution samples y (n). Using (17.35) we can write y (n) = 1 N N 1 Y (k )e j 2k n N , k=0 n = 0, 1, . . . , Nx + Nh 1 where we only recover the samples up to time Nx + Nh 1 and where we use the N point DFT coefcients Y (k) that result from the circular convolution of x (n) and y (n). Example 19.1 (Illustrating computation of linear convolutions) Consider the two sequences from Examples 18.9 and 18.10, namely, x(n) = 1 , 2, 0.5 and h(n) = 1 , 1, 2 Let y (n) denote the sequence that results from the linear convolution of x(n) and h(n). Evaluating y (n) by means of the graphical method of Sec. 6.2 leads to the following result: y (n) = 1 , 1, 7/2, 9/2, 1 with all other samples equal to zero. Let us now arrive at the same result by employing the DFT. It is seen that the lengths of the sequences x(n) and h(n) are Nx = 3 and Nh = 3, respectively. The closest power-of-two to Nx + Nh 1 = 5 is N =8 535 We pad enough zeros to attain length N = 8 samples for each sequence, and dene x (n) = h (n) = SECTION 19.3 BLOCK CONVOLUTION METHODS 1 , 2, 0.5, 0, 0, 0, 0, 0 1 , 1, 2, 0, 0, 0, 0, 0 Let y (n) denote the circular convolution of x (n) and h (n). Evaluating y (n) by means of the graphical method of Sec. 18.2 leads to the following result: y (n) = 1 , 1, 7/2, 9/2, 1, 0, 0, 0 with all other samples equal to zero. It is seen that the rst 5 samples of y (n) coincide with the samples of y (n), as expected from (19.11). Alternatively, we can evaluate the circular convolution sequence y (n) by means of the DFT and its inverse transformation. In this case, we rst use the denition (18.1) to evaluate the 8point DFTs of X (k) and H (k) as follows: 7 X (k ) x (n)ej 2k n 8 x (n)ej = k n 4 , k = 0, 1, . . . , 7 n=0 7 = n=0 = 1 + 2ej k 4 1 j k e2 2 + and 7 H (k ) h (n)ej 2k n 8 h (n)ej = k n 4 , k = 0, 1, . . . , 7 n=0 7 = n=0 = 1 + e j k 4 + 2ej k 2 Once the samples {X (k), H (k)} are determined for k = 0, 1, . . . , 7, we multiply them elementwise to obtain the DFT coefcients of the circular convolution y (n), i.e., Y (k ) = X (k )H (k ), k = 0, 1, . . . , 7 We nally inverse transform Y (k) to obtain y (n) using the IDFT expression (17.35): y (n) = 1 8 7 Y (k )e j 2k n 8 , n = 0, 1, . . . , 7 k=0 Clearly, in this particular example, evaluating the circular convolution y (n) in the time domain is much more immediate. 19.3 BLOCK CONVOLUTION METHODS The computation of the linear convolution of two sequences can be demanding if one of the sequences is long since it would then involve the evaluation of long DFTs. There are methods that segment the long sequence into smaller sequences and transform the problem into the computation of several smaller linear convolutions. These methods are called 536 block convolution methods and they are of two kinds: overlap-add and overlap-save. CHAPTER 19 COMPUTING LINEAR CONVOLUTIONS 19.3.1 Overlap-Add Convolution Method The overlap-add method is simpler to motivate and describe. Consider a causal sequence x(n) whose length Nx is a multiple of some positive integer M : { x(n), 0 n Nx 1, Nx = pM } ( 1 9 .1 2 ) If this is not the case, then the length of x(n) can be extended by padding a sufcient number of trailing zeros. We partition the sequence x(n) into p segments of length M each. Figure 19.1 illustrates this segmentation for the case p = 4. Four segments are shown and they are denoted by xm (n), for m = 0, 1, 2, 3. M x(n) FIGURE 19.1 M M x0 (n) x1 (n) x2 (n) M x3 (n) A sequence x(n) is segmented into shorter sequences of length M each. Each of the sequences xm (n) is causal, has M nonzero samples, and is dened as follows: x(n + mM ), n = 0, 1, . . . , M 1 xm (n) = ( 1 9 .1 3 ) 0, otherwise In other words, each sequence xm (n) extracts a block of M samples from x(n) and shifts it down to the origin of time, n = 0. For example, assuming p = 4 segments, M = 3 samples per block, and x(n) = 1 , 1, 2, 3, 2, 4, 10, 0, 6, 4, 3, 5 we get four sub-sequences of duration M = 3 each: x0 (n) = 1 , 1, 2 x1 (n) = 3 , 2, 4 x2 (n) = 10 , 0, 6 x3 (n) = 4 , 3, 5 where we are using the box notation to indicate the location of the sample at time n = 0. All other samples in the sequences are zero. We can reconstruct the original sequence x(n) from its segments, xm (n), as follows: p1 x(n) = m =0 xm (n mM ) ( 1 9 .1 4 ) That is, the sub-sequences are shifted to the right by multiples of M samples and added together. For the example under consideration, we have x(n) = x0 (n) + x1 (n M ) + x2 (n 2M ) + x3 (n 3M ) Now consider another causal sequence h(n) of length Nh . We are interested in evaluating the linear convolution of x(n) with h(n), namely, the sequence y (n) that is given by n y (n) = x(n) h(n) = k=0 x(k )h(n k ) Using the representation (19.14), and the distributivity property (6.5) of linear convolutions, we nd that y (n) = x(n) h(n) p1 = m=0 xm (n mM ) h(n) p1 = m=0 [xm (n mM ) h(n)] This result is equivalent to saying that p1 y (n) = ym (n mM ) (19.15) m=0 where the sub-sequences ym (n) are the result of convolving each of the xm (n) with h(n): n ym (n) = xm (n) h(n) = k=0 xm (k )h(n k ) (19.16) According to (19.15), the sub-sequences ym (n) are shifted by multiples of M and added together to yield the linear convolution sequence, y (n) see Fig. 19.2. Since each subsequence ym (n) has length M + Nh 1 and these sub-sequences are shifted by multiples of M , then overlaps occur between successive shifted sub-sequences before addition; the occurrence of the overlap motivates the designation overlap-add method for this technique. Summary of the Overlap-Add Method for Evaluating Linear Convolutions (a) Partition the sequence x(n) into p non-overlapping segments of size M each, as dened by (19.13). (b) Compute the linear convolutions ym (n) = xm (n) h(n), as dened by (19.16). These convolutions can be computed using one of your preferred methods, e.g., either directly in the time-domain by using (19.16) or indirectly in the frequency domain by using the DFT technique of Sec. 19.2. (c) Concatenate the convolution sequences ym (n) as indicated by (19.15). 537 SECTION 19.3 BLOCK CONVOLUTION METHODS 538 CHAPTER 19 COMPUTING LINEAR CONVOLUTIONS M M M x(n) x0 (n) x1 (n) x2 (n) y (n ) y0 (n) + M x3 (n) y1 (n) + y2 (n) M + Nh 1 + y3 (n) FIGURE 19.2 The sub-sequences ym (n) are generated by convolving the corresponding subsequences xm (n) with h(n). The resulting ym (n) are then shifted by multiples of M and added together to yield the linear convolution sequence, y (n). Each sub-sequence ym (n) has length M + Nh 1. Therefore, overlaps occur between the successive shifted sub-sequences before addition, which motivates the designation overlap-add method. Example 19.2 (Illustrating the overlap-add method) Consider the sequence x(n) = 1 , 1, 2, 3, 2, 4, 10, 0, 6, 4, 3, 5 with Nx = 12 samples. Let M = 3 samples per block and p = 4 blocks. The resulting subsequences are x0 (n) = x1 (n) = x2 (n) = x3 (n) = 1 , 1, 2 3 , 2, 4 10 , 0, 6 4 , 3, 5 where we are using the box notation to indicate the location of the sample at time n = 0. Let us employ the overlap-add method to evaluate the convolution of x(n) with the following sequence h(n) = (n) + 0.5 (n 1) 539 We rst linearly convolve each of the sub-sequences xm (n) with h(n) to get y0 (n) = x0 (n) h(n) = y1 (n) = x1 (n) h(n) = y2 (n) = x2 (n) h(n) = y3 (n) = x3 (n) h(n) = SECTION 19.3 BLOCK CONVOLUTION METHODS 1 , 0.5, 1.5, 1 3 , 3.5, 3, 2 10 , 5, 6, 3 4 , 1, 6.5, 2.5 Then 3 y (n) = m=0 = ym (n 3m) 1 , 0.5, 1.5, 2, 3.5, 3, 12, 5, 6, 1, 1, 6.5, 2.5 19.3.2 Overlap-Save Convolution Method Let us now motivate an alternative block convolution method known as the overlap-save method, which is more demanding to describe. Consider again causal sequences x(n) and h(n) of lengths Nx and Nh , respectively, with Nx > Nh . The linear convolution of x(n) and h(n) is the sequence y (n) given by n y (n) = x(n) h(n) = k=0 x(k )h(n k ) (19.17) and whose length is equal to Nx + Nh 1. Useful Property of Circular Convolution We rst derive a useful property of circular convolutions, which will serve as the basis for the derivation of the overlap-save method. Assume, for the sake of argument, that we extend the length of h(n) to Nx through sufcient zero padding, and that we perform the Nx point circular convolution of x(n) with the extended h(n): yc (n) = x(n) h(n), 0 n Nx 1 (19.18) The sequence yc (n) has length Nx . We already know from the discussion in Sec. ?? that the sequence yc (n) is related to the periodic embedding yp (n) of y (n) by repeating y (n) every Nx samples (since Nx is the length of the circular convolution) and adding together all shifted sequences: yp (n) = = y (n Nx ) (19.19) Specically, it holds that yc (n) = yp (n), 0 n Nx 1 (19.20) Let us examine the samples of yp (n) over the interval 0 n Nx 1. Figure 19.3 illustrates the sequence y (n) and two of its shifted versions, y (nNx) and y (n+Nx); these are the only shifted sequences that interfere with the samples of y (n) over 0 n Nx 1 while forming yp (n). 540 CHAPTER 19 COMPUTING LINEAR CONVOLUTIONS Nx + Nh y (n ) y ( n + Nx ) y (n Nx ) Nh Nh Nx FIGURE 19.3 When the sequence y (n) is shifted to the left by Nx samples and to the right by Nx samples, overlaps occur at the leading and the trailing Nh samples. Observe that aliasing in time occurs over the leading interval 0 n Nh 1, and over the trailing interval Nx n Nx + Nh 1. However, the samples of y (n) that lie within the interval Nh n Nx 1 are not subjected to aliasing and remain intact while forming yp (n). We then conclude from (19.20) that the samples of yc (n) that occur within Nh n Nx 1 coincide with the samples of y (n) over the same interval: yc (n) = y (n), Nh n Nx 1 (19.21) This discussion leads to the following observation, which will be exploited to motivate and develop the overlap-save block convolution method. Useful conclusion. The Nx point circular convolution of two sequences, x(n) and h(n), allows us to recover a portion of their linear convolution without any distortion. The portion that is recovered is the one that lies within the interval Nh n Nx 1, where Nx and Nh are the lengths of the sequences x(n) and h(n), respectively, and it is assumed that Nx > Nh . Overlap-Save Computations We now use the above conclusion to derive the overlap-save method for the evaluation of linear convolutions. Thus, consider again a causal sequence x(n) whose length Nx is a multiple of some positive integer M . If this is not the case, then the length of x(n) can be extended by padding a sufcient number of leading zeros. We partition the sequence x(n) into a sufcient number of overlapping segments of length M + Nh each in order to cover the entire samples of x(n). Compared with the overlap-add method, observe that the segments are now overlapping and have length M + Nh each. Figure 19.4 illustrates the overlap-save segmentation for the case p = 4. Four segments are shown and they are denoted by xm (n), for m = 0, 1, 2, 3. 541 SECTION 19.3 M M x(n) M BLOCK CONVOLUTION METHODS M x0 (n) x1 (n) zero padding x2 (n) x3 (n) M + Nh FIGURE 19.4 The sequence x(n) is partitioned into overlapping sub-sequences xm (n) of length M + Nh each. The leading Nh samples of xm (n) overlap with the trailing Nh samples of the preceding sequence xm1 (n). The rst sequence, x0 (n) is padded with Nh leading zeros. The rst sub-sequence, x0 (n), has a leading block of Nh zeros followed by the rst M samples of x(n), i.e., x0 (n) = 0, x(n Nh ), 0 n Nh 1 Nh n M + Nh 1 The second sub-sequence, x1 (n), has the same Nh trailing samples of x0 (n) and the sec ond block of M samples from x(n): x1 (n) = x0 (n + M ), x(n + M Nh ), 0 n Nh 1 Nh n M + Nh 1 The third sub-sequence, x2 (n), has the same Nh trailing samples of x1 (n) and the second block of M samples from x(n): x2 (n) = x1 (n + M ), x(n + 2M Nh ), 0 n Nh 1 Nh n M + Nh 1 and so on. We continue this construction until any additional segment will consist solely of zero samples (see Example 19.3 further ahead). We assume the length of h(n) is extended to M + Nh via zero padding. We then start by evaluating the circular convolution of x0 (n) with h(n). The result will be an (M + Nh )point sequence y0 (n): y0 (n) = x0 (n) h(n) (19.22) The rst Nh samples of this convolution are aliased and are discarded. On the other hand, and according to the useful property (19.21) of circular convolutions, the samples within the range Nh n Nh + M 1 are not subject to distortion and coincide with the samples of the linear convolution of x0 (n) and h(n) over the same range: y0 (n) = x0 (n) h(n), over Nh n Nh + M 1 542 CHAPTER 19 COMPUTING LINEAR CONVOLUTIONS However, because of the padding of Nh leading zeros in x0 (n), we nd that the samples of the linear convolution x0 (n) h(n) over the interval Nh n Nh + M 1 coincide with the samples of the desired linear convolution x(n) h(n) over 0 n M 1 see Fig. 19.5. In other words, we conclude that the samples of the computed circular convolution, y0 (n), in (19.22) allow us to identify the rst M samples of the desired linear convolution sequence y (n): y (n) = y0 (n + Nh ), 0nM 1 (19.23) M + Nh M + Nh x0 (n) h( n ) zero padding zero padding Nh y0 (n) discard coincide with samples of y (n) over 0 n M 1 FIGURE 19.5 The sub-sequence x0 (n) is circularly convolved with h(n) to generate sequence y0 (n) with M + Nh samples. The rst Nh samples of y0 (n) are discarded and the remaining samples coincide with the samples of the linear convolution of x(n) and h(n) over 0 n M 1. Before we proceed, let us examine this result more closely. Let x0 (n) denote the trailing M entries of x0 (n); these are the M samples from x(n) that belong to x0 (n). That is, we are excluding the block of leading zeros from x0 (n) and denoting the remaining sequence by x0 (n) see Fig. 19.6. The above discussion indicates that the samples of y0 (n) between Nh n M + Nh 1 coincide with the rst M samples of the linear convolution x0 (n) h(n): x0 (n) h(n) = y0 (n + Nh ), over 0 n M 1 However, the linear convolution of x0 (n) and h(n) is a sequence of length M + Nh 1. We therefore still need to determine the trailing Nh 1 samples of this linear convolution. It is for this reason that the subsequent sequence x1 (n) is dened with an overlapping segment of length Nh with the prior sequence x0 (n). The samples in this overlapping segment are the ones from xo (n) that contribute to the evaluation of the missing Nh 1 samples. So let us now evaluate the circular convolution of the second sequence, x1 (n), with h(n). The result will be an (M + Nh )point sequence y1 (n): y1 (n) = x1 (n) h(n) 543 SECTION 19.3 M + Nh M + Nh h( n ) x0 (n) x0 (n) h( n ) Nh M M + Nh 1 ? First M samples of y (n) already computed Trailing Nh 1 samples of y (n) are still missing FIGURE 19.6 Linearly convolving the sequence x0 (n) of M samples with the sequence h(n) of Nh samples results in a sequence of length M + Nh 1. The circular convolution of x0 (n) and h(n) already provides the rst M samples of x0 (n) h(n). We still need to identify the last Nh samples. The rst Nh samples of this convolution are aliased and are discarded. On the other hand, the samples within the range Nh n Nh + M 1 are not subject to distortion and coincide with the samples of the linear convolution of x(n) and h(n) over M n 2M 1: y (n) = y1 (n + Nh M ), M n 2M 1 (19.24) and so forth. Summary of the Overlap-Save Method for Evaluating Linear Convolutions (a) Partition the sequence x(n) into (p + 1) overlapping segments of size M + Nh each, as illustrated in Fig. 19.4. The leading Nh samples of each sub-sequence xm (n) overlap with the trailing Nh samples of the preceding sub-sequence xm1 (n). The rst sub-sequence x0 (n) is padded with Nh leading zeros. (b) Compute the circular convolutions ym (n) = xm (n) h(n) which result in sub-sequences ym (n) of length M + Nh each. BLOCK CONVOLUTION METHODS 544 CHAPTER 19 COMPUTING LINEAR CONVOLUTIONS (c) Discard the leading Nh samples of the sub-sequences ym (n) to generate the sub sequences ym (n) of length M each: ym (n + Nh ), 0, ym (n) = 0nM 1 otherwise (d) Concatenate the sub-sequences ym (n) to generate the desired linear convolution sequence y (n)as follows: p1 y (n) = m=0 ym (n mM ) Example 19.3 (Illustrating overlap-save method) Let us consider the same sequence x(n) as Example 19.2: x(n) = 1 , 1, 2, 3, 2, 4, 10, 0, 6, 4, 3, 5 with Nx = 12 samples. Let M = 3 samples per block. We want to employ the overlap-save method to evaluate the convolution of x(n) with the following sequence h(n) = (n) + 0.5 (n 1) We now need p = 5 blocks to cover the sequence with the corresponding sub-sequences generated as follows: x0 (n) = x1 (n) = x2 (n) = x3 (n) = x4 (n) = 0 , 0, 1, 1, 2 1 , 2, 3, 2, 4 2 , 4, 10, 0, 6 0 , 6, 4, 3, 5 3 , 5, 0, 0, 0 where we are using the box notation to indicate the location of the sample at time n = 0. We rst convolve circularly each of the sub-sequences, xm (n), with h(n) to get y0 (n) = x0 (n) h(n) = y1 (n) = x1 (n) h(n) = y2 (n) = x2 (n) h(n) = y3 (n) = x3 (n) h(n) = y4 (n) = x4 (n) h(n) = 1 , 0, 1, 0.5, 1.5 3 , 0.5, 2, 3.5, 3 1 , 3, 12, 5, 6 2.5 , 6, 1, 1, 6.5 3 , 6.5, 2.5, 0, 0 545 Discarding the leading Nh = 2 samples of the sequences ym (n) we get y0 (n) = y1 (n) = y2 (n) = y3 (n) = y4 (n) = 1 , 0.5, 1.5 SECTION 19.5 APPLICATIONS 2 , 3.5, 3 12 , 5, 6 1 , 1, 6.5 2.5 , 0, 0 Then, 3 y (n) = m=0 = ym (n 3m) 1 , 0.5, 1.5, 2, 3.5, 3, 12, 5, 6, 1, 1, 6.5, 2.5 19.4 APPLICATIONS TO BE ADDED Practice Questions: 1. 2. 19.5 PROBLEMS Problem 19.1 Let x(n) = -1 , 1, 0, 2 , h(n) = 1 , 2, 1/2, 0 (a) Find x(n) h(n) directly from the denition of the linear convolution. (b) Find x(n) h(n) by using instead the circular convolution. Problem 19.2 Let x(n) = -1 , 2, 1, 1, 2, 0, 1 , h(n) = 1 , 1, 0, 1 (a) Find x(n) h(n) directly from the denition of the linear convolution. (b) Find x(n) h(n) by using instead the circular convolution. Problem 19.3 Given the sequences x1 (n) = (n) + 1 1 (n 1) and x2 (n) = (n) + (n 2) 2 2 Compute the linear convolution of x1 (n) and x2 (n) in the following different ways: 546 CHAPTER 19 COMPUTING LINEAR CONVOLUTIONS (a) Using the graphical method. (b) Using z transforms. (c) Using discrete-time Fourier transforms (DTFTs). (d) Using circular convolution. (e) Using discrete Fourier transforms (DFTs). Problem 19.4 Given the sequences x1 (n) = (n 1) (n 3) and x2 (n) = (n) (n 1) + (n 2) Compute the linear convolution of x1 (n) and x2 (n) in the following different ways: (a) Using the graphical method. (b) Using z transforms. (c) Using discrete-time Fourier transforms (DTFTs). (d) Using circular convolution. (e) Using discrete Fourier transforms (DFTs). Problem 19.5 Let x(n) = -1 , 1, 0, 2, 1/2, 3, 1 , h(n) = 1 , 0, 2 (a) Find x(n) h(n) directly from the denition of the linear convolution. (b) Find x(n) h(n) by using instead the circular convolution. (c) Find x(n) h(n) using the overlap-add method. (d) Find x(n) h(n) using the overlap-save method. Problem 19.6 Let x(n) = 2 , 1, 1, 1/2, 3 , h(n) = 1 , 0, 2, 1 (a) Find x(n) h(n) directly from the denition of the linear convolution. (b) Find x(n) h(n) by using instead the circular convolution. (c) Find x(n) h(n) using the overlap-add method. (d) Find x(n) h(n) using the overlap-save method. Problem 19.7 Consider a causal sequence x(n) of length 5. The values of its samples at time instants 0, 1, 3, and 4 are shown in Fig. 19.7, except for the sample at time instant n = 2, whose value is unknown. The values of the other samples are either 0, 1, or 2. The coefcients of the 2-point DFT of x(n) satisfy X (0) + X (1) = 2 (a) Can you recover the value of the unknown sample of x(n)? If so, what is its value? If not, explain why? (b) Determine X (k) X (k). That is, nd the circular convolution of X (k) with itself. (c) Find also X (k) X (k) by using circular convolution. Problem 19.8 Consider two causal sequences x(n) and h(n) of duration N each. Let y (n) denote their N point circular convolution. Show that the samples of the sequences {x(n), h(n), y (n)} can be related in vector form as follows: yN = H N x N 547 SECTION 19.5 x(n) PROBLEMS ? 2 1 1 2 3 4 n FIGURE 19.7 Sequence x(n) for Prob. 19.7. where the N 1 vectors yN and xN are yN = y (0) y (1) y (2) . . . y (N 1) and xN = x(0) x(1) x(2) . . . x(N 1) and the N N matrix HN is called circulant and has the following form: HN = h(0) h(1) h(2) . . . h(N 1) h(N 1) h(0) h(1) . . . h(N 2) h(N 2) h(N 1) h(0) . . . h(N 3) ... ... ... .. . ... h(1) h(2) h(3) h(0) Observe that each row of HN is obtained by shifting the row above it circularly to the right by one position. Problem 19.9 Consider the circulant matrix HN of Prob. 19.8. Let FN denote the N N DFT matrix dened by (17.46). Show that the product FN HN FN is a diagonal matrix. Remark: This result shows that every circulant matrix is diagonalizable by the DFT matrix. CHAPTER 20 Fast Fourier Transform O ne of the main advantages of working with the DFT in discrete-time signal processing is that efcient methods exist for the evaluation of the DFT and its inverse. These methods are known generally by the name Fast Fourier Transforms or FFTs for short. We saw in the previous chapter that the DFT is useful in evaluating linear convolutions. Therefore, the Fast Fourier Transform (FFT) will provide efcient ways to evaluate linear convolutions as well. 20.1 COMPUTATIONAL COMPLEXITY To motivate the FFT, we start by examining the computational cost involved in evaluating an N point DFT. Thus, let x(n) denote a causal sequence of duration N and introduce its N point DFT sequence, X (k ): N 1 x(n)ej X (k ) = 2k Nn , n=0 k = 0, 1, . . . , N 1 (20.1) The sequence x(n) can be recovered from its DFT through the inverse operation: x(n) = 1 N 1 2k X (k )ej N n , N k=0 n = 0, 1, . . . , N 1 (20.2) For convenience of notation, we let WN denote the N th root of unity, i.e., 2 WN = ej N (20.3) Then evaluating the nk -th power of WN gives nk (WN ) = e j 2k Nn so that denition (20.1) for the N point DFT of x(n) can be re-expressed in terms of WN as N 1 X (k ) = n=0 nk x(n)WN , k = 0, 1, . . . , N 1 (20.4) Likewise, the inverse DFT relation (20.2) can be re-expressed in terms of WN as x(n) = 1 N 1 X (k )WN nk , N n=0 n = 0, 1, . . . , N 1 (20.5) 549 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 550 The complex number WN dened by (20.3) satises several useful relations such as: CHAPTER 20 FAST FOURIER TRANSFORM q (WN ) = WN/q , q+ N 2 q (WN ) = (WN ) , (WN ) qN/2 = (1)q (20.6) for any integer q . Proof: Indeed, note that (W N )q q 2 = e j = e j N q+ N 2 (W N ) = e j 2 (q + N ) N 2 (WN )qN/2 = e j N q 2 N 2 =e 2q N =e 2q j N 2 j N/q = WN/q ej = ej 2q N q = W N = ejq = (1)q We shall exploit the above properties while deriving efcient methods for evaluating the DFT. Now refer to expression (20.4) and observe that the evaluation of each coefcient X (k ) generally involves computing N complex multiplications and (N 1) complex additions (especially when the samples of x(n) are complex-valued themselves). Each complex addition refers to the addition of two complex numbers, which involves two real additions since (a + jb) + (c + jd) = (a + c) j (b + d) (20.7) Likewise, each complex multiplication refers to the multiplication of two complex numbers and involves four real multiplications and two real additions since (a + jb) (c + jd) = (ac bd) + j (ad + bc) (20.8) This complexity translates into an overall cost of N (N 1) complex additions and N 2 complex multiplications to evaluate all N DFT coefcients, X (k ). We therefore say that the evaluation of the N point DFT of a sequence through the standard denition (20.4) has complexity of the order of 2N 2 complex operations (additions and multiplications), written as: N -point DFT requires O(2N 2 ) complex operations (20.9) where the notation O(2N 2 ) signies of the order of 2N 2 . A similar complexity gure holds for the inverse DFT operation. Example 20.1 (Cost of 1024-point DFT) The evaluation of a 1024-point DFT requires (1024)2 = 1, 048, 576 = complex multiplications (1024) (1023) = 1, 047, 552 = complex additions In other words, it is necessary that we perform of the order of 2 million complex operations. To have an idea of what this cost entails, consider a discrete-time processor operating at the rate of 1GHz. Assume further that each complex operation requires one clock cycle, namely, 109 sec. We then nd that the evaluation of the 1024 DFT coefcients would necessitate approximately 2.1 msec. The computational cost of the DFT translates into a demand on the amount of time that is necessary to evaluate its coefcients. We now describe efcient methods for evaluating the same coefcients by resorting to divide-and-conquer strategies that lead to Fast Fourier Transform (FFT) techniques. There are several variants of the FFT algorithm. We limit ourselves to the so-called radix-2 decimation-in-time and decimation-in-frequency versions, which are widely used. Other FFT variants essentially share the same divideand-conquer strategies. 20.2 DECIMATION-IN-TIME FFT Assume the length N is a power of 2, say N = 2p for some positive integer p. This requirement is not restrictive since we can always pad the sequence x(n) with additional trailing zeros in order to meet the condition. The padding of zeros does not alter the DTFT, X (ej and, therefore, does not inuence the values of the DFT coefcients, X (k ). Since N is even, we can split the sequence, x(n), into two smaller sequences of duration N/2 each. In one sequence we group the even-indexed samples of x(n) and in the other sequence we group the odd-indexed samples of x(n), say, xe (n) = x(0) , x(2), x(4), . . . , x(N 4), x(N 2) (20.10) xo (n) = x(1) , x(3), x(5), . . . , x(N 3), x(N 1) (20.11) In (20.10)(20.11), we are using the box notation to indicate the location of the sample of index n = 0 in both sequences xe (n) and xo (n). Figure 20.1 illustrates this construction for a particular sequence x(n) of duration N = 8. Let Xe (k ) and Xo (k ) denote the N point DFT of xe (n) and xo (n), respectively, 2 N 2 Xe (k ) 1 kn xe (n)WN/2 = n=0 N 2 1 = n=0 N 2 Xo (k ) kn x(2n)WN/2 , k = 0, 1, . . . , (N/2) 1 (20.12) 1 kn xo (n)WN/2 = n=0 N 2 1 = n=0 kn x(2n + 1)WN/2 , k = 0, 1, . . . , (N/2) 1 (20.13) Note that we have N/2 coefcients Xe (k ) and N/2 coefcients Xo (k ). Recall that although we are limiting the sequences to the interval 0 k N 1, the DFT coefcients 2 Xe (k ) and Xo (k ) are actually periodic sequences with period N/2. Therefore, when necessary, the coefcients Xe (k ) and Xo (k ) over the extended interval 0 k N 1 are 551 SECTION 20.2 DECIMATIONIN-TIME FFT 552 CHAPTER 20 x (n ) FAST FOURIER TRANSFORM 2 1 4 1 2 5 3 6 n 7 1 xo (n) x e (n ) 2 1 x(0) x(6) 2 x(2) x(3) x(5) 1 x(7) 2 n 3 1 1 1 1 x ( 4) 2 n 3 x(1) FIGURE 20.1 The sequence x(n) of duration N = 8 (top) is decimated into two smaller sequences, xe (n) and xo (n), of duration 4 samples each (bottom). found from {Xe (k ), k = 0, 1, . . . , N 1} = and Xe (0) , Xe (1), . . . , Xe one period with N 2 N 1 , Xe (0), Xe (1), . . . , Xe 2 samples a second period with N 2 N 1 2 samples {Xo (k ), k = 0, 1, . . . , N 1} = Xo (0) , Xo (1), . . . , Xo one period with N 2 N 1 , Xo (0), Xo (1), . . . , Xo 2 samples a second period with N 2 N 1 2 samples where the box notation is used to indicate the location of the sample at bin k = 0. Given the coefcients Xe (k ) and Xo (k ) over the extended interval 0 n N 1, we now verify that the N point DFT of x(n) can be determined from Xe (k ) and Xo (k ) as 553 follows: SECTION 20.2 X (k ) N 1 nk x(n)WN = (20.14) n=0 kn x(n)WN + = kn x(n)WN n=even N 2 n=odd N 2 1 k x(2m)WN2m = k(2m+1) + m=0 N 2 1 x(2m + 1)WN m=0 N 2 1 km x(2m)WN/2 = + k WN m=0 Xe (k) 1 km x(2m + 1)WN/2 m=0 Xo (k) (20.15) In other words, we nd that k X (k ) = Xe (k ) + WN Xo (k ) , k = 0, 1, . . . , N 1 (20.16) By further using the identify k+ N 2 WN k = WN (20.17) and the fact that Xe (k ) and Xo (k ) are periodic with period N/2, relation (20.16) for X (k ) can be rewritten in the equivalent form: X (k ) X k+ N 2 = k Xe (k ) + WN Xo (k ) , 0 k N 2 1 = k Xe (k ) WN Xo (k ) , 0 k N 2 1 (20.18) This result shows that the determination of the N point DFT coefcients X (k ) can be alternatively achieved as follows: (a) We split the original sequence x(n) into two sub-sequences, xe (n) and xo (n), of duration N/2 each. One sequence contains the even-indexed samples of x(n) and the other sequence contains the odd-indexed samples of x(n). (b) We determine the N point DFTs Xe (k ) and Xo (k ), k = 0, 1, . . . , N/2 1. The 2 evaluation of each of these DFTs requires O 2 (N/2)2 = O N 2 /2 complex operations k (c) We multiply the N/2 coefcients Xo (k ) by WN , k = 0, 1, . . . , N/2 1. This step requires N/2 complex multiplications. k (d) We add and subtract the N/2 samples of the sequences {Xe (k ), WN Xo (k )} to generate X (k ). This step requires N complex additions. The total computational cost adds up to O(N 2 ) complex operations, down from the earlier gure of O(2N 2 ) operations in (20.9) when the N point DFT is computed directly from DECIMATIONIN-TIME FFT 554 CHAPTER 20 FAST FOURIER TRANSFORM the dening relation (20.4). We therefore nd that by decimating the sequence in time into two smaller sequences, we are able to reduce the cost by a factor of 2. The same decimation procedure can now be applied to the evaluation of the N point 2 DFTs Xe (k ) and Xo (k ) by splitting each of the sequences xe (n) and xo (n) into two smaller sequences and computing their respective DFTs. For instance, we split xe (n) into two smaller sequences of duration N/4 each: one of the sequences contains the evenindexed samples of xe (n) and the other sequence contains the odd-indexed samples of xe (n), say, xee (n) = x(0) , x(4), x(8), . . . , x(N 6), x(N 2) (20.19) xeo (n) = x(2) , x(6), x(10), . . . , x(N 8), x(N 4) (20.20) We then evaluate the N point DFTs of xee (n) and xeo (n), denoted by Xee (k ) and Xeo (k ), 4 respectively, and combine them to obtain the N -point DFT Xe (k ): 2 Xe (k ) Xe k + N 4 k = Xee (k ) + WN/2 Xeo (k ) , 0 k N 4 1 k = Xee (k ) WN/2 Xeo (k ) , 0 k N 4 1 (20.21) Likewise, we split xo (n) into two smaller sequences of duration N/4 each: one of the sequences contains the even-indexed samples of xo (n) and the other sequence contains the odd-indexed samples of xo (n), say, xoe (n) = x(1) , x(5), x(9), . . . , x(N 5), x(N 1) (20.22) xoo (n) = x(3) , x(7), x(11), . . . , x(N 7), x(N 3) (20.23) We subsequently evaluate the corresponding N -point DFTs, denoted by Xoe (k ) and Xoo (k ), 4 respectively, and combine them to obtain the N point DFT Xo (k ): 2 Xo (k ) Xo k + N 4 = k Xoe (k ) + WN/2 Xoo (k ) , 0 k N 4 1 = k Xoe (k ) WN/2 Xoo (k ) , 0 k N 4 1 (20.24) Observe that now we need to evaluate 4 DFTs of order N/4 each. The decimation process can be repeated again and applied to each of the sequences {xee (n), xeo (n), xoe (n), xoo (n)} In this way, the N 4 point DFTs {Xee (k ), Xeo (k ), Xoe (k ), Xoo (k )} would be computed in terms of N point DFTs and so on. Starting with a duration N that 8 is a power of 2, say N = 2p , then the decimation process can be repeated p = log2 (N ) times until we collapse to a stage that requires the evaluation of 2point DFTs only. This construction is best illustrated by means of an example (see below). Figure 20.2 helps illustrate how the samples of an 8-point sequence , x(n), are decimated into the sequences 555 x (n) xe ( n ) SECTION 20.2 DECIMATIONIN-TIME FFT xee (n) xeo (n) xoe (n) xoo (n) x o (n ) FIGURE 20.2 A representation of the decimation process that takes the samples of an 8point sequence x(n) and divides them into smaller sequences {xee (n), xeo (n), xoe (n), xoo (n)} of size 2 samples each. Within each sequence, the even-indexed samples and the odd-indexed samples are denoted by same colored dots. xe (n) and xo (n) and the subsequent sequences {xee (n), xeo (n), xoe (n), xoo (n)} of size 2 samples each. Example 20.2 (8point DFT via decimation-in-time) Consider an 8-point sequence x(n) = x(0) , x(1), x(2), x(3), x(4), x(5), x(6), x(7) By splitting it into even and odd-indexed samples we obtain the two subsequences: xe (n) = xo (n) = {x(0), x(2), x(4), x(6)} {x(1), x(3), x(5), x(7)} By further splitting each sub-sequence into even and odd-indexed samples we obtain the four subsequences: xee (n) = xeo (n) = xoe (n) = xoo (n) = {x(0), x(4)} {x(2), x(6)} {x(1), x(5)} {x(3), x(7)} 556 CHAPTER 20 FAST FOURIER TRANSFORM We are therefore reduced to computing 2point DFTs. Using the result of Example 17.8 we have Xee (0) = x(0) + x(4) Xee (1) = x(0) x(4) Xeo (0) = x(2) + x(6) Xeo (1) = x(2) x(6) Xoe (0) = x(1) + x(5) Xoe (1) = x(1) x(5) Xoo (0) = x(3) + x(7) Xoo (1) = x(3) x(7) Observe that eight additions are involved in the calculations in this rst stage. We now combine the above 2point DFTs to obtain the 4point DFTs of the sequences xe (n) and xo (n): Xe (0) = Xee (0) + Xeo (0) Xe (1) = Xe (2) = 1 Xee (1) + W4 Xeo (1) Xe (3) = Xo (0) = Xoe (0) + Xoe (1) Xo (1) = Xo (2) = 1 Xoe (0) + W4 Xoe (1) Xo (3) = Xee (0) Xeo (0) 1 Xee (1) W4 Xeo (1) Xoe (0) Xoe (1) 1 Xoe (0) W4 Xoe (1) Observe that eight complex additions and four complex multiplications are again involved in this second stage. Finally, we combine the 4point DFTs to obtain the desired 8-point DFT of x(n): X (0) = Xe (0) + Xo (0) X (1) = X (2) = 1 Xe (1) + W8 Xo (1) X (3) = X (4) = X (5) = X (6) = X (7) = 2 Xe (2) + W8 Xo (2) 3 Xe (2) + W8 Xo (3) Xe (0) Xo (0) 1 Xe (1) W8 Xo (1) 2 Xe (2) W8 Xo (2) 3 Xe (2) W8 Xo (3) We again note that eight complex additions and six complex multiplications are involved in this third stage. Note that 3 stages are all we need in this example to arrive at the desired DFT, and 3 = log2 (8). Figure 20.3 shows a ow diagram representation for the above calculations, where the dark circles represent adders. Computational Cost Observe from Fig. 20.3 that the basic building block for the implementation of the decimationin-time FFT is the so-called buttery section shown in Fig. 20.4: its input values are two 557 SECTION 20.2 Xee (0) x(4) Xe (1) Xeo (0) DECIMATIONIN-TIME FFT X (0) X (1) 1 x(2) x(6) Xe (0) Xee (1) x(0) Xe (2) X (2) 1 Xe (3) Xeo (1) 1 Xoe (0) x(1) X (3) 1 1 W4 Xo (0) X (4) 1 x(5) Xoe (1) Xo (1) 1 Xoo (0) x(3) Xo (2) 1 x(7) 1 1 W4 X (5) X (6) 2 W8 1 3 W8 1 Xo (3) Xoo (1) 1 1 1 W8 X (7) FIGURE 20.3 Flowgraph representation of the 8point decimation-in-time FFT from Example 20.2. The dark circles in the gure represent adders. scalars a and b and its output values are given by A B = a + bW = a bW (20.25) (20.26) in terms of a complex scaling coefcient W . Each buttery transformation requires two complex additions and one complex multiplication by W . For simplicity, we shall say that each buttery transformation requires three complex operations (additions and multiplications together). Observe further that the implementation of an N point decimation-intime FFT requires log2 (N ) stages with N/2 butteries in each stage. Accordingly, the computational complexity of the FFT implementation is 3 N log2 (N ) = 1.5N log2 (N ) complex operations 2 It follows from this analysis that N -point decimation-in-time FFT requires O (1.5N log2 N ) complex operations (20.27) 558 CHAPTER 20 FAST FOURIER TRANSFORM a A = a + Wb b W B = a Wb 1 FIGURE 20.4 Elementary buttery section for decimation-in-time FFT implementations where W is a complex scalar factor. Example 20.3 (Cost of 1024-point DFT) Let us reconsider the evaluation of the 1024-point DFT of Example 20.1 by using the decimation-intime FFT implementation. The computational complexity would be of the order of 1.5 1024 log 2 (1024) = 1.5 1024 10 = 15, 360 complex operations Considering again a discrete-time processor operating at the rate of 1GHz and assuming that each complex operation requires one clock cycle, we nd that the evaluation of the 1024 DFT coefcients in this manner would now necessitate approximately 15.3 sec; a signicant improvement over 2.1 msec. Ordering of Samples We observe from Example 20.2 and Fig. 20.3 that the DFT coefcients X (k ) appear in their natural order on the right-hand side of the gure, while the samples of input sequence, x(n), appear shufed on the left-hand side of the same gure. The order of the input samples can be inferred from the following simple rule. We express the time indices of x(n) in binary format and then reverse the binary representation. For example, for N = 8 we obtain the construction shown in Table 20.1. TABLE 20.1 Ordering of the input samples, x(n), in decimation-in-time FFT. natural order binary format reversed order after shufing 0 1 2 3 4 5 6 7 000 001 010 011 100 101 110 111 000 100 010 110 001 101 011 111 0 4 2 6 1 5 3 7 Evaluating the Inverse DFT through Decimation-in-Time FFT The same decimation-in-time procedure can be used to compute the IDFT (20.5). Thus, given an N point DFT sequence X (k ), the inverse DFT sequence x(n) can be determined by using the same structure shown in Fig. 20.3 for the case N = 8 with the following adjustments: k (a) The coefcients WN are replaced by their complex conjugate values, WN k . (b) The samples on the left-hand side of the gure would be the shufed DFT coefcients: {X (0), X (4), X (2), X (6), X (1), X (5), X (3), X (7)} (c) The samples on the right-hand side of the gure should be scaled by 1/N and would coincide with the input samples in their natural order: {x(0), x(1), x(2), x(3), x(4), x(5), x(6), x(7)} The procedure is illustrated in Fig. 20.5 for the case N = 8. 1/N x(0) X (0) X (4) 1/N 1 1/N x(2) X (2) X (6) x(1) 1 1/N x(3) 1 W4 1 1 1/N x(4) X (1) 1 X (5) 1/N 1 1 W8 1 1/N x(6) X (3) 1 X (7) x(5) W8 2 1 1 W8 3 1 1/N x(7) 1 W4 1 FIGURE 20.5 Flowgraph representation of the 8point decimation-in-time inverse FFT. The dark circles in the gure represent adders. 559 SECTION 20.3 DECIMATIONIN-FREQUENCY FFT 560 20.3 DECIMATION-IN-FREQUENCY FFT CHAPTER 20 FAST FOURIER TRANSFORM We now describe another efcient implementation of the DFT by relying on decimation in frequency rather than in time. In this variant, the order of the input samples is kept unchanged while the order of the DFT coefcients is shufed. The algorithm is motivated as follows. Consider again a causal sequence x(n) of duration N . We split x(n) into two subsequences, x (n) and xr (n), where x (n) consists of the leading N samples of x(n) and 2 xr (n) consists of the trailing N samples of x(n): 2 x (n) = x(0) , x(1), . . . , x ((N/2) 1) xr (n) = x N 2 (20.28) , x ((N/2) + 1) , . . . , x(N 1) (20.29) We can also write x (n) = xr (n) = x(n), x n+ N 2 n = 0, 1, . . . , (N/2) 1 , n = 0, 1, . . . , (N/2) 1 (20.30) Figure 20.6 illustrates this construction for a particular sequence x(n) of duration N = 8. x (n ) 2 1 4 1 2 3 5 6 n 7 1 x (n) 2 xr (n) x(3) x(0) 2 x(2) 1 1 x(6) x (5 ) x(7) 1 2 1 x(1) 3 n 1 1 2 3 n x(4) FIGURE 20.6 The sequence x(n) of duration N = 8 (top) is decimated into two smaller sequences, x (n) and xr (n), of duration 4 samples each (bottom). We further introduce two sequences x1 (n) and x2 (n), also of duration N/2 each and which are dened in terms of x (n) and xr (n) as follows: x1 (n) = x2 (n) = x (n) + xr (n), n = 0, 1, . . . , (N/2) 1 n [x (n) xr (n)]WN , n = 0, 1, . . . , (N/2) 1 (20.31) That is, x1 (n) is obtained by adding the rst N samples of x(n) to the trailing N samples 2 2 of x(n). Likewise, x2 (n) is obtained by subtracting the same two sets of samples and scaling the result by the complex factor n WN = ej for each n. Let X1 (k ) and X2 (k ) denote the x2 (n), respectively, N 2 X1 (k ) 2n N N 2 -point DFTs of the sequences x1 (n) and 1 2 x1 (n)ej N/2 kn = (20.32) n=0 N 2 X2 (k ) 1 2 x2 (n)ej N/2 kn = (20.33) n=0 We now verify that the N point DFT of x(n) can be expressed in terms of the DFTs, X1 (k ) and X2 (k ). Indeed, note that N 2 point N 1 kn x(n)WN X (k ) = n=0 N 2 1 N 1 kn x(n)WN kn x(n)WN + = n=0 N 2 n= N 2 1 kn x (n)WN + = N k/2 WN n=0 N 2 1 n=0 kn xr (n)WN , k = 0, 1, . . . , N 1 Now using the fact that N k/2 = (1)k (20.34) kn x (n) + (1)k xr (n) WN , k = 0, 1, . . . , N 1 (20.35) WN we obtain the equivalent expression N 2 1 X (k ) = n=0 561 SECTION 20.3 DECIMATIONIN-FREQUENCY FFT 562 CHAPTER 20 FAST FOURIER TRANSFORM We can therefore split X (k ) into even and odd-indexed samples and note that these samples coincide with the DFT coefcients X1 (k ) and X2 (k ) introduced earlier in (20.32)(20.33): N 2 1 2 [x (n) + xr (n)] WNkn X (2k ) = n=0 N 2 1 kn x1 (n)WN/2 = n=0 = X1 (k ), k = 0, 1, . . . , (N/2) 1 N 2 1 (2k+1)n X (2k + 1) = n=0 N 2 [x (n) xr (n)] WN 1 = n=0 N 2 (20.36) n kn [x (n) xr (n)] WN WN/2 1 kn x2 (n)WN/2 = n=0 = X2 (k ), k = 0, 1, . . . , (N/2) 1 (20.37) In summary, we have shown the following so far: (a) Starting with a sequence x(n), we split it into two sequences of duration N/2 each. The rst sequence, x (n), contains the leading N/2 entries of x(n) and the second sequence, xr (n), contains the trailing N/2 entries of x(n). (b) We then add the sequences x (n) and xr (n) to generate x1 (n). We also subtract the n sequences and multiply each difference by WN to generate the sequence x2 (n). (c) We then evaluate the N -point DFTs of x1 (n) and x2 (n). The DFT X1 (k ) provides 2 the even-indexed coefcients of the desired N point DFT, X (k ), while the DFT X2 (k ) provides the odd-indexed coefcients of X (k ). The same decimation procedure can now be applied to the evaluation of N point DFTs 2 X1 (k ) and X2 (k ) by splitting each of the sequences x1 (n) and x2 (n) into two smaller sequences and computing their respective DFTs. For instance, we split x1 (n) into two smaller sequences of duration N/4 each: one sequence contains the leading N/4 entries of x1 (n) and the other sequence contains the trailing N/4 entries of x1 (n), say x1 (n) = x1 (0) , x1 (1), x1 (2), . . . , x1 x1r (n) = x1 N 4 , x1 N + 1 , x1 4 N 1 4 N + 2 , . . . , x1 4 (20.38) N 1 2 (20.39) We then introduce the sequences x11 (n) = x12 (n) = x1 (n) + x1r (n), n = 0, 1, . . . , N/4 1 n [x1 (n) x1r (n)] WN/2 , n = 0, 1, . . . , N/4 1 (20.40) and evaluate the N point DFTs of x11 (n) and x12 (n), denoted by X11 (k ) and X12 (k ), 4 respectively. The DFT X11 (k ) provides the even-indexed coefcients of X1 (k ) and the DFT X12 (k ) provides the odd-indexed coefcients of X1 (k ): X1 (2k ) = X11 (k ), X1 (2k + 1) = X12 (k ), 0 k N/4 1 0 k N/4 1 (20.41) (20.42) Likewise, we split x2 (n) into two smaller sequences of duration N/4 each: one sequence contains the leading N/4 entries of x2 (n) and the other sequence contains the trailing N/4 entries of x2 (n), say x2 (n) = x2 (0) , x2 (1), x2 (2), . . . , x2 x2r (n) = x2 N 4 , x2 N + 1 , x2 4 N 1 4 N + 2 ,...,x 4 (20.43) N 1 2 (20.44) We then introduce the sequences x21 (n) = x22 (n) = x2 (n) + x2r (n), n = 0, 1, . . . , N/4 1 n [x2 (n) x2r (n)] WN/2 , n = 0, 1, . . . , N/4 1 (20.45) and evaluate the N point DFTS of x21 (n) and x22 (n), denoted by X21 (k ) and X 22(k ), 4 respectively. The DFT X21 (k ) provides the even-indexed coefcients of X2 (k ) and the DFT X22 (k ) provides the odd-indexed coefcients of X2 (k ): X2 (2k ) = X21 (k ), X2 (2k + 1) = X22 (k ), 0 k N/4 1 (20.46) 0 k N/4 1 (20.47) Observe that now we need to evaluate 4 DFTs of order N/4 each. The decimation procedure can be repeated again and applied to each of the sequences {x11 (n), x12 (n), x21 (n), x22 (n)} In this way, the N 4 point DFTs {X11 (k ), X12 (k ), X21 (k ), X22 (k )} would be computed in terms of N point DFTs and so on. The entire process will again 8 require log2 N stages of decimation with computational complexity given by N -point decimation-in-frequency FFT requires O (1.5N log2 N ) complex operations (20.48) Example 20.4 (8point DFT via decimation-in-time) Consider an 8-point sequence x(n) = x(0) , x(1), x(2), x(3), x(4), x(5), x(6), x(7) 563 SECTION 20.3 DECIMATIONIN-FREQUENCY FFT 564 CHAPTER 20 FAST FOURIER TRANSFORM We rst determine the sub-sequences {x1 (n), x2 (n)} of duration 4 each: x1 (0) = x(0) + x(4) x1 (1) = x(1) + x(5) x1 (2) = x(2) + x(6) x1 (3) = x(3) + x(7) x(0) x(4) x2 (0) = x2 (1) = x2 (2) = x2 (3) = 1 [x(1) x(5)] W8 2 [x(2) x(6)] W8 3 [x(3) x(7)] W8 We then determine the sub-sequences {x11 (n), x12 (n), x21 (n), x22 (n)} of duration 2 each: x11 (0) = x1 (0) + x1 (2) x11 (1) = x1 (1) + x1 (3) x12 (0) = x12 (1) = x1 (0) x1 (2) 1 [x1 (1) x1 (3)] W4 x21 (0) = x2 (0) + x2 (2) x21 (1) = x2 (1) + x2 (3) x22 (0) = x22 (1) = x2 (0) x2 (2) 1 [x2 (1) x2 (3)] W4 We evaluate the 2point DFTs of the sequences {x11 (n), x12 (n), x21 (n), x22 (n)}: X11 (0) = x11 (0) + x11 (1) X11 (1) = x11 (0) x11 (1) X12 (0) = x12 (0) + x12 (1) X12 (1) = x12 (0) x12 (1) X21 (0) = x21 (0) + x21 (1) X21 (1) = x21 (0) x21 (1) X22 (0) = x22 (0) + x22 (1) X22 (1) = x22 (0) x22 (1) 565 and then map these coefcients into the corresponding coefcients X (k): SECTION 20.3 X (0) = X11 (0) X (4) = X11 (1) X (2) = X12 (0) X (6) = X12 (1) X (1) = X21 (0) X (5) = X21 (1) X (3) = X22 (0) X (7) = X22 (1) DECIMATIONIN-FREQUENCY FFT Figure 20.7 shows a ow diagram representation for the above calculations, where the dark circles represent adders. x1 (0) x(1) x11 (0) x1 (1) x(0) x11 (1) X (0) 1 x1 (2) x(2) x12 (0) X (2) 1 x1 (3) x(3) x12 (1) 1 1 1 W4 x2 (0) x21 (0) x2 (1) x(4) X (4) x21 (1) X (6) X (1) 1 x(5) 1 1 W8 x2 (2) x(6) 1 x(7) 1 3 W8 X (3) 1 2 W8 1 x22 (0) X (5) x2 (3) x22 (1) 1 1 W4 1 X (7) FIGURE 20.7 Flowgraph representation of the 8point decimation-in-frequency FFT. The dark circles in the gure represent adders. 566 CHAPTER 20 FAST FOURIER TRANSFORM Computational Cost Observe from Fig. 20.7 that the basic building block for the implementation of decimationin-frequency FFT is again a buttery section; albeit one with the transformation shown in Fig. 20.8: its input values are two scalars a and b and its output values are given by A= B= a+b (a b)W in terms of a complex scaling coefcient W . Each buttery transformation requires two complex additions and one complex multiplication. Observe further that the implementation of an N point decimation-in-frequency FFT requires log2 (N ) stages with N/2 butteries in each stage. Accordingly, the computational complexity of the FFT implementation is 3 N log2 (N ) = 1.5N log2 (N ) complex operations 2 which is of the same order as the decimation-in-time implementation: N -point decimation-in-time FFT requires O (1.5N log2 N ) complex operations a b A= a+b 1 B = (a b)W W FIGURE 20.8 Elementary buttery section for decimation-in-frequency FFT implementations where W is a complex scalar factor. Evaluating the Inverse DFT through Decimation-in-Frequency FFT The same decimation-in-frequency procedure can be used to compute the IDFT (20.5). Thus, given an N point DFT sequence X (k ), the inverse DFT sequence x(n) can be determined by using the same structure shown in Fig. 20.7 for the case N = 8 with the following adjustments: k (a) The coefcients WN are replaced by their complex conjugate values, WN k . (b) The samples on the left-hand side of the gure would be the DFT coefcients in natural order: {X (0), X (1), X (2), X (3), X (4), X (5), X (6), X (7)} (c) The samples on the right-hand side of the gure should be scaled by 1/N and would coincide with the input samples in a reshufed order: {x(0), x(4), x(2), x(6), x(1), x(5), x(3), x(7)} 567 The procedure is illustrated in Fig. 20.9 for the case N = 8. SECTION 20.4 APPLICATIONS 1/N x(0) X (0) 1/N X (1) 1 1/N X ( 2) 1 1/N X (3) 1 W4 1 1 x(4) x(2) x(6) 1/N x(1) X ( 4) 1 1/N X ( 5) 1 1 W8 1 1/N x(3) X ( 6) 1 X ( 7) x(5) W8 2 1 1 W8 3 1 1/N W4 1 1 x(7) FIGURE 20.9 Flowgraph representation of the 8point decimation-in-frequency inverse FFT. The dark circles in the gure represent adders. Relation between Decimation in Time and in Frequency By comparing the owgraphs of Figs. 20.3 and 20.9 for decimation-in-time FFT and decimation-in-frequency inverse FFT, we observe a relationship between both diagrams. If we start with the owgraph of a decimation-in-time FFT and perform the following sequence of operations, we arrive at the implementation for the decimation-in-frequency inverse FFT: (a) We invert the direction of ow of the graph and interchange the input and output nodes. k (b) We invert the phase factors, WN . (c) We scale the output by 1/N . Likewise, by comparing the owgraphs of Figs. 20.5 and 20.7 for decimation-in-time inverse FFT and decimation-in-frequency FFT, we observe a similar relationship between both diagrams. If we start with the owgraph of a decimation-in-frequency FFT and perform the same sequence of operations as above, we arrive at the implementation for the decimation-in-time inverse FFT. 568 20.4 APPLICATIONS CHAPTER 20 FAST FOURIER TRANSFORM TO BE ADDED Practice Questions: 1. 2. 20.5 PROBLEMS Problem 20.1 Let x(n) = { 1+j , 1, ej 3 , 2}. (a) Determine the 4point DFT of x(n) using the denition (20.1). (b) How many real additions and real multiplications are needed to evaluate the DFT of part (a)? Count additions and multiplications separately. (c) Draw a decimation-in-time FFT structure to evaluate X (k). How many real additions and real multiplications are needed to evaluate the DFT coefcients in this structure? (d) Draw a decimation-in-frequency FFT structure to evaluate X (k). How many real additions and real multiplications are needed to evaluate the DFT coefcients in this structure? Problem 20.2 Let x(n) = { -1 , 0, 1 j, ej 2 , 2}. (a) Determine the 8point DFT of x(n) using the denition (20.1). (b) How many real additions and real multiplications are needed to evaluate the DFT of part (a)? Count additions and multiplications separately. (c) Draw a decimation-in-time FFT structure to evaluate X (k). How many real additions and real multiplications are needed to evaluate the DFT coefcients in this structure? (d) Draw a decimation-in-frequency FFT structure to evaluate X (k). How many real additions and real multiplications are needed to evaluate the DFT coefcients in this structure? Problem 20.3 Let X (k) = { 1+j , 1, 1, 1 j }. (a) Determine the inverse 4point DFT of X (k) using the denition (20.2). (b) How many real additions and real multiplications are needed to evaluate the DFT of part (a)? Count additions and multiplications separately. (c) Draw an inverse decimation-in-time FFT structure to evaluate x(n). How many real additions and real multiplications are needed to evaluate the DFT coefcients in this structure? (d) Draw an inverse decimation-in-frequency FFT structure to evaluate the x(n). How many real additions and real multiplications are needed to evaluate the DFT coefcients in this structure? Problem 20.4 Let x(n) = { -1 , j, j, 0, 1}. (a) Determine the inverse 8point DFT of X (k) using the denition (20.2). (b) How many real additions and real multiplications are needed to evaluate the DFT of part (a)? Count additions and multiplications separately. (c) Draw an inverse decimation-in-time FFT structure to evaluate x(n). How many real additions and real multiplications are needed to evaluate the DFT coefcients in this structure? (d) Draw an inverse decimation-in-frequency FFT structure to evaluate x(n). How many real additions and real multiplications are needed to evaluate the DFT coefcients in this structure? 569 Problem 20.5 Consider the two sequences x1 (n) = (n) + 1 1 (n 1) and x2 (n) = (n) + (n 2) 2 2 Explain how you would evaluate the linear convolution of x1 (n) and x2 (n) by employing a decimationin-time FFT. Draw a complete diagram with all necessary weights and input and output signals clearly indicated. The output nodes of your diagram should be the samples of the linear convolution sequence. Problem 20.6 The samples of a nite-duration sequence h(n) are nonzero only over 0 n 2 and they are equal to the samples of the periodic sequence hp (n) = k= 1 2 n5k u(n 5k) over the same interval of time. (a) Determine the samples of h(n). (b) Draw the diagram of the smallest radix-2 decimation-in-time FFT that computes a DFT of h(n). (c) Draw a radix-2 decimation-in-frequency FFT that computes the 4point DFT of the sequence x(n) = (n) (n 2) (d) Explain how you would combine the FFT diagrams of parts (b) and (c) in order to obtain at the output nodes the values of the circular convolution y (n) = { 1 , 0, 1, 0} {h(n), 0} Show all connections. Determine also the sequence y (n). Problem 20.7 Consider the problem of nding the circular convolution of two complex sequences, each having 2m entries. (a) How many complex multiplications and additions are required to directly convolve the sequences without using any DFTs? (b) Assuming that a real addition and a real multiplication take about the same computation time, for what values of m, less computation time will be required to perform the convolution as above, rather than computing the FFT of each sequence, multiplying the DFT transforms, and performing an inverse FFT? Problem 20.8 Let x(n) and h(n) denote two real-valued causal sequences of duration 1024 and 128, respectively. Let y (n) denote the linear convolution of x(n) and y (n). (a) How many real additions and multiplications are required to evaluate the samples of y (n) directly from the denition of the linear convolution. (b) How many real additions and multiplications are required to evaluate the samples of y (n) by using the overlap-add method of Sec. 19.3, where the required smaller linear convolutions are computed again from the denition. (c) How many real additions and multiplications are required to evaluate the samples of y (n) by using the overlap-save method of Sec. 19.3 where the required circular convolutions are computed directly from the denition. (d) How many real additions and multiplications are required to evaluate the samples of y (n) by using the overlap-save method of Sec. 19.3 where the required circular convolutions are computed by means of decimation-in-time FFTs. Problem 20.9 Express the DFT of the 9point sequence {x(0), x(1), . . . , x(8)} in terms of the DFTs of the 3point sequences: {x(0), x(3), x(6)}, {x(1), x(4), x(7)}, {x(2), x(5), x(8)} SECTION 20.5 PROBLEMS 590 21.4 APPLICATIONS CHAPTER 21 SPECTRAL RESOLUTION TO BE ADDED Practice Questions: 1. 2. 21.5 PROBLEMS Problem 21.1 Consider the truncated sequence xt (n) = cos(o n) + cos(1 n), 0nN 1 where N = 64. Assume 9 and 1 = 4 32 both in radians/sample. Let Xt (ej ) denote the DTFT of xt (n) and let X (k) denote the 64point DFT of xt (n). o = (a) What is the spectral resolution of the DTFT in this case? (b) What is the spectral resolution of the DFT in this case? (c) What is the separation between the sinusoidal frequencies? (d) Explain why the 64point DFT can still resolve the sinusoidal components even though the DTFT cannot and the DFT coefcients are obtained from sampling the DTFT? Problem 21.2 Show that the DTFT of the Kaiser window (21.6) is given by W (ej ) = N sinh 2 Io () 2 2 N 2 where the hyperbolic sine function sinh is dened by sinh(x) = N 2 e x + e x 2 2 CHAPTER 22 Sampling We indicated earlier in Chapter 1 that sequences often arise from the process of sampling continuous-time signals. In the previous chapters we studied sequences and their properties in the time and frequency domains rather extensively. We also studied how systems operate on sequences to transform them from one form to another. In the current chapter we examine the sampling process more closely. Our objective is to close the gap between the continuous-time signal, x(t), and its discrete-time counterpart, x(n). An important question to address is whether the original continuous-time signal x(t) can be fully recovered from knowledge of its sampled version, x(n), alone. For example, are there conditions on how small or how large the sampling period, Ts , should be so that one can fully recover x(t) from knowledge of its samples? As we shall see, this question is answered by Nyquists sampling theorem. 22.1 SAMPLING PROCESS If x(t) is a continuous-time signal, sampling it every Ts units of time results in the sequence x(nTs ). In this construction, only values of x(t) at multiples of Ts are retained in the sampling process and the other values of x(t) are ignored see Fig. 22.1. Usually, the compact notation x(n) is used instead of x(nTs ) to refer to the resulting sequence with the letter Ts dropped. We thus write x(n) to refer to x(nTs ): x(n) = x(t)|t=nTs (22.1) The quantity Fs = 1/Ts (22.2) is called the sampling frequency and it is measured in samples/second or Hertz (abbreviated as Hz). The value of Fs indicates how many samples, x(n), are generated per second by the sampling process. Example 22.1 (Sampling frequency) A continuous-time signal x(t) is sampled at the rate of 107 samples per second. This means that ten million samples are generated for every duration of one second of the signal so that Fs = 10 MHz It also means that the sampling period is Ts = 1 = 0.1 s Fs 591 Discrete-Time Processing and Filtering, by Ali H. Sayed Copyright c 2010 John Wiley & Sons, Inc. 592 CHAPTER 22 SAMPLING x( t ) x(n) x( t ) t Ts FIGURE 22.1 Sampling a continuous-time signal, x(t), at multiples of the sampling period, Ts , generates a sequence x(n). so that the interval of time separating two successive samples is 0.1s. Assume that each sample is digitized, say, as explained earlier in Sec. 1.2, and represented by 8 bits. Knowing that every 8 bits correspond to one byte and every 1024 bytes correspond to 1KB (kilo byte), then every segment of duration equal to one second of the signal requires = 107 bytes = storage space 107 /1024 9.8MB It is seen that the higher the sampling frequency, Fs , the more storage space is needed to store the digitized samples of x(n). Generally, given a continuous-time signal, x(t), the more samples we keep of it (i.e., the higher the sampling frequency, Fs ) the more information we have about the signal. However, it is often desirable to reduce the number of samples that we generate in order to save both on the storage requirement and on the computational effort that is subsequently needed to process the samples. Intuition suggests that if the underlying signal x(t) exhibits fast variations, then it may be necessary to sample it at a higher rate in order to capture the fast signal variations with greater delity. If, on the other hand, the signal x(t) varies slowly then we should be able to capture its behavior well with a smaller number of samples. These observations suggest that the choice of the sampling frequency, Fs , should be related to the frequency content of x(t) and whether x(t) has high frequency components or not. The Nyquists sampling theorem will provide an explicit condition on how low the sampling frequency, Fs , can be without the risk of losing critical information about the underlying continuous-time signal. In order to introduce Nyquists result, we rst review briey some material about the frequency representation of continuous-time signals, x(t). Only those properties that are necessary for our arguments in this chapter are presented here. In the process of deriving the sampling theorem, we shall also highlight several useful connections between the frequency-domain representation of continuous-time signals and the frequency-domain representation of their discrete-time versions. 22.2 FOURIER TRANSFORM Consider a continuous-time signal, x(t). Under some relatively mild conditions, its continuoustime Fourier Transform (FT) is dened as follows: X (j ) = x(t)ej t dt (Fourier transform) (22.3) in terms of an integral over the range t (, ). The continuous variable is called the angular frequency and it is measured in radians/second. The variable assumes values over the entire real axis, (, ). The Fourier transform, X (j ), is in general a complex-valued function of ; it admits both a magnitude component and a phase component. Observe that we are denoting the argument of the FT by j instead of simply ; while the justication for this choice of notation is unnecessary for our presentation here, it is nevertheless useful to mention in passing that the notation is the result of specializing the so-called Laplace transform, X (s), of the signal x(t) to the imaginary axis by setting the complex variable s to the choice s = j : x(t)est dt X (s) = (Laplace transform) (22.4) We shall have more to say about the Laplace transform later in Sec. 27.1. It is instructive for the reader to note the analogy between the FT of a signal x(t) and the DTFT of a sequence x(n). The latter was dened earlier in (13.4) as X (ej ) = x(n)ejn (22.5) n= in terms of a frequency variable [, ] that is measured in radians/sample. The reason for using the notation X (ej ) instead of X ( ) was meant to highlight the fact that the DTFT of x(n) can generally be obtained by evaluating the corresponding z transform on the unit circle (by setting z = ej ). We shall comment later on the exact relation between X (j ) and X (ej ) when the sequence x(n) is obtained from sampling x(t). For now, we continue with the discussion of the FT (22.3). Given the Fourier transform of a signal x(t), we can recover the signal via inverse transformation as follows: x(t) = 1 2 X (j )ej t d (22.6) It is again instructive to note the analogy with the inverse DTFT expression (13.14) for sequences, namely, 1 x(n) = X (ej )ejn d (22.7) 2 2 where the integral is carried over a 2 long interval, such as [, ] or [0, 2 ]. 593 SECTION 22.2 FOURIER TRANSFORM 594 Example 22.2 (Rectangular pulse) CHAPTER 22 SAMPLING Consider a continuous-time rectangular pulse of unit amplitude and width that is centered around the origin, t = 0 see Figure 22.2. We shall use the notation t to refer to the pulse. That is, t < t < 2 otherwise 1, 0, = 2 t 1 2 2 t FIGURE 22.2 A rectangular pulse of amplitude one and width ; the pulse is centered around the origin of time and extends between t = and t = . 2 2 Using denition (22.3) we can evaluate the Fourier transform of the rectangular pulse as follows: X (j ) = x(t)ej t dt /2 = /2 = = = = = ej t dt /2 1 j t e j /2 1 ej /2 ej /2 j sin(/2) /2 sin(/2) /2 sinc(/2) in terms of the sinc function, which was dened earlier in Example 13.8. Therefore, we arrive at the transform pair: t FT , sinc , 2 =0 =0 (22.8) In other words, the Fourier transform of a rectangular pulse is a sinc function. Recall that a sinc function assumes zero values whenever its argument is a multiple of . In the current example, this means that the Fourier transform of the rectangular pulse will evaluate to zero at values that satisfy 595 SECTION 22.2 = m, 2 FOURIER TRANSFORM for any nonzero integer m Figure 22.3 illustrates the Fourier transform of the rectangular pulse of width = 2. Fourier transform 2 amplitude 1.5 1 0.5 0 20 15 10 5 0 5 (radians/second) 10 15 20 FIGURE 22.3 The Fourier transform of the rectangular pulse (t/2), which has amplitude 1, width 2 and is centered around the origin of time, t = 0. The Fourier transform is displayed over the range [20, 20]. Example 22.3 (Sinc function) Consider now the continuous-time function x(t) = sinc t To 1, sin(t/To ) , t/To = t=0 t=0 This is a sinc function that attains the value of one at t = 0 and evaluates to zero whenever t satises t = m, To for any nonzero integer m That is, x(t) is zero at all nonzero multiples of To , t = mTo , m=0 Figure 22.4 plots the function x(t) over the interval t [5, 5] for the case To = 1. We now verify that the following Fourier transform pair holds 1, sinc(t/To ), t=0 t=0 FT To o (22.9) 596 x(t)=sinc( t) 1 CHAPTER 22 SAMPLING 0.8 amplitude 0.6 0.4 0.2 0 0.2 5 4 3 2 1 0 t (sec) 1 2 3 4 5 FIGURE 22.4 A plot of the sinc function x(t) = sinc(t) over the interval [5, 5]. The function attains the value of one at t = 0 and crosses zero at integer values of t. where 2 To In other words, the Fourier transform is a rectangular pulse in the frequency domain with amplitude To , centered at the origin, = 0, and located between o /2 and o /2 see Fig. 22.5. o = To To To o 2 o 2 (radians/sec) FIGURE 22.5 A rectangular pulse in the frequency domain with amplitude To and width o ; the pulse is centered around the origin of frequency. This pulse is the Fourier transform of the sinc function, x(t) = sinc(t/To ). The above transform pair can be established by employing the inverse Fourier transform formula (22.6), namely, x (t ) 1 2 = To 2 = X (j )e j t FOURIER TRANSFORM d o /2 o /2 ej t d To 1 j t o e 2 jt o /2 = /2 To 1 ej o t/2 ej o t/2 2 jt sin(t/To ) , using o = 2/To t/To = = as desired. Example 22.4 (Impulse function) Consider the signal x (t ) = (t T ) (22.10) which is dened in terms of the continuous-time delta function. Recall that in continuous-time, the impulse function (t) is dened by the following properties: (t)dt = 1, f (t) (t to )dt = f (to ) (22.11) for any function f (t) that is well dened at t = to . The second property is known as the sifting property; it extracts the value of the function at the location of the impulse function, t = to . Using the denition (22.3), and the above sifting property, we can evaluate the Fourier transform of (t T ) as follows: X (j ) = = = e x(t)ej t dt (t T )ej t dt j T Therefore, we arrive at the Fourier transform pair FT (t T ) ej T (22.12) Example 22.5 (Train of impulses) Consider now the function x (t ) = n= 597 SECTION 22.2 (t nTo ) in terms of continuous-time impulse functions, (t). The signal x(t) so dened is referred to as a train of impulses of unit amplitude; it is a periodic signal of period To and consists of impulses 598 CHAPTER 22 SAMPLING located at t = nTo for all integers n. It turns out that the Fourier transform of the train of impulses is another train of impulses in the frequency domain with period o = 2/To and amplitude o , namely, n= (t nTo ) o ( ko ) , o = 2/To (22.13) k= Figure 22.6 illustrates the signal x(t) and its Fourier transform. x(t) = (t nTo ) n = 1 3To 2To To 2To To 3To t X (j ) = ( k o o) n= o 3 o 2 o 2 o o 3 o o (radians/sec) FIGURE 22.6 A periodic train of impulses in the time domain (top) with period To . Its Fourier transform is another train of impulses in the frequency domain with amplitude o and period o = 2/To (bottom). One way to justify the result (22.13) is as follows. Since the Fourier transform of (t to ) is ej to , from the linearity of the Fourier transform we have X (j ) = ej nTo (22.14) k= Now recall that in Prob. 13.31 we argued that the DTFT of the sequence y (n) = 1 for all n is given by Y (ej ) = n= ejn = k= 2 ( 2k) Comparing with (22.14), we note that we can interpret expression (22.14) for X (j ) as the DTFT of the unit sequence evaluated at = To , i.e., X (j ) = n= jn e =To = Y (ej )|=To Consequently, X (j ) = 2 k= (To 2k) 1 Let o = 2/To . Then, from the scaling property of the delta function, namely, (at) = a (t), we arrive at X (j ) = o k= ( ko ) as desired. Example 22.6 (Modulation property) Consider a signal x(t) with Fourier transform X (j ). It holds that ej o t x(t) X (j ( o )) (22.15) That is, if the time-domain signal is multiplied by a complex exponential signal at frequency = o , where o can be positive or negative, then its Fourier transform is shifted to the right (when o > 0) or to the left (when o < 0) by an amount equal to |o | see Fig. 22.7. X (j ) B B (rad/sec) Y (j ) B + o o B+ o (rad/sec) FIGURE 22.7 Illustration of the modulation property for a positive value of o . The gure shows the Fourier transform of x(t) (top) and the Fourier transform of y (t) = ej o t x(t) (bottom). 599 SECTION 22.2 FOURIER TRANSFORM 600 Proof: Using the denition (22.3) we have CHAPTER 22 SAMPLING Y (j ) = = = x(t)ej o t ej t dt x(t)ej (o )t dt X (j ( o )) Example 22.7 (Symmetry property) Consider a real-valued signal x(t) with Fourier transform X (j ). Then the following symmetry relations hold |X (j )| = |X (j )| X (j ) = X (j ) and (22.16) That is, the magnitude response is an even function of while the phase response is an odd function of . Proof: Using the denition (22.3) and Eulers relation (3.9), we have X (j ) = = x(t)ej t dt x(t) [cos(t) j sin(t)] dt Therefore, since x(t) is real, the real and imaginary components of X (j ) are given by XR (j ) = x(t) cos(t)dt, XI (j ) = x(t) sin(t)dt where XR and XI denote the real and imaginary components of X (j ), respectively. It is now clear that XR (j ) = XR (j ) and XI (j ) = XI (j ) which leads to the desired result since |X (j )| = |XR (j )|2 + |XI (j )|2 , X (j ) = arctan XI (j ) XR (j ) Example 22.8 (Scaling property and bandlimited signals) The Fourier transform of a continuous-time signal satises the scaling property x(at) 1 X |a | j a (22.17) where a is a nonzero number. Before establishing the result, we note that this property has a useful interpretation. For scalars |a| > 1, the graph of x(at) is compressed in relation to the graph of x(t), 601 x (t ) t1 SECTION 22.2 FOURIER TRANSFORM to t x(2t) to 2 1 t2 t x(t/2) 2t1 2to t FIGURE 22.8 Illustration of the compression and expansion behavior that results from replacing x(t) (top) by x(2t) (middle) and x(t/2) (bottom). while for |a| < 1, the graph of x(at) is expanded in relation to the graph of x(t) see Fig. 22.8. A similar interpretation holds for functions in the frequency domain. By examining the scaling property (22.17) we see that whenever compression occurs in the time domain, it leads to expansion in the frequency domain and vice-versa. For instance, note that as the duration of a time-domain signal decreases (say by compressing its time-scale), then the domain of its Fourier transform expands. It follows that if a signal x(t) has nite duration, then its Fourier transform cannot be limited in bandwidth. By the same token, if a signal has nite bandwidth, then it should have innite duration. Proof: Let y (t) = x(at). Assume initially that a > 0. Then, using the denition (22.3) we have Y (j ) = = = = x(at)ej t dt x( )ej /a d /a, 1 a 1 X a x( )ej /a d j a using = at 602 Assume now that a < 0. Then CHAPTER 22 SAMPLING Y (j ) = = = = x(at)ej t dt 1 a 1 X |a| x( )ej /a d /a, using = at x( )ej /a d j a which establishes (22.17). Table 22.1 summarizes some of the properties of the Fourier transform for ease of reference. TABLE 22.1 Several properties of the Fourier Transform. Signal Fourier Transform x (t ) X (j ) y (t ) Y (j ) ax(t) + by (t) aX (j ) + bY (j ) linearity x(at) 1 X ( ja ) |a| scaling X (t ) 2 x(j ) duality x (t t o ) ej to X (j ) time-shifts ej o t x(t) X (j j o ) modulation t 1 X (j ) + X (0) (j ) j integration j X (j ) differentiation X (j )Y (j ) convolution 1 X (j)Y (j j)d 2 multiplication x( )d dx(t)/dt x()y (t )d x (t )y (t ) Property 22.3 LINEAR CONVOLUTION Consider two continuous-time functions x(t) and h(t). Their linear convolution is the function y (t), denoted by y (t) = x(t) h(t) 603 and which is obtained as follows: SECTION 22.3 y (t) = x()h(t )d (22.18) It is again instructive for the reader to note the analogy with the discrete-time linear convolution of two sequences x(n) and h(n), which we dened earlier in (5.6) as y (n) = x(n) h(n) = k= x(k )h(n k ) Just as was the case with discrete-time, the continuous-time convolution of two signals admits several useful properties both in the time-domain and in the frequency domain. Here we highlight only three of these properties since they are of immediate interest to our discussions on sampling. Convolving with an Impulse Function The rst property we are interested in is the fact that x(t) (t T ) = x(t T ) (22.19) In other words, convolving a signal x(t) with a continuous-time impulse function at t = T results in shifting the signal into the location of the impulse see Fig. 22.9. Proof: Let y (t ) = x (t ) (t T ) Then, according to the denition of the linear convolution, y (t ) = = x() (t T )d x (t T ) where in the second equality we used the sifting property (22.11) of impulse functions. The property states that we should evaluate x() at the location of the impulse function (t T + ); this impulse occurs at location = t T . Convolution in Time The second property we are interested in pertains to the Fourier transform of the convolution of two signals. The following transform pair relation holds: FT x(t) h(t) X (j )H (j ) (22.20) In other words, the Fourier transform of the convolution of two signals is given by the product of the individual Fourier transforms. Proof: Let y (t) = x(t) h(t) LINEAR CONVOLUTION 604 CHAPTER 22 SAMPLING x(t) x(t) (t T ) t t T FIGURE 22.9 Convolving a signal x(t) with an impulse located at t = T , namely, (t T ), results in shifting the signal into the location of the impulse function. Then, according to the denition of the linear convolution, y (t ) = x()h(t )d Using denition (22.3) of the Fourier transform we have Y (j ) = = = = = = y (t)ej t dt x()h(t )d ej t dt x ( ) x ( ) h(t )ej (t) dt ej d h()ej d ej d, x()ej d using = t h()ej d X (j )H (j ) Example 22.9 (Convolution with a train of impulses) Consider a signal x(t) and let us convolve it with a train of impulses, say y (t ) = x (t ) n= (t nTo ) The train of impulses is periodic with period To . The above convolution therefore amounts to repeating x(t) periodically every To units of time. According to the convolution property (22.20), the Fourier transform of the signal y (t) is obtained by multiplying the Fourier transform of x(t) with the Fourier transform of the train of impulses. We 605 already stated in Example 22.5 the transform pair SECTION 22.3 n= (t nTo ) o k= ( ko ) , LINEAR CONVOLUTION o = 2/To which determines the Fourier transform of the train of impulses. Combining this result with the convolution property (22.20) we get Y (j ) = X (j ) o k= ( ko ) Note that the effect of multiplying the function X (j ) by a periodic train of impulses is to extract samples from X (j ) at the locations of these impulses. Thus, the above relation for Y (j ) can be rewritten as Y (j ) = o k= X (jko ) ( ko ) where the amplitudes of various impulse functions are now modulated by X (j ). The result of this construction is illustrated in Fig. 22.10. We therefore say that multiplication by a train of impulses in the time domain corresponds to sampling the Fourier transform of the signal in the frequency domain and scaling the result by o . We also say that periodic repetition in the time domain amounts to sampling in the frequency domain. X (j ) 1 (radians/sec) Y (j ) o (radians/sec) o FIGURE 22.10 Convolving a signal x(t) with a periodic train of impulses of period To in the time domain corresponds to sampling its Fourier transform at multiples of o = 2/To and scaling the result by o . The top plot shows an example of a Fourier transform X (j ) and the bottom plot shows the resulting Y (j ). The amplitude values of 1 and o at = 0 are meant to illustrate the scaling that occurs when going from X (j ) to its sampled version Y (j ). 606 CHAPTER 22 SAMPLING Example 22.10 (Low-pass ltering) Consider a signal x(t) and assume we convolve it with the signal h(t) = t To 1 sinc To = 1/To , 1 sin(t/To ) , To t/To t=0 t=0 That is, let us study the signal y (t) = x(t) h(t) The signal h(t) is a sinc function and it was studied in Example 22.3 where we showed that its Fourier transform is the rectangular pulse H (j ) = o This pulse is shown in the middle row of Fig. 22.11. We see that H (j ) extends between o /2 and o /2 and is zero elsewhere. We normalized the denition of h(t) above by 1/To so that the amplitude of H (j ) is set to one. Using the convolution property (22.20) we know that the Fourier transform of the convolution signal y (t) is given by Y (j ) = X (j ) H (j ) We therefore see that the effect of convolving with the sinc function h(t) is to limit the frequency components in X (j ) to the range [ o , o ]. We say that H (j ) performs low-pass ltering 2 2 since it retains the low frequency components of X (j ). This situation is illustrated by means of an example in Fig. 22.11. The plot in the top row shows a Fourier transform that extends beyond the range [ o , o ]. The middle row shows the Fourier transform of the sinc function h(t) where the 2 2 value of o denes To through the relation o = 2/To . The last row of the gure shows the result of the convolution of x(t) and h(t). It is seen that the parts of the Fourier transform of x(t) that lie outside the frequency range of the low-pass transform H (j ) are removed. Multiplication in Time is Convolution in Frequency The third property we are interested in pertains to the Fourier transform of the product of two signals. The following transform pair relation holds: x(t)h(t) 1 1 X (j)H (j j)d X (j ) H (j ) = 2 2 (22.21) In other words, the Fourier transform of the product of two signals is given by the (scaled) linear convolution of the individual Fourier transforms. Proof: Let Y (j ) denote the following scaled convolution: Y (j ) = 1 2 X (j)H (j j)d 607 SECTION 22.3 X (j ) LINEAR CONVOLUTION (radians/sec) o o 2 2 H (j ) = To 1 o (radians/sec) o 2 2 Y (j ) (radians/sec) o o 2 2 FIGURE 22.11 Convolving a signal x(t) with the sinc function h(t) = 1/To sinc(t/To ) results in a new signal y (t) whose Fourier transform is limited to the range [ o , o ]. The top row of the 2 2 gure shows a Fourier transform that extends beyond the range [ o , o ]. The middle row shows 2 2 the Fourier transform of the sinc function h(t) = 1/To sinc(t/To ) where the value of To is related to o via o = 2/To . The last row shows the result of the convolution of x(t) and h(t). and let us verify that its inverse Fourier transform coincides with the product x(t)h(t). Indeed, using the inverse transformation relation (22.6) we have y (t ) = = = = = = 1 2 1 2 1 2 1 2 1 2 Y (j )ej t d x(t)h(t) 1 2 X (j)H (j j)d ej t d X (j)ejt d 1 2 X (j)ejt d 1 2 X (j)ejt d 1 2 H (j j)ej ()t d H (j)ejt d , using = H (j)ejt d 608 CHAPTER 22 SAMPLING Example 22.11 (Multiplication by a train of impulses) Consider a signal x(t) and let us multiply it by a train of impulses, say y (t ) = x (t ) n= (t nTo ) The train of impulses is periodic with period To . The above multiplication therefore amounts to sampling x(t) in the time domain at multiples of To . According to the convolution property (22.21), the Fourier transform of the signal y (t) is obtained by convolving the Fourier transform of x(t) with the Fourier transform of the train of impulses, and scaling the result by 1/2 . We already stated in Example 22.5 the transform pair n= (t nTo ) o k= ( ko ) , o = 2/To which gives the Fourier transform of the train of impulses. Combining this result with the convolution property (22.21) we get Y (j ) = 1 X (j ) 2 o k= ( ko ) Recall further from property (22.19) that convolving a signal with an impulse function results in shifting the signal to the location of the impulse function. This property of convolution holds regardless of whether we are convolving functions in the time domain or the frequency domain. In the above expression for Y (j ), we are convolving X (j ) with several delayed impulse functions and, consequently, the relation for Y (j ) can be rewritten as Y (j ) = 1 To k= X (j jko ) This expression reveals that the Fourier transform of Y (j ) will consist of the Fourier transform of X (j ) repeated periodically every o radians/sec and scaled by 1/To . The result of this construction is illustrated in Fig. 22.12. We therefore say that multiplication by a train of impulses in the time domain corresponds to periodically repeating the Fourier transform of the signal in the frequency domain and scaling the result by 1/To . We also say that sampling in the time domain corresponds to periodic repetition in the frequency domain. 22.4 LINEAR TIME-INVARIANT SYSTEMS Our presentation on sampling will benet from properties of systems in continuous-time. These properties are analogous to what we have seen in discrete-time in Chapters 4 and 5, and we shall therefore be brief in reviewing them here. Systems. A continuous-time system is dened as a mapping (or transformation) between an input signal, x(t), and an output signal, y (t) see Fig. 22.13. What makes a system special is that the input signal, x(t), uniquely denes the output signal, y (t). Causality. A continuous-time system is causal if its output at time t depends only on present and past values of the input signal. In other words, y (t) depends only on x( ) for 609 X (j ) SECTION 22.4 LINEAR TIME INVARIANT SYSTEMS 1 (radians/sec) Y (j ) 1/To o o (radians/sec) FIGURE 22.12 Multiplying a signal x(t) with a periodic train of impulses of period To in the time domain corresponds to repeating its Fourier transform periodically at multiples of o = 2/To and scaling the result by 1/To . The top plot shows an example of a Fourier transform X (j ) and the bottom plot shows the resulting Y (j ). The amplitude values of 1 and 1/To at = 0 are meant to illustrate the scaling that occurs when going from X (j ) to Y (j ). input signal x ( t) system S output signal y (t) FIGURE 22.13 A continuous-time system S maps an input signal, x(t), into an output or response signal, y (t). t. Otherwise, the system is noncausal. Stability. A continuous-time system is bounded-input bounded-output (BIBO) stable if every bounded input signal, x(t), yields a bounded output signal y (t). By denition, a bounded signal x(t) is one for which all its values are bounded by some nite positive number Bx : |x(t)| Bx < for all t (22.22) Time-Invariance. A continuous-time system is time-invariant if a time delay (or advance) in the input signal yields an identical delay (or advance) in the output signal. In other words, if y (t) = S [x(t)] describes a system, then it should hold that y (t ) = S [x(t )], for any real (22.23) 610 CHAPTER 22 SAMPLING Linearity. A continuous-time system is linear if it satises the superposition principle, which states that ay1 (t) + by2 (t) = S [ax1 (t) + bx2 (t)] (22.24) for any constants {a, b}. In other words, the response of the system to any linear combination of input signals is the same linear combination of the corresponding output signals. To be more precise, we should also require the superposition property to hold for a combination of an innite number of input signals. Impulse Response. The impulse response of a system is denoted by h(t) and is dened as the response of the system to the impulse function, x(t) = (t), i.e., h(t) = S [ (t)] (22.25) Linear Time-Invariance. The input-output relation of linear-time-invariant (LTI) continuoustime systems is fully characterized by the convolution integral x( )h(t )d y (t) = (22.26) In other words, for any input signal, x(t), the corresponding output signal, y (t), can be determined by convolving x(t) with the impulse response, h(t). This is because we can express a signal x(t) through the integral representation x(t) = x( ) (t )d so that, by linearity, S [x(t)] =S x( ) (t )d = = x( )S [ (t )] d x( )h(t )d as desired. The Fourier transform of h(t) is called the frequency response of the LTI system. Stability and Causality of LTI Systems. A continuous-time LTI system is stable if, and only if, its impulse response is absolutely integrable: LTI system is stable |h(t)|dt < (22.27) Likewise, a continuous-time LTI system is causal if, and only if, its impulse response is a causal signal, i.e., LTI system is causal h(t) = 0 for all t < 0 (22.28) The proofs of the above two statements are analogous to what was done in discrete-time in Secs. 5.2 and 5.3 and are therefore omitted. 22.5 NYQUIST RATE FOR BASEBAND SIGNALS The results of Examples 22.922.11 provide the necessary building blocks for the derivation of Nyquists sampling theorem. The theorem will give a lower bound on how small the sampling frequency, Fs , can be so that we can still recover the original signal x(t) from its sampled version x(n). We start our exposition with a generic continuous-time signal x(t) and assume that its Fourier transform, X (j ), is bandlimited to B radians/second. That is, X (j ) lies within the range [B, B ]. Such signals are called baseband signals. In practice, the condition usually means that the portions of X (j ) that exist outside the range [B, B ] are negligible. This situation is illustrated in Fig. 22.14; the curves shown in the gure are for illustration purposes only and they do not correspond to an actual Fourier transform pair. Remark. Recall from the result of Example 22.8 that a signal that is bandlimited in frequency must necessarily have innite-duration in the time-domain. We shall ignore this technical detail in our presentation and assume that the time-domain signal decays sufciently fast so that it can be assumed to be reasonably conned to a nite duration. x (t ) X (j ) 1 B t (s) B (rad/s) FIGURE 22.14 A signal x(t) in the time domain (left) and its assumed Fourier transform (right), where is measured in radians/second and t is measured in seconds. The amplitude value of one is meant as a reference point to illustrate the scaling that occurs as we go through the sampling procedure in future plots. It should be noted that the curves shown in this gure are for illustration purposes only; they do not correspond to an actual Fourier transform pair. Sampling in Time Now given x(t), we sample it every Ts seconds. The sampling process corresponds to multiplying x(t) by a periodic train of impulses of period Ts . This operation generates a sampled signal, which we shall denote by xs (t) see Fig. 22.15: xs (t) = x(t) n= (t nTs ) = n= x(nTs ) (t nTs ) (22.29) 611 SECTION 22.5 NYQUIST RATE FOR BASEBAND SIGNALS 612 CHAPTER 22 SAMPLING This situation is analogous to the case that was discussed in Example 22.11. We nd that xs (t) consists of a train of impulses that are modulated by the amplitude of x(t). x (t ) xs (t) xs (t) x (t ) X t t 1 3Ts 2Ts Ts 0 Ts 2Ts 3Ts FIGURE 22.15 Multiplying a continuous-time signal, x(t), by a train of impulses results in a sampled signal xs (t). According to the convolution property (22.21), and as was already explained in the aforementioned example, the Fourier transform of the signal xs (t) is obtained by convolving the Fourier transform of x(t) with the Fourier transform of the train of impulses. We already stated in Example 22.5 the transform pair n= (t nTs ) s k= ( k s ) , s = 2/Ts which gives the Fourier transform of the train of impulses. Combining this result with the convolution property (22.21) we get Xs (j ) = = 1 X (j ) 2 1 Ts s k= ( k s ) k= X (j jk s ) (22.30) That is, the Fourier transform of Xs (j ) will consist of the Fourier transform of X (j ) repeated periodically every s radians/second and scaled by 1/Ts . The result of this construction is illustrated in Fig. 22.16 for the same signals of Fig. 22.14. Useful conclusion: We therefore say that sampling in time corresponds to periodically repeating the Fourier transform of the signal in the frequency domain every s radians/second and scaling the result by 1/Ts . Nyquists Condition If we examine the Fourier transform of the sampled signal, Xs (j ), in Fig. 22.16, we notice that several images (or bands) of the original Fourier transform X (j ) are generated; these images are centered at multiples of s . Let us focus on the part that corresponds to 613 x (t ) SECTION 22.5 X (j ) NYQUIST RATE FOR BASEBAND SIGNALS 1 B t(s) (rad/s) B (t nTs ) n= 1 t(s) Ts repeat periodically every s radians/second and scale the result by 1/Ts xs (t) t(s) X s (j ) 1/Ts B s B s B B + (rad/sec) s s B+ s FIGURE 22.16 Multiplying a signal x(t) with a periodic train of impulses of period Ts in the time domain corresponds to repeating its Fourier transform periodically at multiples of s = 2/Ts and scaling the result by 1/Ts . The top plot shows an example of a Fourier transform X (j ) and the bottom plot shows the resulting Xs (j ). The amplitude values of 1 and 1/Ts at = 0 are meant to illustrate the scaling that occurs when going from X (j ) to Xs (j ). The second row in the gure shows the periodic train of impulses in the time domain and the third row shows the sampled signal x s (t ). the original transform, and which stretches from B to B , and on the image that is to the right of it, and which stretches from B + s to B + s see Fig. 22.17. In the gure we are using markers to indicate the boundaries between adjacent images. It is seen that two adjacent images will not interfere with each other if the value of s is chosen such that B < B + s or, equivalently, s > 2 B (22.31) 614 CHAPTER 22 SAMPLING In this case, the portion of the Fourier transform Xs (j ) that lies within the signal bandwidth [B, B ] will only be a scaled version (scaled by 1/Ts ) of the original Fourier transform X (j ). Nyquists Sampling Theorem: If the continuous-time signal x(t) is bandlimited, say, X (j ) = 0 for || > B (22.32) then no overlaps occur in the Fourier transform of the sampled signal, xs (t), if the sampling rate is larger than twice the signal bandwidth. The result (22.31) is known as Nyquists sampling condition. It provides a lower limit on the sampling frequency, namely, the sampling frequency needs to be at least twice as large as the bandwidth of the original signal. This minimum sampling frequency is usually called the Nyquist rate or Nyquist frequency. We are going to see that when Nyquists condition (22.31) is satised, it is possible to recover the original signal x(t) from its sampled version xs (t) (and, hence, from the corresponding sequence x(n)). X (j ) 1 B B (rad/s) X s (j ) 1/Ts B s B s B B + (rad/sec) s s B+ s FIGURE 22.17 Overlap does not occur between adjacent images in the Fourier transform of Xs (t) if, and only if, the sampling frequency s guarantees that B < B + s , which is equivalent to requiring s > 2B . The markers in the gure indicate the boundaries between adjacent images. Figure 22.18 illustrates what happens when the sampling frequency is smaller than 2B , i.e., when it violates Nyquists condition. In this case, the images are not separated enough and overlap occurs between adjacent images in the Fourier transform of Xs (j ). It is seen that the portion of the Fourier transform Xs (j ) that lies within the signal bandwidth [B, B ] is now distorted relative to the original Fourier transform X (j ). 615 SECTION 22.5 X (j ) NYQUIST RATE FOR BASEBAND SIGNALS 1 B (rad/s) B X s (j ) 1/Ts s B B B + s (rad/sec) s FIGURE 22.18 Overlap occurs between adjacent images in the Fourier transform of Xs (t) when the sampling frequency s violates Nyquists condition and is smaller than 2B . Example 22.12 (Speech signals) Speech signals are generally bandlimited at B = 4KHz. That is, the Fourier transform of a speech signal usually contains signicant frequency components inside the range [4, 4] KHz. Therefore, Nyquists rate for sampling speech signals is Fs = 2 4 = 8 KHz This means that employing 8000 samples per second satises Nyquists condition (22.31). This sampling rate is used by most telephony systems. Example 22.13 (Audio signals) Audio signals are usually bandlimited at B = 20KHz. These signals are sampled at Fs = 48 KHz in professional audio systems and at Fs = 44.1 KHz in compact disc (CD) storage systems. Both sampling rates meet Nyquists condition (22.31). Signal Reconstruction Assume the sampling frequency, s , is large enough and satises Nyquists condition (22.31), i.e., s 2 B so that s B 2 616 CHAPTER 22 SAMPLING Then no overlap occurs between adjacent bands in the Fourier transform of Xs (j ). We now show how the original signal x(t) can be recovered from its sampled version xs (t) (and, consequently, from the corresponding sequence x(n)). To achieve this objective, we call upon the result of Example 22.10. Thus, consider the sinc function 1, t=0 t sin(t/Ts ) h(t) = sinc (22.33) = , t=0 Ts t/Ts The signal h(t) was studied in Example 22.3 where we showed that its Fourier transform is the rectangular pulse: s H (j ) = Ts = s < < 2 otherwise Ts , 0, s 2 (22.34) This pulse is shown in the third row of Fig. 22.19. We see that H (j ) extends between s /2 and s /2 and is zero elsewhere. Its amplitude is equal to Ts . We now multiply the Fourier transforms Xs (j ) and H (j ) and denote the result by Y (j ) = Xs (j ) H (j ) (22.35) The effect of this multiplication is to limit the frequency components in Y (j ) to the range [ s , s ]. This situation is illustrated in the last row of Fig. 22.19. The plot in the top row 2 2 shows the original Fourier transform X (j ), which is bandlimited to B radians/second. The second row shows the Fourier transform of the sampled signal, xs (t): it consists of periodic repetitions of the transform of x(t) scaled by 1/Ts . The third row shows the low-pass Fourier transform of h(t) stretching over the frequency range [ s , s ] with 2 2 amplitude Ts . Multiplying Xs (j ) and H (j ) extracts that portion of Xs (j ) that lies within the same frequency range [ s , s ]. The result is Y (j ) and is shown in the last 2 2 row of the gure; note that Y (j ) and X (j ) agree with each other. The discussion therefore shows that X (j ) = Xs (j ) H (j ) = Y (j ) (22.36) so that X (j ) can be recovered from Xs (j ) by multiplying the latter by the reconstruction lter H (j ). Using the convolution property (22.20) we can translate this result into the time domain and write x(t) = xs (t) h(t) (22.37) That is, the original signal x(t) can be recovered from xs (t) by convolving the latter with the sinc function h(t). Let us examine this result more closely. Using expressions (22.29) and (22.33) for xs (t) and h(t), respectively, and substituting into the above expression for x(t) we obtain x(t) = xs (t) h(t) = n= x(nTs ) (t nTs ) sinc t Ts which shows that x(t) is obtained by convolving the sinc function with a periodic train of impulses. Using property (22.19) about convolution with impulse functions we arrive at the following useful expression for x(t) in terms of the sampled signal xs (t): x(t) = x(nTs ) sinc n= (tnTs ) Ts (22.38) 617 X (j ) SECTION 22.5 NYQUIST RATE FOR BASEBAND SIGNALS 1 B (rad/s) B X s (j ) 1/Ts B s B s s (rad/sec) s 2 2 H (j ) Ts s (rad/sec) s 2 2 Y (j ) = X (j ) 1 B B (rad/s) FIGURE 22.19 The top row shows the original Fourier transform X (j ), while the second row shows the Fourier transform of the sampled signal xs (t): it consists of periodic repetitions of the transform of x(t) scaled by 1/Ts . The third row shows a low-pass Fourier transform stretching over the frequency range [ s , s ] with amplitude Ts . Multiplying Xs (j ) and H (j ) extracts that 2 2 portion of Xs (j ) that lies within the same frequency range [ s , s ], and which agrees with the 2 2 original Fourier transform X (j ). This result shows that x(t) consists of the sum of modulated sinc functions that are centered at multiples of Ts and scaled by x(nTs ). The construction (22.38) is illustrated in Fig. 22.20. Recall that the sinc function t sinc Ts is one at t = 0 and is zero at multiples of Ts . Therefore, the reconstruction procedure (22.38) for recovering x(t) from xs (t) consists of associating with each sampling instant a sinc function whose amplitude is the sample value x(nTs ) and is centered at nTs . The 618 CHAPTER 22 SAMPLING sinc functions do not interfere with each other at the sampling instants nTs since they all evaluate to zero at these points, except the function that is centered at nTs . xs (t) sinc t Ts x(0) x(Ts ) x(2Ts ) t Ts 2Ts FIGURE 22.20 Convolving xs (t) with the sinc function sinc( t/Ts ) results in placing a sinc at every multiple of Ts and scaling it by the amplitude of the sample at that location, x(nTs ). A sinc function at location nTs evaluates to zero at all other multiples of Ts . The combination of all sinc functions enables the reconstruction of the values of x(t) for all t. Aliasing When the sampling frequency, s , does not satisfy Nyquists condition (22.31), we nd that overlap occurs between the bands in the Fourier transform of Xs (j ), as was illustrated in Fig. 22.18. We say that aliasing occurs. As a result, multiplying Xs (j ) by the low-pass Fourier transform H (j ) will not allow us to recover X (j ). The resulting Fourier transform, Y (j ), will be different from X (j ), as illustrated in the steps of Fig. 22.21. Often in practice, the Fourier transform of the original signal x(t) is not bandlimited to some sharp frequency range [B , B ]. Instead, the transform may extend beyond this range and have frequency components of negligible amplitude outside [B , B ]. For this reason, it is common practice to rst pass the continuous-time signal x(t) through a so-called antialiasing lter, a(t), before sampling it. That is, x(t) is convolved with a(t) to generate an intermediate signal z (t): z (t) = x(t) a(t) The purpose of the anti-aliasing lter a(t) is to limit the bandwidth of z (t) to the range [B , B ]. The lter a(t) is generally a low-pass lter whose Fourier transform leaves unaltered frequency components within the range [B , B ] and signicantly attenuates frequency components outside this range. In this way, when z (t) is sampled at some suitable rate satisfying s > 2B , then aliasing will not occur see Fig. 22.22. 619 X (j ) SECTION 22.5 NYQUIST RATE FOR BASEBAND SIGNALS 1 B (rad/s) B X s (j ) 1/Ts s B B s (rad/sec) s s 2 2 H (j ) Ts s s 2 2 (rad/sec) Y (j ) = X (j ) 1 B s 2 (rad/s) B s 2 FIGURE 22.21 When aliasing occurs, multiplying Xs (j ) by the low-pass Fourier transform H (j ) does not recover X (j ). Instead a distorted Fourier transform is obtained whose inverse transform will not lead to x(t) but to some other signal. Zero-Order-Hold Reconstruction In practice, it is not possible to implement the low-pass ltering operation (22.35). There are several ways to illustrate the impracticality of this solution. Note, for example, from the reconstruction formula (22.38) that the value of x(t), at any time t, depends on samples x(nTs ) that occur before and after time t since n runs over the entire range, < n < . In this way, the transformation (22.38) is a non-causal operation and the value of x(t) cannot be generated in real-time by relying solely on samples, x(nTs ), that occur prior to time t; one needs to wait for future samples of x(nTs ) as well. Another reason for the impracticality of the reconstruction procedure (22.38) is that the ideal low-pass lter H (j ) is not implementable because it corresponds to an unstable and noncausal lter. 620 CHAPTER 22 SAMPLING sample at nTs where s > 2B x(t) z (t) a(t) zs (t) Anti-aliasing lter. It limits the signal bandwidth to [B, B ] FIGURE 22.22 The anti-aliasing lter a(t) is a low-pass lter whose purpose is to limit the bandwidth of the original signal x(t) to the range [B , B ] radians/second before sampling at the rate of s > 2B radians/second. Specically, note that its impulse response function, h(t), which is given by (22.33), is not absolutely integrable and is noncausal (since it is nonzero for t < 0). For this reason, the sinc function h(t) in (22.33) is usually replaced by the so-called zero-order-hold (ZOH) function: hzoh (t) = 1, 0, 0 t Ts otherwise ( 2 2 .3 9 ) which corresponds to a rectangular pulse within the interval [0, Ts ] see Fig. 22.23. hzoh (t) Ts t FIGURE 22.23 Impulse response function of the zero-order-hold operation. The Fourier transform of hzoh (t) can be obtained by noticing that hzoh (t) can be expressed in terms of a regular rectangular pulse of width Ts and shifted to the right by Ts /2, namely, t Ts 2 ( 2 2 .4 0 ) hzoh (t) = Ts Thus, in a manner similar to Example 22.2 we can nd that Hzoh (j ) = ej T s 2 T s sin(Ts /2) = ej 2 Ts sinc / 2 T s 2 ( 2 2 .4 1 ) 621 The magnitude and phase plots of Hzoh (j ) are shown in Fig. 22.24 over the range [20, 20] radians/second and for the case Ts = 1. Observe that the main lobe in the magnitude response of Hzoh (j ) extends between s and s . The dotted lines in the top plot of Fig. 22.24 indicate the frequency response of the ideal low-pass lter (22.34) with magnitude scaled to one; the response extends between s and s . 2 2 Magnitude plot 1 Ideal lowpass filter |Hzoh(j)| 0.8 0.6 ZOH filter 0.4 0.2 20 15 10 5 0 5 (radians/second) Phase plot s 10 15 20 10 15 20 s 3.14 3 (j) 1 zoh 1 H 2 0 2 3 20 15 10 5 0 5 (radians/second) FIGURE 22.24 Magnitude (top) and phase (bottom) responses of the ZOH lter Hzoh (j ) in (22.41) for Ts = 1 over the range [20, 20]. Applying the ZOH lter Hzoh (j ) to the sampled signal xs (t) results in Xzoh (j ) = Xs (j )Hzoh (j ) where we are denoting the result of the ZOH operation by Xzoh (j ). The above transformation replaces the ideal low-pass ltering operation represented by (22.36). The resulting time-domain equivalent of (22.38) then becomes xzoh (t) = xs (t) hzoh (t) = n= x(nTs ) (t nTs ) = n= x(nTs ) t (n+1)Ts 2 Ts t Ts 2 Ts (22.42) The form of the sequence xzoh (t) is indicated in Fig. 22.25; it consists of rectangular pulses of amplitudes x(nTs ) and centered at the locations t = (n+1)Ts for all integers n. It is seen 2 that xzoh (t) provides a staircase approximation for the original signal x(t). We therefore conclude that the zero-order-hold operation, while practical and implementable, it nevertheless does not lead to perfect reconstruction of the original signal x(t). SECTION 22.5 NYQUIST RATE FOR BASEBAND SIGNALS 622 CHAPTER 22 SAMPLING xs (t) xzoh (t) xzoh (t) xs (t) t t hzoh (t) t Ts FIGURE 22.25 Convolving the sampled signal xs (t) with the zero-order-hold impulse function, hzoh (t), results in a staircase approximation for the original signal x(t). In order to get the signal xzoh (t) closer to the signal x(t), the ZOH operation is usually followed by another ltering (compensation) operation denoted by Hcomp (j ), say, X (j ) = Xs (j )Hzoh (j )Hcomp (j ) where the purpose of Hcomp (j ) is to compensate for the non-ideal frequency characteristics of Hzoh (j ) see Fig. 22.26. xs (t) Hcomp (j ) ZOH x (t) x(t) FIGURE 22.26 The zero-order-hold (ZOH) operation is followed by a compensation lter Hcomp (j ) in order to approximate the ideal reconstruction procedure that results in x(t). Ideally, we would like the combination of Hzoh (j ) and Hcomp (j ) to approximate the ideal low-pass lter, H (j ), given by (22.34), within the range [ s , s ], namely, 2 2 Hzoh (j )Hcomp (j ) Ts s = Ts , 0, s < < 2 otherwise s 2 Using expression (22.41) for Hzoh (j ) we conclude that the compensation lter should approximate the following frequency response: Hcomp (j ) ej 0, T s 2 Ts /2 sin(Ts /2) , s < < 2 otherwise s 2 Figure 22.27 displays the magnitude responses of the zero-order-hold lter, Hzoh (j ), and the desirable compensation lter, Hcomp (j ), for the case Ts = 1. Since it is difcult to implement compensation lters with sharp transitions at s /2, the lter is usually replaced by an approximation with a wider transition band as illustrated in Fig. 22.28. The effect of the wider transition band on the reconstruction process would be negligible when the sampling frequency, s , is sufciently larger than the Nyquist frequency, 2B , so that the original signal, x(t), does not have relevant frequency components around s /2. Magnitude plots 1.5 1 |Hzoh(j)| and |H comp(j) Hcomp(j) Hzoh(j) 0.5 s/2 s/2 0 20 15 10 5 0 5 (radians/second) 10 15 20 FIGURE 22.27 Magnitude responses of the zero-order-hold lter (solid line) and the desirable compensation lter (dotted line) using Ts = 1. Hcomp (j ) Hcomp (j ) 1 s 2 1 s 2 s 2 s 2 FIGURE 22.28 Desired magnitude response of the compensation lter (left) and an approximation for it with wider transition bands (right). 22.6 SAMPLING OF BANDPASS SIGNALS When the original signal x(t) is not baseband, there are situations where the signal can be fully recovered even when the sampling rate is below Nyquists condition as the ensuing analysis demonstrates. We distinguish between real-valued and complex-valued bandpass signals and provide illustrative examples. 623 SECTION 22.6 SAMPLING OF BANDPASS SIGNALS 624 CHAPTER 22 SAMPLING 22.6.1 Complex-valued Bandpass Signals To begin with, consider a signal x(t) whose Fourier transform, X (j ), is nonzero over the frequency range [1 , 2 ], as shown in Fig. 22.29. We say that x(t) is a bandpass signal and, actually, x(t) is a complex-valued bandpass signal. This is because if x(t) were real-valued then from the property (22.16), the magnitude response of its Fourier transform should be an even function of , which is not the case here. Now since the highest frequency is 2 , the Nyquist condition (22.31) states that the signal x(t) can be recovered from sampling it at any rate s satisfying s > 22 . However, since x(t) is bandlimited to the range [1 , 2 ], we shall now verity that for such bandpass signals it is possible to sample x(t) at a lower rate than dictated by Nyquists condition without any loss in information. Specically, we shall argue that s need only satisfy the condition s > 2 1 (22.43) where the difference 2 1 amounts to the total signal bandwidth. To see that this is indeed the case, we start by introducing the frequencies B= 2 1 2 o = and 2 + 1 2 (22.44) where B denotes half the width of the bandwidth of the signal, and o is the midpoint of the same bandwidth. X (j ) 1 2 1+ (rad/s) 2 2 FIGURE 22.29 The Fourier transform of a complex-valued bandpass signal x(t) is assumed to be nonzero over the range [1 , 2 ]. Let y (t) = ej o t x(t) (22.45) That is, y (t) is obtained by multiplying x(t) by the complex exponential signal ej o t . It is clear that y (t) and x(t) determine each other uniquely since given y (t) we can nd x(t) through the relation x(t) = ej o t y (t) (22.46) Therefore, if we can show how to recover y (t) from the samples of x(t), then we would also arrive at a procedure to recover x(t) from these same samples. Using the modulation property (22.15) we nd that the Fourier transform of y (t) is related to the Fourier transform of x(t) as follows: Y (j ) = X (j ( + o )) which amounts to shifting X (j ) to the left by o radians/second. Doing so results in the Fourier transform shown in Fig. 22.30. Observe that y (t) is now a baseband signal and its Fourier transform extends between B and B radians/second. Y (j ) 1+ 2 2 1+ (rad/s) 2 2 FIGURE 22.30 Fourier transform of the signal y (t) = ej o t x(t). Assume the signal y (t) is sampled at some rate s radians/second. Then Nyquists condition (22.31) for perfect reconstruction of y (t) from its samples, y (nTs ), requires that we select s such that s > 2 B = 2 1 (22.47) In this case, we can recover y (t) from its samples: y (nTs ) = ej o nTs x(nTs ) (22.48) through the reconstruction formula (22.38): y (t) = n= = n= y (nTs ) sinc (t nTs ) Ts ej (1 +2 )nTs /2 x(nTs ) sinc (t nTs ) Ts Consequently, using relation (22.45) between x(t) and y (t) we conclude that, as long as the sampling frequency satises: s > 2 1 (complex-valued bandpass signals) (22.49) the signal x(t) can be recovered from its samples through the reconstruction procedure x(t) = ej (1 +2 )(tnTs )/2 x(nTs ) sinc n= (tnTs ) Ts (22.50) 625 SECTION 22.6 SAMPLING OF BANDPASS SIGNALS 626 CHAPTER 22 SAMPLING Example 22.14 (Sampling complex-valued bandpass signals) The Fourier transform of a complex-valued bandpass signal x(t) is nonzero over the range 10KHz < f < 12KHz. The highest frequency in x(t) is 12KHz and, therefore, according to Nyquists condition (22.31), the signal x(t) can be recovered from its samples, x(n), for any sampling rate, Fs , that exceeds 24 KHz. However, the result (22.49) suggests that for such bandpass signals we can sample x(t) at much lower rates and still recover it fully from its samples. In this case we have B = 1KHz and, therefore, the signal can be sampled at 2KHz without loss of information. 22.6.2 Real-valued Bandpass Signals Consider now a real-valued signal x(t) whose Fourier transform, X (j ), is nonzero over the frequency range 1 < |f | < 2 , i.e., over [2 , 1 ] and [1 , 2 ] as shown in Fig. 22.29. We say that x(t) is a real-valued bandpass signal. The fact that x(t) is realvalued implies, from the symmetry property (22.16), that the magnitude response |X (j )| must be an even function of , while the phase response X (j ) must be an odd function o f . Now since the highest frequency is 2 , Nyquists condition (22.31) states that the signal x(t) can be recovered from sampling it at any rate s satisfying s > 22 . However, we shall argue that for real-valued bandpass signals of this kind it is possible at times to sample the signal at lower rates than required by Nyquist condition without any loss in information. To see that this is indeed the case, we start by introducing the frequencies B = 2 1 an d o = 2 + 1 2 ( 2 2 .5 1 ) We distinguish between two cases depending on whether 2 is a multiple of B or not. X (j ) 1 2 1+ 2 2 1 1 2 1+ 2 2 FIGURE 22.31 The Fourier transform of a real-valued bandpass signal x(t) is assumed to be nonzero over the ranges [1 , 2 ] and [1 , 2 ]. 627 Upper frequency 2 is a multiple of B Assume the signal x(t) is sampled at some rate s radians/second to obtain SECTION 22.6 SAMPLING OF BANDPASS SIGNALS xs (t) = x(nTs ) (t nTs ) (22.52) As we already know, the Fourier transform of xs (t) is obtained by repeating the Fourier transform of x(t) periodically every s radians/second and scaling the result by 1/Ts . When 2 is a multiple of B , then the interval between 2 and 2 will correspond to an integer multiple of 2B . In this case, if we select the sampling frequency as s = 2(2 1 ), Ts = 2 s (real-valued bandpass signals) (22.53) then when the Fourier transform of x(t) is repeated every s radians/second, the resulting Fourier transform will be lled with adjacent non-overlapping images as shown in Fig. 22.32. s Xs (j ) B B 1/Ts 2 1 1 o 2 FIGURE 22.32 The Fourier transform of the sampled signal xs (t) when 2 is a multiple of B and the signal x(t) is sampled at 2 = 2B radians/second. Since no aliasing occurs, the signal x(t) can be recovered from the sampled signal xs (t) through bandpass ltering, i.e., X (j ) = Xs (j )H (j ) (22.54) where the ideal reconstruction lter H (j ) is chosen as Ts , 1 < < 2 H (j ) = Ts , 2 < < 1 0, otherwise Note that H (j ) can be expressed in the form of two rectangular pulses of width B = 2 1 each and centered at o : H (j ) = Ts t o B + Ts t + o B (22.55) 628 so that, by inverse transformation, the corresponding impulse response function is CHAPTER 22 SAMPLING h(t) = = ej o t sinc 2sinc t Ts t Ts + ej o t sinc t Ts cos(o t) (22.56) Consequently, the reconstruction formula is given by x(t) = x(nTs ) sinc n= (t nTs ) Ts cos(o (t nTs )) (22.57) Example 22.15 (Sampling a real-valued bandpass signal) Figure 22.33 displays the Fourier transform of a real-valued bandpass signal x(t). The frequency content of the signal is nonzero over the range 9 || 12 radians/second. The highest frequency in the signal is 2 = 12 radians/second and, therefore, according to Nyquists condition (22.31), the signal x(t) can be recovered from its samples, x(n), for any sampling rate, s , that exceeds 24 radians/second. However, the current situation corresponds to B = 3 radians/second and the higher frequency, 2 = 12, is a multiple of B . The result (22.53) then suggests that for such bandpass signals we can sample x(t) at much lower rates and still recover it fully from its samples. In this case, the signal can be sampled at s = 2B = 6 radians/second without loss of information. The middle plot in the same gure shows the Fourier transform of Xs (j ), which is obtained by repeating the Fourier transform of x(t) at every s = 6 radians/second. It is seen that the successive images do not overlap with each other. The dotted lines in the gure indicate the location of the ideal bandpass reconstruction lter that would recover x(t) from xs (t). Note, however, that the result (22.53) does not state that any s that is larger than 2(2 1 ) will do! Indeed, the last plot in Figure 22.33 illustrates the Fourier transform that would result for xs (t) when the sampling rate is s = 7 radians/second. In this case, aliasing occurs and it is not possible to recover x(t) from xs (t). In other words, expression (22.53) simply provides the value of the smallest possible sampling frequency. Upper frequency 2 is not a multiple of B Let us now consider the case when the upper frequency, 2 is not a multiple of B . In this case, if we continue to sample the signal x(t) at the rate s = 2B , then aliasing in frequency will occur, as illustrated in Fig. 22.34 In order to avoid aliasing in frequency, we can adjust the value of B to a new larger value Ba such that 2 is a multiple of Ba . The smallest such Ba can be selected as follows. Let 2 = mB + r where m is a positive integer and r is the remainder of dividing 2 by B , and choose Ba = 2 /m (22.58) Obviously, Ba B and 2 is a multiple of Ba . This choice of Ba corresponds to assuming that the bandwidth of x(t) lies within the expanded range 2 Ba < || < 2 see Fig. 22.35. 629 SECTION 22.6 X (j ) SAMPLING OF BANDPASS SIGNALS 1 12 9 6 3 3 s =6 6 9 12 6 9 12 6 9 12 Xs ( j ) 1/Ts 12 9 6 3 3 s =7 Xs ( j ) 1/Ts 12 9 6 3 3 FIGURE 22.33 The Fourier transforms of a real-valued bandpass signal x(t) (top), and its sampled versions, xs (t), for sampling frequencies s = 6 radians/second (middle) and s = 7 radians/second (bottom). The dotted lines in the middle plot illustrate the location of the ideal reconstruction bandpass lter that allows recovering x(t) from xs (t). Observe how aliasing in frequency occurs in the bottom plot. Now, the same argument that was used in the case when 2 is a multiple of B will show that if we sample x(t) at the rate s = 2Ba , Ts = 2 s (22.59) then the signal x(t) be recovered from the sampled version xs (t) through bandpass ltering, namely, X (j ) = Xs (j )H (j ) where now Let Ts , H (j ) = T, s 0, a = 2 Ba < < 2 2 < < 2 + Ba otherwise (22.60) 22 Ba 2 (22.61) 630 CHAPTER 22 SAMPLING Xs (j ) 1/Ts 2 1 1 o 2 FIGURE 22.34 The Fourier transform of the sampled signal xs (t) when 2 is not a multiple of B and the signal x(t) is still sampled at 2 = 2B radians/second. We now nd that aliasing occurs. X (j ) 1 2 2 + Ba 2 2 Ba a a FIGURE 22.35 The Fourier transform of the real-valued bandpass signal x(t) is assumed to extend over the ranges [2 , 2 + Ba ] and [2 Ba , 2 ]. and note that the ideal reconstruction lter, H (j ), can be expressed in the form of two rectangular pulses of width Ba and centered at a : H (j ) = Ts t a Ba + Ts t + a Ba ( 2 2 .6 2 ) so that, by inverse transformation, the corresponding impulse response function is h(t) = = ej a t sinc 2sinc t Ts t Ts + ej a t sinc t Ts cos(a t) ( 2 2 .6 3 ) Consequently, the reconstruction formula is given by x(t) = x(nTs ) sinc n= (t nTs ) Ts cos(a (t nTs )) ( 2 2 .6 4 ) 631 SECTION 22.7 Example 22.16 (Sampling a real-valued bandpass signal) Figure 22.36 displays the Fourier transform of a real-valued bandpass signal x(t). The frequency content of the signal is nonzero over the range 7 || 11 radians/second. The highest frequency in the signal is 2 = 11 radians/second and, therefore, according to Nyquists condition (22.31), the signal x(t) can be recovered from its samples, x(n), for any sampling rate, s , that exceeds 22 radians/second. However, the current situation corresponds to B = 4 radians/second and the higher frequency, 2 = 11, is not a multiple of B . Note though that 2 = 2 B + 3 so that m = 2. Select Ba = 2 /m = 11/2 = 5.5 The result (22.53) then suggests that the signal can be sampled at s = 2Ba = 11 radians/second without loss of information, which is much lower than the Nyquist rate. The middle plot in the same gure shows the Fourier transform of Xs (j ), which is obtained by repeating the Fourier transform of x(t) at every s = 8 radians/second. It is seen that the successive images overlap with each other. The bottom plot of the same gure shows the Fourier transform of xs (t) when x(t) is sampled at s = 11 radians/second.The dotted lines in the gure indicate the location of the ideal bandpass reconstruction lter that would recover x(t) from xs (t). Example 22.17 (Sampling real-valued bandpass signals) Consider a real-valued signal whose Fourier transform is nonzero over the range 10KHz < |f | < 12KHz Then B = 2KHz and the higher frequency of 12KHz is a multiple of B . Therefore, this signal can be sampled at the rate of Fs = 2B = 4KHz without loss of information. Now assume instead that the Fourier transform of the signal is nonzero over the range 10KHz < |f | < 13KHz Then B = 3KHz and the higher frequency of 13KHz is not a multiple of B . Note though that 13 = 4 B + 1 so that we can dene Ba = F2 /4 = 13/4 = 3.25KHz Then the signal can be sampled at the rate of Fs = 2Ba = 6.5KHz without loss of information. 22.7 RELATION OF FOURIER TRANSFORM TO THE DTFT The discussion in the previous section on the sample procedure, and the constructions that are associated with it in the frequency domain, can be used to highlight useful relations between the Fourier transform (FT) of continuous-time signals and the discrete-time Fourier transform (DTFT) of discrete-time signals. Thus, recall that we started with a generic continuous-time signal x(t) with Fourier transform, X (j ), as was illustrated in Fig. 22.14. We subsequently sampled x(t) to RELATION OF FOURIER TRANSFORM TO THE DTFT 632 CHAPTER 22 X (j ) SAMPLING 1 12 9 6 3 3 s 6 9 12 6 9 12 6 9 12 Xs ( j ) =8 1/Ts 12 9 6 3 3 s = 11 Xs ( j ) 1/Ts 12 9 6 3 3 FIGURE 22.36 The Fourier transforms of a real-valued bandpass signal x(t) (top), and its sampled versions, xs (t), for sampling frequencies s = 8 radians/second (middle) and s = 11 radians/second (bottom). The dotted lines in the bottom plot illustrate the location of the ideal reconstruction bandpass lter that allows recovering x(t) from xs (t). Observe how aliasing in frequency occurs in the middle plot. obtain xs (t) = n= x(nTs ) (t nTs ) (22.65) and we argued that the Fourier transform of the sampled signal, xs (t), consists of the Fourier transform of X (j ) repeated periodically every s radians/second and scaled by 1/Ts , namely, Xs (j ) = 1 Ts k= X (j jk s ) (22.66) This construction was illustrated in Fig. 22.16. There is an alternative expression for the Fourier transform of xs (t), which is useful for the purposes of the discussion in this section. To arrive at this expression we start from (22.65) and recall from Example 22.2 the Fourier transform pair (t nTs ) ej nTs (22.67) Using this result in (22.65), and invoking the linearity property of the Fourier transform, we get Xs (j ) = x(nTs )e j nTs (22.68) n= Let us write x(nTs ) simply as x(n), which has been our notation for the terms of a sequence all along, and let us also introduce a convenient change of variables as follows = T s (frequency normalization) (22.69) This transformation maps the frequency variable to a normalized frequency variable . Note in particular that the value = s radians/second (sampling frequency) is mapped to the normalized value = s T s = 2 Ts = 2 radians/sample Ts (22.70) That is, = s (radians/second) = 2 (radians/sample) (22.71) Note further that the units for are radians/sample. Using the normalized frequency , we nd that expression (22.68) for Xs (j ) becomes x(n)ejn Xs (j ) = n= We readily recognize the expression on the right-hand side as the DTFT of the sequence x(n), and which we denoted earlier by X (ej ). Therefore, we conclude that the following relation holds: Xs (j ) = X (ej ) (22.72) Ts (22.73) or, equivalently, X (ej ) = Xs j Observe that both Xs (j ) and X (ej ) are periodic functions: the former is periodic with period s while the latter is periodic with period 2 . Obviously, the values of both periods are related through the normalization = Ts . This discussion shows that the DTFT of a sequence x(n) is nothing but the original Fourier transform X (j ) repeated every s rad/s (and, hence, periodic) and scaled by 1/Ts . Moreover, since we normalize the frequency axis so that the sampling frequency = s is mapped to = 2 , then the DTFT becomes periodic with period 2 : the s -periodicity in the -domain is transformed into a 2 -periodicity in the -domain see 633 SECTION 22.7 RELATION OF FOURIER TRANSFORM TO THE DTFT 634 X s (j ) CHAPTER 22 SAMPLING 1/Ts s B s (rad/sec) 2 (rad/sample) B X (ej ) 1/Ts 2 BTs BTs FIGURE 22.37 The Fourier transform (FT) of the sampled signal, xs (t), and the discrete-time Fourier transform (DTFT) of the corresponding sequence, x(n), coincide apart from a normalization of the frequency variable through the relation = Ts , where the sampling frequency s is mapped to 2 . Fig. 22.37. One useful consequence of using the normalized frequency variable, , is that frequency plots now become independent of the value of the actual sampling rate, s . Example 22.18 (Normalized frequency) A discrete-time system processes data that has been sampled at the rate of 8 KHz. A tone at 60Hz in the continuous-time domain would correspond to the following normalized frequency in the discretetime domain: = = Ts 2 60/8000 = 3/200 0.0471 radians/sample Example 22.19 (Discrete-time ltering) The frequency response of a discrete-time lter is shown in Fig. 22.38. The lter operates at 16KHz. A 3KHz tone is sampled and fed through the lter. We would like to determine the attenuation that the tone will undergo as it is processed by the lter. To do so, we rst map the frequency of the tone to the normalized domain as follows: = = = Ts 2 3000/16000 3/8 radians/sample Therefore, the frequency of the tone is viewed by the discrete-time system as = 3 /8. From the frequency response in Fig. 22.38 we nd that this particular frequency is attenuated by 0.85. H (ej ) 0.85 /2 /2 (rad/sample) 3 /8 FIGURE 22.38 The frequency response of a discrete-time lter operating at 16KHz. 22.8 RELATION OF FOURIER TRANSFORM TO THE DFT We can also comment on the relation between the Fourier transform (FT) of a signal, x(t), and the discrete Fourier transform (DFT) of the corresponding sequence, x(n). Thus, recall that the N point DFT of x(n) is obtained by sampling its DTFT, X (ej ), at multiples of 2 /N radians, i.e., X (k ) = X (ej ) = 2k N Using the transformation = Ts , and the correspondence between X (ej ) and Xs (j ) from (22.73), we conclude that the samples of the N point DFT correspond to sampling Xs (j ) in the domain at multiples of s /N rad/s, namely, X (k ) = Xs j kNs ( 2 2 .7 4 ) Let us pursue this relation further in the time domain. Thus, let Xr (j ) denote the Fourier transform that results from sampling Xs (j ) at multiples of s /N , namely, Xr (j ) = Xs (j ) k = k s N ( 2 2 .7 5 ) The above operation amounts to multiplying Xs (j ) by a periodic train of impulses with period s /N . We listed earlier in Example 22.5 the Fourier transform of a periodic train of impulses, which in the current case translates into n= (t nN Ts ) s N k = k s N , s = 2 / T s Using the convolution property (22.20), which states that multiplication in the frequency domain amounts to convolution in the time domain, we nd that the inverse transform of 635 SECTION 22.8 RELATION OF FOURIER TRANSFORM TO THE DFT 636 Xr (j ) is the signal xr (t) given by CHAPTER 22 SAMPLING xr (t) N s = xs (t) = = (t N Ts ) N Ts 2 = xs (t N Ts ) (22.76) That is, the sampled signal xs (t) is repeated periodically every N Ts seconds and the results are added and scaled by N Ts /2 . Obviously, aliasing in time will occur (i.e., adjacent repetitions of the signal xs (t) will interfere with each other) if the period N Ts is not larger than the duration of the signal xs (t). Thus, we shall assume that the duration of the original signal x(t) is reasonably within N Ts seconds. This construction is illustrated in Fig. 22.39. Note that the samples of the periodic signal xr (t) are scaled versions of the periodic sequence xp (n) that was constructed earlier in (17.19) while studying the DFT in Sec. 17.2. In order to determine the sequence xr (n) that corresponds to xr (t) we proceed in two equivalent ways. Doing so will further clarify the relation between the Fourier transform and the DFT in the time domain. To begin with, replacing with /Ts (and, accordingly, s with 2 ) in (22.75), we obtain a periodic function in of period 2 , i.e., Xr j Ts = Xs j Ts = T s Xs j Ts s k Ts N k= k= 2k N (22.77) 1 where in the second equality we used the normalization property (at) = a (t). The function Xr (j Ts ) so obtained is periodic with period 2 and it can be viewed as the DTFT of some sequence, xr (n), to be determined. We shall denote this DTFT by the standard notation Xr (ej ) and use (22.73) to rewrite the above equality in the equivalent form: Xr (ej ) = Ts X (ej ) k= 2k N (22.78) To arrive at xr (n), we now compute the inverse DTFT of Xr (ej ), and use the convolution property (14.10) of the DTFT (which states that multiplication in the frequency domain amounts to convolution in the time domain). Indeed, note rst that the inverse DTFT of the train of impulses in (22.78) is given by 1 2 2 0 Ts k= k 2 N ejn d = Ts 2 N 1 ej 2kn N (22.79) k=0 where the sum on the right-hand side is over the interval 0 k N 1 because the integration on the left-hand side is over the interval [0, 2 ]; therefore, the integration extracts only the dirac impulses that are located within [0, 2 ]. Returning to (22.78) and inverse-transforming both sides with the help of (22.79) we obtain xr (n) = x(n) Ts 2 N 1 ej k=0 2kn N (22.80) 637 SECTION 22.8 RELATION OF FOURIER TRANSFORM TO THE DFT X s (j ) 1/Ts B s s s (rad/sec) s B (rad/sec) s 2 2 Xr (j ) 1/Ts B s B s N xs (t) 1 t(s) xr ( t) N Ts /2 N Ts N Ts t(s) Ts FIGURE 22.39 Sampling the Fourier transform Xs (j ) every s /N radians/second results in the sampled Fourier transform Xr (j ) shown in the second row. The corresponding action in the time domain is to repeat the sampled signal xs (t) every N Ts seconds and to scale the result by N Ts /2 . Now recall that the sum of exponential sequences that appears in the above expression reduces to the following: N 1 ej 2kn N = k=0 N, 0, n = 0, N, 2N, . . . otherwise (22.81) That is, N 1 ej k=0 2kn N = N = (n N ) (22.82) 638 CHAPTER 22 SAMPLING in terms of shifted versions of the unit-sample sequence, (n). Substituting into (22.80) we nd that xr (n) = N s x(n N ) (22.83) = This means that, apart from scaling by N/s , the sequence xr (n) is obtained by repeating the sequence x(n) periodically every N samples and adding the results. Obviously, aliasing in time will occur (i.e., adjacent repetitions of the sequence x(n) will interfere with each other) if the duration of x(n) is larger than N samples. We shall therefore assume that the duration of the original continuous-time signal, x(t), is reasonably within N Ts seconds to avoid the possibility of aliasing when forming xr (n). Note further that the sequence xr (n) in (22.83) is a scaled version of the periodic sequence, xp (n), which we constructed earlier in (17.19) while studying the DFT of x(n) in Sec. 17.2, namely, x(n N ) xp (n) = (22.84) = Now, there is an alternative way to arrive at an expression for xr (n) from (22.78). We rewrite (22.78) as Xr (ej ) = X ej Ts 2k N k= 2k N (22.85) where the term involving X (ej ) has been moved inside the summation. Subsequently, the inverse DTFT of Xr (ej ) can also be found as follows: xr (n) = Ts = = Ts 2 1 2 2 X ej 2k N 0 N 1 X ej 2k N ej 2k N ejn d 2kn N k=0 1 N s N N 1 Xs j k=0 k s N ej 2kn N (22.86) Comparing (22.86) with (22.83) and (22.84) we conclude that xp (n) = 1 N N 1 k=0 Xs j kNs ej 2kn N (22.87) which again conrms that the coefcients of the N point DFT of x(n) are given by Xs (j kNs ). 22.9 SPECTRAL RESOLUTION The discussion on the relation between the Fourier transform of x(t) and the N point DFT of the corresponding sequence x(n) allows us to make the identication X (k ) = Xs j k s N (22.88) We therefore conclude that the separation between two DFT coefcients, which is equal to 2/N in the normalized frequency domain (see Sec. 21.3), translates into a separation of s radians/second N (22.89) in the regular frequency domain. For this reason, we say that the frequency (or spectral) resolution that is provided by an N DFT is given by frequency resolution in radians/second = s 2 = N N Ts (22.90) In Hertz, we obtain frequency resolution in Hertz = Fs 1 = N Ts N (22.91) where N Ts duration in seconds of data segment used by the DFT Therefore, the longer the duration of a signal segment in time the better the resolution in frequency that is provided by the DFT. Observe that the resolution is not a function of N alone but rather of the product N Ts . Example 22.20 (Zero padding) A speech signal is bandlimited to 4KHz. We can therefore sample it at 10KHz and satisfy Nyquists condition. We would like to determine the amount of samples that are needed and the size of the DFT to use in order to achieve spectral resolution of 10Hz. First note that the duration of the segment of speech that we need to collect is inversely related to the desired spectral resolution and therefore, duration of speech segment needed = 1 = 0.1 second 10 Since the sampling rate is Fs = 10KHz (i.e., 10000 samples per second), a segment of duration 0.1 second would correspond to N = 10000 0.1 = 1000 samples The closet power-of-2 for N is to select N = 1024 and to compute a 1024point DFT. What if we are unable to collect 0.1 second of speech data but, say, only 0.05 second? This duration would result in only 500 samples available and we need 1000 samples to attain the desired frequency resolution. We can take the available 500 data points and pad them with zeros to increase the length of the data up to N = 1024 points. Doing so improves the spectral resolution. This step can be justied as follows. Assume we return to the construction illustrated in Fig. 22.39 and reduce the separation s /N between two successive samples of Xr (j ) in the second row of the gure (for example, by increasing the value of N to N > N but keeping s xed); in this way, the frequency resolution s /N is enhanced. Then the effect on xr (t) in the last row of the gure is to separate the images further apart from each other and to add additional zero samples in between 639 SECTION 22.10 SPECTRAL RESOLUTION 640 xr ( t) CHAPTER 22 SAMPLING N Ts /2 t(s) N Ts Ts x (t) r N Ts /2 N Ts t(s) Ts FIGURE 22.40 Sampling the Fourier transform Xs (j ) in Fig. 22.39 at a ner scale every s /N radians/second (where N > N ) results in repeating xs (t) every N Ts ; the images in the time domain are further apart repeating every N Ts seconds (bottom) rather than every N Ts seconds where N < N (top). see Fig. 22.40. In other words, the data segment that is used by the DFT of order N will have additional zeros padded to its end relative to the data segment that is used by the DFT of order N . 22.10 APPLICATIONS TO BE ADDED Practice Questions: 1. 2. 22.11 PROBLEMS Problem 22.1 Find the Fourier transform of the following signals (a) x(t) = cos(o t) (b) x(t) = cos(o t) sinc t Ts . t Ts (c) x(t) = cos(o (t 1)) . t 2 Ts . (d) x(t) = (e) x(t) = (f) x(t) = t t 2t Ts n= 641 (t nTs ). SECTION 22.11 (t nTs ). n= PROBLEMS . Problem 22.2 Find the Fourier transform of the following signals (a) x(t) = sin(o t) t 1 Ts (b) x(t) = cos2 (o t) sinc . t Ts (c) x(t) = sin(o (t + 1)) (d) x(t) = (e) x(t) = (f) x(t) = t2 t 1 3(t2) Ts n= n= . t 2 Ts . (t nTs ). (t nTs ). . Problem 22.3 Find the energies of the signals in Prob. 22.1. Problem 22.4 Find the energies of the signals in Prob. 22.2. Problem 22.5 Compute the convolution t 2 t1 4 (a) Using the denition of linear convolution. (b) Using properties of the Fourier transform. Problem 22.6 Compute the convolution cos(2t) t 2 t+1 4 (a) Using the denition of linear convolution. (b) Using properties of the Fourier transform. Problem 22.7 Figure 22.41 shows the Fourier transform of an input signal, x(t), and the frequency response of an LTI lter, H (j ). Determine the output signal y (t) and its energy. Is the lter stable? Problem 22.8 Figure 22.42 shows the Fourier transform of an input signal, x(t), and the frequency response of an LTI lter, H (j ). Determine the output signal y (t) and its energy. Is the lter stable? Problem 22.9 Consider the Fourier transform shown in Fig. 22.43. (a) What is Nyquists rate for this signal? (b) Set s = 10 radians/sec. Draw Xs (j ). (c) Set s = 6 radians/sec. Draw Xs (j ). Does aliasing occur? (d) What is the energy of x(t)? (e) What is the energy of the sequences x(n) from parts (b) and (c)? Problem 22.10 Consider the Fourier transform shown in Fig. 22.44. (a) What is Nyquists rate for this signal? (b) Set s = 6 radians/sec. Draw Xs (j ). (c) Set s = 3 radians/sec. Draw Xs (j ). Does aliasing occur? 642 CHAPTER 22 X (j ) SAMPLING 1 B B (radians/sec) H (j ) 1 (radians/sec) B 2 B 2 FIGURE 22.41 Fourier transform of the input signal (top plot) and the frequency response of an LTI system (bottom plot) for Prob. 22.7. X (j ) 1 B B (radians/sec) H (j ) 1 B B 2 B 2 B (radians/sec) FIGURE 22.42 Fourier transform of the input signal (top plot) and the frequency response of an LTI system (bottom plot) for Prob. 22.8. (d) What is the energy of x(t)? (e) What is the energy of the sequences x(n) from parts (b) and (c)? Problem 22.11 Consider the Fourier transform shown in Fig. 22.45. (a) What is the smallest sampling frequency s for no aliasing to occur? (b) What is the energy of x(t)? (c) Set s = 3 radians/sec. Draw Xs (j ). (d) For part (c), what is the energy of the resulting sequence, x(n). (e) Set s = 1 radians/sec. Draw Xs (j ). 643 SECTION 22.11 PROBLEMS X (j ) 1 4 4 (radians/sec) FIGURE 22.43 Fourier transform for Prob. 22.9. X (j ) 1 2 2 (radians/sec) FIGURE 22.44 Fourier transform for Prob. 22.10. X (j ) 2 1 456 (radians/sec) FIGURE 22.45 Fourier transform for Prob. 22.11. (f) For part (e), what is the energy of the resulting sequence x(n). Problem 22.12 Repeat Prob. 22.11 for Fig. 22.46. Problem 22.13 Repeat Prob. 22.11 for Fig. 22.47. Problem 22.14 Repeat Prob. 22.11 for the transform X (j ) = ej /2 X (j ). Problem 22.15 Consider the Fourier transform shown in Fig. 22.48. Select s = 6 radians/sec. 644 CHAPTER 22 X (j ) SAMPLING 2 1 456 6 5 4 (radians/sec) FIGURE 22.46 Fourier transform for Prob. 22.12. X (j ) 2 1 7 5 4 45 7 (radians/sec) FIGURE 22.47 Fourier transform for Prob. 22.13. (a) Draw Xs (j ). (b) Draw X (ej ). (c) Draw Xr (ej ). X (j ) 2 1 2 1 12 (radians/sec) FIGURE 22.48 Fourier transform for Prob. 22.15. Problem 22.16 Consider the Fourier transform shown in Fig. 22.49. Select s = 8 radians/sec. (a) Draw Xs (j ). (b) Draw X (ej ). (c) Draw Xr (ej ). Problem 22.17 A continuous-time signal is sampled at the rate of 1GHz. Each sample is quantized to 16 bits. How many bytes of memory are necessary to record one hour of the signal? 645 SECTION 22.11 X (j ) PROBLEMS 2 3 3 1 1 (radians/sec) FIGURE 22.49 Fourier transform for Prob. 22.16. Problem 22.18 A CD audio signal is band-limited to about 22KHz. If the signal is sampled at twice the Nyquist rate, and if each sample is quantized to 12 bits, determine the resulting bit rate measured in bits per second. How much memory, measured in mega bits, would you need to store one minute of a CD audio signal at this sampling rate? Problem 22.19 Establish Parsevals relation for continuous-time signals, |x(t)|2 dt = 1 |X (j )|2 d 2 Problem 22.20 Establish the Fourier transform property dx(t) dt j X (j ) Problem 22.21 Establish the Fourier transform property x(2t) 1 X 2 j 2 Problem 22.22 The Fourier transform of a signal x(t) is zero for || > B radians/second. The signal is sampled at the rate of s > 2B . Let Ed denote the energy of the resulting discrete-time sequence, Ed = n= |x(n)|2 Likewise, let Ec denote the energy of the continuous-time signal, Ec = |x(t)|2 dt Show that Ec = Ts Ed where Ts = 2/s . Problem 22.23 Find the frequency response of the LTI system described by the differential equation y(t) + 3y (t) + 2y (t) = x(t 1) where y and y denote the second and rst-order derivatives of y (t). Find also the impulse response of the system. Problem 22.24 Find the frequency response of the LTI system described by the differential equation 3 1 y(t) + y(t) + y (t) = cos(2t) x(t) 2 2 646 Find its impulse response as well. CHAPTER 22 SAMPLING Problem 22.25 What is the Nyquist rate for the signal x(t) = cos(2F1 t) + sin(2F2 t) where F1 = 100 Hz and F2 = 125 Hz. Problem 22.26 The maximum frequency that is present in a baseband signal x(t) is 500 Hz. What is the minimum sampling frequency that can be used to avoid aliasing? The sampled signal is to be processed by a discrete-time lter to remove the frequency content in the range 50 70Hz. What is the impulse response sequence of the ideal discrete-time lter that achieves this task? Problem 22.27 A continuous-time speech signal x(t) is contaminated with a unit amplitude interfering tone at 3000Hz. The speech signal, which is assumed to be band-limited at 4 KHz, is sampled at the rate of 12000 samples per second. The resulting discrete-time sequence is then processed by the LTI system: 1 y (n) = y (n 1) + x(n 1) 2 (a) By how much is the 3000Hz interference attenuated at the output of the discrete-time lter? Find the steady-state response of the lter to the unit amplitude tone at 3000Hz. (b) Consider a rst-order LTI system of the form y (n) = ay (n 1) + x(n) for some value of a. Design a such that the amplitude of the 3000Hz interference is reduced by at least 25%. Problem 22.28 A causal systemis composed of the series cascade of two LTI subsystems with n n impulse responses 1 u(n) and 1 u(n 1). A tone at 1KHz is attenuated by 2/ 21 (i.e., by 2 3 approximately 43.6). Can you tell what the sampling rate is? Problem 22.29 Let o = 2 radians/second and = 13 radians/second. Consider the signal o x(t) = sinc o t 2 cos t o Find the smallest frequency at which x(t) can be sampled without loss of information. Problem 22.30 Assume the Nyquist rate of a signal x(t) is s radians/second. What is the Nyquist rate of the following transformations of the signal: (a) x(t). (b) x(2t). (c) x(t/2). (d) x2 (t). Problem 22.31 Assume the Nyquist rate of a signal x(t) is s radians/second. What is the Nyquist rate of the following transformations of the signal: (a) dx(t)/dt. (b) ej o t x(t). (c) x(t) x(t). (d) cos(o t) x(t). Problem 22.32 The DTFT of a sequence x(n) is shown in Fig. 22.50. If x(n) was obtained by sampling a signal x(t) at 20KHz, can you determine the bandwidth of x(t)? 647 X (ej ) SECTION 22.11 PROBLEMS 4 2 4 4 2 (rad/sample) FIGURE 22.50 DTFT of the sequence x(n)for Prob. 22.32. Problem 22.33 Consider a discrete-time processor operating at the rate of 1GHz and assume that each complex operation (addition or multiplication) requires one clock cycle. It is desired to sample a continuous-time signal, x(t), and to process the resulting sequence, x(n), by an FIR lter whose impulse response sequence has L nonzero coefcients. What is the maximum bandwidth that the signal x(t) can have in terms of L and the DSP clock rate? Assume L = 124 and nd the resulting numerical value.
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

UCLA - EE - 113
DISCRETE-TIMEPROCESSING AND FILTERINGAli H. SayedElectrical Engineering DepartmentUniversity of California at Los Angelesc 2008 All rights reserved.These notes are only distributed to the students enrolled in the EE113course in the Electrical Engin
UCLA - EE - 113
DISCRETE-TIMEPROCESSING AND FILTERINGAli H. SayedElectrical Engineering DepartmentUniversity of California at Los Angelesc 2008 All rights reserved.These notes are only distributed to the students enrolled in the EE113course in the Electrical Engin
UCLA - EE - 113
UCLA - EE - 113
UCLADepartment of Electrical EngineeringEE113: Digital Signal ProcessingFall 2011Instructor:Professor Abeer Alwan, email: alwan@ee.ucla.eduRoom 66-147G EIVTeaching Assistant:Mr. Sen Li, ls870825@gmail.comMr. Jianshu Chen, cjs09@ucla.eduLectures:
UCLA - EE - 113
EE113: Digital Signal ProcessingProf. Abeer AlwanTA: Jianshu Chen and Sen LiFall 2011October 13, 2011Solution to Quiz 11. Solution:(a) From sampling theory, we have x(n) = x(t)|t=nTs , where Ts is the sampling interval. Weknow that sampling rate i
UCLA - EE - 113
UCLA - EE - 113
UCLADept. of Electrical EngineeringEE113: Digital Signal ProcessingProblem Set 1Due: 10/4/2011Reading Assignment: Chapters 1 and 21. Are the following signals one or multi-dimensional? Are they continuoustime or discrete-time? If discrete-time, spec
UCLA - EE - 113
UCLADept. of Electrical EngineeringEE113: Digital Signal ProcessingProblem Set 2Due: 10/11/2011Reading Assignment: Chapters 3, 4, and 51. Problem 3.4. Write down the angular frequency and period for each sequence.2. Problem 3.8.3. Problem 3.11: on
UCLA - EE - 113
UCLADept. of Electrical EngineeringEE113: Digital Signal ProcessingProblem Set 3Due: 10/18/2011Reading Assignment: Chapters 5, 6, and 91. Problem 5.1 (parts a, b).2. Problem 5.8.3. Problem 5.9, parts (a), (b), and (c).4. Problem 5.14.5. Problem
UCLA - EE - 113
UCLADept. of Electrical EngineeringEE113: Digital Signal ProcessingProblem Set 4Due: 10/25/2011Reading Assignment: Chapters 9-121. Problem 9.1.2. For each of the following sequences, nd the z-transform and sketch thepole-zero pattern. Include an i
UCLA - EE - 113
UCLADept. of Electrical EngineeringEE113: Digital Signal ProcessingProblem Set 5Due: 11/8/2011Reading Assignment: Chapters 12 and 13, and 14. The second quizwill be on Thursday, 11/17 covering HMWK 5 and 6.1. Problem 12.1.2. Problem 12.11.3. Prob
UCLA - EE - 113
UCLADept. of Electrical EngineeringEE113: Digital Signal ProcessingProblem Set 6Due: 11/15/2011Reading Assignment: Chapters 13 and 141. Problem 13.13 part (a) only.2. Problem 13.15 part (a) only.3. Problem 13.27.4. Problem 13.35.5. Problem 14.9
UCLA - EE - 113
UCLADept. of Electrical EngineeringEE113: Digital Signal ProcessingProblem Set 7Due: 11/22/2011Reading Assignment: Chapters 15, 17, and 181. Problem 15.3.2. Problem 15.7 all parts EXCEPT part (c).3. Problem 15.11 parts (a-d).4. Problem 15.14.5.
UCLA - EE - 113
UCLADept. of Electrical EngineeringEE113: Digital Signal ProcessingProblem Set 8Due: 12/01/2011Please note that for the Final Exam on Wed. 12/7, you may bring two8.5 x 11 in sheets of formulae but no phones, calculators, or electronicdevices are al
UCLA - EE - 113
EE113: Digital Signal ProcessingProf. Abeer AlwanTA: Jianshu Chen, and Sen LiFall 2011October 4, 2011Solution to HW 11. Solution:(a) The signal of each closing stock price is a one-dimensional discrete-time signal. This isbecause the signal only t
UCLA - EE - 113
EE113: Digital Signal ProcessingProf. Abeer AlwanTA: Jianshu Chen, and Sen LiFall 2011October 11, 2011Solution to HW 21. (Problem 3.4)Solution:2k= 6k = N1 = 61 = , N1 =322kx2 (n) = ej 6 n , 2 = , N2 == 12k = N2 = 12625122k5= k = N3 =
UCLA - EE - 113
Fall 2011October 18, 2011EE113: Digital Signal ProcessingProf. Abeer AlwanTA: Jianshu Chen, and Sen LiSolution to HW 31. (Problem 5.1(part a,b)Solution:1(a) The system y (n) = 3 y (n 1) + x(n 1) is relaxed, which implies that for input x(n) = (n
UCLA - EE - 113
Fall 2011October 25, 2011EE113: Digital Signal ProcessingProf. Abeer AlwanTA: Jianshu Chen, and Sen LiSolution to HW 41. (Problem 9.1)Solution:For x(n) = u(n + 3) u(n 3), the ROC of x(n) is+X (z ) =(u(n + 3) u(n 3)z nn=32= z + z + z + 1 + z
UCLA - EE - 113
Sl i t H 5o tno WuoPo l 3rbemPo l 41.rbe ( 4m3)Po l 5rbemPo l 6rbemPo l 7rbem8. (Problem 13.26 (a)Solution:The the formula of inverse DTFT, we havex(n) ==1212X (ej )ejn d /2/4/43/4ejn d + 2ejn d /2/2ejn d 2/23/411
UCLA - EE - 113
7.
UCLA - EE - 113
.6.8. (Computer Project: Touch Tone Telephone)Solution:(a) The PSD of digit 0 has peaks at 950 Hz and 1336 Hz. Therefore, the unknown frequencyat the bottom of the rst column is about 950 Hz. Furthermore, the PSD for digit 3 haspeaks at 1500 Hz and
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 1Wednesday, September 28, 2011and Friday, September 30, 2011Reading: Chapter 2 of Probability, Statistics, and Random Processes by A. Leon-Garcia1. Venn diagram. Problem 2.13, page 82 of ALG
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 1Wednesday, September 28, 2011and Friday, September 30, 2011Reading: Chapter 2 of Probability, Statistics, and Random Processes by A. Leon-Garcia1. Venn diagram. Problem 2.13, page 82 of ALG
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 2Wednesday, October 5, 2011and Friday, October 7, 2011Reading: Chapter 2 of Probability, Statistics, and Random Processes by A. Leon-GarciaConcepts covered: Conditional probability Partitio
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 2Wednesday, October 5, 2011and Friday, October 7, 2011Reading: Chapter 2 of Probability, Statistics, and Random Processes by A. Leon-Garcia1. Conditional Probability. Problem 2.73, page 88 of
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 2Wednesday, October 5, 2011and Friday, October 7, 2011Reading: Chapter 2 of Probability, Statistics, and Random Processes by A. Leon-GarciaConcepts covered: Conditional probability Partitio
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 3Wednesday, October 12, 2011and Friday, October 14, 2011Reading: Chapters 3 and 4 of Probability, Statistics, and Random Processes by A.Leon-GarciaConcepts covered: What is a random variabl
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 3Wednesday, October 12, 2011and Friday, October 14, 2011Reading: Chapters 3 and 4 of Probability, Statistics, and Random Processes by A.Leon-GarciaConcepts covered: What is a random variabl
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 4Wednesday, October 19, 2011and Friday, October 21, 2011Reading: Chapter 4 of Probability, Statistics, and Random Processes by A. Leon-GarciaConcepts covered: CDF and PDF Examples of import
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 4Wednesday, October 19, 2011and Friday, October 21, 2011Reading: Chapters 4 of Probability, Statistics, and Random Processes by A. Leon-Garcia1. Cdf and pdf and functions. Problem 4.13, page
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 5Wednesday, October 26, 2011and Friday, October 28, 2011Reading: Chapters 4 of Probability, Statistics, and Random Processes by A. Leon-Garcia1. Max of iid. uniform. Problem 4.174, page 231 o
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 5Wednesday, October 26, 2011and Friday, October 28, 2011Reading: Chapters 4 of Probability, Statistics, and Random Processes by A. Leon-Garcia1. Max of iid. uniform. Problem 4.174, page 231 o
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 6Wednesday, November 2, 2011and Friday, November 4, 2011Reading: Chapters 4 of Probability, Statistics, and Random Processes by A. Leon-Garcia1. Characteristic function of Gaussian. Problem 4
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 6Wednesday, November 2, 2011and Friday, November 4, 2011Reading: Chapter 4 of Probability, Statistics, and Random Processes by A. Leon-GarciaConcepts covered: Characteristic function X ( ) =
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 7Wednesday, November 09, 2011and Friday, November 11, 2011Reading: Chapters 5 of Probability, Statistics, and Random Processes by A. Leon-Garcia1. Coin tossing and two RVs. Problem 5.1, page
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 7Wednesday, November 9, 2011and Friday, November 11, 2011Reading: Chapters 5 of Probability, Statistics, and Random Processes by A. Leon-GarciaConcepts covered: Two random variables: joint c
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 8Wednesday, November 16, 2011and Friday, November 18, 2011Reading: Chapter 5 Probability, Statistics, and Random Processes by A. Leon-Garcia Review of MATLAB commands and functions Condition
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 8Wednesday, November 16, 2011and Friday, November 18, 2011Reading: Chapter 5 Probability, Statistics, and Random Processes by A. Leon-Garcia Review of MATLAB commands and functions Condition
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekDiscussion Set 9Wednesday, November 23, 2011No Friday Section (holiday)Reading: Chapter 5 Probability, Statistics, and Random Processes by A. Leon-GarciaConcepts covered: Conditional probability and condit
UCLA - EE - 132A
UCLA - EE - 132A
EE 131A, Fall 2011ProbabilityInstructor: Lara DolecekFinal Study GuideReading: Chapters 2.1-2.6, 3.1-3.5, and 4.1-4.7,5.1-5.10, 7.1-7.3, 8.4-8.5, 8.7 of Probability,Statistics, and Random Processes by A. Leon-GarciaYou should be able to do the follo
UCLA - EE - 132A
EE 131 AProbabilityInstructor: Lara DolecekHandout 1Course Information Sheet9/26/2011EE 131A Course Information SheetCourse Web Site: https:/eeweb.ee.ucla.edu/classinfo.php?/ee131A/1/fall/11Time &amp; Place for Lecture: 2-3.50 pm M-W, 169 HumanitiesT
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekMATLAB projectWednesday, November 9, 2011Due: Wednesday, November 30, 2011Reading: Chapters 2 through 8 of Probability, Statistics, and Random Processes by A.Leon-Garcia100 points totalIn this project we
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekFall 2010 MidtermWednesday, October 27, 2010Maximum score is 100 points. You have 110 minutesto complete the exam. Please show your work.Good luck!Your Name:Your ID Number:Name of person on your left:Na
UCLA - EE - 132A
EE 131A, Fall 2011ProbabilityInstructor: Lara DolecekMidterm Study GuideReading: Chapters 2.1-2.6, 3.1-3.5, and 4.1-4.5 of Probability, Statistics, and RandomProcesses by A. Leon-GarciaYou should be able to do the following: For a given random expe
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekLecture/Section #DateL19/28/11L310/03/11L410/05/11L5Assignment9/26/11L2SyllabusMonday, 9/26/201110/10/11L610/12/11L710/19/11L9L1011/02/11L1311/09/11L1511/16/11L17ch 3Discrete RVs. CD
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekComprehensive projectMonday, November 14, 2011Due: Wednesday, December 1, 2011Reading: Chapters 2 through 8 of Probability, Statistics, and Random Processes by A.Leon-Garcia100 points totalIn this project
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekProblem Set 1Wednesday, September 28, 2011Due: Wednesday, October 5, 2011Reading: Chapter 2 of Probability, Statistics, and Random Processes by A. Leon-Garcia100 points total1. Dry pens. Problem 2.5, page
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekProblem Set 1Wednesday, September 28, 2011Due: Wednesday, October 5, 2011Reading: Chapter 2 of Probability, Statistics, and Random Processes by A. Leon-Garcia1. Dry pens. Problem 2.5, page 81 of ALG(a)Den
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekProblem Set 2Wednesday, October 5, 2011Due: Wednesday, October 12, 2011Reading: Chapter 2 of Probability, Statistics, and Random Processes by A. Leon-Garcia100 points total1. Uniform Interval and Condition
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekProblem Set 2Wednesday, October 5, 2011Due: Wednesday, October 12, 2011Reading: Chapter 2 of Probability, Statistics, and Random Processes by A. Leon-Garcia100 points total1. Uniform Interval and Condition
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekProblem Set 3Wednesday, October 12, 2011Due: Wednesday, October 19, 2011Reading: Chapters 3 and 4 of Probability, Statistics, and Random Processes by A.Leon-Garcia100 points total1. Drawing dollars from a
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekProblem Set 3Wednesday, October 12, 2011Due: Wednesday, October 19, 2011Reading: Chapters 3 and 4 of Probability, Statistics, and Random Processes by A.Leon-Garcia100 points total1. Drawing dollars from a
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekProblem Set 4Wednesday, October 19, 2011Due: Wednesday, November 2, 2011Reading: Chapter 4 of Probability, Statistics, and Random Processes by A. Leon-Garcia100 points total1. CDF, PDF and median. A PDF of
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekProblem Set 4Wednesday, October 19, 2011Due: Wednesday, November 2, 2011Reading: Chapter 4 of Probability, Statistics, and Random Processes by A. Leon-Garcia100 points total1. CDF, PDF and median. A PDF of
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekProblem Set 5Wednesday, November 2, 2011Due: Wednesday, November 9, 2011Reading: Chapter 4 of Probability, Statistics, and Random Processes by A. Leon-Garcia100 points total1. Conditional probability refre
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekProblem Set 6Wednesday, November 9, 2011Due: Wednesday, November 16, 2011Reading: Chapter 5 of Probability, Statistics, and Random Processes by A. Leon-Garcia100 points total1. Coin tossing and two RVs. Pr
UCLA - EE - 132A
EE 131AProbabilityInstructor: Lara DolecekProblem Set 6Wednesday, November 9, 2011Due: Wednesday, November 16, 2011Reading: Chapter 5 of Probability, Statistics, and Random Processes by A. Leon-Garcia100 points total1. Coin tossing and two RVs. Pr