1 00:00:00,090 --> 00:00:02,490 The following content is provided under a Creative 2 00:00:02,490 --> 00:00:04,030 Commons license. 3 00:00:04,030 --> 00:00:06,330 Your support will help MIT OpenCourseWare 4 00:00:06,330 --> 00:00:10,720 continue to offer high quality educational resources for free. 5 00:00:10,720 --> 00:00:13,320 To make a donation, or view additional materials 6 00:00:13,320 --> 00:00:17,280 from hundreds of MIT courses, visit MIT OpenCourseWare 7 00:00:17,280 --> 00:00:18,450 at ocw.mit.edu. 8 00:00:25,400 --> 00:00:26,967 [MUSIC PLAYING] 9 00:00:57,360 --> 00:00:59,370 ALAN OPPENHEIM: Well, last time we 10 00:00:59,370 --> 00:01:02,640 had discussed, in a very general way, the field 11 00:01:02,640 --> 00:01:06,180 of digital signal processing, and hopefully 12 00:01:06,180 --> 00:01:08,400 one of the things that you were convinced of 13 00:01:08,400 --> 00:01:12,480 was the importance of this set of techniques 14 00:01:12,480 --> 00:01:14,230 in a general sense. 15 00:01:14,230 --> 00:01:17,400 What we'd like to begin on now is 16 00:01:17,400 --> 00:01:21,780 a discussion of some of the details of digital signal 17 00:01:21,780 --> 00:01:23,250 processing. 18 00:01:23,250 --> 00:01:26,620 And in particular, in this lecture, 19 00:01:26,620 --> 00:01:31,740 I would like to introduce the class of discrete time signals, 20 00:01:31,740 --> 00:01:36,070 and also the class of discrete time systems. 21 00:01:36,070 --> 00:01:42,330 Well, last time, I reminded you that I 22 00:01:42,330 --> 00:01:49,050 will be assuming a familiarity with continuous time signals 23 00:01:49,050 --> 00:01:50,460 and systems. 24 00:01:50,460 --> 00:01:53,580 And what you'll see as we go through this lecture-- 25 00:01:53,580 --> 00:01:56,460 and in fact, as we go through all of these lectures-- 26 00:01:56,460 --> 00:02:01,710 is a very strong similarity between the results that you're 27 00:02:01,710 --> 00:02:05,110 familiar with in the continuous time case, 28 00:02:05,110 --> 00:02:09,690 and results that will develop for the discrete time case. 29 00:02:09,690 --> 00:02:14,380 Obviously, of course, there will also be some differences. 30 00:02:14,380 --> 00:02:16,500 And these differences are important, 31 00:02:16,500 --> 00:02:18,840 and they will be important to focus on. 32 00:02:18,840 --> 00:02:23,340 So there will be a great deal of similarity, also 33 00:02:23,340 --> 00:02:24,580 a few differences. 34 00:02:24,580 --> 00:02:28,440 And these few differences are very important. 35 00:02:28,440 --> 00:02:31,200 In the discrete time domain, we're 36 00:02:31,200 --> 00:02:36,150 concerned with processing signals that are sequences. 37 00:02:36,150 --> 00:02:39,870 That is, these signals are functions of an integer 38 00:02:39,870 --> 00:02:43,650 variable, which we'll call n. 39 00:02:43,650 --> 00:02:47,730 Typically, will depict sequences graphically, 40 00:02:47,730 --> 00:02:54,570 as I've illustrated here on this first viewgraph, where I've 41 00:02:54,570 --> 00:02:57,120 denoted a general sequence-- 42 00:02:57,120 --> 00:02:59,910 which I call x of n-- 43 00:02:59,910 --> 00:03:01,890 a function of the energy variable 44 00:03:01,890 --> 00:03:08,730 n, and the sequence values, I've represented by a bar graph 45 00:03:08,730 --> 00:03:11,820 with the height of each bar corresponding 46 00:03:11,820 --> 00:03:14,340 to the sequence value. 47 00:03:14,340 --> 00:03:18,705 So we have, then, for example, at n 48 00:03:18,705 --> 00:03:23,495 equals 0, a line of height x of 0 at n 49 00:03:23,495 --> 00:03:28,380 equals 1 a line of height x of 1, et cetera. 50 00:03:28,380 --> 00:03:31,740 Of course, as I've drawn this horizontal axis, 51 00:03:31,740 --> 00:03:35,670 I've drawn it as a continuous line, 52 00:03:35,670 --> 00:03:41,550 but it's important to keep in mind that the sequences only 53 00:03:41,550 --> 00:03:42,600 are defined-- 54 00:03:42,600 --> 00:03:44,400 or only make sense-- 55 00:03:44,400 --> 00:03:47,530 for integer values of the argument. 56 00:03:47,530 --> 00:03:51,940 If n is an integer, then x of n makes sense. 57 00:03:51,940 --> 00:03:57,010 If n is not an integer, it's not just that x of n 58 00:03:57,010 --> 00:04:02,200 is 0 or something like that, it's simply that x of n 59 00:04:02,200 --> 00:04:03,470 is not defined. 60 00:04:03,470 --> 00:04:05,950 In other words, x of n makes sense, 61 00:04:05,950 --> 00:04:09,550 or is defined for n an integer, and does not make sense, 62 00:04:09,550 --> 00:04:13,940 or is not defined, if n is not an integer. 63 00:04:13,940 --> 00:04:18,279 So this, then, is a graphical representation 64 00:04:18,279 --> 00:04:21,579 of a general sequence. 65 00:04:21,579 --> 00:04:25,430 And just as in the continuous time case, 66 00:04:25,430 --> 00:04:29,680 we have a number of important basic sequences 67 00:04:29,680 --> 00:04:33,930 that we would like to focus on. 68 00:04:33,930 --> 00:04:36,480 The first of these that I'd like to introduce 69 00:04:36,480 --> 00:04:41,390 is the unit sample, or impulse sequence, 70 00:04:41,390 --> 00:04:45,850 which we'll denote by delta of n. 71 00:04:45,850 --> 00:04:48,540 The unit sample sequence is a sequence 72 00:04:48,540 --> 00:04:54,870 whose value is unity at n equals 0, and it's equal to 0 73 00:04:54,870 --> 00:04:55,800 otherwise. 74 00:04:55,800 --> 00:05:00,840 That is delta of n equals 1 at n equals 0, and delta of n 75 00:05:00,840 --> 00:05:05,660 is equal to 0 for n not equal to 0. 76 00:05:05,660 --> 00:05:09,230 The unit sample sequence plays the same role 77 00:05:09,230 --> 00:05:13,280 in the discrete time case that the unit impulse time 78 00:05:13,280 --> 00:05:16,400 function plays in the continuous time case. 79 00:05:16,400 --> 00:05:20,720 Let me just mention, however, that the unit sample sequence 80 00:05:20,720 --> 00:05:23,610 is very easily defined. 81 00:05:23,610 --> 00:05:26,900 There's no issue here about the definition. 82 00:05:26,900 --> 00:05:30,050 In contrast with the usual mathematical problems 83 00:05:30,050 --> 00:05:32,550 with a continuous time impulse-- 84 00:05:32,550 --> 00:05:37,310 which is infinitely big at the origin, and 0 every place else, 85 00:05:37,310 --> 00:05:39,650 but has some area, et cetera. 86 00:05:39,650 --> 00:05:43,790 So there's a very precise definition here of the unit 87 00:05:43,790 --> 00:05:47,570 sample, or unit impulse sequence, 88 00:05:47,570 --> 00:05:51,380 and it will play a role similar to the unit impulse time 89 00:05:51,380 --> 00:05:55,430 function in the continuous time case. 90 00:05:55,430 --> 00:06:01,310 Another important basic sequence is the unit step sequence, 91 00:06:01,310 --> 00:06:05,180 which I'm denoting by u of n. 92 00:06:05,180 --> 00:06:10,550 And the unit step sequence is equal to unity for n 93 00:06:10,550 --> 00:06:15,080 greater than or equal to 0, and is equal to 0 94 00:06:15,080 --> 00:06:18,980 for n less than 0. 95 00:06:18,980 --> 00:06:24,680 So the unit step sequence, then, is 0 for n less than 0, 96 00:06:24,680 --> 00:06:30,890 it's unity four n greater than or equal to 0. 97 00:06:30,890 --> 00:06:33,560 This shouldn't be, incidentally, less than or equal to 0, 98 00:06:33,560 --> 00:06:36,590 this should be n less than 0. 99 00:06:36,590 --> 00:06:44,300 And it is-- again, does not have the difficulties in definition 100 00:06:44,300 --> 00:06:49,170 that a continuous time unit step normally has. 101 00:06:49,170 --> 00:06:53,420 It's the change in value from n equals minus 1 to n 102 00:06:53,420 --> 00:06:57,590 equals 0 is precisely and easily defined. 103 00:06:57,590 --> 00:07:01,520 Here the unit step is 0, here the unit step is 1. 104 00:07:01,520 --> 00:07:04,850 There's no issue, as there is in the continuous time case, 105 00:07:04,850 --> 00:07:06,020 about discontinuity. 106 00:07:08,680 --> 00:07:11,100 Just as in the continuous time case, 107 00:07:11,100 --> 00:07:16,810 there is a simple relationship between the unit sample, 108 00:07:16,810 --> 00:07:20,020 or a unit impulse, and the unit step. 109 00:07:20,020 --> 00:07:22,420 In a discrete time case, there is likewise 110 00:07:22,420 --> 00:07:26,650 a simple relationship between the unit sample sequence, 111 00:07:26,650 --> 00:07:29,530 and the unit step sequence. 112 00:07:29,530 --> 00:07:33,220 In particular, the unit sample sequence 113 00:07:33,220 --> 00:07:37,210 can be obtained from the unit step sequence 114 00:07:37,210 --> 00:07:41,370 by constructing the first difference. 115 00:07:41,370 --> 00:07:44,410 The unit sample sequence, delta of n, 116 00:07:44,410 --> 00:07:48,310 is equal to u of n, the unit step, 117 00:07:48,310 --> 00:07:52,690 minus the unit step delayed by 1 sample. 118 00:07:52,690 --> 00:07:55,030 And we can see that that obviously 119 00:07:55,030 --> 00:07:59,740 is the case, if we look at the unit step sequence, u of n. 120 00:07:59,740 --> 00:08:04,000 Here we have the unit step sequence delayed by 1-- 121 00:08:04,000 --> 00:08:08,132 so this occurs at n equals 0, this is n equals 1. 122 00:08:08,132 --> 00:08:11,520 And clearly, the difference between those two 123 00:08:11,520 --> 00:08:15,910 will generate a sample at n equals 0, 0, of course, 124 00:08:15,910 --> 00:08:21,250 for n less than 0, and 0, likewise, for n greater than 0, 125 00:08:21,250 --> 00:08:24,640 because these sequence values will be canceled out 126 00:08:24,640 --> 00:08:26,740 by those sequence values. 127 00:08:26,740 --> 00:08:32,230 So the unit sample sequence is the unit step minus the delayed 128 00:08:32,230 --> 00:08:35,110 unit step, or the unit sample sequence 129 00:08:35,110 --> 00:08:40,150 is equal to the first difference of the unit step sequence. 130 00:08:40,150 --> 00:08:43,929 Similarly, we can obtain the unit step sequence 131 00:08:43,929 --> 00:08:50,190 from the unit sample sequence by constructing a running sum. 132 00:08:50,190 --> 00:08:53,950 In particular, the unit step sequence 133 00:08:53,950 --> 00:08:59,980 is equal to a running sum of the unit sample sequence. 134 00:08:59,980 --> 00:09:02,650 In other words, we're constructing here a sum 135 00:09:02,650 --> 00:09:08,750 from k equals minus infinity to the independent variable n 136 00:09:08,750 --> 00:09:12,280 of the sequence, delta of k. 137 00:09:12,280 --> 00:09:16,060 Here we have the sequence, delta of k. 138 00:09:16,060 --> 00:09:22,000 If n is less than 0, then we're adding up sequence values 139 00:09:22,000 --> 00:09:27,160 from minus infinity to some negative value of k. 140 00:09:27,160 --> 00:09:29,500 And the only values that we collect when we 141 00:09:29,500 --> 00:09:32,230 do that are values equal to 0. 142 00:09:32,230 --> 00:09:38,770 So for n less than 0, we see that we obtain 0 for this sum. 143 00:09:38,770 --> 00:09:44,140 If n is greater than 0, as I've indicated here, then the sum, 144 00:09:44,140 --> 00:09:48,490 as we collect sequence values from minus infinity up to n, 145 00:09:48,490 --> 00:09:53,440 we collect 1 non-0 sequence value which is equal to 1. 146 00:09:53,440 --> 00:09:56,110 Consequently for n greater than 0, 147 00:09:56,110 --> 00:10:00,790 we obtain, in this running sum, u of n equal to 1. 148 00:10:00,790 --> 00:10:03,130 This plays a role, this running sum 149 00:10:03,130 --> 00:10:07,690 plays a role, similar to the integral in the continuous time 150 00:10:07,690 --> 00:10:08,720 case. 151 00:10:08,720 --> 00:10:11,020 And so now we have a relationship 152 00:10:11,020 --> 00:10:12,970 between the unit sample sequence, 153 00:10:12,970 --> 00:10:16,250 and the unit step sequence. 154 00:10:16,250 --> 00:10:18,490 There are other basic sequences that 155 00:10:18,490 --> 00:10:21,430 will play an important role, just as they 156 00:10:21,430 --> 00:10:25,660 do in the continuous time case. 157 00:10:25,660 --> 00:10:32,110 In particular, we have the real exponential sequence. 158 00:10:32,110 --> 00:10:38,560 The sequence x of n is equal to alpha to the n. 159 00:10:38,560 --> 00:10:42,040 I've depicted the exponential sequence here 160 00:10:42,040 --> 00:10:48,040 for the case in which alpha is positive but less than unity, 161 00:10:48,040 --> 00:10:53,710 so that as n increases, the exponential decreases. 162 00:10:53,710 --> 00:10:57,910 So alpha to the n, if alpha is between 0 and 1, 163 00:10:57,910 --> 00:11:00,280 decreases with increasing n. 164 00:11:00,280 --> 00:11:03,910 If alpha is greater than 1, then the exponential sequence 165 00:11:03,910 --> 00:11:07,660 grows, of course, exponentially. 166 00:11:07,660 --> 00:11:12,640 We have, also, the sinusoidal sequence. 167 00:11:12,640 --> 00:11:15,220 The general form of the sinusoidal sequence 168 00:11:15,220 --> 00:11:21,730 is x of n is equal to a cosine omega 0 n plus phi-- 169 00:11:21,730 --> 00:11:27,100 phi a phase angle, omega 0 we'll refer to as the frequency, a, 170 00:11:27,100 --> 00:11:29,500 of course, is the amplitude. 171 00:11:29,500 --> 00:11:33,640 I've illustrated a sinusoidal sequence here 172 00:11:33,640 --> 00:11:35,890 for a particular choice of omega 0 173 00:11:35,890 --> 00:11:39,310 and phi, namely omega 0 equal to pi over 4, 174 00:11:39,310 --> 00:11:42,580 and phi equal minus pi over 8. 175 00:11:42,580 --> 00:11:49,990 And in looking at this, we see that we get a periodic sequence 176 00:11:49,990 --> 00:11:52,420 that is, for this choice of parameters, 177 00:11:52,420 --> 00:11:55,390 this sequence is periodic. 178 00:11:55,390 --> 00:11:57,250 However, an important distinction 179 00:11:57,250 --> 00:12:01,330 between the continuous time case and the discrete time case, 180 00:12:01,330 --> 00:12:06,310 is that a discrete time sinusoidal signal is not 181 00:12:06,310 --> 00:12:09,070 necessarily periodic. 182 00:12:09,070 --> 00:12:11,260 Particular, I've illustrated here 183 00:12:11,260 --> 00:12:15,130 another sinusoidal sequence with a different choice 184 00:12:15,130 --> 00:12:17,560 for omega 0 and phi. 185 00:12:17,560 --> 00:12:22,840 In this case, omega 0 equal to 3 pi over 7. 186 00:12:22,840 --> 00:12:25,120 With that choice of omega 0, these 187 00:12:25,120 --> 00:12:27,760 are the sequence values we obtain. 188 00:12:27,760 --> 00:12:31,990 And it should be obvious by examining this sequence 189 00:12:31,990 --> 00:12:35,170 that this sequence is no longer periodic, 190 00:12:35,170 --> 00:12:37,930 whereas this sequence was. 191 00:12:37,930 --> 00:12:42,190 So the sinusoidal sequence may or may not be periodic. 192 00:12:42,190 --> 00:12:46,780 Of course, let me remind you that if n was allowed to vary 193 00:12:46,780 --> 00:12:49,780 continuously-- if it was not an integer variable-- 194 00:12:49,780 --> 00:12:52,290 x of n would be periodic. 195 00:12:52,290 --> 00:12:56,800 The periodicity is lost because n is now constrained 196 00:12:56,800 --> 00:12:59,710 to be an integer variable. 197 00:12:59,710 --> 00:13:02,440 And that is one of the important distinctions 198 00:13:02,440 --> 00:13:06,310 between continuous time signals and systems, and discrete time 199 00:13:06,310 --> 00:13:08,500 signals and systems. 200 00:13:08,500 --> 00:13:13,120 Another point which I'll suggest now, 201 00:13:13,120 --> 00:13:17,020 although it's a point that I'll want to refer to 202 00:13:17,020 --> 00:13:21,400 in more detail in some of the future lectures, 203 00:13:21,400 --> 00:13:31,480 is that the sinusoidal sequence is only distinguishable 204 00:13:31,480 --> 00:13:37,240 as omega 0 runs from over the range 0 to 2 pi 205 00:13:37,240 --> 00:13:40,060 or minus pi to pi. 206 00:13:40,060 --> 00:13:45,340 If omega 0-- if we were to replace omega 0 by omega 0 207 00:13:45,340 --> 00:13:50,830 plus 2 pi, then we would have in this argument omega 0 n plus 208 00:13:50,830 --> 00:13:52,180 2 pi n. 209 00:13:52,180 --> 00:13:54,370 The 2 pi n, of course, would have no effect, 210 00:13:54,370 --> 00:13:56,480 and we'd end up with the same sequence. 211 00:13:56,480 --> 00:14:01,590 So in fact as, we varied omega 0 between minus pi and plus pi, 212 00:14:01,590 --> 00:14:06,820 you will have seen all of the sinusoidal sequences 213 00:14:06,820 --> 00:14:08,830 with this amplitude and this phase 214 00:14:08,830 --> 00:14:12,820 that we can possibly generate. 215 00:14:12,820 --> 00:14:20,020 One of the important of this set of basic signals 216 00:14:20,020 --> 00:14:24,850 is that they can be used to represent a more general class 217 00:14:24,850 --> 00:14:28,880 of signals, just as in the continuous time case, 218 00:14:28,880 --> 00:14:33,040 we use impulses, or we use complex exponentials, 219 00:14:33,040 --> 00:14:37,570 or we use sinusoids to represent very general signals, 220 00:14:37,570 --> 00:14:41,500 we can develop similar representations here. 221 00:14:41,500 --> 00:14:47,050 Let me illustrate this with an example where 222 00:14:47,050 --> 00:14:55,440 I consider a general sequence here, x of n. 223 00:14:55,440 --> 00:15:01,180 The sequence values are x of 0, x of 1, x of 2, et cetera. 224 00:15:01,180 --> 00:15:05,860 And I mean to suggest here a very general sequence. 225 00:15:05,860 --> 00:15:10,360 Now, I can decompose this sequence 226 00:15:10,360 --> 00:15:16,590 into a linear combination of weighted, delayed unit 227 00:15:16,590 --> 00:15:20,920 samples, unit sample sequences, by simply 228 00:15:20,920 --> 00:15:24,910 extracting individual sequence values out of x of n. 229 00:15:24,910 --> 00:15:29,420 For example, let's consider the sequence 230 00:15:29,420 --> 00:15:34,340 x of 0 times delta of n, as I've illustrated here. 231 00:15:34,340 --> 00:15:38,890 X of 0 times delta of n is equal to the original sequence 232 00:15:38,890 --> 00:15:43,600 x of n at n equals 0, and it's equal to 0 otherwise. 233 00:15:46,290 --> 00:15:50,860 A second sequence, x of 1 times delta of n minus 1, 234 00:15:50,860 --> 00:15:55,510 is a unit sample sequence, delayed by 1 235 00:15:55,510 --> 00:15:58,600 and having an amplitude equal to x of 1. 236 00:15:58,600 --> 00:16:03,100 So this sequence is equal to this one at n equals 1, 237 00:16:03,100 --> 00:16:05,320 and it's equal to 0, otherwise. 238 00:16:05,320 --> 00:16:07,960 The sum of these two, of course, is 239 00:16:07,960 --> 00:16:14,020 equal to this x of n at these two values, and equal to 0, 240 00:16:14,020 --> 00:16:15,100 otherwise. 241 00:16:15,100 --> 00:16:19,660 Similarly, we can consider x of minus 1 times 242 00:16:19,660 --> 00:16:21,890 delta of n plus 1. 243 00:16:21,890 --> 00:16:24,820 That's a unit sample at n equals minus 1, 244 00:16:24,820 --> 00:16:28,070 with an amplitude of x of minus 1, 245 00:16:28,070 --> 00:16:31,060 which picks up this sequence value. 246 00:16:31,060 --> 00:16:37,600 x of minus 2 times delta of n plus 2 is a unit sample at n 247 00:16:37,600 --> 00:16:42,650 equals minus 2 multiplied by an amplitude x of minus 2, 248 00:16:42,650 --> 00:16:47,450 which picks up this sequence value, et cetera. 249 00:16:47,450 --> 00:16:52,870 So I think you can see, then, that as we add these up, 250 00:16:52,870 --> 00:16:57,710 what we'll generate is this arbitrary sequence, x of n. 251 00:16:57,710 --> 00:17:03,490 In other words, we can construct x of n, an arbitrary sequence, 252 00:17:03,490 --> 00:17:09,060 as a linear combination of weighted delayed unit samples-- 253 00:17:09,060 --> 00:17:15,700 x of 0 times delta of n plus x of 1 times delta of n minus 1 254 00:17:15,700 --> 00:17:19,060 plus x of minus 1 delta n plus 1, et cetera. 255 00:17:19,060 --> 00:17:22,710 Or, more generally, the sum from k 256 00:17:22,710 --> 00:17:27,640 equals minus infinity to plus infinity of x of k times 257 00:17:27,640 --> 00:17:30,010 delta of n minus k. 258 00:17:30,010 --> 00:17:36,490 This, then, corresponds to a general representation 259 00:17:36,490 --> 00:17:41,320 of an arbitrary sequence in terms of weighted delayed unit 260 00:17:41,320 --> 00:17:42,740 samples. 261 00:17:42,740 --> 00:17:46,600 And it's a representation that we'll want to refer back to 262 00:17:46,600 --> 00:17:47,980 in a few minutes. 263 00:17:47,980 --> 00:17:51,400 It's not, as I've indicated, the only representation 264 00:17:51,400 --> 00:17:53,490 of arbitrary sequences-- 265 00:17:53,490 --> 00:17:56,230 we'll also be developing representations 266 00:17:56,230 --> 00:17:58,450 in terms of complex exponentials, 267 00:17:58,450 --> 00:18:03,700 or real exponentials, or in terms of sines and cosines. 268 00:18:03,700 --> 00:18:12,760 OK, that is an introduction to the basic class of signals 269 00:18:12,760 --> 00:18:14,800 and the notion of sequences. 270 00:18:14,800 --> 00:18:19,540 What I'd like to do now is focus on the class of discrete time 271 00:18:19,540 --> 00:18:23,800 systems, and then refer back to some of these results 272 00:18:23,800 --> 00:18:25,840 to develop a general representation 273 00:18:25,840 --> 00:18:28,555 for a special class of discrete time systems. 274 00:18:35,160 --> 00:18:41,560 First of all, let me begin with a general system, which 275 00:18:41,560 --> 00:18:47,540 is a discrete time system that has an input-- 276 00:18:47,540 --> 00:18:50,200 which is a sequence x of n. 277 00:18:50,200 --> 00:18:53,680 It has an output, which is a sequence y of n. 278 00:18:53,680 --> 00:18:56,150 And it has a system transformation, 279 00:18:56,150 --> 00:19:00,760 which I've denoted by T. Of course, there isn't much 280 00:19:00,760 --> 00:19:03,850 that you can do with a general system-- 281 00:19:03,850 --> 00:19:07,960 the difficulty with trying to describe a general system 282 00:19:07,960 --> 00:19:10,450 in general is that there are no properties 283 00:19:10,450 --> 00:19:12,920 that you can take advantage of. 284 00:19:12,920 --> 00:19:16,240 So always, in characterizing systems, 285 00:19:16,240 --> 00:19:19,630 it's useful to specialize the class of systems-- 286 00:19:19,630 --> 00:19:22,060 that is, impose properties on the system which 287 00:19:22,060 --> 00:19:25,330 you can exploit to represent the system, 288 00:19:25,330 --> 00:19:28,930 or to implement the system, et cetera. 289 00:19:28,930 --> 00:19:31,900 The special class that we'll want to consider 290 00:19:31,900 --> 00:19:36,250 is the class of systems which are, first of all, linear. 291 00:19:36,250 --> 00:19:40,210 And second of all, shift invariant. 292 00:19:40,210 --> 00:19:44,650 And this class corresponds, in the continuous time case, 293 00:19:44,650 --> 00:19:47,140 to the class of systems that we normally 294 00:19:47,140 --> 00:19:50,470 refer to as linear and time invariant. 295 00:19:50,470 --> 00:19:53,700 We'll tend to refer to these as linear and shift invariant, 296 00:19:53,700 --> 00:20:00,700 and for a shorthand notation, just express this as well LSI. 297 00:20:00,700 --> 00:20:03,610 When I refer to an LSI system, what I mean 298 00:20:03,610 --> 00:20:07,180 is a system that is linear and shift invariant. 299 00:20:07,180 --> 00:20:09,740 Well, let's define these terms. 300 00:20:09,740 --> 00:20:11,530 First of all, linearity. 301 00:20:14,170 --> 00:20:18,690 Linearity states that if I excite 302 00:20:18,690 --> 00:20:24,750 the system with a sequence x 1 of n, and I get at the output 303 00:20:24,750 --> 00:20:30,120 a sequence y 1 of n, and if I excite with x 2 of n, 304 00:20:30,120 --> 00:20:37,470 and get at the output y 2 of n, then the condition of linearity 305 00:20:37,470 --> 00:20:43,530 is that the linear combination, a x 1 of n plus b x 2 of n, 306 00:20:43,530 --> 00:20:48,570 produces at the output a y1 of n plus b y 2 of n. 307 00:20:48,570 --> 00:20:53,630 That is, the response of the system to a sum of inputs, 308 00:20:53,630 --> 00:20:55,860 or a linear combination of inputs, 309 00:20:55,860 --> 00:21:00,130 is a linear combination of the corresponding outputs. 310 00:21:00,130 --> 00:21:04,230 Now, by repeated application of just this statement, 311 00:21:04,230 --> 00:21:07,120 we can make a more general statement, 312 00:21:07,120 --> 00:21:14,910 which is that the sum of a sub k times x sub k of n produces, 313 00:21:14,910 --> 00:21:24,090 as an output, the sum of a sub k times y sub k of n. 314 00:21:24,090 --> 00:21:28,050 Linearity is stated here, of course, for two inputs, 315 00:21:28,050 --> 00:21:32,730 but we can obviously extend that to an arbitrary number 316 00:21:32,730 --> 00:21:36,360 of inputs so that the statement of linearity, as we'll 317 00:21:36,360 --> 00:21:39,300 refer to it, will generally be that 318 00:21:39,300 --> 00:21:43,260 a general linear combination of inputs produces, at the output, 319 00:21:43,260 --> 00:21:47,820 the same linear combination of the corresponding outputs. 320 00:21:47,820 --> 00:21:51,630 So that's the condition of linearity. 321 00:21:51,630 --> 00:21:53,460 The second condition that we want 322 00:21:53,460 --> 00:21:56,040 to impose on our class of systems 323 00:21:56,040 --> 00:21:58,880 is the condition of shift invariance. 324 00:21:58,880 --> 00:22:05,630 What shift invariance says, simply, is that if x of n 325 00:22:05,630 --> 00:22:10,680 produces y of n, then x of n minus n 0 326 00:22:10,680 --> 00:22:13,710 produces y of n minus n 0. 327 00:22:13,710 --> 00:22:17,160 It's basically a statement that the system doesn't particularly 328 00:22:17,160 --> 00:22:20,460 care what you call n equals 0. 329 00:22:20,460 --> 00:22:24,120 In other words, if we shift the input in n, 330 00:22:24,120 --> 00:22:25,830 we shift the output in n. 331 00:22:25,830 --> 00:22:28,740 It's exactly like the condition of time invariance 332 00:22:28,740 --> 00:22:30,000 in the continuous time case. 333 00:22:32,570 --> 00:22:37,920 For example, if we excited the system with a unit sample, 334 00:22:37,920 --> 00:22:40,985 to get the unit sample response, h 335 00:22:40,985 --> 00:22:46,490 of n, then the response of the system, if the system is shift 336 00:22:46,490 --> 00:22:49,340 invariant, to a delayed unit sample 337 00:22:49,340 --> 00:22:54,150 is the delayed version of the unit sample response. 338 00:22:54,150 --> 00:22:56,390 So this is shift invariance. 339 00:22:56,390 --> 00:22:58,460 We had the condition of linearity. 340 00:22:58,460 --> 00:23:00,810 These are two independent conditions 341 00:23:00,810 --> 00:23:03,020 which we'll now want to put together 342 00:23:03,020 --> 00:23:07,310 to develop a general representation for linear shift 343 00:23:07,310 --> 00:23:10,200 invariant systems. 344 00:23:10,200 --> 00:23:14,990 Well, let me remind you from the last viewgraph 345 00:23:14,990 --> 00:23:19,820 that we had looked at, that we had a general representation 346 00:23:19,820 --> 00:23:25,040 for a sequence in terms of weighted delayed units samples. 347 00:23:25,040 --> 00:23:30,180 That is, previously we had developed a representation, 348 00:23:30,180 --> 00:23:35,510 x of n, of this form, which expresses an arbitrary 349 00:23:35,510 --> 00:23:40,370 sequence in terms of weighted delayed unit samples. 350 00:23:40,370 --> 00:23:43,370 Well, this, then, says that x of n 351 00:23:43,370 --> 00:23:48,260 is expressed as a linear combination of basic inputs, 352 00:23:48,260 --> 00:23:53,210 and if we restrict ourselves to linear systems, 353 00:23:53,210 --> 00:23:59,870 then the output must correspond to the same linear combination 354 00:23:59,870 --> 00:24:02,000 of the corresponding outputs. 355 00:24:02,000 --> 00:24:07,910 Well, delta of n minus k into a linear shift invariant system 356 00:24:07,910 --> 00:24:13,160 will produce, at the output, by virtue 357 00:24:13,160 --> 00:24:18,380 of the property of shift invariance, the sequence 358 00:24:18,380 --> 00:24:21,500 h of n minus k. 359 00:24:21,500 --> 00:24:25,840 And the linear combination of these delayed unit 360 00:24:25,840 --> 00:24:30,380 samples will produce at the output, by virtue of linearity, 361 00:24:30,380 --> 00:24:38,000 the same linear combination of the responses 362 00:24:38,000 --> 00:24:40,130 to delta of n minus k. 363 00:24:40,130 --> 00:24:45,200 So if we consider a linear shift invariant system, and because 364 00:24:45,200 --> 00:24:48,110 of this representation, we can say 365 00:24:48,110 --> 00:24:52,190 that the response due to an arbitrary input 366 00:24:52,190 --> 00:24:58,550 is equal to a linear combination of delayed unit sample 367 00:24:58,550 --> 00:24:59,900 responses. 368 00:24:59,900 --> 00:25:02,067 Where, in general, this is a sum from k 369 00:25:02,067 --> 00:25:05,990 equals minus infinity to plus infinity. 370 00:25:05,990 --> 00:25:08,450 Well, this is the key result-- 371 00:25:08,450 --> 00:25:11,480 this is a statement that says that if we 372 00:25:11,480 --> 00:25:14,750 talk about linear shift invariant systems, 373 00:25:14,750 --> 00:25:17,480 then all that we need to know about the system 374 00:25:17,480 --> 00:25:21,980 to characterize it is its response to a unit sample. 375 00:25:21,980 --> 00:25:24,410 If we have its response to a unit sample, 376 00:25:24,410 --> 00:25:27,620 we can construct y of n in general-- 377 00:25:27,620 --> 00:25:30,980 that is, we can construct the output for an arbitrary 378 00:25:30,980 --> 00:25:32,000 input, x of k. 379 00:25:34,670 --> 00:25:40,150 This is generally referred to as the convolution sum. 380 00:25:40,150 --> 00:25:44,750 In analogy with the convolution integral in the continuous time 381 00:25:44,750 --> 00:25:49,880 case, this is one way of writing the convolution sum. 382 00:25:49,880 --> 00:25:53,450 There is an alternative, which is 383 00:25:53,450 --> 00:25:57,350 interesting in that it suggests some important properties 384 00:25:57,350 --> 00:25:59,810 of linear shift invariant systems, 385 00:25:59,810 --> 00:26:01,790 and it's obtained simply by applying 386 00:26:01,790 --> 00:26:05,120 a substitution of variables to this expression. 387 00:26:05,120 --> 00:26:10,970 In particular, suppose that we replace n minus k 388 00:26:10,970 --> 00:26:16,880 by the variable r, or equivalently, k 389 00:26:16,880 --> 00:26:20,510 is equal to n minus r. 390 00:26:20,510 --> 00:26:27,050 Then what we obtain is y of n is now equal to a sum-- 391 00:26:27,050 --> 00:26:29,480 and this is now a sum on r. 392 00:26:29,480 --> 00:26:31,400 For k, we have n minus r. 393 00:26:31,400 --> 00:26:36,416 So this is x of n minus r times h 394 00:26:36,416 --> 00:26:41,030 of n minus k, which is equal to r. 395 00:26:41,030 --> 00:26:44,060 So this h of r. 396 00:26:44,060 --> 00:26:46,790 Well, it's a simple step to take, 397 00:26:46,790 --> 00:26:52,730 but in fact, what it says is that the system doesn't 398 00:26:52,730 --> 00:26:57,560 particularly care what you call the input to the system, 399 00:26:57,560 --> 00:27:01,780 and what you call the unit sample response of the system. 400 00:27:01,780 --> 00:27:07,760 Said another way, it says that convolution is commutative-- 401 00:27:07,760 --> 00:27:12,380 that is, if we represent the convolution of x of n 402 00:27:12,380 --> 00:27:16,220 with h of n with an asterisk, then, 403 00:27:16,220 --> 00:27:19,730 because of the fact that we were able to interchange 404 00:27:19,730 --> 00:27:23,120 the roles of x of n and h of n, that implies, 405 00:27:23,120 --> 00:27:27,020 essentially, that x of n convolved with h o n 406 00:27:27,020 --> 00:27:31,940 is the same thing as h of n convolved with x of n. 407 00:27:31,940 --> 00:27:35,450 That implies, as I indicated, that if we 408 00:27:35,450 --> 00:27:39,890 had a system with an impulse response or unit sample 409 00:27:39,890 --> 00:27:46,670 response, h of n, and input x of n, and output y of n, 410 00:27:46,670 --> 00:27:50,840 that if I call this the input, and I call this the unit sample 411 00:27:50,840 --> 00:27:51,950 response-- 412 00:27:51,950 --> 00:27:53,690 as I've done here-- 413 00:27:53,690 --> 00:27:55,220 we obtain the same output. 414 00:27:55,220 --> 00:27:59,960 That is, h of n into a system with unit sample response, x 415 00:27:59,960 --> 00:28:05,600 of n, gives us at the output, y of n, also. 416 00:28:05,600 --> 00:28:10,190 An implication of that is that linear shift invariant systems 417 00:28:10,190 --> 00:28:15,050 in cascade don't particularly care which order 418 00:28:15,050 --> 00:28:17,300 the systems are cascaded in. 419 00:28:17,300 --> 00:28:21,470 That is, if I have a system h 1 of n-- 420 00:28:21,470 --> 00:28:24,360 that is with unit sample response, h 1 of n-- 421 00:28:24,360 --> 00:28:30,710 and cascade with a system with unit sample response h 2 of n, 422 00:28:30,710 --> 00:28:34,550 and input x of n, the unit sample 423 00:28:34,550 --> 00:28:37,480 response of this overall system is h 1 424 00:28:37,480 --> 00:28:41,090 of n convolved with h 2 of n. 425 00:28:41,090 --> 00:28:43,250 But since convolution is commutative, 426 00:28:43,250 --> 00:28:46,700 we could just as easily convolve h 2 with h 1, 427 00:28:46,700 --> 00:28:52,340 and that corresponds to a cascade of the system h 2 of n 428 00:28:52,340 --> 00:28:54,380 with the system h 1 of n. 429 00:28:54,380 --> 00:28:58,400 So simply because of the fact that convolution 430 00:28:58,400 --> 00:29:06,010 is commutative, that implies that, for example, 431 00:29:06,010 --> 00:29:09,860 that linear shift invariant systems in cascade 432 00:29:09,860 --> 00:29:13,720 don't particularly care in which order their cascaded. 433 00:29:13,720 --> 00:29:16,420 There are lots of other properties of convolution 434 00:29:16,420 --> 00:29:20,200 and simple properties of linear shift invariant systems 435 00:29:20,200 --> 00:29:24,910 that are a direct consequence of convolution, 436 00:29:24,910 --> 00:29:28,300 and some of the properties that we've mentioned of convolution. 437 00:29:28,300 --> 00:29:32,470 And a number of these, we'll see in the lectures as we go along, 438 00:29:32,470 --> 00:29:35,290 and also a number of them you'll have a chance 439 00:29:35,290 --> 00:29:39,780 to wrestle with in the study guide. 440 00:29:39,780 --> 00:29:45,790 OK, so this is a development of the convolution sum. 441 00:29:45,790 --> 00:29:50,500 One of the important aspects of the convolution sum 442 00:29:50,500 --> 00:29:54,970 is the steps involved in actually computing it-- 443 00:29:54,970 --> 00:29:59,650 that is, the manipulations involved in forming this sum. 444 00:29:59,650 --> 00:30:03,410 And as the last point that I'd like to make in this lecture, 445 00:30:03,410 --> 00:30:10,000 I'd like to illustrate, first with a viewgraph, and then 446 00:30:10,000 --> 00:30:14,740 with a movie, the computation, or the implementation, 447 00:30:14,740 --> 00:30:16,600 of the convolution sum. 448 00:30:16,600 --> 00:30:19,600 So let's return to the viewgraph. 449 00:30:30,850 --> 00:30:36,550 And I've indicated here, again, the convolution sum as-- 450 00:30:36,550 --> 00:30:41,980 we've derived it-- y of n is the sum of x of k h of n minus k. 451 00:30:41,980 --> 00:30:44,890 Now, in implementing the convolution sum, 452 00:30:44,890 --> 00:30:50,590 let me stress that it is for n, which 453 00:30:50,590 --> 00:30:52,540 is the independent variable for which 454 00:30:52,540 --> 00:30:54,370 we are computing the output-- 455 00:30:54,370 --> 00:30:58,090 that is, k is just simply a dummy variable 456 00:30:58,090 --> 00:31:00,670 inside this summation. 457 00:31:00,670 --> 00:31:06,160 Well, I've illustrated here, for a specific example, a sequence, 458 00:31:06,160 --> 00:31:12,070 x of k, which is a constant from 0 to I 459 00:31:12,070 --> 00:31:18,610 guess n equals 10, equal to unity for n equals 0 to 10, 460 00:31:18,610 --> 00:31:20,660 and 0 otherwise. 461 00:31:20,660 --> 00:31:24,310 And I've indicated the sequence a little differently here than 462 00:31:24,310 --> 00:31:28,120 I had previously, since I want to distinguish between 463 00:31:28,120 --> 00:31:30,610 the x's, h's, and the y's. 464 00:31:30,610 --> 00:31:35,020 The sequence x of k, I'm denoting with little x's-- 465 00:31:35,020 --> 00:31:38,350 the sequence h, I'll denote note with little h's, and later 466 00:31:38,350 --> 00:31:42,190 on, the sequence y, we'll denote with little y's. 467 00:31:42,190 --> 00:31:48,790 All right, so here we have the sequence a, that's this one. 468 00:31:48,790 --> 00:31:53,530 And plotted as a function of k. 469 00:31:53,530 --> 00:31:57,130 Here, I have the sequence, h of k, 470 00:31:57,130 --> 00:31:59,710 which I've chosen to be an exponential for k 471 00:31:59,710 --> 00:32:03,460 greater than 0, and 0 for k less than 0. 472 00:32:03,460 --> 00:32:07,360 But it's not h of k that we want in this sum. 473 00:32:07,360 --> 00:32:09,840 It's h of n minus k. 474 00:32:09,840 --> 00:32:10,930 And what's n? 475 00:32:10,930 --> 00:32:14,470 Well, n is whatever value of the output sequence 476 00:32:14,470 --> 00:32:16,340 we're trying to compute. 477 00:32:16,340 --> 00:32:20,000 So if n was equal to 0, for example, 478 00:32:20,000 --> 00:32:23,680 we would want the sequence, h of 0 minus k. 479 00:32:23,680 --> 00:32:25,880 And that's this sequence. 480 00:32:25,880 --> 00:32:32,410 It's h of k, flipped around in k, because of this minus sign, 481 00:32:32,410 --> 00:32:34,300 and not shifted one way or the other 482 00:32:34,300 --> 00:32:36,890 simply because we have a 0 here. 483 00:32:36,890 --> 00:32:40,870 So here's h of k, but that's not what you want. 484 00:32:40,870 --> 00:32:44,260 It's h of 0 minus k. 485 00:32:44,260 --> 00:32:50,140 And now to compute y of 0, we would multiply this sequence 486 00:32:50,140 --> 00:32:54,400 by this one, and compute the sum from minus infinity 487 00:32:54,400 --> 00:32:55,720 to plus infinity. 488 00:32:55,720 --> 00:32:58,810 That would give us the value, y of 0. 489 00:32:58,810 --> 00:33:01,330 For a different value of n, we would 490 00:33:01,330 --> 00:33:05,290 have to look at h of n minus k, for whichever value of n 491 00:33:05,290 --> 00:33:06,960 we were computing this for. 492 00:33:06,960 --> 00:33:10,660 For example, if n is equal to minus 4, 493 00:33:10,660 --> 00:33:14,830 the sequence that we want is h of minus 4 minus k, 494 00:33:14,830 --> 00:33:19,930 and that is this sequence shifted to the left by 4. 495 00:33:19,930 --> 00:33:24,190 So to compute y of minus 4, we want 496 00:33:24,190 --> 00:33:28,060 this sequence multiplied by this one, 497 00:33:28,060 --> 00:33:31,570 and the sum computed from minus infinity to plus infinity. 498 00:33:31,570 --> 00:33:34,960 And you can see, obviously, for that particular case-- 499 00:33:34,960 --> 00:33:37,750 that is n equal to minus 4-- 500 00:33:37,750 --> 00:33:40,300 the product of this and this is 0, 501 00:33:40,300 --> 00:33:41,730 and the sum will be equal to 0. 502 00:33:41,730 --> 00:33:49,180 Well, let's look at this example a little more dynamically, 503 00:33:49,180 --> 00:33:54,370 with a movie that was prepared at Bell Telephone Laboratories 504 00:33:54,370 --> 00:33:55,610 by Dr. Ronald Shaefer. 505 00:34:06,710 --> 00:34:08,630 OK, the convolution sum, then, we 506 00:34:08,630 --> 00:34:12,469 have is the sum of x of k, h of n minus k. 507 00:34:12,469 --> 00:34:15,110 And so what we would like to illustrate 508 00:34:15,110 --> 00:34:19,370 is the operation of evaluating this sum. 509 00:34:19,370 --> 00:34:21,770 On the top, we have x of k. 510 00:34:21,770 --> 00:34:26,300 On the bottom we have h of k-- he of k being an exponential. 511 00:34:26,300 --> 00:34:31,909 And now, we see h of minus k, namely h of k flipped over. 512 00:34:31,909 --> 00:34:35,489 As we shift h of k to the left, corresponding to n 513 00:34:35,489 --> 00:34:42,969 equals minus 1, then back to 0, and now to the right. 514 00:34:42,969 --> 00:34:45,929 So we have h of 1 minus k. 515 00:34:45,929 --> 00:34:51,570 And then to 4 y of n, we want the product of h of minus k 516 00:34:51,570 --> 00:34:55,110 shifted with x of k, that product sum 517 00:34:55,110 --> 00:34:58,360 from minus infinity to plus infinity. 518 00:34:58,360 --> 00:35:02,880 So here, we see x of k times h of 1 minus k, 2 519 00:35:02,880 --> 00:35:06,300 minus k, 3 minus k, et cetera. 520 00:35:06,300 --> 00:35:08,880 Those multiplied and then summed from minus infinity 521 00:35:08,880 --> 00:35:12,980 to plus infinity, we see during this portion 522 00:35:12,980 --> 00:35:14,400 that more and more values of h are 523 00:35:14,400 --> 00:35:17,730 engaged with non-0 values of x, and so y of n 524 00:35:17,730 --> 00:35:21,720 grows until we reach the point where values fall off 525 00:35:21,720 --> 00:35:28,320 the end of the non-0 values of x, where y of n decays. 526 00:35:28,320 --> 00:35:31,410 So this, then, is an illustration 527 00:35:31,410 --> 00:35:36,660 of the linear convolution of x of k with h of k. 528 00:35:40,830 --> 00:35:43,850 OK, this completes our introduction 529 00:35:43,850 --> 00:35:47,150 to discrete time signals and systems. 530 00:35:47,150 --> 00:35:50,480 There were a number of important points 531 00:35:50,480 --> 00:35:53,010 that we've made during this lecture. 532 00:35:53,010 --> 00:35:56,990 But the key result, and the result 533 00:35:56,990 --> 00:36:00,290 that it's important to develop some experience with, 534 00:36:00,290 --> 00:36:03,140 is the convolution sum. 535 00:36:03,140 --> 00:36:07,490 Next time, we'll introduce some additional considerations, 536 00:36:07,490 --> 00:36:11,510 namely the considerations of stability and causality 537 00:36:11,510 --> 00:36:13,760 for discrete time systems. 538 00:36:13,760 --> 00:36:17,960 And we'll also discuss, briefly, the class of linear shift 539 00:36:17,960 --> 00:36:21,410 invariant systems that are represented 540 00:36:21,410 --> 00:36:25,320 by linear constant coefficient difference equations. 541 00:36:25,320 --> 00:36:29,220 Finally, we'll try to tie some of this together 542 00:36:29,220 --> 00:36:33,770 and in particular, present what will be called the frequency 543 00:36:33,770 --> 00:36:35,660 response of the systems. 544 00:36:35,660 --> 00:36:38,360 And this will eventually lead into a discussion 545 00:36:38,360 --> 00:36:40,146 of Fourier transforms. 546 00:36:40,146 --> 00:36:41,138 Thank you. 547 00:36:42,626 --> 00:36:45,364 [MUSIC PLAYING]