1 00:00:00,000 --> 00:00:00,030 2 00:00:00,030 --> 00:00:02,330 The following content is provided under a Creative 3 00:00:02,330 --> 00:00:03,710 Commons license. 4 00:00:03,710 --> 00:00:05,950 Your support will help MIT OpenCourseWare 5 00:00:05,950 --> 00:00:09,940 continue to offer high-quality educational resources for free. 6 00:00:09,940 --> 00:00:12,530 To make a donation, or to view additional materials 7 00:00:12,530 --> 00:00:15,526 from hundreds of MIT courses, visit MIT OpenCourseWare 8 00:00:15,526 --> 00:00:16,150 at ocw.mit.edu. 9 00:00:16,150 --> 00:00:20,000 10 00:00:20,000 --> 00:00:24,300 PROFESSOR STRANG: OK, so. 11 00:00:24,300 --> 00:00:26,320 These are our two topics. 12 00:00:26,320 --> 00:00:31,490 And, Thanksgiving is coming up, of course. 13 00:00:31,490 --> 00:00:36,560 With convolutions, where are we? 14 00:00:36,560 --> 00:00:38,330 I'm probably starting a little early. 15 00:00:38,330 --> 00:00:40,770 Oh, I am. 16 00:00:40,770 --> 00:00:41,790 Is that right? 17 00:00:41,790 --> 00:00:42,900 Yeah, OK. 18 00:00:42,900 --> 00:00:45,490 So, with convolutions, I feel we've 19 00:00:45,490 --> 00:00:47,360 got a whole lot of formulas. 20 00:00:47,360 --> 00:00:51,690 We practiced on some specific examples, 21 00:00:51,690 --> 00:00:53,720 but we didn't see the reason for them. 22 00:00:53,720 --> 00:00:55,240 We didn't say the use of them. 23 00:00:55,240 --> 00:00:59,440 And I'm unwilling to let a whole topic, 24 00:00:59,440 --> 00:01:01,380 important topic like convolutions, 25 00:01:01,380 --> 00:01:05,800 go on with just formulas. 26 00:01:05,800 --> 00:01:13,300 So I want to talk about signal processing. 27 00:01:13,300 --> 00:01:18,320 So that's a nice, perfect application of convolutions. 28 00:01:18,320 --> 00:01:19,170 And you'll see it. 29 00:01:19,170 --> 00:01:21,180 You'll see the point, and it's something 30 00:01:21,180 --> 00:01:23,120 that you're going to end up doing. 31 00:01:23,120 --> 00:01:27,740 And it's quite a simple idea, once you understand 32 00:01:27,740 --> 00:01:29,900 convolutions you've got it. 33 00:01:29,900 --> 00:01:34,250 OK, but then I do want to go on to the Fourier integral part. 34 00:01:34,250 --> 00:01:38,050 And basically, today I'll just give the formulas. 35 00:01:38,050 --> 00:01:40,690 So you've got the Fourier integral formulas 36 00:01:40,690 --> 00:01:46,470 that take from a function f, defined for all x now. 37 00:01:46,470 --> 00:01:49,940 It's on the whole line, like some bell-shaped curve 38 00:01:49,940 --> 00:01:53,780 or some exponential decaying. 39 00:01:53,780 --> 00:01:59,860 And then you get its transform, I could call that c(k), 40 00:01:59,860 --> 00:02:04,480 but a more familiar notation is f hat of k. 41 00:02:04,480 --> 00:02:08,900 So that will be the Fourier integral transform, or just 42 00:02:08,900 --> 00:02:12,120 for short, Fourier transform of f(x), 43 00:02:12,120 --> 00:02:15,210 and it'll involve all frequencies. 44 00:02:15,210 --> 00:02:19,320 So we are getting away from the periodic case and integer 45 00:02:19,320 --> 00:02:23,020 frequencies, to the whole line case with a whole line 46 00:02:23,020 --> 00:02:24,100 of frequencies. 47 00:02:24,100 --> 00:02:26,090 OK, so is that alright? 48 00:02:26,090 --> 00:02:31,290 Finishing, I'll have more to say about 4.4 convolutions, 49 00:02:31,290 --> 00:02:33,620 but I want to say this much. 50 00:02:33,620 --> 00:02:37,300 OK, let's move to an example. 51 00:02:37,300 --> 00:02:40,130 So here's a typical block diagram. 52 00:02:40,130 --> 00:02:43,400 In comes the signal. 53 00:02:43,400 --> 00:02:46,580 Vector x, values x_k. 54 00:02:46,580 --> 00:02:50,420 Often, in engineering and EE, people 55 00:02:50,420 --> 00:02:54,050 tend to write that x of k, these days. 56 00:02:54,050 --> 00:02:57,380 OK, so, as being easier to type. 57 00:02:57,380 --> 00:02:58,850 And sort of better. 58 00:02:58,850 --> 00:03:01,840 But I'll stay with the subscript. 59 00:03:01,840 --> 00:03:06,110 So that signal comes in. 60 00:03:06,110 --> 00:03:09,210 And it goes through a filter. 61 00:03:09,210 --> 00:03:12,970 And I'm taking the simplest filter I can think of, 62 00:03:12,970 --> 00:03:16,870 the one that just averages the current value 63 00:03:16,870 --> 00:03:19,210 with the previous value. 64 00:03:19,210 --> 00:03:24,140 And we want to see what's the effect of doing that. 65 00:03:24,140 --> 00:03:27,210 So we want to see, we want to understand the outputs, 66 00:03:27,210 --> 00:03:30,890 the y_k's, which are just the current value 67 00:03:30,890 --> 00:03:33,970 and the previous value averaged. 68 00:03:33,970 --> 00:03:36,230 We want to see that as a convolution, 69 00:03:36,230 --> 00:03:39,220 and see what it's doing. 70 00:03:39,220 --> 00:03:45,010 OK, so that's the-- And I guess that here, it's 71 00:03:45,010 --> 00:03:54,650 a frequent convention in signal processing to basically pretend 72 00:03:54,650 --> 00:03:57,080 that the signal is infinitely long. 73 00:03:57,080 --> 00:04:03,070 That there's no start and no finish. 74 00:04:03,070 --> 00:04:06,960 Of course, in reality there has to be a start and a finish. 75 00:04:06,960 --> 00:04:10,480 But if it's a long, you know if it's a cd or something, 76 00:04:10,480 --> 00:04:15,250 and you're sampling it every-- thousands and thousands 77 00:04:15,250 --> 00:04:15,860 of times. 78 00:04:15,860 --> 00:04:19,940 And the input signal is so long and you're not really 79 00:04:19,940 --> 00:04:22,880 caring about the very start and the very end. 80 00:04:22,880 --> 00:04:24,920 It's simpler to just pretend that you've 81 00:04:24,920 --> 00:04:28,760 got numbers for all k. 82 00:04:28,760 --> 00:04:39,020 OK, then let's see what kind of a filter this is. 83 00:04:39,020 --> 00:04:41,090 What does it do to the signal? 84 00:04:41,090 --> 00:04:43,610 OK. 85 00:04:43,610 --> 00:04:49,520 Well, one way filters are-- First of all, 86 00:04:49,520 --> 00:04:51,500 let's see it as a convolution. 87 00:04:51,500 --> 00:04:56,410 So I want to see that this formula is a convolution, 88 00:04:56,410 --> 00:05:02,320 that the output y, that output of all the averages y, 89 00:05:02,320 --> 00:05:07,220 is the convolution of some filter, some, 90 00:05:07,220 --> 00:05:14,470 and I'll give it a proper name, with the input. 91 00:05:14,470 --> 00:05:17,810 And notice that, again, there's no circle around here. 92 00:05:17,810 --> 00:05:19,980 We're not doing the cyclic case, we're just 93 00:05:19,980 --> 00:05:21,730 pretending infinitely long. 94 00:05:21,730 --> 00:05:25,410 So OK, now I just want to ask you what is the h, 95 00:05:25,410 --> 00:05:27,970 I want to recognize this as a filter. 96 00:05:27,970 --> 00:05:32,720 So that convolution, let's remember the notation. 97 00:05:32,720 --> 00:05:36,070 And then we can match this to that. 98 00:05:36,070 --> 00:05:42,460 So remember the notation for that would be, 99 00:05:42,460 --> 00:05:46,520 for a convolution is, I take a sum. 100 00:05:46,520 --> 00:05:56,430 Of all x-- Of h sub l, x sub k-l, right? 101 00:05:56,430 --> 00:05:58,930 That's what convolution is. 102 00:05:58,930 --> 00:06:04,080 This is our famous, and it would be in principle the sum over l. 103 00:06:04,080 --> 00:06:06,100 Sum over l's. 104 00:06:06,100 --> 00:06:13,770 So the filter is defined by these numbers h, these h's, 105 00:06:13,770 --> 00:06:19,230 h_0, h_1, so on. 106 00:06:19,230 --> 00:06:26,980 Those numbers h multiply the x's, where this familiar rule 107 00:06:26,980 --> 00:06:30,440 to give the k-th output. 108 00:06:30,440 --> 00:06:36,370 OK, let's have no mystery here. 109 00:06:36,370 --> 00:06:41,250 What are the h's if this is the output? 110 00:06:41,250 --> 00:06:44,780 Well, I want to match that with that. 111 00:06:44,780 --> 00:06:51,370 So here I see that this takes x_k, multiplies by a half. 112 00:06:51,370 --> 00:06:55,600 So that tells me that when l is zero, 113 00:06:55,600 --> 00:07:00,060 I'm getting h_0 times x_k, so what's h_0? 114 00:07:00,060 --> 00:07:03,140 So what's the h_0? 115 00:07:03,140 --> 00:07:05,880 It's 1/2. 116 00:07:05,880 --> 00:07:09,390 That's what this formula is saying. 117 00:07:09,390 --> 00:07:12,970 When l is zero, so l is zero, take 118 00:07:12,970 --> 00:07:17,110 h_0, 1/2, times x_k, ta-da. 119 00:07:17,110 --> 00:07:20,190 Now, what's the other h that's showing up here? 120 00:07:20,190 --> 00:07:22,750 This is a very, very short filter. 121 00:07:22,750 --> 00:07:27,820 It's only going to have two coefficients, h_0 and h what? 122 00:07:27,820 --> 00:07:28,660 One. 123 00:07:28,660 --> 00:07:31,940 And what's the coefficient h_1? 124 00:07:31,940 --> 00:07:35,170 What's the number h_1? 125 00:07:35,170 --> 00:07:37,820 Now you've told me everything about h 126 00:07:37,820 --> 00:07:39,310 when you tell me that number. 127 00:07:39,310 --> 00:07:41,070 Everybody sees it. 128 00:07:41,070 --> 00:07:43,910 It's also 1/2, right? 129 00:07:43,910 --> 00:07:48,320 Because I'm taking 1/2 of x_(k-1). 130 00:07:48,320 --> 00:07:56,240 So when l is that one, we have h, the h is 1/2, times x_(k-1). 131 00:07:56,240 --> 00:08:00,660 Do you see that that simple averaging, running average, 132 00:08:00,660 --> 00:08:01,830 you could call it. 133 00:08:01,830 --> 00:08:04,280 Running average, it's the most, the first thing 134 00:08:04,280 --> 00:08:09,220 you would think of to-- Why would you do such a thing? 135 00:08:09,220 --> 00:08:13,320 Why is filtering done? 136 00:08:13,320 --> 00:08:18,070 This filter, this averaging filter, would smooth the data. 137 00:08:18,070 --> 00:08:22,350 So the data comes with noise, of course. 138 00:08:22,350 --> 00:08:27,780 And what you'd like, so noise is high-frequency stuff. 139 00:08:27,780 --> 00:08:31,050 So what you want to do is like damp those high frequencies 140 00:08:31,050 --> 00:08:35,050 a little bit, because much of it is not, 141 00:08:35,050 --> 00:08:36,780 it hasn't got information in it. 142 00:08:36,780 --> 00:08:42,870 It's just noise, but you want to keep the signal. 143 00:08:42,870 --> 00:08:45,950 So it's always this signal-to-noise ratio. 144 00:08:45,950 --> 00:08:48,160 That's the key -- SNR. 145 00:08:48,160 --> 00:08:49,650 PSNR. 146 00:08:49,650 --> 00:08:55,030 That's the constant expression, signal-to-noise ratio. 147 00:08:55,030 --> 00:09:00,200 And we're sort of expecting here that the signal-to-noise ratio 148 00:09:00,200 --> 00:09:01,430 is pretty good. 149 00:09:01,430 --> 00:09:02,290 High. 150 00:09:02,290 --> 00:09:03,410 Mostly signal. 151 00:09:03,410 --> 00:09:06,190 But there's some noise. 152 00:09:06,190 --> 00:09:10,500 This is a very simple, extremely short, filter. 153 00:09:10,500 --> 00:09:16,350 So this vector h, it's a proper convolution. 154 00:09:16,350 --> 00:09:18,880 You could say h has infinitely many components. 155 00:09:18,880 --> 00:09:21,950 But they're all zero, except for those two. 156 00:09:21,950 --> 00:09:23,290 Right, do you see it? 157 00:09:23,290 --> 00:09:26,650 Another way, just at the end of last time, 158 00:09:26,650 --> 00:09:33,670 I asked you to think of a matrix that's doing the same thing. 159 00:09:33,670 --> 00:09:36,460 Why do I bring a matrix in? 160 00:09:36,460 --> 00:09:39,490 Because anytime I see something linear, 161 00:09:39,490 --> 00:09:42,610 and that's incredibly linear, right? 162 00:09:42,610 --> 00:09:45,500 I think OK, there's a matrix doing it. 163 00:09:45,500 --> 00:09:52,710 So these y's, like y_k, y_(k+1), all the y's are coming out. 164 00:09:52,710 --> 00:10:01,560 The x's are going in, x_k, x_(k+1), x_(k-1), bunch of x's. 165 00:10:01,560 --> 00:10:04,610 And there's a matrix doing exactly that. 166 00:10:04,610 --> 00:10:06,480 And what does that matrix have? 167 00:10:06,480 --> 00:10:10,440 Well, it has 1/2 on the diagonal. 168 00:10:10,440 --> 00:10:14,370 So that y_k will have a 1/2 of x_k, 169 00:10:14,370 --> 00:10:18,620 and what's the other entry in that row? 170 00:10:18,620 --> 00:10:23,910 I want 1/2 of x_k, and I want 1/2 of x_(k-1), right? 171 00:10:23,910 --> 00:10:26,020 So I just put 1/2 next to it. 172 00:10:26,020 --> 00:10:28,810 So there is the main diagonal of the halves, 173 00:10:28,810 --> 00:10:32,740 and there is the sub-diagonal of the half. 174 00:10:32,740 --> 00:10:37,900 So it's just constant diagonal. 175 00:10:37,900 --> 00:10:41,660 Now, yeah, let me tell you the word. 176 00:10:41,660 --> 00:10:43,860 When an engineer, electrical engineer 177 00:10:43,860 --> 00:10:47,720 looks at this, first thing, or this, any of these. 178 00:10:47,720 --> 00:10:54,400 First letters he uses is linear time-invariant LTI. 179 00:10:54,400 --> 00:10:58,510 So linear we understand, right? 180 00:10:58,510 --> 00:11:01,430 What does this time-invariant mean? 181 00:11:01,430 --> 00:11:05,780 Time-invariant means that you're not changing the filter 182 00:11:05,780 --> 00:11:07,190 as the signal comes through. 183 00:11:07,190 --> 00:11:10,790 You're keeping a half and a half. 184 00:11:10,790 --> 00:11:12,340 You're keeping the formula. 185 00:11:12,340 --> 00:11:16,740 The formula doesn't depend on k, the numbers 186 00:11:16,740 --> 00:11:18,030 are just 1/2 and 1/2. 187 00:11:18,030 --> 00:11:22,970 They're the same, so if I shift the whole signal by a thousand, 188 00:11:22,970 --> 00:11:25,450 the output shifts by a thousand, right? 189 00:11:25,450 --> 00:11:28,730 If I take the whole signal and delay it, 190 00:11:28,730 --> 00:11:34,090 delay it by a thousand time, clock times? 191 00:11:34,090 --> 00:11:39,070 Then the same output will come a thousand clock times delayed. 192 00:11:39,070 --> 00:11:40,970 So linear time-invariant. 193 00:11:40,970 --> 00:11:43,780 That would be-- I mean, linear time-invariant 194 00:11:43,780 --> 00:11:48,530 is just talking convolution. 195 00:11:48,530 --> 00:11:52,170 I mean, that's what it comes to if we're in discrete problems. 196 00:11:52,170 --> 00:11:54,960 It's just that, for some h. 197 00:11:54,960 --> 00:12:03,090 Now, our h deserves like, the other initials you see. 198 00:12:03,090 --> 00:12:04,680 OK, that was linear time invariant. 199 00:12:04,680 --> 00:12:07,970 Now, the next initials you'll see 200 00:12:07,970 --> 00:12:11,960 will be F-I-R. It's an FIR filter. 201 00:12:11,960 --> 00:12:19,630 So that's finite impulse response. 202 00:12:19,630 --> 00:12:21,860 What's the impulse response mean? 203 00:12:21,860 --> 00:12:23,910 It means the h. 204 00:12:23,910 --> 00:12:26,820 The vector h is the impulse response. 205 00:12:26,820 --> 00:12:30,520 The vector h is what you get if I put an impulse in, 206 00:12:30,520 --> 00:12:32,050 what comes out? 207 00:12:32,050 --> 00:12:33,710 Just tell me, what happens here. 208 00:12:33,710 --> 00:12:35,990 Suppose an impulse, by an impulse 209 00:12:35,990 --> 00:12:39,680 I mean I stick a one in one position and all zeroes. 210 00:12:39,680 --> 00:12:41,360 Our usual delta. 211 00:12:41,360 --> 00:12:44,870 Our impulse, our spike, is just, suppose 212 00:12:44,870 --> 00:12:48,870 the x's have a one here, otherwise 213 00:12:48,870 --> 00:12:51,900 all zero, what comes out? 214 00:12:51,900 --> 00:12:55,600 Well, suppose there's just x_0 is one. 215 00:12:55,600 --> 00:12:57,590 What is y? 216 00:12:57,590 --> 00:13:00,630 Suppose the only input is boom, you 217 00:13:00,630 --> 00:13:03,170 know a bell sounds at time zero. 218 00:13:03,170 --> 00:13:06,750 What comes out from the filter? 219 00:13:06,750 --> 00:13:11,070 Well, y_0 will be what? 220 00:13:11,070 --> 00:13:14,160 If the input has just a single x, 221 00:13:14,160 --> 00:13:20,080 and it's one, at that time zero, so x_0 is one. 222 00:13:20,080 --> 00:13:22,600 Then y_0 will be? 223 00:13:22,600 --> 00:13:29,500 1/2, and what will be y_1? 224 00:13:29,500 --> 00:13:30,640 Also 1/2, right? 225 00:13:30,640 --> 00:13:34,500 Because y_1 will take x_1, that's 226 00:13:34,500 --> 00:13:36,020 already dropped back to zero. 227 00:13:36,020 --> 00:13:38,390 Plus x_0, that's the bell. 228 00:13:38,390 --> 00:13:39,270 It'll be 1/2. 229 00:13:39,270 --> 00:13:42,700 In other words, the output is this. 230 00:13:42,700 --> 00:13:45,370 No big deal. 231 00:13:45,370 --> 00:13:49,210 The impulse responses is exactly h. 232 00:13:49,210 --> 00:13:53,660 So you can say they've created a long word for a small idea, 233 00:13:53,660 --> 00:13:55,260 true. 234 00:13:55,260 --> 00:14:00,210 And the idea, the word finite is the important number. 235 00:14:00,210 --> 00:14:02,980 Finite, meaning that it's finite length, 236 00:14:02,980 --> 00:14:08,710 I only have a finite number of h's, and in this case two h's. 237 00:14:08,710 --> 00:14:15,070 So that's-- Part of every subject is just learning 238 00:14:15,070 --> 00:14:16,150 the language. 239 00:14:16,150 --> 00:14:21,630 So LTI, it means you've got a convolution. 240 00:14:21,630 --> 00:14:26,230 FIR means that the convolution has finite length. 241 00:14:26,230 --> 00:14:29,930 OK, now for the question. 242 00:14:29,930 --> 00:14:34,390 What is this filter doing to the signal? 243 00:14:34,390 --> 00:14:35,730 It's certainly averaging. 244 00:14:35,730 --> 00:14:38,460 That's clear. 245 00:14:38,460 --> 00:14:41,810 But we want to be more precise. 246 00:14:41,810 --> 00:14:46,710 Well, let me take some examples. 247 00:14:46,710 --> 00:14:51,680 Suppose the input is all ones. 248 00:14:51,680 --> 00:14:54,280 All x_k are one. 249 00:14:54,280 --> 00:14:55,670 So a constant input. 250 00:14:55,670 --> 00:14:57,170 Natural thing to test. 251 00:14:57,170 --> 00:15:02,240 That's the constant input, that's zero frequency. 252 00:15:02,240 --> 00:15:04,310 Zero frequency. 253 00:15:04,310 --> 00:15:12,050 What's the output? 254 00:15:12,050 --> 00:15:14,370 From all ones going in. 255 00:15:14,370 --> 00:15:17,990 Wow, sorry to ask you such a trivial question. 256 00:15:17,990 --> 00:15:20,190 You came in for some good math here, 257 00:15:20,190 --> 00:15:22,830 and I'm just taking 1/2 and 1/2. 258 00:15:22,830 --> 00:15:28,880 So the output is all y's equal, right? 259 00:15:28,880 --> 00:15:32,250 So, to me, that's telling, just to introduce 260 00:15:32,250 --> 00:15:37,040 an appropriate word, low frequencies; in fact, 261 00:15:37,040 --> 00:15:39,580 bottom frequency, zero frequency, 262 00:15:39,580 --> 00:15:42,010 is passed straight through. 263 00:15:42,010 --> 00:15:44,170 That's a lowpass filter. 264 00:15:44,170 --> 00:15:49,660 That's telling me I have a lowpass filter. 265 00:15:49,660 --> 00:15:52,230 So that's an expression. 266 00:15:52,230 --> 00:15:56,490 That's so simple that you might as well know those words. 267 00:15:56,490 --> 00:16:01,460 Lowpass means that the lowest frequencies pass 268 00:16:01,460 --> 00:16:04,810 through virtually unchanged. 269 00:16:04,810 --> 00:16:09,160 In this case, the very zero frequency, the DC term, 270 00:16:09,160 --> 00:16:12,890 the constant term, passes through completely unchanged. 271 00:16:12,890 --> 00:16:16,620 Now, what about another input all-- Well, 272 00:16:16,620 --> 00:16:18,300 now I want high frequencies. 273 00:16:18,300 --> 00:16:22,380 Top frequencies. 274 00:16:22,380 --> 00:16:27,200 What's the most-- The highest oscillation I can get 275 00:16:27,200 --> 00:16:35,690 would be x equal, say, it starts one, minus one, one, minus one, 276 00:16:35,690 --> 00:16:37,380 so on. 277 00:16:37,380 --> 00:16:38,870 Both directions. 278 00:16:38,870 --> 00:16:41,210 Oscillating as fast as possible. 279 00:16:41,210 --> 00:16:44,990 I couldn't get a faster frequency of oscillation 280 00:16:44,990 --> 00:16:48,210 in a discrete signal than up, down, up, down. 281 00:16:48,210 --> 00:16:53,810 What's the output for that? 282 00:16:53,810 --> 00:16:58,430 So that's really oscillation. 283 00:16:58,430 --> 00:17:01,110 That's the fastest oscillation. 284 00:17:01,110 --> 00:17:03,430 What would be the output from my averaging 285 00:17:03,430 --> 00:17:06,590 filter for this input? 286 00:17:06,590 --> 00:17:08,420 Zero. 287 00:17:08,420 --> 00:17:12,810 At every step, I'm averaging this with the guy before 288 00:17:12,810 --> 00:17:13,850 and they add to zero. 289 00:17:13,850 --> 00:17:16,710 I'm averaging this with the guy before, this with the guy-- 290 00:17:16,710 --> 00:17:20,310 Output is, y equals all zeroes. 291 00:17:20,310 --> 00:17:26,810 OK, so that confirms in my mind that I have a lowpass filter. 292 00:17:26,810 --> 00:17:30,910 The high frequencies are getting wiped out. 293 00:17:30,910 --> 00:17:34,110 OK, so that's two examples. 294 00:17:34,110 --> 00:17:36,820 Now, what about frequencies in between? 295 00:17:36,820 --> 00:17:40,280 Because ultimately we want to see 296 00:17:40,280 --> 00:17:43,220 what's happening to frequencies in between. 297 00:17:43,220 --> 00:17:45,950 OK, so what's an in-between frequency? 298 00:17:45,950 --> 00:17:55,190 So in between, x_k could be e^(ikn), let's say. 299 00:17:55,190 --> 00:17:57,860 e^(ik*omega). 300 00:17:57,860 --> 00:18:00,010 e^(ik*omega). 301 00:18:00,010 --> 00:18:09,160 Where this omega is somewhere between minus pi and pi. 302 00:18:09,160 --> 00:18:13,270 OK, why do I say minus pi and pi? 303 00:18:13,270 --> 00:18:16,170 If the frequency-- So that's the frequency. 304 00:18:16,170 --> 00:18:19,860 If omega is zero, what's my signal? 305 00:18:19,860 --> 00:18:22,040 All ones, right? 306 00:18:22,040 --> 00:18:25,500 If omega is zero, everything is my all ones. 307 00:18:25,500 --> 00:18:26,740 This is this case. 308 00:18:26,740 --> 00:18:32,240 So I now have a letter for it, omega=0. 309 00:18:32,240 --> 00:18:34,640 What's this top frequency? 310 00:18:34,640 --> 00:18:37,630 One, minus one, one, minus one, what omega 311 00:18:37,630 --> 00:18:41,010 will give me alternating signs? 312 00:18:41,010 --> 00:18:43,200 Omega equal? 313 00:18:43,200 --> 00:18:44,130 Pi, right? 314 00:18:44,130 --> 00:18:45,690 Omega=pi. 315 00:18:45,690 --> 00:18:50,360 Because if this is pi, I have e^(i*pi), which is minus one. 316 00:18:50,360 --> 00:19:01,560 So when omega=pi, my inputs are e^(i*omega), to the k-th power. 317 00:19:01,560 --> 00:19:06,930 But this is minus one. e^(i*pi), to the k-th power, 318 00:19:06,930 --> 00:19:09,010 and that's minus one. 319 00:19:09,010 --> 00:19:12,270 So that's the top frequency. 320 00:19:12,270 --> 00:19:15,490 And also the bottom frequency is pi. 321 00:19:15,490 --> 00:19:20,260 And the zero frequency is the all ones. 322 00:19:20,260 --> 00:19:24,920 And this is what happens-- Ah. 323 00:19:24,920 --> 00:19:29,130 Now comes the point. 324 00:19:29,130 --> 00:19:32,470 What's the output if this is the input? 325 00:19:32,470 --> 00:19:34,870 What's the output when this is the input? 326 00:19:34,870 --> 00:19:36,380 We can easily figure that out. 327 00:19:36,380 --> 00:19:38,600 We can take that average. 328 00:19:38,600 --> 00:19:44,070 OK, so let me do that input. 329 00:19:44,070 --> 00:19:49,890 Input x_k is e^(ik*omega). 330 00:19:49,890 --> 00:19:52,750 331 00:19:52,750 --> 00:20:01,290 And now what's the output? y_k is the average of that. 332 00:20:01,290 --> 00:20:05,850 And the one before. 333 00:20:05,850 --> 00:20:09,250 Divided by two, right? 334 00:20:09,250 --> 00:20:14,030 OK, now you're certainly going to factor out, 335 00:20:14,030 --> 00:20:18,070 anybody who sees this is going to factor out e^(ik*omega), 336 00:20:18,070 --> 00:20:18,810 right? 337 00:20:18,810 --> 00:20:21,020 I mean that's sitting there, that's 338 00:20:21,020 --> 00:20:22,950 the whole point of these exponentials 339 00:20:22,950 --> 00:20:25,730 is they factor out of all linear stuff. 340 00:20:25,730 --> 00:20:33,770 So if I factor that out, I get a very, very important thing. 341 00:20:33,770 --> 00:20:37,380 I get, well, it's over two, I get a one. 342 00:20:37,380 --> 00:20:43,670 And I get, what's this term? e^(ik*omega) is here. 343 00:20:43,670 --> 00:20:48,300 So I only want e^(-i*omega). 344 00:20:48,300 --> 00:20:54,870 OK, that is called the frequency response. 345 00:20:54,870 --> 00:20:57,270 So that's telling me the response 346 00:20:57,270 --> 00:21:01,200 of-- what the filter does to frequency omega. 347 00:21:01,200 --> 00:21:04,200 It multiplies the signal. 348 00:21:04,200 --> 00:21:09,590 If I have a signal that's purely with frequency omega, 349 00:21:09,590 --> 00:21:12,630 that signal is getting multiplied by that response 350 00:21:12,630 --> 00:21:14,390 factor. 351 00:21:14,390 --> 00:21:15,810 1+e^(i*omega). 352 00:21:15,810 --> 00:21:21,240 When omega is zero, what is this quantity? 353 00:21:21,240 --> 00:21:27,510 So let me call this cap H of omega. 354 00:21:27,510 --> 00:21:31,570 What is this factor, if omega is zero? 355 00:21:31,570 --> 00:21:35,930 Then H at omega=0 is? 356 00:21:35,930 --> 00:21:37,040 One. 357 00:21:37,040 --> 00:21:41,560 That's telling me again that at zero frequency 358 00:21:41,560 --> 00:21:44,030 the output is the same as the input. 359 00:21:44,030 --> 00:21:45,730 Multiplied by one. 360 00:21:45,730 --> 00:21:52,550 And at omega equal to pi, what is this frequency response? 361 00:21:52,550 --> 00:21:53,380 Zero, right. 362 00:21:53,380 --> 00:21:58,050 At omega=pi, this is minus one so I get zero. 363 00:21:58,050 --> 00:22:02,340 And it's telling me again that this is the response. 364 00:22:02,340 --> 00:22:08,370 And now it's also telling me what the response factor is 365 00:22:08,370 --> 00:22:10,770 for the frequencies in between. 366 00:22:10,770 --> 00:22:15,080 And everybody would draw a graph of the darn thing, right? 367 00:22:15,080 --> 00:22:19,880 So this was simple, let me do its graph over here. 368 00:22:19,880 --> 00:22:23,090 So I'm going to graph H(omega). 369 00:22:23,090 --> 00:22:25,560 Well, I've a little problem. 370 00:22:25,560 --> 00:22:27,920 H(omega)'s a complex number. 371 00:22:27,920 --> 00:22:31,200 I'll graph the magnitude response. 372 00:22:31,200 --> 00:22:36,870 So here I'm going to do a graph from minus pi to pi. 373 00:22:36,870 --> 00:22:38,930 This is the picture. 374 00:22:38,930 --> 00:22:41,790 This is the picture people look at. 375 00:22:41,790 --> 00:22:46,350 This is the picture of what the filter is doing. 376 00:22:46,350 --> 00:22:50,070 All the information about the filter is in here. 377 00:22:50,070 --> 00:22:53,120 All the information is in there. 378 00:22:53,120 --> 00:22:56,690 So if I graph that, I know what the filter's doing. 379 00:22:56,690 --> 00:23:01,090 So you said at omega=0, I get a value of one. 380 00:23:01,090 --> 00:23:03,860 At omega=pi, I get a value of zero. 381 00:23:03,860 --> 00:23:06,660 At omega equal minus pi, I get a value of zero. 382 00:23:06,660 --> 00:23:10,900 And I think if you figure out the magnitude, 383 00:23:10,900 --> 00:23:12,480 it's just a cosine. 384 00:23:12,480 --> 00:23:15,980 It's just an arc of a cosine. 385 00:23:15,980 --> 00:23:19,400 OK, for that really, really simple filter. 386 00:23:19,400 --> 00:23:22,740 So any engineer, any signal processing person, 387 00:23:22,740 --> 00:23:27,140 looks at this graph of H(omega) and says 388 00:23:27,140 --> 00:23:31,490 that is a very fuzzy filter. 389 00:23:31,490 --> 00:23:36,240 A good, an ideal filter, an ideal lowpass filter, 390 00:23:36,240 --> 00:23:38,140 would do something like this. 391 00:23:38,140 --> 00:23:45,750 An ideal filter would stay at one up to some frequency, 392 00:23:45,750 --> 00:23:48,000 say pi/2. 393 00:23:48,000 --> 00:23:50,460 And drop instantly to zero. 394 00:23:50,460 --> 00:23:52,200 There is a really good filter. 395 00:23:52,200 --> 00:23:55,950 I mean, people would pay money for that filter. 396 00:23:55,950 --> 00:23:58,260 Because what happens when you send a signal 397 00:23:58,260 --> 00:24:00,300 through that ideal filter? 398 00:24:00,300 --> 00:24:03,780 It completely wipes out the top frequencies. 399 00:24:03,780 --> 00:24:06,910 Let's say, up after pi/2. 400 00:24:06,910 --> 00:24:09,700 And it completely saves the in-between ones. 401 00:24:09,700 --> 00:24:11,820 So that's really a sharp filter. 402 00:24:11,820 --> 00:24:14,830 Actually, what people would like to do 403 00:24:14,830 --> 00:24:18,270 would be to have that filter available. 404 00:24:18,270 --> 00:24:22,390 And then also to have a perfect, ideal highpass filter. 405 00:24:22,390 --> 00:24:26,480 What would be an ideal highpass filter? 406 00:24:26,480 --> 00:24:29,350 Yeah, let's talk about highpass filters just a moment. 407 00:24:29,350 --> 00:24:34,290 Because this is, you're seeing the reality of what people do, 408 00:24:34,290 --> 00:24:39,680 and how they-- and that little easy bit of math they do. 409 00:24:39,680 --> 00:24:41,790 Do you want to suggest a highpass filter, 410 00:24:41,790 --> 00:24:43,780 let me come back to this? 411 00:24:43,780 --> 00:24:46,980 And just change it a little? 412 00:24:46,980 --> 00:24:53,970 So I plan to do not-- I'm now going to do a different filter. 413 00:24:53,970 --> 00:24:56,080 That's going to be a highpass filter. 414 00:24:56,080 --> 00:24:58,230 And what do I mean by that? 415 00:24:58,230 --> 00:25:05,060 A highpass filter will kill the x_k=1. 416 00:25:05,060 --> 00:25:08,220 I now want the output from-- This is now going to be, 417 00:25:08,220 --> 00:25:09,060 I'm going to change. 418 00:25:09,060 --> 00:25:11,760 Can I just erase, change a lot of things? 419 00:25:11,760 --> 00:25:17,040 I'm now going to produce a highpass filter. 420 00:25:17,040 --> 00:25:19,910 Sorry, pi. 421 00:25:19,910 --> 00:25:21,650 And what's the difference? 422 00:25:21,650 --> 00:25:26,070 When all x's are one, the output is going to be? 423 00:25:26,070 --> 00:25:27,650 Zero. 424 00:25:27,650 --> 00:25:31,160 And when I have the highest frequency, 425 00:25:31,160 --> 00:25:32,600 the output is going to be? 426 00:25:32,600 --> 00:25:37,520 The input. 427 00:25:37,520 --> 00:25:40,170 And what am I-- And then in between, I'll 428 00:25:40,170 --> 00:25:42,000 do something in between. 429 00:25:42,000 --> 00:25:47,310 OK, what do you think would be a highpass filter, 430 00:25:47,310 --> 00:25:52,110 like the simplest highpass filter we can think of? 431 00:25:52,110 --> 00:25:53,370 Anybody think of it? 432 00:25:53,370 --> 00:25:58,410 You're only getting, like, 15 seconds to think in this class. 433 00:25:58,410 --> 00:26:01,060 That's a small drawback, 15 seconds. 434 00:26:01,060 --> 00:26:06,420 But, the highpass filter that I think of first 435 00:26:06,420 --> 00:26:12,250 is, take the difference. 436 00:26:12,250 --> 00:26:13,720 Take the difference. 437 00:26:13,720 --> 00:26:18,240 Put minus a halfs on the sub-diagonal. 438 00:26:18,240 --> 00:26:21,800 This is the same, this is also a convolution, 439 00:26:21,800 --> 00:26:24,770 but now what? h_0 is still a half. 440 00:26:24,770 --> 00:26:27,660 But now h_1 is? 441 00:26:27,660 --> 00:26:29,220 Minus 1/2. 442 00:26:29,220 --> 00:26:31,000 We're still convolving. 443 00:26:31,000 --> 00:26:33,840 We're still convolving, it's still 444 00:26:33,840 --> 00:26:37,070 linear time-invariant, that just means it's a convolution. 445 00:26:37,070 --> 00:26:39,660 It's still a finite impulse response. 446 00:26:39,660 --> 00:26:46,170 But the response, the impulse response is now 1/2 minus 1/2. 447 00:26:46,170 --> 00:26:49,430 So what happens if I, in my picture over here, 448 00:26:49,430 --> 00:26:55,560 if I send in any pure frequency, I'm now doing minus 1/2 here. 449 00:26:55,560 --> 00:26:57,990 So I'll just keep the plus. 450 00:26:57,990 --> 00:27:02,000 But I'll also add in the minus. 451 00:27:02,000 --> 00:27:08,310 So now I'm looking at one minus e^(-i*omega) over two. 452 00:27:08,310 --> 00:27:11,780 And again, let's plot a few points for that guy. 453 00:27:11,780 --> 00:27:14,530 So what, at x, at omega-- So this 454 00:27:14,530 --> 00:27:16,640 is omega in this direction. 455 00:27:16,640 --> 00:27:19,000 And this is h in this direction. 456 00:27:19,000 --> 00:27:24,570 So at omega=0, what's my highpass guy? 457 00:27:24,570 --> 00:27:32,820 When I send in a zero frequency, constant, I get what output? 458 00:27:32,820 --> 00:27:37,800 Zeroes, because now-- I'll call it a differencing filter. 459 00:27:37,800 --> 00:27:44,650 So I'll just, instead of averaging I'm differencing. 460 00:27:44,650 --> 00:27:48,220 OK, so now for this one, maybe I'll 461 00:27:48,220 --> 00:27:50,770 put an x to indicate I'm now doing, 462 00:27:50,770 --> 00:27:53,460 I'll do x's for the high pass. 463 00:27:53,460 --> 00:27:57,650 So this now, the high pass guy, kills the low frequency 464 00:27:57,650 --> 00:28:00,530 and preserves the high frequency. 465 00:28:00,530 --> 00:28:04,220 And you won't be surprised to find 466 00:28:04,220 --> 00:28:08,200 it's some cosine or something that, well yeah, 467 00:28:08,200 --> 00:28:15,200 it's got-- Sorry, that's not much of a cosine. 468 00:28:15,200 --> 00:28:26,950 It's the mirror image of the lowpass guy. 469 00:28:26,950 --> 00:28:29,120 And maybe the sum of squares adds 470 00:28:29,120 --> 00:28:30,990 to one or two or something. 471 00:28:30,990 --> 00:28:32,410 One, probably. 472 00:28:32,410 --> 00:28:34,810 The sum of squares probably adds to one. 473 00:28:34,810 --> 00:28:39,630 And they're kind of complementary filters. 474 00:28:39,630 --> 00:28:41,540 But they're very poor. 475 00:28:41,540 --> 00:28:47,170 Very crude, I mean that's so far from the ideal filter. 476 00:28:47,170 --> 00:28:52,490 So how would we create a closer to ideal filter? 477 00:28:52,490 --> 00:28:57,030 Well, we need more h's. 478 00:28:57,030 --> 00:28:59,930 With two h's, we're doing the best we can, 479 00:28:59,930 --> 00:29:02,120 with just h_0 and h_1. 480 00:29:02,120 --> 00:29:04,790 With a longer filter, for which we're 481 00:29:04,790 --> 00:29:07,170 going to have to pay a little more to use, 482 00:29:07,170 --> 00:29:08,860 but we'll get a lot more. 483 00:29:08,860 --> 00:29:10,810 We'll get something, we could get 484 00:29:10,810 --> 00:29:14,854 a filter that stays pretty close to this, drops pretty fast. 485 00:29:14,854 --> 00:29:15,770 There's a whole world. 486 00:29:15,770 --> 00:29:22,400 Bell Labs had a little team of filter experts. 487 00:29:22,400 --> 00:29:25,540 Creating, and now MATLAB will create it 488 00:29:25,540 --> 00:29:29,770 for you, the coefficients h, that would give you 489 00:29:29,770 --> 00:29:32,740 a response, a frequency response, that'll 490 00:29:32,740 --> 00:29:36,550 stay up toward, up close to one as long as possible. 491 00:29:36,550 --> 00:29:41,150 And drop as fast as possible, and bounce around there. 492 00:29:41,150 --> 00:29:45,110 So next week, if I come back to that topic, 493 00:29:45,110 --> 00:29:50,450 I can say a little more about these really good filters. 494 00:29:50,450 --> 00:29:53,680 What was I trying to do today? 495 00:29:53,680 --> 00:29:59,590 Trying to see how convolution is used. 496 00:29:59,590 --> 00:30:02,100 And this is a use you will really make. 497 00:30:02,100 --> 00:30:04,660 So now I just have, I think, about two more things 498 00:30:04,660 --> 00:30:06,740 to say about this example. 499 00:30:06,740 --> 00:30:08,850 Let's see, what are they? 500 00:30:08,850 --> 00:30:11,110 Well, first, so all the information 501 00:30:11,110 --> 00:30:12,090 is in this H(omega). 502 00:30:12,090 --> 00:30:15,320 503 00:30:15,320 --> 00:30:18,360 Oh, yeah. 504 00:30:18,360 --> 00:30:24,860 This simple example gives us a way to visualize convolution. 505 00:30:24,860 --> 00:30:26,380 And I think we need that. 506 00:30:26,380 --> 00:30:27,210 Right? 507 00:30:27,210 --> 00:30:30,780 Because up to now, convolution has been a formula. 508 00:30:30,780 --> 00:30:31,820 Right? 509 00:30:31,820 --> 00:30:34,410 It's been this formula. 510 00:30:34,410 --> 00:30:36,220 That's the formula for convolution, 511 00:30:36,220 --> 00:30:39,080 and how do I visualize that? 512 00:30:39,080 --> 00:30:43,250 Just think of, may I try to visualize that? 513 00:30:43,250 --> 00:30:50,250 Here I have, this is the time line. 514 00:30:50,250 --> 00:30:57,530 The different k's. k equals zero, one, two, minus one. 515 00:30:57,530 --> 00:31:03,820 And I have x_(-1), x_0, x_1, x_2, x_3. 516 00:31:03,820 --> 00:31:08,260 So that would be a little bouncy up and down. 517 00:31:08,260 --> 00:31:12,710 And the averaging filter, let me go back to the averaging one. 518 00:31:12,710 --> 00:31:17,940 The averaging filter would smooth out the bumps. 519 00:31:17,940 --> 00:31:23,300 Because it would take the, it would, like, average neighbors. 520 00:31:23,300 --> 00:31:26,700 And that's a smoothing process. 521 00:31:26,700 --> 00:31:32,000 As we see here, it's a process that kills high frequencies. 522 00:31:32,000 --> 00:31:37,010 Now, what is this visualization I want you to think of? 523 00:31:37,010 --> 00:31:41,460 I want you to just think of, like, a moving window. 524 00:31:41,460 --> 00:31:44,240 So here is the input. 525 00:31:44,240 --> 00:31:47,390 Now, I move a window along. 526 00:31:47,390 --> 00:31:51,970 And that window, so let's say here's the window, 527 00:31:51,970 --> 00:31:54,010 I should have another. 528 00:31:54,010 --> 00:31:55,300 So that's the window. 529 00:31:55,300 --> 00:32:00,380 When the window is there, it takes the average of those two. 530 00:32:00,380 --> 00:32:02,960 That gives me the new output. 531 00:32:02,960 --> 00:32:06,490 Now, think of the window as moving along here, 532 00:32:06,490 --> 00:32:08,270 taking the average of these. 533 00:32:08,270 --> 00:32:10,980 Move the window along, take the average of these. 534 00:32:10,980 --> 00:32:12,440 Move the window along. 535 00:32:12,440 --> 00:32:18,930 Do you see the sort of, this is what a convolution is doing. 536 00:32:18,930 --> 00:32:28,740 This is a picture of my formula, sum of h_k*x_(l-k). 537 00:32:28,740 --> 00:32:32,780 So the window is the h's, is the width of the h's, 538 00:32:32,780 --> 00:32:35,590 and as that window moves along. 539 00:32:35,590 --> 00:32:39,490 I mean, you could write, you could create, 540 00:32:39,490 --> 00:32:44,460 design a little circuit that would do exactly this. 541 00:32:44,460 --> 00:32:46,530 That would do the convolution. 542 00:32:46,530 --> 00:32:50,820 You just have to put together some multipliers, 543 00:32:50,820 --> 00:32:54,580 because you have these h's, these, like, halves. 544 00:32:54,580 --> 00:32:59,220 And you have to put in an adder, that'll add the pieces. 545 00:32:59,220 --> 00:33:07,670 And those are the essential little electronic pieces 546 00:33:07,670 --> 00:33:12,430 of an actual filter. 547 00:33:12,430 --> 00:33:13,760 Then you just move it along. 548 00:33:13,760 --> 00:33:16,220 So it needs a delay. 549 00:33:16,220 --> 00:33:18,710 That's about the content of a filter. 550 00:33:18,710 --> 00:33:26,410 Is multipliers that will multiply by the h's, so in come 551 00:33:26,410 --> 00:33:32,730 the x, multiply by the h's, do the addition, 552 00:33:32,730 --> 00:33:37,680 and do a shift to get onto the next one. 553 00:33:37,680 --> 00:33:39,630 You see how a filter works? 554 00:33:39,630 --> 00:33:41,920 I think that image of convolution 555 00:33:41,920 --> 00:33:44,610 is a little bit vague, maybe? 556 00:33:44,610 --> 00:33:46,840 This window moving along? 557 00:33:46,840 --> 00:33:51,110 But it's quite meaningful. 558 00:33:51,110 --> 00:33:56,830 And then the final thing I'll say about filters is this. 559 00:33:56,830 --> 00:34:03,320 That, what's the connection between H(omega) and h(k)? 560 00:34:03,320 --> 00:34:06,990 Or h sub k, let me call it h sub k. 561 00:34:06,990 --> 00:34:11,780 What's the connection between the numbers 562 00:34:11,780 --> 00:34:18,770 in impulse response, just, which were the h's, and the function, 563 00:34:18,770 --> 00:34:24,140 which is the frequency response, which tells me what happens 564 00:34:24,140 --> 00:34:25,990 to a particular frequency? 565 00:34:25,990 --> 00:34:27,940 Each frequency, e to the-- You notice 566 00:34:27,940 --> 00:34:31,750 how the frequency that went in is 567 00:34:31,750 --> 00:34:34,050 the frequency that comes out. 568 00:34:34,050 --> 00:34:37,610 It's just amplified or diminished 569 00:34:37,610 --> 00:34:41,080 by this H(omega) factor. 570 00:34:41,080 --> 00:34:47,300 So you see the h's are the coefficients here of H(omega). 571 00:34:47,300 --> 00:34:50,070 In other words, H(omega) is the sum 572 00:34:50,070 --> 00:34:56,460 of the h_k's, e to the-- e to the minus ik-- 573 00:34:56,460 --> 00:35:00,990 Here's the beautiful formula. 574 00:35:00,990 --> 00:35:05,810 That's obvious, right? 575 00:35:05,810 --> 00:35:08,460 Here you're seeing the formula in the simplest case, 576 00:35:08,460 --> 00:35:11,170 with just an h_0 and an h_1. 577 00:35:11,170 --> 00:35:15,350 But of course, it would have worked if I had several h's. 578 00:35:15,350 --> 00:35:19,190 So this H(omega), this factor that comes out, 579 00:35:19,190 --> 00:35:22,320 is just this guy. 580 00:35:22,320 --> 00:35:30,490 Now, if I look at that, what am I saying? 581 00:35:30,490 --> 00:35:36,450 I've seen things that connect a function of omega 582 00:35:36,450 --> 00:35:41,020 with a number of filter coefficients. 583 00:35:41,020 --> 00:35:45,420 I saw that in Section 4.1, in Fourier series. 584 00:35:45,420 --> 00:35:50,140 This is the Fourier series for that function. 585 00:35:50,140 --> 00:35:52,350 Right? 586 00:35:52,350 --> 00:35:55,720 You might say, OK, why that minus? 587 00:35:55,720 --> 00:35:58,590 I say, it's there because the electrical engineers put it 588 00:35:58,590 --> 00:35:59,210 there. 589 00:35:59,210 --> 00:36:00,870 They liked it. 590 00:36:00,870 --> 00:36:04,140 And the rest of the world has to live with it. 591 00:36:04,140 --> 00:36:08,560 So, you notice I don't concede on i. 592 00:36:08,560 --> 00:36:11,120 I refuse to write j. 593 00:36:11,120 --> 00:36:14,020 But they all would. 594 00:36:14,020 --> 00:36:17,820 I speak about they, but probably some you would write j. 595 00:36:17,820 --> 00:36:22,740 So I'm hoping it's OK if I write i. i is for imaginary. 596 00:36:22,740 --> 00:36:25,770 I don't see how you could say the word imaginary starting 597 00:36:25,770 --> 00:36:29,730 with a j. 598 00:36:29,730 --> 00:36:33,090 And what was the matter with i, anyway? 599 00:36:33,090 --> 00:36:33,600 Current. 600 00:36:33,600 --> 00:36:35,970 Well, current used to be i. 601 00:36:35,970 --> 00:36:39,560 I mean who, is it still? 602 00:36:39,560 --> 00:36:41,080 Well, let's just accept it. 603 00:36:41,080 --> 00:36:44,512 OK, they can call the current i, and the square root 604 00:36:44,512 --> 00:36:48,510 of minus one j, but not in 18.085. 605 00:36:48,510 --> 00:36:52,390 So OK, here we are. 606 00:36:52,390 --> 00:36:57,010 So my point is just that we have a Fourier series. 607 00:36:57,010 --> 00:37:01,600 Here we a 2pi periodic function. 608 00:37:01,600 --> 00:37:04,800 Here we have its Fourier coefficients. 609 00:37:04,800 --> 00:37:10,830 The only difference is that we started with the coefficients. 610 00:37:10,830 --> 00:37:12,900 And created the function. 611 00:37:12,900 --> 00:37:19,350 But otherwise, we're back to Section 4.1, Fourier series. 612 00:37:19,350 --> 00:37:22,370 But that fact that we started with the coefficients 613 00:37:22,370 --> 00:37:26,680 and built the function, sometimes you 614 00:37:26,680 --> 00:37:28,910 could say, OK that sounds a little 615 00:37:28,910 --> 00:37:30,950 different from the regular Fourier series, 616 00:37:30,950 --> 00:37:32,480 where you go the other way. 617 00:37:32,480 --> 00:37:36,170 So people give it the name discrete-time 618 00:37:36,170 --> 00:37:37,510 Fourier transform. 619 00:37:37,510 --> 00:37:40,090 You might see those letters sometime. 620 00:37:40,090 --> 00:37:42,250 The discrete-time Fourier transform 621 00:37:42,250 --> 00:37:47,200 goes from the coefficients to the function. 622 00:37:47,200 --> 00:37:50,430 Where the standard Fourier series starts with a function, 623 00:37:50,430 --> 00:37:51,840 goes to the coefficients. 624 00:37:51,840 --> 00:37:54,780 But really, it doesn't matter. 625 00:37:54,780 --> 00:37:56,790 The point is, yeah. 626 00:37:56,790 --> 00:38:01,110 So you could say, maybe we have now a fourth transform. 627 00:38:01,110 --> 00:38:03,830 Like the first transform was Fourier series. 628 00:38:03,830 --> 00:38:05,780 The second one was the discrete. 629 00:38:05,780 --> 00:38:07,530 The third one is the Fourier integral 630 00:38:07,530 --> 00:38:09,590 that's coming in one minute. 631 00:38:09,590 --> 00:38:12,200 And the fourth is this one. 632 00:38:12,200 --> 00:38:19,350 But hey, it's just the coefficients 633 00:38:19,350 --> 00:38:24,550 and the function have switched places, in the, 634 00:38:24,550 --> 00:38:30,824 which one is the start and which one is at the end. 635 00:38:30,824 --> 00:38:32,490 OK, let me pause a minute because that's 636 00:38:32,490 --> 00:38:36,450 everything I wanted to say about simple filters. 637 00:38:36,450 --> 00:38:41,840 And you can see that this is a very simple filter, 638 00:38:41,840 --> 00:38:44,910 and could be improved. 639 00:38:44,910 --> 00:38:47,190 Better numbers would give, I mean 640 00:38:47,190 --> 00:38:48,530 what would be better numbers? 641 00:38:48,530 --> 00:38:54,680 I suppose that 1/4, 1/2, 1/4 would probably be better. 642 00:38:54,680 --> 00:38:57,160 If I took those numbers, I'm pretty 643 00:38:57,160 --> 00:39:06,950 sure that this thing would be closer to ideal by quite a bit. 644 00:39:06,950 --> 00:39:11,310 If I plotted-- So what do I mean by, those are the h's. 645 00:39:11,310 --> 00:39:18,370 So I would take 1/4 plus 1/2 e^(-i*omega) plus 1/4 646 00:39:18,370 --> 00:39:19,000 e^(-2i*omega). 647 00:39:19,000 --> 00:39:23,680 This would be my better H(omega). 648 00:39:23,680 --> 00:39:27,990 This would be my frequency response to a better averaging 649 00:39:27,990 --> 00:39:32,090 filter, sort of this is like averaged averaged, right? 650 00:39:32,090 --> 00:39:35,630 If I do a half an average and then I do the average again. 651 00:39:35,630 --> 00:39:40,780 In other words, if I just send these signals y_k 652 00:39:40,780 --> 00:39:44,060 through that same averaging filter, so average 653 00:39:44,060 --> 00:39:49,580 again to get a z_k, I think probably the coefficients 654 00:39:49,580 --> 00:39:52,260 would be 1/4, 1/2, 1/4, and it would 655 00:39:52,260 --> 00:39:54,860 be, I've taken out more noise. 656 00:39:54,860 --> 00:39:56,880 Right? 657 00:39:56,880 --> 00:40:00,600 Each time I did that averaging, I damp the high frequencies, 658 00:40:00,600 --> 00:40:03,380 so if I do it twice I get more damping. 659 00:40:03,380 --> 00:40:07,610 But I lose signal, of course. 660 00:40:07,610 --> 00:40:11,640 I mean, presumably there's some information in the signal 661 00:40:11,640 --> 00:40:12,990 in these frequencies. 662 00:40:12,990 --> 00:40:15,470 And I'm reducing it. 663 00:40:15,470 --> 00:40:18,540 And if I average twice I'm reducing it further. 664 00:40:18,540 --> 00:40:23,580 So a better one would be to get a sharp cutoff. 665 00:40:23,580 --> 00:40:27,430 OK, that's filters. 666 00:40:27,430 --> 00:40:33,840 I guess what I hope is that we have the idea of a convolution, 667 00:40:33,840 --> 00:40:36,580 and now we see what we can use it for. 668 00:40:36,580 --> 00:40:37,920 Right? 669 00:40:37,920 --> 00:40:39,150 And there are many others. 670 00:40:39,150 --> 00:40:40,340 So we'll have another. 671 00:40:40,340 --> 00:40:44,860 We'll come back to convolutions and de-convolution. 672 00:40:44,860 --> 00:40:48,380 Because if you have a CT scanner, 673 00:40:48,380 --> 00:40:51,180 that doing a little convolution. 674 00:40:51,180 --> 00:40:54,530 I mean, you're the input, right, to the CT scanner? 675 00:40:54,530 --> 00:40:57,230 You march in, hoping for the best. 676 00:40:57,230 --> 00:41:02,630 OK, CT scanner convolves you with their little filter. 677 00:41:02,630 --> 00:41:07,490 And then it does a deconvolution, 678 00:41:07,490 --> 00:41:15,570 to an approximate deconvolution, to have a better image of you. 679 00:41:15,570 --> 00:41:19,450 OK, let's leave that. 680 00:41:19,450 --> 00:41:21,880 Can I change direction and just write down 681 00:41:21,880 --> 00:41:27,120 the formulas for the Fourier integral transform? 682 00:41:27,120 --> 00:41:29,430 And do one example? 683 00:41:29,430 --> 00:41:32,980 OK. 684 00:41:32,980 --> 00:41:37,000 I don't know what you think about a lecture that 685 00:41:37,000 --> 00:41:41,870 stops and starts a new topic. 686 00:41:41,870 --> 00:41:46,450 Is it, maybe it's tough on the listener? 687 00:41:46,450 --> 00:41:48,980 Or maybe it's a break. 688 00:41:48,980 --> 00:41:49,630 I don't know. 689 00:41:49,630 --> 00:41:51,320 Let's look at it positively. 690 00:41:51,320 --> 00:41:53,450 Alright, break. 691 00:41:53,450 --> 00:41:58,010 Alright. 692 00:41:58,010 --> 00:42:02,990 So let me remember the Fourier series formulas. 693 00:42:02,990 --> 00:42:05,040 So I'm just going to break, and now we 694 00:42:05,040 --> 00:42:09,030 go to the integral transform. 695 00:42:09,030 --> 00:42:13,190 OK, so let me remember the formula for the coefficients, 696 00:42:13,190 --> 00:42:22,990 which was 1/(2pi), the integral of f(x)e^(-ikx)dx, right? 697 00:42:22,990 --> 00:42:26,840 And then when we added it up to get f(x) back again, 698 00:42:26,840 --> 00:42:34,900 we added up a sum of the c_k's e^(ikx)'s, right? 699 00:42:34,900 --> 00:42:37,260 That's 4.1. 700 00:42:37,260 --> 00:42:39,030 We know those formulas. 701 00:42:39,030 --> 00:42:40,710 And we notice again. 702 00:42:40,710 --> 00:42:42,020 Complex conjugate. 703 00:42:42,020 --> 00:42:44,460 One direction is the conjugate compared 704 00:42:44,460 --> 00:42:45,810 to the other direction. 705 00:42:45,810 --> 00:42:51,430 Now, all I plan to do is write down the formula. 706 00:42:51,430 --> 00:42:55,250 And remember, I'm going to use f hat of k, 707 00:42:55,250 --> 00:42:57,370 instead of the coefficients. 708 00:42:57,370 --> 00:43:01,160 Because it's a function of k, all k's and not just integers 709 00:43:01,160 --> 00:43:02,020 are allowed. 710 00:43:02,020 --> 00:43:05,090 And then I'm going to recover f(x). 711 00:43:05,090 --> 00:43:08,090 OK, now this integral went from minus pi 712 00:43:08,090 --> 00:43:10,190 to pi, because that was periodic. 713 00:43:10,190 --> 00:43:13,450 But now all the integrals are going to go from minus infinity 714 00:43:13,450 --> 00:43:15,020 to infinity. 715 00:43:15,020 --> 00:43:17,550 We've got every k, every x. 716 00:43:17,550 --> 00:43:21,230 So we take, what do you expect here? f(x)? 717 00:43:21,230 --> 00:43:23,720 e^(-ikx)? 718 00:43:23,720 --> 00:43:24,380 dx? 719 00:43:24,380 --> 00:43:25,600 Yes. 720 00:43:25,600 --> 00:43:27,560 Fine. 721 00:43:27,560 --> 00:43:32,690 Same thing, f(x) is there, but now any k is allowed so I have 722 00:43:32,690 --> 00:43:34,350 a function of all k's. 723 00:43:34,350 --> 00:43:36,910 And now I want to recover f(x). 724 00:43:36,910 --> 00:43:38,470 So what do I do? 725 00:43:38,470 --> 00:43:39,450 You can guess. 726 00:43:39,450 --> 00:43:41,590 I've got an integral now. 727 00:43:41,590 --> 00:43:43,160 Not a sum. 728 00:43:43,160 --> 00:43:47,800 Because a sum was when I had only integer numbers. 729 00:43:47,800 --> 00:43:52,680 Now, I've got f hat of k, and would you 730 00:43:52,680 --> 00:43:58,020 like to tell me what the magic factor is, there 731 00:43:58,020 --> 00:44:00,490 in the integral formula? 732 00:44:00,490 --> 00:44:02,860 It's just what you hope. 733 00:44:02,860 --> 00:44:07,110 It's the e^(ik*omega). 734 00:44:07,110 --> 00:44:08,670 d what? 735 00:44:08,670 --> 00:44:14,610 Now this is where it's easy to make a mistake. d, 736 00:44:14,610 --> 00:44:16,130 I'm integrating here. 737 00:44:16,130 --> 00:44:19,750 I'm putting the whole, reconstructing the function. 738 00:44:19,750 --> 00:44:23,360 I'm putting back the harmonics with the amount, 739 00:44:23,360 --> 00:44:28,330 f hat of k tells me how much e^(ik*omega) there is 740 00:44:28,330 --> 00:44:29,560 in the function. 741 00:44:29,560 --> 00:44:34,630 I put them all together, so I integrate dk. 742 00:44:34,630 --> 00:44:36,440 I'm integrating over the frequencies. 743 00:44:36,440 --> 00:44:39,390 This was the sum over k. 744 00:44:39,390 --> 00:44:41,200 From minus infinity to infinity. 745 00:44:41,200 --> 00:44:46,020 Now this is an integral, because we've got, it's all filled in. 746 00:44:46,020 --> 00:44:49,060 And it remains to deal with this 2pi. 747 00:44:49,060 --> 00:44:54,130 And I see in the book that the 2pi went there. 748 00:44:54,130 --> 00:44:55,180 I don't know why. 749 00:44:55,180 --> 00:44:56,720 Anyway, there it is. 750 00:44:56,720 --> 00:45:00,250 So let's follow that convention. 751 00:45:00,250 --> 00:45:01,920 Put the 2pi here. 752 00:45:01,920 --> 00:45:05,110 So there's the formula. 753 00:45:05,110 --> 00:45:07,460 The pair of formulas, the twin formulas. 754 00:45:07,460 --> 00:45:11,800 The transform, from f to f hat, and the inverse 755 00:45:11,800 --> 00:45:14,560 transform, from f hat back to f. 756 00:45:14,560 --> 00:45:22,730 And it's just like the one you've seen for Fourier series. 757 00:45:22,730 --> 00:45:26,800 Well, I think the only good way to remember 758 00:45:26,800 --> 00:45:32,620 those is to put in a function and find its transform. 759 00:45:32,620 --> 00:45:37,760 So my final thing for today would be take 760 00:45:37,760 --> 00:45:39,620 a particular function, f(x). 761 00:45:39,620 --> 00:45:42,390 762 00:45:42,390 --> 00:45:44,210 Here, let me take ever f(x) to be, 763 00:45:44,210 --> 00:45:52,560 here's one. f to be zero here, and then a jump to one. 764 00:45:52,560 --> 00:45:54,890 And then an exponential decay. 765 00:45:54,890 --> 00:45:56,000 So e^(-ax). 766 00:45:56,000 --> 00:46:00,130 767 00:46:00,130 --> 00:46:03,130 OK, so that's the input. 768 00:46:03,130 --> 00:46:06,580 It's not odd, it's not even. 769 00:46:06,580 --> 00:46:12,290 So I expect sort of a complex f hat of k, which I can compute. 770 00:46:12,290 --> 00:46:14,800 So f hat of k is what? 771 00:46:14,800 --> 00:46:18,060 Now, let's just figure out f hat of k and look 772 00:46:18,060 --> 00:46:21,100 at the decay rate and all the other good stuff. 773 00:46:21,100 --> 00:46:23,040 So what do I do? 774 00:46:23,040 --> 00:46:27,060 I'm just doing this integral. 775 00:46:27,060 --> 00:46:28,380 For practice. 776 00:46:28,380 --> 00:46:31,130 OK, so f is zero in the first half. 777 00:46:31,130 --> 00:46:34,630 So I really only integrate zero to infinity. 778 00:46:34,630 --> 00:46:41,350 And in that region it's e^(-ax), and I multiply by e^(-ikx), 779 00:46:41,350 --> 00:46:46,360 and I integrate dx, and what do I get? 780 00:46:46,360 --> 00:46:49,890 I'll get, this is an integral we can do, 781 00:46:49,890 --> 00:46:58,370 and it's easy because this is e^(-(a+ik)x). 782 00:46:58,370 --> 00:47:02,730 You're always going to see it that way, right? 783 00:47:02,730 --> 00:47:04,120 That we're integrating. 784 00:47:04,120 --> 00:47:06,260 And then the integral of an exponential 785 00:47:06,260 --> 00:47:14,100 is the exponential divided by the factor that will come down 786 00:47:14,100 --> 00:47:15,350 when we take the derivative. 787 00:47:15,350 --> 00:47:19,770 So I think we just have this, right? 788 00:47:19,770 --> 00:47:20,770 Don't you think? 789 00:47:20,770 --> 00:47:23,370 To integrate that exponential, we just 790 00:47:23,370 --> 00:47:26,550 get the exponential divided by its little factor. 791 00:47:26,550 --> 00:47:29,320 And now we have to stick in the limits. 792 00:47:29,320 --> 00:47:31,950 And what do I get at the limits? 793 00:47:31,950 --> 00:47:36,550 This is like, a fun part of Fourier integral formulas. 794 00:47:36,550 --> 00:47:41,660 What do I get at the upper limit, x equal infinity? 795 00:47:41,660 --> 00:47:47,190 If x is very large, what does this thing do? 796 00:47:47,190 --> 00:47:50,740 Goes to zero. 797 00:47:50,740 --> 00:47:52,590 It's gone. 798 00:47:52,590 --> 00:47:57,640 The e^(ikx) is oscillating around, it's of size one. 799 00:47:57,640 --> 00:48:01,850 But the e^(-ax), so I needed a to be positive here. 800 00:48:01,850 --> 00:48:07,130 That picture had to be the right one. a positive. 801 00:48:07,130 --> 00:48:10,390 Then at infinity, I get zero. 802 00:48:10,390 --> 00:48:12,800 So now I just plug in this lower limit, 803 00:48:12,800 --> 00:48:14,750 that comes with a minus sign. 804 00:48:14,750 --> 00:48:15,990 So what do I get? 805 00:48:15,990 --> 00:48:19,560 The minus sign will make this a+ik, 806 00:48:19,560 --> 00:48:23,720 and what does it thing equal at x=0? 807 00:48:23,720 --> 00:48:27,350 One. e^0 is one. 808 00:48:27,350 --> 00:48:31,760 So there is the Fourier transform. 809 00:48:31,760 --> 00:48:36,410 Of my one-sided exponential. 810 00:48:36,410 --> 00:48:39,600 Now, just a quick look at that and then I'll do some more, 811 00:48:39,600 --> 00:48:45,720 this example's Example one in Section 4.5, 812 00:48:45,720 --> 00:48:49,160 and we'll do more examples. 813 00:48:49,160 --> 00:48:53,170 But let's just look at that one. 814 00:48:53,170 --> 00:48:58,650 I see a jump in the function. 815 00:48:58,650 --> 00:49:05,770 What do I expect in the decay rate of the transform? 816 00:49:05,770 --> 00:49:12,740 So a jump in the function, I expect a decay rate of 1/k. 817 00:49:12,740 --> 00:49:15,120 Decay rate, right? 818 00:49:15,120 --> 00:49:17,480 Just as for Fourier coefficients, so 819 00:49:17,480 --> 00:49:19,260 for the integral transform. 820 00:49:19,260 --> 00:49:23,290 So a decay rate in f hat. 821 00:49:23,290 --> 00:49:25,180 And it's here. 822 00:49:25,180 --> 00:49:28,080 1/k in the denominator. 823 00:49:28,080 --> 00:49:29,590 Yeah. 824 00:49:29,590 --> 00:49:34,400 So that's a a good example. 825 00:49:34,400 --> 00:49:38,630 You might say, wait a minute, OK that's fine but what 826 00:49:38,630 --> 00:49:40,510 about the second one? 827 00:49:40,510 --> 00:49:47,000 Could I put in 1/(a+ik) and get back the pulse? 828 00:49:47,000 --> 00:49:49,470 The exponential pulse? 829 00:49:49,470 --> 00:49:51,760 The answer is yes, but maybe I don't 830 00:49:51,760 --> 00:49:53,620 know how to do that integral. 831 00:49:53,620 --> 00:49:56,550 So I'm sort of fortunate that these formulas 832 00:49:56,550 --> 00:50:00,860 are proved for any function including this function. 833 00:50:00,860 --> 00:50:08,350 So this example shows the decay rate. 834 00:50:08,350 --> 00:50:12,020 The possibility sometimes of doing one integral 835 00:50:12,020 --> 00:50:15,230 but maybe the other integral going the other direction 836 00:50:15,230 --> 00:50:16,360 is not so easy. 837 00:50:16,360 --> 00:50:17,760 And that's normal. 838 00:50:17,760 --> 00:50:20,610 So that's, like, Fourier transforms and inverse 839 00:50:20,610 --> 00:50:26,460 transforms, we don't expect to be able to do them all by hand. 840 00:50:26,460 --> 00:50:32,160 I mean, I'll just say that actually, anybody 841 00:50:32,160 --> 00:50:37,040 who studies complex variables and residues, 842 00:50:37,040 --> 00:50:38,660 I don't know if you know any of this, 843 00:50:38,660 --> 00:50:42,580 heard these words about-- There are ways to integrate. 844 00:50:42,580 --> 00:50:47,350 I could put 1/(a+ik) in here. 845 00:50:47,350 --> 00:50:50,100 And, actually, and do this integral 846 00:50:50,100 --> 00:50:51,800 for minus infinity to infinity. 847 00:50:51,800 --> 00:50:54,290 By stuff that's in Chapter 5. 848 00:50:54,290 --> 00:50:59,450 Can I just point ahead without any plan to discuss it. 849 00:50:59,450 --> 00:51:05,370 That some integrals can be done by x+iy tricks, 850 00:51:05,370 --> 00:51:08,680 by using complex numbers. 851 00:51:08,680 --> 00:51:10,450 But I won't do more. 852 00:51:10,450 --> 00:51:11,540 OK, thanks. 853 00:51:11,540 --> 00:51:15,460 So that's the formulas. 854 00:51:15,460 --> 00:51:17,650 And that's one example. 855 00:51:17,650 --> 00:51:21,030 Wednesday there will be more examples and then no review 856 00:51:21,030 --> 00:51:23,330 session Wednesday evening.