1 00:00:00,000 --> 00:00:02,490 The following content is provided under a Creative 2 00:00:02,490 --> 00:00:04,059 Commons license. 3 00:00:04,059 --> 00:00:06,360 Your support will help MIT OpenCourseWare 4 00:00:06,360 --> 00:00:10,720 continue to offer high quality educational resources for free. 5 00:00:10,720 --> 00:00:13,350 To make a donation or view additional materials 6 00:00:13,350 --> 00:00:17,290 from hundreds of MIT courses, visit MIT OpenCourseWare 7 00:00:17,290 --> 00:00:18,294 at ocw.mit.edu. 8 00:00:26,652 --> 00:00:28,360 PROFESSOR: So today I'm going to continue 9 00:00:28,360 --> 00:00:30,820 with frequency response and filtering, 10 00:00:30,820 --> 00:00:36,260 but also begin the story of spectral content of signals. 11 00:00:36,260 --> 00:00:38,530 So our starting point is still something 12 00:00:38,530 --> 00:00:41,710 you've seen before, namely the statement that for an LTI 13 00:00:41,710 --> 00:00:43,990 system, a sinusoid into the system 14 00:00:43,990 --> 00:00:47,030 gives you a sinusoid out at the same frequency, 15 00:00:47,030 --> 00:00:51,970 but maybe shifted in phase and scaled in amplitude. 16 00:00:51,970 --> 00:00:57,220 So a bit of terminology here just for general interest, 17 00:00:57,220 --> 00:01:02,230 we refer to the exponential as an eigenfunction of the LTI 18 00:01:02,230 --> 00:01:04,239 system, because the only effect the LTI 19 00:01:04,239 --> 00:01:06,400 system has on it a scaling. 20 00:01:06,400 --> 00:01:10,330 So an input to some kind of a mapping, which comes out 21 00:01:10,330 --> 00:01:12,310 the same except for a scaling is referred 22 00:01:12,310 --> 00:01:14,440 to as an eigenfunction, or an eigenvector 23 00:01:14,440 --> 00:01:16,960 if you're talking about matrices. 24 00:01:16,960 --> 00:01:19,960 So we say that the exponential-- the complex exponential 25 00:01:19,960 --> 00:01:22,540 here is an eigenfunction of the LTI system. 26 00:01:22,540 --> 00:01:25,630 Because when it comes through, it's just the same exponential, 27 00:01:25,630 --> 00:01:28,480 but scaled by some number. 28 00:01:28,480 --> 00:01:31,450 And that number is what we refer to as a frequency response, 29 00:01:31,450 --> 00:01:32,020 right? 30 00:01:32,020 --> 00:01:35,133 And we've seen that there's a simple expression for it. 31 00:01:35,133 --> 00:01:36,550 And let me put that expression up, 32 00:01:36,550 --> 00:01:39,220 because we're going to use it repeatedly. 33 00:01:47,640 --> 00:01:49,270 The m here is irrelevant. 34 00:01:49,270 --> 00:01:52,140 It can be any dummy index, because we're 35 00:01:52,140 --> 00:01:53,393 summing over the m. 36 00:01:53,393 --> 00:01:54,810 You can call it anything you want. 37 00:01:58,597 --> 00:02:00,180 And I just should mention that there's 38 00:02:00,180 --> 00:02:03,120 other notation for this object. 39 00:02:07,280 --> 00:02:10,009 There are people who refer to it as-- 40 00:02:10,009 --> 00:02:15,800 well, it's often referred to as h of ej omega, 41 00:02:15,800 --> 00:02:19,610 because actually, the way omega enters is always in the term e 42 00:02:19,610 --> 00:02:20,640 to the j omega. 43 00:02:20,640 --> 00:02:23,840 So this is-- if you want to think of it that way, 44 00:02:23,840 --> 00:02:29,420 this is e to the j omega to the power minus m, right? 45 00:02:29,420 --> 00:02:35,176 Well, let me just write it as 1 over 1 over e to the j omega m. 46 00:02:37,870 --> 00:02:42,890 OK, so it's some function of e to the j omega. 47 00:02:42,890 --> 00:02:44,875 And people will often write it this way. 48 00:02:44,875 --> 00:02:46,250 And one of the advantages of this 49 00:02:46,250 --> 00:02:48,140 is the notation right away tells you 50 00:02:48,140 --> 00:02:51,080 that this object is periodic with period 2 pi. 51 00:02:51,080 --> 00:02:53,120 Because if you were to increase omega 52 00:02:53,120 --> 00:02:56,060 by an integer multiple of 2 pi in the numerator here, 53 00:02:56,060 --> 00:02:58,040 you'd get the same argument again. 54 00:02:58,040 --> 00:02:59,990 And therefore, h must be the same again. 55 00:02:59,990 --> 00:03:02,870 So this notation has the value that it 56 00:03:02,870 --> 00:03:05,820 keeps the periodicity front and center. 57 00:03:05,820 --> 00:03:08,750 It also makes sense when you're developing 58 00:03:08,750 --> 00:03:10,010 various other transforms. 59 00:03:10,010 --> 00:03:13,940 There's something called a z transform, which we 60 00:03:13,940 --> 00:03:15,380 won't deal with in this class. 61 00:03:15,380 --> 00:03:19,160 But it's used a lot when dealing with discrete-time systems. 62 00:03:19,160 --> 00:03:24,470 And the way that you get from the z transform 63 00:03:24,470 --> 00:03:28,130 to this object is by making the substitution z equals ej omega. 64 00:03:28,130 --> 00:03:31,320 So people will use this notation. 65 00:03:31,320 --> 00:03:34,580 So the z transform uses z exactly where 66 00:03:34,580 --> 00:03:36,650 we use e to the j omega. 67 00:03:36,650 --> 00:03:39,390 But for our purposes, this is a much simpler notation. 68 00:03:39,390 --> 00:03:42,230 It's just that we need you to remember when you see this 69 00:03:42,230 --> 00:03:43,790 that we're talking about something 70 00:03:43,790 --> 00:03:45,890 that's got period 2 pi. 71 00:03:45,890 --> 00:03:48,860 And if you look at the definition, that becomes clear. 72 00:03:48,860 --> 00:03:51,110 If you increase big omega here by any integer 73 00:03:51,110 --> 00:03:53,990 multiple of 2 pi, you're going to get the same thing 74 00:03:53,990 --> 00:03:56,610 back again. 75 00:03:56,610 --> 00:03:59,060 There's another bit of notational confusion that 76 00:03:59,060 --> 00:04:07,650 can arise, which is that people will sometimes 77 00:04:07,650 --> 00:04:11,040 write little omega instead of big omega. 78 00:04:15,390 --> 00:04:18,160 So that's also used. 79 00:04:18,160 --> 00:04:20,760 So this is other notation, and it's notation 80 00:04:20,760 --> 00:04:22,470 that we will try not to use, but you 81 00:04:22,470 --> 00:04:25,560 might see vestiges of this when you look through old problems. 82 00:04:25,560 --> 00:04:27,000 Because in some terms, we may have 83 00:04:27,000 --> 00:04:29,440 used this notation, and some terms, 84 00:04:29,440 --> 00:04:32,700 we may have used a little omega instead of a big omega. 85 00:04:32,700 --> 00:04:35,120 But for our purposes, we'll stick to this. 86 00:04:35,120 --> 00:04:37,890 OK, so when we say big omega, we're 87 00:04:37,890 --> 00:04:41,145 thinking of it as an angle around the unit circle. 88 00:04:43,960 --> 00:04:49,590 So if you've got the complex number here 89 00:04:49,590 --> 00:04:52,790 at an angle big omega, this complex number 90 00:04:52,790 --> 00:04:54,930 is e to the j omega, right? 91 00:04:54,930 --> 00:04:57,390 So we're thinking of big omega as an angle, something 92 00:04:57,390 --> 00:05:00,420 measured in radians, and it's different from little omega. 93 00:05:05,100 --> 00:05:08,220 You can write the expression for the frequency response 94 00:05:08,220 --> 00:05:09,150 in various ways. 95 00:05:09,150 --> 00:05:11,340 So here, I've just used Euler's identity 96 00:05:11,340 --> 00:05:14,130 to split that into a cosine and a sine, 97 00:05:14,130 --> 00:05:17,430 and that's straightforward enough. 98 00:05:17,430 --> 00:05:20,130 The sums are over infinite intervals. 99 00:05:20,130 --> 00:05:23,670 And we talked last time about how stability of the system-- 100 00:05:23,670 --> 00:05:25,950 bounded input, bounded output stability of the system 101 00:05:25,950 --> 00:05:30,830 will guarantee that those summations are well defined. 102 00:05:30,830 --> 00:05:34,700 OK, now there's another name for this formula. 103 00:05:34,700 --> 00:05:38,940 Basically, we've called it the frequency response. 104 00:05:38,940 --> 00:05:42,950 But when you compute an h of omega using this formula, 105 00:05:42,950 --> 00:05:44,450 another way to say what you're doing 106 00:05:44,450 --> 00:05:50,270 is to say that you're taking the discrete-time Fourier transform 107 00:05:50,270 --> 00:05:54,735 of the sequence h dot, OK? 108 00:05:54,735 --> 00:05:56,610 So it's the discrete-times Fourier transform. 109 00:05:56,610 --> 00:05:58,560 Again, that's just terminology for now. 110 00:05:58,560 --> 00:06:00,670 We'll come to expand our view of it later. 111 00:06:00,670 --> 00:06:04,170 But we've called it the frequency response so far, 112 00:06:04,170 --> 00:06:08,400 because it describes how sinusoids or exponentials here 113 00:06:08,400 --> 00:06:11,280 get to the output, but it's also referred to 114 00:06:11,280 --> 00:06:14,400 as the discrete-time Fourier transform of the unit sample 115 00:06:14,400 --> 00:06:15,310 response. 116 00:06:15,310 --> 00:06:17,280 So you've got some time signal-- 117 00:06:17,280 --> 00:06:20,100 happens to be a unit sample response. 118 00:06:20,100 --> 00:06:22,080 You compute an object through this formula 119 00:06:22,080 --> 00:06:24,090 to get an h of omega. 120 00:06:24,090 --> 00:06:28,330 That's the DTFT, OK? 121 00:06:28,330 --> 00:06:29,980 Another thing we've already seen is 122 00:06:29,980 --> 00:06:35,060 that knowing that you have an LTI system, 123 00:06:35,060 --> 00:06:37,300 and that a cosine is a superposition 124 00:06:37,300 --> 00:06:40,300 of complex exponentials, you can use the result 125 00:06:40,300 --> 00:06:43,300 that we had so far to just describe 126 00:06:43,300 --> 00:06:46,490 what happens to a cosine when it goes through the system. 127 00:06:46,490 --> 00:06:49,060 So it's no longer a complex exponential. 128 00:06:49,060 --> 00:06:51,160 It's a real signal of the kind that we're 129 00:06:51,160 --> 00:06:53,282 more likely to work with. 130 00:06:53,282 --> 00:06:55,240 And we've seen that the only thing that happens 131 00:06:55,240 --> 00:06:58,180 is the cosine that went in gets scaled 132 00:06:58,180 --> 00:07:01,280 in amplitude by an extra factor, which 133 00:07:01,280 --> 00:07:03,830 is the magnitude of the frequency response. 134 00:07:03,830 --> 00:07:06,270 And whatever phase it had, you get an extra phase, 135 00:07:06,270 --> 00:07:09,410 which is the angle of the frequency response. 136 00:07:09,410 --> 00:07:11,650 So actually, if you had an LTI system, 137 00:07:11,650 --> 00:07:14,770 this is a good way to measure the frequency response 138 00:07:14,770 --> 00:07:15,580 in the lab. 139 00:07:15,580 --> 00:07:17,770 What you do is you take your system there, 140 00:07:17,770 --> 00:07:20,640 excite it with a sinusoid. 141 00:07:20,640 --> 00:07:23,620 In continuous-time, we know we can do that with an oscillator. 142 00:07:23,620 --> 00:07:26,960 In discrete-time, you generate a sequence like this. 143 00:07:26,960 --> 00:07:30,100 And then look to see what comes out of the system 144 00:07:30,100 --> 00:07:34,100 and express it in this form, and you'll label the scale factor 145 00:07:34,100 --> 00:07:36,100 there as the magnitude of the frequency response 146 00:07:36,100 --> 00:07:39,550 and the extra phase angle as the phase angle of the frequency 147 00:07:39,550 --> 00:07:40,840 response. 148 00:07:40,840 --> 00:07:43,180 So it makes for a very systematic way 149 00:07:43,180 --> 00:07:48,820 to probe a system and get at the frequency response. 150 00:07:48,820 --> 00:07:51,710 Again, of a point that I've made before, 151 00:07:51,710 --> 00:07:54,580 which is that when you do this probing, 152 00:07:54,580 --> 00:08:02,380 you only need to vary big omega over the range minus pi to pi. 153 00:08:02,380 --> 00:08:09,580 So when we write a frequency response, because h of omega 154 00:08:09,580 --> 00:08:16,180 is periodic with period 2 pi, we only need to probe h of omega-- 155 00:08:16,180 --> 00:08:20,990 either the magnitude, that would be one plot, and the angle 156 00:08:20,990 --> 00:08:21,950 would be another plot. 157 00:08:26,210 --> 00:08:28,460 Both of these would be plotted from minus pi to pi. 158 00:08:32,240 --> 00:08:33,799 Because outside of that range-- well, 159 00:08:33,799 --> 00:08:35,960 you can see it already with the cosine. 160 00:08:35,960 --> 00:08:40,610 If I added an integer multiple of 2 pi to omega 0, 161 00:08:40,610 --> 00:08:43,280 I'm going to get an integer multiple of 2 pi added 162 00:08:43,280 --> 00:08:45,110 into the argument of a cosine. 163 00:08:45,110 --> 00:08:47,635 And I'm getting the same cosine back again. 164 00:08:47,635 --> 00:08:49,010 And the reason that's the case is 165 00:08:49,010 --> 00:08:51,960 because the n that's multiplying it here is an integer. 166 00:08:51,960 --> 00:08:53,720 So in continuous-time, it doesn't 167 00:08:53,720 --> 00:08:55,250 work quite the same way. 168 00:08:55,250 --> 00:08:58,760 If I had a little omega 0t and I added multiple of 2 pi, 169 00:08:58,760 --> 00:09:00,800 I wouldn't get the same argument back again. 170 00:09:00,800 --> 00:09:04,700 So what's different here is that if I increase omega 171 00:09:04,700 --> 00:09:07,310 0 by an integer multiple of 2 pi, 172 00:09:07,310 --> 00:09:09,410 because I've got an integer, and outside that, 173 00:09:09,410 --> 00:09:13,020 again, I end up adding an integer multiple of 2 pi, 174 00:09:13,020 --> 00:09:14,510 and I'm back at the same cosine. 175 00:09:14,510 --> 00:09:17,600 So frequency response for a discrete-time system 176 00:09:17,600 --> 00:09:20,443 is always in the interval minus pi to pi. 177 00:09:20,443 --> 00:09:22,610 It repeats periodically outside of that if you chose 178 00:09:22,610 --> 00:09:24,590 to look at some other omega. 179 00:09:27,390 --> 00:09:30,000 And I've said that already. 180 00:09:30,000 --> 00:09:33,120 You actually heard the term frequency response 181 00:09:33,120 --> 00:09:35,250 in all sorts of settings, I'm sure. 182 00:09:35,250 --> 00:09:38,505 One setting in which it's used a lot is in describing, 183 00:09:38,505 --> 00:09:40,380 for instance, the performance characteristics 184 00:09:40,380 --> 00:09:41,670 of a loudspeaker. 185 00:09:41,670 --> 00:09:45,120 So people will tell you how good their loudspeaker 186 00:09:45,120 --> 00:09:47,915 is by showing you the frequency response of the speaker. 187 00:09:47,915 --> 00:09:49,290 And what they're doing is they're 188 00:09:49,290 --> 00:09:52,470 applying a sinusoidal voltage to the input 189 00:09:52,470 --> 00:09:56,670 and looking at the sound pressure that comes out. 190 00:09:56,670 --> 00:10:01,440 SPL here is sound pressure level. 191 00:10:01,440 --> 00:10:05,000 This is measured in dB, so it's actually 192 00:10:05,000 --> 00:10:06,750 a measurement of the ratio of the pressure 193 00:10:06,750 --> 00:10:10,050 that you hear under certain standardized conditions 194 00:10:10,050 --> 00:10:15,900 to a pressure which is taken as the lowest 195 00:10:15,900 --> 00:10:18,060 audible pressure on the ear. 196 00:10:18,060 --> 00:10:20,340 So there's a particular ratio there. 197 00:10:20,340 --> 00:10:22,860 So what they'll do is they'll feed the loudspeaker 198 00:10:22,860 --> 00:10:27,690 with 1 watt at 1,000 Hertz, so just a steady tone. 199 00:10:27,690 --> 00:10:31,770 And then, a meter away from the speaker in an anechoic chamber, 200 00:10:31,770 --> 00:10:34,410 they'll look to see what sound pressure they pick up 201 00:10:34,410 --> 00:10:36,140 on a specialized sensor-- 202 00:10:36,140 --> 00:10:39,120 a detector, a microphone basically-- 203 00:10:39,120 --> 00:10:42,670 and that number in dB is what they'll represent. 204 00:10:42,670 --> 00:10:45,390 And so typical speakers are-- 205 00:10:45,390 --> 00:10:47,830 have values in that kind of range. 206 00:10:47,830 --> 00:10:49,920 Now, if you probe it at different frequencies 207 00:10:49,920 --> 00:10:54,840 applying the same input voltage and looking at pressure, 208 00:10:54,840 --> 00:10:58,440 you'll get varying pressure depending on the frequency 209 00:10:58,440 --> 00:10:59,250 that you probe at. 210 00:10:59,250 --> 00:11:01,790 So this is the frequency response of the speaker, 211 00:11:01,790 --> 00:11:04,237 and if you go too low in frequency, 212 00:11:04,237 --> 00:11:05,820 then you don't get much of a response. 213 00:11:05,820 --> 00:11:07,278 If you go to high in frequency, you 214 00:11:07,278 --> 00:11:08,925 don't get much of a response. 215 00:11:12,540 --> 00:11:16,740 Now, of course, when you use the speaker, 216 00:11:16,740 --> 00:11:19,133 you're not going to probe it with sines and cosines. 217 00:11:19,133 --> 00:11:21,300 You're actually going to put more complicated sounds 218 00:11:21,300 --> 00:11:22,120 in there. 219 00:11:22,120 --> 00:11:24,240 So what you're really interested in 220 00:11:24,240 --> 00:11:27,030 is how does the speaker behave to signals that 221 00:11:27,030 --> 00:11:29,670 are combinations of cosines? 222 00:11:29,670 --> 00:11:33,540 And again, we're using our model of the speaker as an LTI 223 00:11:33,540 --> 00:11:34,110 system. 224 00:11:34,110 --> 00:11:38,730 All bets are off if you drive your speaker so hard that you 225 00:11:38,730 --> 00:11:42,990 get distortion and exercise all the nonlinearities there 226 00:11:42,990 --> 00:11:44,310 or burn it out. 227 00:11:44,310 --> 00:11:48,180 But if you're in a normal range, the speaker is acting linearly, 228 00:11:48,180 --> 00:11:49,980 you can talk about its frequency response. 229 00:11:49,980 --> 00:11:51,210 And what you're really interested in 230 00:11:51,210 --> 00:11:53,640 is how does the speaker respond to linear combinations 231 00:11:53,640 --> 00:11:55,110 of cosines? 232 00:11:55,110 --> 00:12:01,770 And all of these various signals can be thought of as-- 233 00:12:01,770 --> 00:12:05,550 at least over reasonable time intervals-- 234 00:12:05,550 --> 00:12:09,850 as combinations of cosines appropriately chosen. 235 00:12:09,850 --> 00:12:12,250 So if you hit a particular key on the piano, 236 00:12:12,250 --> 00:12:15,570 you get a dominant note, but you'll get harmonics of that. 237 00:12:15,570 --> 00:12:17,700 And that's what's going into your speaker. 238 00:12:17,700 --> 00:12:22,170 So knowing how an LTI system responds to cosines 239 00:12:22,170 --> 00:12:24,750 then puts you in a position to say 240 00:12:24,750 --> 00:12:27,180 how it responds to combinations of cosines, 241 00:12:27,180 --> 00:12:29,490 or signals that are combinations of cosines. 242 00:12:29,490 --> 00:12:32,280 So the other part of the story that we're going to get 243 00:12:32,280 --> 00:12:35,070 to-- and maybe even by the end of this lecture-- 244 00:12:35,070 --> 00:12:37,800 is we need a way to take a general signal 245 00:12:37,800 --> 00:12:40,310 and represent it as a combination of cosines. 246 00:12:40,310 --> 00:12:42,690 And that's what we refer to as the spectral content 247 00:12:42,690 --> 00:12:43,750 of the signal. 248 00:12:43,750 --> 00:12:47,620 So when we talk of exposing the spectral content of a signal, 249 00:12:47,620 --> 00:12:49,800 as over here, what we're saying is 250 00:12:49,800 --> 00:12:52,830 we're going to show you what combination of cosines it 251 00:12:52,830 --> 00:12:54,750 takes to make up that signal. 252 00:12:54,750 --> 00:12:57,180 And once you figure that out, and you have the frequency 253 00:12:57,180 --> 00:12:59,400 response of your LTI system, you can say how 254 00:12:59,400 --> 00:13:01,180 your system responds to that. 255 00:13:01,180 --> 00:13:05,310 OK, so this theme runs through every stage 256 00:13:05,310 --> 00:13:09,950 of what happens, actually, in communication. 257 00:13:09,950 --> 00:13:11,950 Now, the example I've given you here 258 00:13:11,950 --> 00:13:14,840 is one that you would typically probe 259 00:13:14,840 --> 00:13:18,603 with a continuous-time oscillator in the lab. 260 00:13:18,603 --> 00:13:20,270 And so there's some connections that you 261 00:13:20,270 --> 00:13:24,990 might want to make between probing 262 00:13:24,990 --> 00:13:27,630 with a continuous-time signal and probing 263 00:13:27,630 --> 00:13:29,310 with a discrete-time sequence that comes 264 00:13:29,310 --> 00:13:30,900 from sampling that signal. 265 00:13:30,900 --> 00:13:33,450 But I'm going to leave you to look at that later or leave 266 00:13:33,450 --> 00:13:36,090 your recitation instructors to pull that back, 267 00:13:36,090 --> 00:13:39,030 or leave you to draw this up if you have a homework 268 00:13:39,030 --> 00:13:41,820 problem that needs you to think about how continuous-time maps 269 00:13:41,820 --> 00:13:42,900 to discrete-time. 270 00:13:42,900 --> 00:13:46,980 But the basic point is the actual, physical speaker 271 00:13:46,980 --> 00:13:51,390 you might probe with a cosine in continuous-time, 272 00:13:51,390 --> 00:13:53,970 if you're generating that signal from a computer, what you'd 273 00:13:53,970 --> 00:13:58,140 actually be sending to your amplifier 274 00:13:58,140 --> 00:13:59,950 is a sequence of numbers. 275 00:13:59,950 --> 00:14:03,810 And the frequency of the numbers that you would send, 276 00:14:03,810 --> 00:14:06,007 this frequency is related to the frequency 277 00:14:06,007 --> 00:14:07,590 of the continuous-time cosine that you 278 00:14:07,590 --> 00:14:09,923 want in a very particular way. 279 00:14:09,923 --> 00:14:11,340 So I'll leave you to chew on that. 280 00:14:11,340 --> 00:14:15,920 But I don't want to spend time on that now. 281 00:14:15,920 --> 00:14:18,210 OK, so let's spend a little time talking 282 00:14:18,210 --> 00:14:20,220 about the properties of frequency response now 283 00:14:20,220 --> 00:14:22,860 that we know why we would use it. 284 00:14:22,860 --> 00:14:24,060 And this I've already said. 285 00:14:26,990 --> 00:14:30,710 The value of the frequency response at-- 286 00:14:30,710 --> 00:14:33,380 some of this, by the way, you may have seen in recitation. 287 00:14:33,380 --> 00:14:35,840 But it doesn't hurt to repeat. 288 00:14:35,840 --> 00:14:41,420 The frequency response at frequency 0-- 289 00:14:41,420 --> 00:14:47,360 well, we've said if you've got e to the j omega sub 290 00:14:47,360 --> 00:14:53,770 0 and some frequency omega sub zero going into a system h 291 00:14:53,770 --> 00:14:57,790 omega, a system with frequency response h omega, 292 00:14:57,790 --> 00:15:00,860 an LTI system with frequency response h omega-- all right, 293 00:15:00,860 --> 00:15:02,632 I'm leaving out lots of words. 294 00:15:02,632 --> 00:15:04,340 But frequency response doesn't make sense 295 00:15:04,340 --> 00:15:07,000 unless you have an LTI system. 296 00:15:12,100 --> 00:15:14,940 OK, so for what kind of input signal 297 00:15:14,940 --> 00:15:17,270 would you be looking at omega equals 0? 298 00:15:21,380 --> 00:15:23,203 DC, right-- a constant signal. 299 00:15:23,203 --> 00:15:24,620 It's what the electrical engineers 300 00:15:24,620 --> 00:15:32,030 call DC, which used to stand for direct current 301 00:15:32,030 --> 00:15:35,090 but has now come to mean constant. 302 00:15:38,110 --> 00:15:41,900 When we say a DC input, we just mean a constant input. 303 00:15:41,900 --> 00:15:46,900 So if I pick omega sub 0 to be 0, then e to the j 0n, 304 00:15:46,900 --> 00:15:49,010 well, that's just one for all time. 305 00:15:49,010 --> 00:15:51,640 And so I'm feeding the system with a constant. 306 00:15:51,640 --> 00:15:54,130 That's the slowest possible input that you can find. 307 00:15:54,130 --> 00:15:56,620 It's a 0 frequency input. 308 00:15:56,620 --> 00:15:58,300 And the amount that it's scaled by 309 00:15:58,300 --> 00:16:00,580 is the number that you're going to plot here. 310 00:16:00,580 --> 00:16:04,030 So whatever value you get is going 311 00:16:04,030 --> 00:16:07,000 to end up being plotted there at omega equals 0. 312 00:16:09,550 --> 00:16:12,880 And let's see, do we believe this other statement-- 313 00:16:12,880 --> 00:16:15,290 h0? 314 00:16:15,290 --> 00:16:17,000 It's just a substitution in here. 315 00:16:17,000 --> 00:16:21,077 If I put omega equals 0, it's a summation of all the hm's. 316 00:16:21,077 --> 00:16:22,910 But there's another way to think of it also. 317 00:16:22,910 --> 00:16:25,560 If you want to think of it in the time domain-- 318 00:16:25,560 --> 00:16:26,060 let's see. 319 00:16:29,130 --> 00:16:32,350 I have an LTI system. 320 00:16:32,350 --> 00:16:33,955 It's got some unit sample response. 321 00:16:38,470 --> 00:16:42,255 And I'm feeding it with an input that's constant for all time. 322 00:16:42,255 --> 00:16:44,380 It's actually constant at the value 1 for all time. 323 00:16:50,150 --> 00:16:54,080 If you're thinking in terms of convolution, the flip slide 324 00:16:54,080 --> 00:16:59,910 and dot product picture, what is the output at any time here? 325 00:16:59,910 --> 00:17:03,580 You're going to draw out your unit sample response. 326 00:17:03,580 --> 00:17:07,329 You're going to draw out your input, which is 1 for all time, 327 00:17:07,329 --> 00:17:09,700 take one of them and flip it over, slide 328 00:17:09,700 --> 00:17:11,690 it the appropriate amount over the other, 329 00:17:11,690 --> 00:17:13,599 and then take the dot product. 330 00:17:13,599 --> 00:17:18,579 Well, for every shift of this flipped and shifted input, 331 00:17:18,579 --> 00:17:21,240 you're going to pick up all of the unit sample response. 332 00:17:21,240 --> 00:17:24,040 So every time, you're going to get summation hm outside. 333 00:17:29,940 --> 00:17:32,355 So if you fed an input that was DC at the value 1, 334 00:17:32,355 --> 00:17:34,230 this is what the output will be at all times. 335 00:17:34,230 --> 00:17:36,520 You can see that from the convolution picture. 336 00:17:36,520 --> 00:17:39,660 So what's the frequency response at frequency 0? 337 00:17:39,660 --> 00:17:42,300 What's the ratio of the output to the input-- 338 00:17:42,300 --> 00:17:44,460 the output amplitude to the input? 339 00:17:44,460 --> 00:17:45,390 This is for all time. 340 00:17:47,950 --> 00:17:50,580 So the input amplitude was 1 at each time. 341 00:17:50,580 --> 00:17:52,920 The output amplitude was that. 342 00:17:52,920 --> 00:17:54,823 And so that's the DC gain-- 343 00:17:54,823 --> 00:17:57,240 the DC gain of the system, or the frequency response at 0. 344 00:18:06,100 --> 00:18:10,840 Let's say, so h0 is what's referred to as the DC gain. 345 00:18:24,210 --> 00:18:26,280 What about high frequency? 346 00:18:26,280 --> 00:18:28,590 So what's the highest frequency variation 347 00:18:28,590 --> 00:18:31,800 that you can have with a discrete time sequence? 348 00:18:31,800 --> 00:18:33,780 I've got a sequence here at the input. 349 00:18:38,580 --> 00:18:40,940 We've seen what the slowest variation possible is. 350 00:18:40,940 --> 00:18:42,750 It's something that's constant. 351 00:18:42,750 --> 00:18:46,020 If you're talking about a discrete-time signal that 352 00:18:46,020 --> 00:18:48,690 can only take values at integer times, 353 00:18:48,690 --> 00:18:53,110 what's the highest frequency variation that you can get? 354 00:18:53,110 --> 00:18:55,148 Just something that alternates in sine, right? 355 00:18:55,148 --> 00:18:56,190 So you're going to have-- 356 00:19:03,260 --> 00:19:07,660 OK, so is this of the form e to the j omega 357 00:19:07,660 --> 00:19:11,590 0n for some omega 0? 358 00:19:11,590 --> 00:19:13,390 Is that a signal of exponential form? 359 00:19:16,228 --> 00:19:17,174 Yes? 360 00:19:17,174 --> 00:19:18,120 AUDIENCE: [INAUDIBLE] 361 00:19:18,120 --> 00:19:21,510 PROFESSOR: Yeah, if you take omega not equal to pi, 362 00:19:21,510 --> 00:19:25,620 this is just e to the j pi n. 363 00:19:25,620 --> 00:19:27,390 In fact, you can take plus or minus pi. 364 00:19:30,490 --> 00:19:33,277 So when you probe the system with an input 365 00:19:33,277 --> 00:19:35,110 of this type, which is the highest frequency 366 00:19:35,110 --> 00:19:37,450 input that you can probe with, what you're really 367 00:19:37,450 --> 00:19:40,960 probing is what's the frequency response at this point? 368 00:19:40,960 --> 00:19:43,510 You get the same value at minus pi or pi. 369 00:19:47,400 --> 00:19:48,650 So these are the two extremes. 370 00:19:48,650 --> 00:19:50,608 And then the frequency response, the rest of it 371 00:19:50,608 --> 00:19:52,730 lies in between for other sorts of inputs. 372 00:19:55,400 --> 00:19:59,660 Now, do you believe this other identity that I have up there? 373 00:19:59,660 --> 00:20:04,730 Well, you can go back to the definition, set 374 00:20:04,730 --> 00:20:06,830 big omega equal to pi or minus pi, 375 00:20:06,830 --> 00:20:10,430 and you'll get an alternating sequence of 1's and minus 376 00:20:10,430 --> 00:20:11,600 1's here. 377 00:20:11,600 --> 00:20:14,210 And so that verifies that identity. 378 00:20:14,210 --> 00:20:17,000 Or you can think in terms of convolution. 379 00:20:17,000 --> 00:20:22,760 If I convolve a sequence like this with a system 380 00:20:22,760 --> 00:20:27,470 with this unit sample response, what comes out at every time 381 00:20:27,470 --> 00:20:30,680 is an alternating sum of the hm's, except the sine flips 382 00:20:30,680 --> 00:20:32,480 from one time to the next. 383 00:20:32,480 --> 00:20:37,520 And so, again, you can verify in the time domain 384 00:20:37,520 --> 00:20:40,530 that that's actually the high frequency gain of the system, 385 00:20:40,530 --> 00:20:41,030 OK? 386 00:20:45,600 --> 00:20:49,260 Now, there's a bunch of other symmetry properties 387 00:20:49,260 --> 00:20:51,720 of the frequency response that I think 388 00:20:51,720 --> 00:20:55,470 in-- at least in some of the recitations you've done. 389 00:20:55,470 --> 00:20:58,350 And the easiest way to see these symmetry properties 390 00:20:58,350 --> 00:21:01,710 is to actually go back to the rewriting 391 00:21:01,710 --> 00:21:05,700 I did of the frequency response in terms of sines and cosines. 392 00:21:05,700 --> 00:21:09,570 This first term here I'm calling C of omega. 393 00:21:09,570 --> 00:21:11,250 The second term here, the summation, 394 00:21:11,250 --> 00:21:14,660 I'm calling S of omega. 395 00:21:14,660 --> 00:21:17,720 So where would a statement like this come from? 396 00:21:17,720 --> 00:21:18,560 Let's see. 397 00:21:18,560 --> 00:21:21,260 For real h of n, that's the only kind of h of n 398 00:21:21,260 --> 00:21:22,850 we're going to worry about in general. 399 00:21:22,850 --> 00:21:25,520 We're going to talk about systems with real unit sample 400 00:21:25,520 --> 00:21:27,110 responses. 401 00:21:27,110 --> 00:21:29,810 if h is real, why would it be true 402 00:21:29,810 --> 00:21:32,060 that the real part of the frequency response 403 00:21:32,060 --> 00:21:34,370 is an even function of frequency? 404 00:21:36,930 --> 00:21:40,020 Well, the real part of the frequency response 405 00:21:40,020 --> 00:21:44,500 is this term, because the other term is the imaginary part. 406 00:21:44,500 --> 00:21:46,540 So the real part of the frequency response 407 00:21:46,540 --> 00:21:48,940 is this term. 408 00:21:48,940 --> 00:21:51,110 And if I change big omega to minus omega, 409 00:21:51,110 --> 00:21:52,800 the cosine doesn't change. 410 00:21:52,800 --> 00:21:53,850 It's the same. 411 00:21:53,850 --> 00:21:56,090 And therefore, the real part is even, OK? 412 00:21:56,090 --> 00:21:58,330 So the real part of the frequency response 413 00:21:58,330 --> 00:22:00,110 is an even function of omega. 414 00:22:00,110 --> 00:22:03,910 The imaginary part, which is the minus S omega, 415 00:22:03,910 --> 00:22:07,100 well if I change omega to minus omega, I flip the sine. 416 00:22:07,100 --> 00:22:10,460 So that's an odd function of omega, and so on. 417 00:22:10,460 --> 00:22:12,350 So you can go through these properties. 418 00:22:12,350 --> 00:22:14,600 Whenever you're stuck trying to figure out a property, 419 00:22:14,600 --> 00:22:16,142 this is the expression to go back to. 420 00:22:16,142 --> 00:22:19,670 So rewrite the basic definition in this form, 421 00:22:19,670 --> 00:22:22,930 and you'll understand a lot of this. 422 00:22:22,930 --> 00:22:24,890 And again, you'll get practice in recitation 423 00:22:24,890 --> 00:22:27,680 if you haven't done that already. 424 00:22:30,680 --> 00:22:34,980 Another important property of-- 425 00:22:34,980 --> 00:22:37,520 that you encounter when you go from the time domain 426 00:22:37,520 --> 00:22:40,040 to the frequency domain-- 427 00:22:40,040 --> 00:22:41,690 so remember, in the time domain, we 428 00:22:41,690 --> 00:22:45,410 said that if you have an input here, you 429 00:22:45,410 --> 00:22:49,310 convolve that input with h1 to get the output 430 00:22:49,310 --> 00:22:50,760 of the intermediate point? 431 00:22:55,350 --> 00:22:58,330 OK, so if I call the output of the intermediate point-- 432 00:22:58,330 --> 00:22:59,980 I should have done it there. 433 00:22:59,980 --> 00:23:00,930 But here's h1. 434 00:23:03,480 --> 00:23:09,160 If I call this w, this is x. 435 00:23:09,160 --> 00:23:16,100 And then I go into a second system, h2. 436 00:23:16,100 --> 00:23:16,890 And here's y. 437 00:23:19,850 --> 00:23:26,210 OK, well w is equal to h1 convolved with x. 438 00:23:26,210 --> 00:23:33,680 And y equals h2 convolved with w. 439 00:23:33,680 --> 00:23:37,770 So that's this. 440 00:23:37,770 --> 00:23:40,780 But I can put the parentheses any way I like for convolution, 441 00:23:40,780 --> 00:23:41,280 right? 442 00:23:41,280 --> 00:23:42,947 We've already established that property. 443 00:23:48,240 --> 00:23:50,930 So the net effect of the cascade of systems 444 00:23:50,930 --> 00:23:55,840 is the effect you'd get by having a single system LTI 445 00:23:55,840 --> 00:23:59,930 with this unit sample response. 446 00:23:59,930 --> 00:24:03,430 Now, if I think the frequency domain-- 447 00:24:03,430 --> 00:24:12,490 if I put e to the j omega n here, then 448 00:24:12,490 --> 00:24:14,670 what comes out at the intermediate point? 449 00:24:14,670 --> 00:24:22,870 At the intermediate point, I get h1 omega ej omega n. 450 00:24:22,870 --> 00:24:24,220 All right, so that's wn. 451 00:24:27,710 --> 00:24:31,140 But this is, again, an input of exponential form. 452 00:24:31,140 --> 00:24:33,170 So what comes out of the second system when 453 00:24:33,170 --> 00:24:35,190 I put this input into it? 454 00:24:35,190 --> 00:24:37,640 So what's w of n-- sorry, what's y of n going to be? 455 00:24:41,060 --> 00:24:41,560 Yeah? 456 00:24:41,560 --> 00:24:43,860 AUDIENCE: [INAUDIBLE] 457 00:24:43,860 --> 00:24:46,110 PROFESSOR: Yeah, so it's basically the second system's 458 00:24:46,110 --> 00:24:50,370 frequency response scaling the exponential that 459 00:24:50,370 --> 00:24:52,470 went into the second system, which is this. 460 00:24:56,260 --> 00:25:00,040 So the net effect when I put ej omega in at the first spot 461 00:25:00,040 --> 00:25:03,400 is at the output, I get the same ej omega n, 462 00:25:03,400 --> 00:25:08,850 but scaled by the product of the two frequency responses. 463 00:25:08,850 --> 00:25:10,460 So the nice thing here is that when 464 00:25:10,460 --> 00:25:13,740 I'm describing a cascade of two systems, 465 00:25:13,740 --> 00:25:16,100 if I describe the net effect in the time domain, 466 00:25:16,100 --> 00:25:19,220 I've got to do a convolution of these two units' sample 467 00:25:19,220 --> 00:25:20,300 responses. 468 00:25:20,300 --> 00:25:22,700 If I think of it in the frequency domain, 469 00:25:22,700 --> 00:25:25,370 I just have to take the product of the individual frequency 470 00:25:25,370 --> 00:25:26,810 responses. 471 00:25:26,810 --> 00:25:31,490 So the key observation here is that convolution 472 00:25:31,490 --> 00:25:37,760 in the time domain maps to multiplication in the frequency 473 00:25:37,760 --> 00:25:39,390 domain. 474 00:25:39,390 --> 00:25:43,190 So if I wanted the DTFT of this-- 475 00:25:43,190 --> 00:25:44,780 if I wanted the discrete-time Fourier 476 00:25:44,780 --> 00:25:48,800 transform of this result of a convolution, 477 00:25:48,800 --> 00:25:50,660 I can find it by just multiplying 478 00:25:50,660 --> 00:25:55,490 the individual DTFTs, all right? 479 00:25:55,490 --> 00:26:04,670 So convolution in time maps to multiplication in frequency. 480 00:26:09,130 --> 00:26:14,530 And this actually makes design much more easy, 481 00:26:14,530 --> 00:26:17,590 because we're often cascading systems in this form. 482 00:26:17,590 --> 00:26:20,020 And if you think in terms of frequency, 483 00:26:20,020 --> 00:26:22,190 you can track a frequency component 484 00:26:22,190 --> 00:26:24,130 through a cascade of such systems 485 00:26:24,130 --> 00:26:26,950 just focusing on the frequency response of each system 486 00:26:26,950 --> 00:26:29,060 as you go. 487 00:26:29,060 --> 00:26:29,935 So here's an example. 488 00:26:33,112 --> 00:26:34,195 Suppose we have a channel. 489 00:26:39,840 --> 00:26:43,095 Let's say that it's a channel with an echo, so when I put-- 490 00:26:46,200 --> 00:26:49,880 let me actually draw it out here. 491 00:26:49,880 --> 00:26:59,020 So I've got a channel here which I'm modeling as LTI. 492 00:26:59,020 --> 00:27:02,020 And if I put in a unit sample function 493 00:27:02,020 --> 00:27:05,740 here, so this has the value 1 at time 1, 494 00:27:05,740 --> 00:27:09,710 suppose the channel is one that has some echoing in it. 495 00:27:09,710 --> 00:27:13,260 So what I actually get out for this input 496 00:27:13,260 --> 00:27:21,300 is the same delta of n plus 0.8 delta of n minus 1. 497 00:27:21,300 --> 00:27:27,270 So there is a later arrival scaled by something 498 00:27:27,270 --> 00:27:29,970 which corresponds to the echo. 499 00:27:29,970 --> 00:27:35,100 So this must be the unit sample response of the channel. 500 00:27:38,980 --> 00:27:42,750 What's the frequency response of the channel? 501 00:27:42,750 --> 00:27:48,640 So if I call this h1 of n, what is h1 big of omega-- 502 00:27:48,640 --> 00:27:51,940 big omega-- h1 of big omega? 503 00:27:57,968 --> 00:27:59,260 I don't have it up there, do I? 504 00:27:59,260 --> 00:28:01,400 No. 505 00:28:01,400 --> 00:28:03,210 Anyone? 506 00:28:03,210 --> 00:28:04,748 Just from the definition. 507 00:28:14,483 --> 00:28:16,150 Is the problem here that you don't quite 508 00:28:16,150 --> 00:28:20,920 see what h1, 0 is, h1, 1, h1, 2, and so on? 509 00:28:20,920 --> 00:28:24,490 If I asked you to plot this out, how would you plot it? 510 00:28:34,801 --> 00:28:35,783 Yeah? 511 00:28:35,783 --> 00:28:38,880 AUDIENCE: [INAUDIBLE] 512 00:28:38,880 --> 00:28:39,800 PROFESSOR: Is it 1.8? 513 00:28:39,800 --> 00:28:40,300 Where? 514 00:28:40,300 --> 00:28:42,340 Where would you put the 1-- 515 00:28:42,340 --> 00:28:43,060 just over there? 516 00:28:43,060 --> 00:28:45,060 Oh, you're talking about the frequency response. 517 00:28:45,060 --> 00:28:47,110 Let's get the unit sample response first. 518 00:28:47,110 --> 00:28:47,890 Let's sketch this. 519 00:28:47,890 --> 00:28:49,282 What's your sketch of that? 520 00:28:49,282 --> 00:28:50,430 AUDIENCE: At 0B1 521 00:28:50,430 --> 00:28:52,372 PROFESSOR: At 0B1? 522 00:28:52,372 --> 00:28:57,730 AUDIENCE: [INAUDIBLE] 523 00:28:57,730 --> 00:29:00,870 PROFESSOR: OK, on 0 everywhere else-- 524 00:29:00,870 --> 00:29:03,440 that's the unit sample response. 525 00:29:03,440 --> 00:29:05,070 OK, so what's the frequency response? 526 00:29:05,070 --> 00:29:06,820 Well, we just plug it into the definition. 527 00:29:06,820 --> 00:29:12,810 All the h's except the ones that argue in 0 on 1 are equal to 0. 528 00:29:12,810 --> 00:29:19,573 So this is going to be 1 plus 0.8 to the minus j omega. 529 00:29:19,573 --> 00:29:20,490 Is that what you said? 530 00:29:20,490 --> 00:29:23,700 It was not quite what you said, right? 531 00:29:23,700 --> 00:29:25,740 What you said was the number I'd get at omega 532 00:29:25,740 --> 00:29:28,500 equals 0-- the DC gain of the system. 533 00:29:28,500 --> 00:29:30,000 But the frequency response is that. 534 00:29:40,270 --> 00:29:43,240 Let's just work backwards here. 535 00:29:52,660 --> 00:29:54,130 So the frequency response is that. 536 00:29:54,130 --> 00:29:56,890 Or if I wanted to write it-- 537 00:29:56,890 --> 00:29:58,760 we're going from that board to here-- 538 00:29:58,760 --> 00:30:02,530 h1 of omega, I can write it as a real plus imaginary part. 539 00:30:02,530 --> 00:30:06,900 So it would be 1 plus 0.8 cosine omega. 540 00:30:06,900 --> 00:30:08,742 This would be the real part. 541 00:30:08,742 --> 00:30:12,140 Then I have a minus j-- 542 00:30:12,140 --> 00:30:14,140 sorry, 0.8 sine omega. 543 00:30:18,730 --> 00:30:21,850 OK, so that's the frequency response-- 544 00:30:21,850 --> 00:30:24,780 some complex number with a real part and an imaginary part. 545 00:30:31,770 --> 00:30:35,800 OK, and if I asked you to give it to me in magnitude and angle 546 00:30:35,800 --> 00:30:37,180 form, you could do that. 547 00:30:37,180 --> 00:30:40,480 It's just rearranging things. 548 00:30:40,480 --> 00:30:44,170 So you'd-- the magnitude would be the square root of the sum 549 00:30:44,170 --> 00:30:47,230 of squares of these two pieces. 550 00:30:47,230 --> 00:30:50,330 And the angle would be the arctan of the ratio. 551 00:30:50,330 --> 00:30:54,065 So I assume that you know how to do all of that. 552 00:30:54,065 --> 00:30:55,440 And what you find-- actually, you 553 00:30:55,440 --> 00:30:57,750 can see it in these expressions already. 554 00:30:57,750 --> 00:31:00,270 Just as-- well, I didn't quite claim this earlier. 555 00:31:00,270 --> 00:31:03,210 But the magnitude of the frequency response 556 00:31:03,210 --> 00:31:06,300 will always be a real function of frequency-- sorry, 557 00:31:06,300 --> 00:31:08,110 an even function of frequency. 558 00:31:08,110 --> 00:31:12,160 And the phase will always be an odd function of frequency. 559 00:31:12,160 --> 00:31:16,620 So if you're drawing the results of a computation like this 560 00:31:16,620 --> 00:31:21,990 and you find that you don't have an even function 561 00:31:21,990 --> 00:31:24,610 for the magnitude, then you know you've done something wrong. 562 00:31:24,610 --> 00:31:27,160 So I'm not-- I'm going to sketch something here 563 00:31:27,160 --> 00:31:29,340 which I'm not pretending is the magnitude of that. 564 00:31:29,340 --> 00:31:32,760 I just want you to get the idea of what I mean by even. 565 00:31:32,760 --> 00:31:41,350 It's going to be something that's symmetric in omega. 566 00:31:41,350 --> 00:31:42,990 This is the magnitude. 567 00:31:42,990 --> 00:31:45,630 And then, if I did the phase, the phase 568 00:31:45,630 --> 00:31:48,630 is always going to be something that's 569 00:31:48,630 --> 00:31:50,489 an odd function of frequency. 570 00:31:55,553 --> 00:31:57,220 So if it's an odd function of frequency, 571 00:31:57,220 --> 00:31:59,470 what's the value at 0 of the phase? 572 00:32:03,430 --> 00:32:05,690 It's got to go through 0, right? 573 00:32:05,690 --> 00:32:08,117 And so I might get-- 574 00:32:08,117 --> 00:32:09,450 well, what would it actually be? 575 00:32:09,450 --> 00:32:12,710 It would be some shape. 576 00:32:12,710 --> 00:32:14,810 I'm not pretending I have the right shape here. 577 00:32:14,810 --> 00:32:18,980 But it's going to have an odd symmetry. 578 00:32:18,980 --> 00:32:22,830 I'll leave you to figure out what it actually looks like. 579 00:32:22,830 --> 00:32:28,350 So that's the frequency response of this echo channel. 580 00:32:28,350 --> 00:32:30,930 So here's what I want you to do now. 581 00:32:30,930 --> 00:32:33,960 At your receiver, build for me a filter that's 582 00:32:33,960 --> 00:32:38,350 going to undo the distortion that the echo has produced. 583 00:32:38,350 --> 00:32:41,165 So what I'd like is, I'd like an output, 584 00:32:41,165 --> 00:32:42,790 after you've done your filtering, to be 585 00:32:42,790 --> 00:32:45,560 exactly equal to the input. 586 00:32:45,560 --> 00:32:47,350 So my question is, what should-- 587 00:32:47,350 --> 00:32:51,070 and my claim is you can do that with an LTI filter. 588 00:32:51,070 --> 00:32:53,170 How would you describe that LTI filter? 589 00:32:53,170 --> 00:32:56,182 What should that LTI filter be? 590 00:32:56,182 --> 00:32:57,170 Yeah? 591 00:32:57,170 --> 00:33:02,110 AUDIENCE: [INAUDIBLE] 592 00:33:02,110 --> 00:33:06,750 PROFESSOR: Right, OK, so if you wanted the output 593 00:33:06,750 --> 00:33:08,460 to be exactly equal to the input, 594 00:33:08,460 --> 00:33:13,890 no matter what input was, you want a frequency response of 1 595 00:33:13,890 --> 00:33:15,380 overall. 596 00:33:15,380 --> 00:33:17,220 And the overall frequency response we know 597 00:33:17,220 --> 00:33:19,680 is the product of the two individual ones. 598 00:33:19,680 --> 00:33:27,420 And so we want h2 omega times h1 omega to be equal to 1. 599 00:33:27,420 --> 00:33:29,790 And therefore, h2 should be 1 over h1. 600 00:33:29,790 --> 00:33:33,120 So you can see here how things get a lot easier when you 601 00:33:33,120 --> 00:33:34,650 think in the frequency domain. 602 00:33:34,650 --> 00:33:38,310 If I had to do this in the time domain, 603 00:33:38,310 --> 00:33:40,910 I would have had to say h2 convolved 604 00:33:40,910 --> 00:33:44,940 with h1 has got to give me the unit sample function. 605 00:33:44,940 --> 00:33:47,490 And I'll give you h1, now you've got to figure h2. 606 00:33:47,490 --> 00:33:50,850 Well, you've got to go and work the convolution picture 607 00:33:50,850 --> 00:33:54,480 backwards, which is doable for simple cases. 608 00:33:54,480 --> 00:33:56,320 But this is much simpler. 609 00:33:56,320 --> 00:34:03,150 So this shows that h2 should be 1 over h1. 610 00:34:09,020 --> 00:34:12,050 Seems like a reasonable way to go. 611 00:34:12,050 --> 00:34:16,500 And you can actually work the whole thing through. 612 00:34:16,500 --> 00:34:18,197 But there's a problem with this. 613 00:34:18,197 --> 00:34:19,739 And we've seen this in other settings 614 00:34:19,739 --> 00:34:23,190 as well, which is something that works 615 00:34:23,190 --> 00:34:27,090 fine in the noise-free case doesn't 616 00:34:27,090 --> 00:34:29,260 work so well when you've got noise in your system. 617 00:34:29,260 --> 00:34:33,219 So look at what this receiver filter is doing. 618 00:34:33,219 --> 00:34:38,040 The receiver filter-- let's see, what is its magnitude? 619 00:34:38,040 --> 00:34:40,770 How does the magnitude of the receiver filter 620 00:34:40,770 --> 00:34:44,370 relate to the magnitude of the channel filter-- 621 00:34:46,929 --> 00:34:49,820 of the channel frequency response? 622 00:34:49,820 --> 00:34:52,519 So this magnitude is a magnitude of 1 over h1. 623 00:34:52,519 --> 00:34:58,712 Is that the same as 1 over magnitude of h1? 624 00:34:58,712 --> 00:35:00,340 Is that how complex numbers work? 625 00:35:03,020 --> 00:35:05,800 OK, right? 626 00:35:05,800 --> 00:35:06,730 So look what happens. 627 00:35:06,730 --> 00:35:10,210 Where the channel has a very low frequency response-- 628 00:35:10,210 --> 00:35:12,820 in other words, where the channel output is very 629 00:35:12,820 --> 00:35:16,350 low for a sinusoidal input at that frequency, 630 00:35:16,350 --> 00:35:19,400 the receiver filter is going to have a very high magnitude. 631 00:35:19,400 --> 00:35:21,820 So the receiver filter is trying to boost up 632 00:35:21,820 --> 00:35:24,730 whatever signal it sees in a frequency range 633 00:35:24,730 --> 00:35:28,220 where the channel actually has very little output. 634 00:35:28,220 --> 00:35:30,880 So what happens if I come and have a bit of noise 635 00:35:30,880 --> 00:35:33,595 here where I'm receiving the signal? 636 00:35:33,595 --> 00:35:36,070 Well, it's going to be very badly exaggerated 637 00:35:36,070 --> 00:35:40,580 by the inverse filter. 638 00:35:40,580 --> 00:35:43,430 So a little bit of noise here will 639 00:35:43,430 --> 00:35:46,700 get accentuated at frequencies where 640 00:35:46,700 --> 00:35:50,000 the frequency response of the receiver filter is large. 641 00:35:50,000 --> 00:35:52,280 But that's precisely where the channel had 642 00:35:52,280 --> 00:35:53,810 a very low frequency response. 643 00:35:53,810 --> 00:35:55,935 And it's precisely where the output-- the channel-- 644 00:35:55,935 --> 00:35:57,360 has nothing interesting for me. 645 00:35:57,360 --> 00:36:00,420 So my receiver filter ends up accentuating the noise. 646 00:36:00,420 --> 00:36:02,960 OK, so yet again, we see that these sorts 647 00:36:02,960 --> 00:36:05,508 of inversion operations may look nice on paper. 648 00:36:05,508 --> 00:36:07,550 But if you don't take account of what noise does, 649 00:36:07,550 --> 00:36:09,200 then you can run into trouble. 650 00:36:09,200 --> 00:36:10,670 And the picture is very transparent 651 00:36:10,670 --> 00:36:14,660 when you think in the frequency domain. 652 00:36:14,660 --> 00:36:23,550 OK, some more practice with filters and cascade-- 653 00:36:23,550 --> 00:36:26,340 I think I'm going to leave you to work through this 654 00:36:26,340 --> 00:36:27,550 in recitation, perhaps. 655 00:36:27,550 --> 00:36:30,180 So I'll leave it on the slides. 656 00:36:30,180 --> 00:36:36,185 But let's go to design of filters. 657 00:36:40,190 --> 00:36:43,730 So now, we've seen one example of trying to design a filter-- 658 00:36:43,730 --> 00:36:47,090 the receiver filter-- to undo the distortion of the channel. 659 00:36:47,090 --> 00:36:50,320 Here's another-- actually, I want that. 660 00:36:50,320 --> 00:36:54,020 Here is another design problem that you 661 00:36:54,020 --> 00:37:02,960 run into all the time, which is that you see a signal that's 662 00:37:02,960 --> 00:37:05,270 got a whole bunch of frequencies mixed up in it, 663 00:37:05,270 --> 00:37:07,260 and you want to exclude some of them. 664 00:37:07,260 --> 00:37:09,560 So maybe you're looking for an audio signal. 665 00:37:09,560 --> 00:37:12,410 You know that the combinations of sinusoids 666 00:37:12,410 --> 00:37:16,010 that make up an audio signal are unlikely to go above-- 667 00:37:16,010 --> 00:37:16,760 whatever you want. 668 00:37:16,760 --> 00:37:19,620 Pick your number-- 10 kilohertz, 20 kilohertz. 669 00:37:19,620 --> 00:37:21,590 And so you want to exclude frequencies outside 670 00:37:21,590 --> 00:37:22,710 of that range. 671 00:37:22,710 --> 00:37:25,010 So you're very often in the position 672 00:37:25,010 --> 00:37:29,940 of trying to build what's called an ideal low pass filter. 673 00:37:29,940 --> 00:37:31,550 So here's an ideal low pass filter. 674 00:37:34,370 --> 00:37:37,280 I'd like you to build for me a filter that 675 00:37:37,280 --> 00:37:44,120 passes all frequencies in some range without distortion, 676 00:37:44,120 --> 00:37:46,445 and that completely kills everything outside. 677 00:37:49,590 --> 00:37:53,100 So let me call this the cutoff frequency. 678 00:38:00,150 --> 00:38:02,905 So that's the h of omega I want. 679 00:38:02,905 --> 00:38:05,530 And now my question is, how are you going to build this filter? 680 00:38:05,530 --> 00:38:07,690 I want you to give me the unit sample 681 00:38:07,690 --> 00:38:09,300 response that goes with it. 682 00:38:09,300 --> 00:38:11,140 And you see a hint over here. 683 00:38:11,140 --> 00:38:13,570 But can you tell me how you might go about that? 684 00:38:19,610 --> 00:38:20,630 Not so obvious, right? 685 00:38:20,630 --> 00:38:25,010 Because we've specified the filter characteristic 686 00:38:25,010 --> 00:38:27,740 in the frequency domain, and now we want to find the h's 687 00:38:27,740 --> 00:38:29,550 that go with it. 688 00:38:29,550 --> 00:38:32,270 So what we're really looking for is a formula 689 00:38:32,270 --> 00:38:36,500 that will give us the time domain signal in terms 690 00:38:36,500 --> 00:38:37,500 of the frequency domain. 691 00:38:37,500 --> 00:38:39,422 So we want to invert this somehow. 692 00:38:39,422 --> 00:38:40,880 So what we're looking for is really 693 00:38:40,880 --> 00:38:43,655 what's called the inverse DTFT. 694 00:39:00,627 --> 00:39:02,460 And actually, if you've done Fourier series, 695 00:39:02,460 --> 00:39:04,500 you've seen this trick before. 696 00:39:04,500 --> 00:39:06,837 Because really, we're not far from Fourier series here. 697 00:39:06,837 --> 00:39:08,920 It's just that the domains are a little different, 698 00:39:08,920 --> 00:39:10,590 so maybe you don't recognize it. 699 00:39:10,590 --> 00:39:13,920 Here, we've got a periodic something expressed 700 00:39:13,920 --> 00:39:16,350 as a combination of sines and cosines, 701 00:39:16,350 --> 00:39:19,320 or as a combination of exponentials. 702 00:39:19,320 --> 00:39:22,650 And now, we want to invert that, OK? 703 00:39:22,650 --> 00:39:25,860 If you thought of these as Fourier coefficients 704 00:39:25,860 --> 00:39:28,320 for some periodic signal, and then went and looked up 705 00:39:28,320 --> 00:39:30,540 whatever book you use for Fourier series, 706 00:39:30,540 --> 00:39:32,350 you'd get the formula. 707 00:39:32,350 --> 00:39:34,350 Because we're just trying to extract the Fourier 708 00:39:34,350 --> 00:39:38,120 coefficients for this periodic signal. 709 00:39:38,120 --> 00:39:39,790 But you can actually do it from scratch. 710 00:39:39,790 --> 00:39:44,880 So if you think of multiplying both sides of this by, 711 00:39:44,880 --> 00:39:46,440 let's say, e to the j omega n-- 712 00:39:49,085 --> 00:39:52,240 OK, so I'm going to multiply both sides. 713 00:39:52,240 --> 00:40:03,310 So I've got e to the minus j omega m minus n now, right? 714 00:40:06,110 --> 00:40:10,450 And I'm going to then integrate both sides over an interval 715 00:40:10,450 --> 00:40:11,440 of length 2 pi-- 716 00:40:15,180 --> 00:40:17,130 any contiguous interval of length 2 pi. 717 00:40:17,130 --> 00:40:21,593 It actually does matter because of the periodicity. 718 00:40:21,593 --> 00:40:23,260 So I'll take any interval of length 2 pi 719 00:40:23,260 --> 00:40:24,430 and I integrate both sides. 720 00:40:28,680 --> 00:40:31,020 And I'll assume that I can hop this integral in there. 721 00:40:31,020 --> 00:40:34,210 I'll assume my signal is well-behaved enough for that. 722 00:40:34,210 --> 00:40:44,130 So here's what I end up getting. 723 00:40:44,130 --> 00:40:54,080 On this right hand side, I get summation integral hm. 724 00:40:54,080 --> 00:40:55,670 Oh, I should put a d omega there. 725 00:40:55,670 --> 00:40:57,360 Sorry. 726 00:40:57,360 --> 00:40:59,497 I've gotten casual with my integration. 727 00:41:11,460 --> 00:41:13,720 So on this side, I have this integral. 728 00:41:13,720 --> 00:41:16,820 On this side, I have that integral. 729 00:41:16,820 --> 00:41:19,870 And if you work through this, out 730 00:41:19,870 --> 00:41:21,550 of all this infinity of terms, there's 731 00:41:21,550 --> 00:41:23,770 only one term that survives. 732 00:41:23,770 --> 00:41:27,370 Because any term in which m is different from n 733 00:41:27,370 --> 00:41:30,490 will have this exponential still sitting here. 734 00:41:30,490 --> 00:41:33,190 This exponential is like a cosine plus a j sine, 735 00:41:33,190 --> 00:41:35,650 or a cosine minus a j sine. 736 00:41:35,650 --> 00:41:39,710 You're integrating it over an interval of 2 pi. 737 00:41:39,710 --> 00:41:43,210 So any term here that has the exponential, 738 00:41:43,210 --> 00:41:45,833 or has the sine or cosine in it, will disappear 739 00:41:45,833 --> 00:41:46,750 under the integration. 740 00:41:46,750 --> 00:41:50,830 The only term that survives is the one where m equals n. 741 00:41:50,830 --> 00:41:54,160 And so what you discover is that this is 742 00:41:54,160 --> 00:41:57,915 2 pi hn when you're all done. 743 00:41:57,915 --> 00:41:59,540 I'm not going through the details here. 744 00:42:02,320 --> 00:42:05,455 So here is the formula we wanted for the inverse DTFT. 745 00:42:19,890 --> 00:42:26,430 Here's the inverse DTFT, OK? 746 00:42:26,430 --> 00:42:30,750 I've forgotten my colored chalk today, but that'll do. 747 00:42:34,030 --> 00:42:37,910 So if I gave you a filter characteristic like this 748 00:42:37,910 --> 00:42:40,430 and asked you to find the unit sample response of the filter 749 00:42:40,430 --> 00:42:44,480 that went with it, you would just have to plug 750 00:42:44,480 --> 00:42:47,750 in the frequency response characteristic that I gave you 751 00:42:47,750 --> 00:42:48,950 and solve for the h's. 752 00:42:52,080 --> 00:42:55,793 I think I have a bunch of this on the slides. 753 00:42:55,793 --> 00:42:57,210 This is what we just went through. 754 00:43:01,100 --> 00:43:05,543 So let's do this now for the ideal low pass filter. 755 00:43:05,543 --> 00:43:06,460 What is it that we do? 756 00:43:09,540 --> 00:43:13,440 I've got the formula that I just derived for you there. 757 00:43:13,440 --> 00:43:18,090 h is equal to 1 in the pass band of the filter, 758 00:43:18,090 --> 00:43:21,070 and it's 0 outside of that. 759 00:43:21,070 --> 00:43:24,380 So I set h equal to 1 in the pass band of the filter, which 760 00:43:24,380 --> 00:43:27,710 is from minus omega C to plus omega C, and the rest of it 761 00:43:27,710 --> 00:43:29,420 doesn't contribute anything. 762 00:43:29,420 --> 00:43:31,920 And then, I just work out this integral. 763 00:43:31,920 --> 00:43:34,320 And I've actually got to do it in two pieces. 764 00:43:34,320 --> 00:43:37,010 For n not equal to 0, this is what I get. 765 00:43:37,010 --> 00:43:40,790 For n equals 0, this is what I get. 766 00:43:40,790 --> 00:43:42,560 If n was continuous, actually, you'd 767 00:43:42,560 --> 00:43:46,580 say that this is the same expression as here, 768 00:43:46,580 --> 00:43:48,560 because you just use L'Hopital's rule 769 00:43:48,560 --> 00:43:50,660 and you'll get from here to here. 770 00:43:50,660 --> 00:43:52,730 But since n is an integer, we've got 771 00:43:52,730 --> 00:43:54,620 to be a little careful how we write it, OK? 772 00:43:54,620 --> 00:43:57,440 So you can't really say you're going to use L'Hopital's rule 773 00:43:57,440 --> 00:43:59,810 to see what this is in the limit of n going to 0, 774 00:43:59,810 --> 00:44:01,680 because n takes integer values. 775 00:44:01,680 --> 00:44:04,323 But if you work it out from scratch for n equals 0, 776 00:44:04,323 --> 00:44:05,990 you'll see that you get a formula that's 777 00:44:05,990 --> 00:44:09,110 consistent with using L'Hopital's rule. 778 00:44:09,110 --> 00:44:13,530 OK, so this is a function that we'll see again and again when 779 00:44:13,530 --> 00:44:15,960 we do filtering of this type, and it's 780 00:44:15,960 --> 00:44:18,100 referred to as a sinc function. 781 00:44:18,100 --> 00:44:22,380 So it's not S-I-N, but S-I-N-C. And if you plot it out, 782 00:44:22,380 --> 00:44:23,250 this is what it is. 783 00:44:26,410 --> 00:44:31,180 So it's got the oscilation that comes from the sine, 784 00:44:31,180 --> 00:44:33,970 but it's got a reduction in amplitude that comes from the 1 785 00:44:33,970 --> 00:44:34,720 over n. 786 00:44:34,720 --> 00:44:36,400 So it's a signal that falls off as 1 787 00:44:36,400 --> 00:44:42,642 over n with this kind of a characteristic. 788 00:44:47,290 --> 00:44:50,400 Do you think it's a bounded input, bounded output 789 00:44:50,400 --> 00:44:52,020 stable system? 790 00:44:52,020 --> 00:44:52,830 What's your hunch? 791 00:44:56,740 --> 00:44:59,030 Remember what it takes for a system to be stable? 792 00:44:59,030 --> 00:45:02,753 The unit sample response has to be absolutely summable. 793 00:45:02,753 --> 00:45:04,420 So if you take the absolute values here, 794 00:45:04,420 --> 00:45:06,370 and sum from minus infinity to infinity, 795 00:45:06,370 --> 00:45:10,890 you want to get something finite to call this stable. 796 00:45:10,890 --> 00:45:12,900 Well, since this only falls off as 1 over n, 797 00:45:12,900 --> 00:45:14,480 it turns out to not be stable. 798 00:45:14,480 --> 00:45:16,920 So it's actually an extreme idealization 799 00:45:16,920 --> 00:45:20,460 that is not bounded-- input bounded, output stable, 800 00:45:20,460 --> 00:45:21,150 but it's close. 801 00:45:24,870 --> 00:45:29,730 Just to go back when I showed you this filter characteristic 802 00:45:29,730 --> 00:45:35,790 here, to give the cheap version of a low pass filter, what 803 00:45:35,790 --> 00:45:41,670 we actually did was take the sinc function 804 00:45:41,670 --> 00:45:43,973 and truncated to a finite interval. 805 00:45:43,973 --> 00:45:46,140 And so what happens when you truncate it to a finite 806 00:45:46,140 --> 00:45:50,083 interval is that instead of the sharp box-like shape 807 00:45:50,083 --> 00:45:52,500 for the frequency response, you get a closer approximation 808 00:45:52,500 --> 00:45:53,160 to it-- 809 00:45:53,160 --> 00:45:56,678 not exactly the ideal low pass filter, but maybe good enough. 810 00:45:56,678 --> 00:45:58,220 The other thing that you might notice 811 00:45:58,220 --> 00:46:01,610 if you're looking carefully is that I had a sinc that 812 00:46:01,610 --> 00:46:04,130 was centered around 0 and even. 813 00:46:04,130 --> 00:46:07,530 And now, I seem to have a causal version of the filter. 814 00:46:07,530 --> 00:46:10,700 And I think I'll leave you in recitation to figure out 815 00:46:10,700 --> 00:46:13,910 how you can go from the centered, non-causal filter 816 00:46:13,910 --> 00:46:15,770 to a causal filter, and what that 817 00:46:15,770 --> 00:46:19,787 does to phase and to frequency response magnitude. 818 00:46:25,620 --> 00:46:29,370 So basically, I'll leave you to go through the details here. 819 00:46:29,370 --> 00:46:33,505 But the key idea here is the inverse DTFT. 820 00:46:37,690 --> 00:46:40,190 So now, I want to just take a slightly different perspective 821 00:46:40,190 --> 00:46:42,710 on this formula that we derived. 822 00:46:42,710 --> 00:46:45,080 We said we've got a frequency response, which we're 823 00:46:45,080 --> 00:46:49,910 calling the DTFT of the signal h of n-- the unit sample 824 00:46:49,910 --> 00:46:51,470 response. 825 00:46:51,470 --> 00:46:53,060 We've got an inverse formula that 826 00:46:53,060 --> 00:46:57,680 allows us to get the time signal from the frequency response. 827 00:46:57,680 --> 00:46:59,825 But here's yet another way of looking at what 828 00:46:59,825 --> 00:47:00,950 this formula is telling us. 829 00:47:00,950 --> 00:47:04,730 This formula is saying, I can think of h of n 830 00:47:04,730 --> 00:47:08,368 as being made up of a whole bunch of complex exponentials. 831 00:47:08,368 --> 00:47:10,410 So you see that this is what we were looking for. 832 00:47:10,410 --> 00:47:13,100 We were looking for a way to take a signal 833 00:47:13,100 --> 00:47:15,260 and figure out its spectral content. 834 00:47:15,260 --> 00:47:18,350 We want to know what complex exponentials, 835 00:47:18,350 --> 00:47:21,440 or what sinusoids does it take to make that signal? 836 00:47:21,440 --> 00:47:23,510 Well, we have a hint of that in this expression, 837 00:47:23,510 --> 00:47:26,420 because this is saying, take the time domain signal. 838 00:47:26,420 --> 00:47:28,610 I can think of it as being a combination. 839 00:47:28,610 --> 00:47:32,240 Now, this is not a finite combination, it's a continuum. 840 00:47:32,240 --> 00:47:35,720 But it is a combination of exponentials of the type 841 00:47:35,720 --> 00:47:37,730 that we know to work with. 842 00:47:37,730 --> 00:47:41,270 So this is actually giving us a spectral decomposition 843 00:47:41,270 --> 00:47:43,730 of the unit sample response, where 844 00:47:43,730 --> 00:47:47,240 the amount of e to the j omega n that it 845 00:47:47,240 --> 00:47:51,140 takes to make up the signal is told to me by h of omega. 846 00:47:51,140 --> 00:47:53,870 So the h of omegas are sort of the weights 847 00:47:53,870 --> 00:47:57,720 that we use to combine these exponentials to get the signal. 848 00:47:57,720 --> 00:48:01,340 So the idea for a spectral decomposition, 849 00:48:01,340 --> 00:48:03,560 or for describing the spectral nature of a signal 850 00:48:03,560 --> 00:48:05,480 is actually sitting there. 851 00:48:05,480 --> 00:48:08,360 All we have to do is say, we'll use the same formulas, 852 00:48:08,360 --> 00:48:12,050 but let's no longer restrict it to the unit sample 853 00:48:12,050 --> 00:48:14,750 response of a system and the frequency 854 00:48:14,750 --> 00:48:15,900 response of that system. 855 00:48:15,900 --> 00:48:17,850 Let's use it for any signal-- 856 00:48:17,850 --> 00:48:21,446 so the same formulas, but now for any signal xn. 857 00:48:21,446 --> 00:48:24,930 Give me any signal xn, I'll compute for you 858 00:48:24,930 --> 00:48:30,000 this object, which is the DTFT of that signal, just 859 00:48:30,000 --> 00:48:31,910 the same way I did for a frequency response. 860 00:48:31,910 --> 00:48:34,560 So I'll compute the x of omega for you. 861 00:48:34,560 --> 00:48:37,170 What's the significance of x of omega? 862 00:48:37,170 --> 00:48:39,240 Well, it tells me in what combination 863 00:48:39,240 --> 00:48:42,540 I have to wait the e to the j omega n's 864 00:48:42,540 --> 00:48:44,110 to construct for you the signal. 865 00:48:44,110 --> 00:48:49,650 So the x of big omega, the DTFT tells me 866 00:48:49,650 --> 00:48:51,720 what the spectral content of the signal is. 867 00:48:51,720 --> 00:48:53,640 If I plot that as a function of frequency, 868 00:48:53,640 --> 00:48:55,800 it tells me how to assemble the signal out 869 00:48:55,800 --> 00:48:59,160 of sums of sines and cosines. 870 00:48:59,160 --> 00:49:00,150 So let's see here. 871 00:49:05,880 --> 00:49:12,180 More specifically, what I would say is that the DTFT at omega 872 00:49:12,180 --> 00:49:12,830 0-- 873 00:49:12,830 --> 00:49:16,470 omega sub 0 times d omega is the spectral content 874 00:49:16,470 --> 00:49:19,800 of the signal in that particular interval. 875 00:49:19,800 --> 00:49:23,310 And if I add up all those components over all frequencies 876 00:49:23,310 --> 00:49:26,040 in this 2 pi range, I'll get the original signal 877 00:49:26,040 --> 00:49:27,580 that I'm interested in. 878 00:49:27,580 --> 00:49:31,080 So what we'll do next time is work with this idea 879 00:49:31,080 --> 00:49:34,290 to see how it lets us think about signals through systems, 880 00:49:34,290 --> 00:49:38,280 and how it enables us to do filtering in a systematic way. 881 00:49:38,280 --> 00:49:40,880 All right, let's leave it at that for now.