1 00:00:00,560 --> 00:00:02,760 PROFESSOR: Convolution is a tricky concept 2 00:00:02,760 --> 00:00:04,420 and hard to understand. 3 00:00:04,420 --> 00:00:06,800 But it gives so much insight that it's worthwhile 4 00:00:06,800 --> 00:00:08,710 coming to grips with it. 5 00:00:08,710 --> 00:00:10,840 The Convolution: Accumulation mathlet 6 00:00:10,840 --> 00:00:14,710 provides one perspective on the convolution integral. 7 00:00:14,710 --> 00:00:18,080 I'll explain the applet using a story. 8 00:00:18,080 --> 00:00:20,890 There's a lake in Iowa with a stream running into it 9 00:00:20,890 --> 00:00:23,000 and a stream running out of it. 10 00:00:23,000 --> 00:00:26,560 Farm runoff puts phosphate into the lake. 11 00:00:26,560 --> 00:00:30,150 The rate of deposition of the phosphate varies over the year. 12 00:00:30,150 --> 00:00:33,550 Most in the summer, none in the dead of winter. 13 00:00:33,550 --> 00:00:37,330 Suppose the farm is new and that t equals 0, 14 00:00:37,330 --> 00:00:39,550 there is no phosphate in the lake. 15 00:00:39,550 --> 00:00:42,780 This is called rest initial conditions. 16 00:00:42,780 --> 00:00:45,980 The question is, how much phosphate is there 17 00:00:45,980 --> 00:00:49,860 in the lake at some later time, say t. 18 00:00:49,860 --> 00:00:53,290 This will be an accumulation of contributions from earlier 19 00:00:53,290 --> 00:00:55,770 times, but the earlier contributions 20 00:00:55,770 --> 00:00:59,650 will have decayed somewhat by time t. 21 00:00:59,650 --> 00:01:02,710 We can visualize this process using the Convolution: 22 00:01:02,710 --> 00:01:04,780 Accumulation mathlet. 23 00:01:04,780 --> 00:01:08,100 I'll set it up to model what we're looking at. 24 00:01:08,100 --> 00:01:13,010 The signal f of t is the rate of input of phosphate 25 00:01:13,010 --> 00:01:14,290 into the lake. 26 00:01:14,290 --> 00:01:20,260 And I will model it by the menu item f of t is 1 plus cosine 27 00:01:20,260 --> 00:01:21,810 b*t. 28 00:01:21,810 --> 00:01:24,765 You can see it drawn in the lower graphing window here. 29 00:01:29,300 --> 00:01:32,700 A certain proportion of the phosphate in the lake 30 00:01:32,700 --> 00:01:36,200 leaves it during each unit of time. 31 00:01:36,200 --> 00:01:40,710 This results in an exponential decay of each contribution. 32 00:01:40,710 --> 00:01:44,690 This decay profile is called the weight function, denoted here 33 00:01:44,690 --> 00:01:46,390 by g of t. 34 00:01:46,390 --> 00:01:48,755 And I will select the weight function, 35 00:01:48,755 --> 00:01:52,320 giving exponential decay e to the minus a*t. 36 00:01:56,082 --> 00:01:57,540 Now let's see what happens if I let 37 00:01:57,540 --> 00:01:59,620 a small amount of time elapse. 38 00:01:59,620 --> 00:02:00,990 How small? 39 00:02:00,990 --> 00:02:04,630 Well I can select that by picking the step size. 40 00:02:04,630 --> 00:02:08,479 And I will select a step size of one eighth. 41 00:02:08,479 --> 00:02:11,810 So now let's let a little bit of time elapse. 42 00:02:11,810 --> 00:02:17,060 Say, amount of time of one eighth. 43 00:02:17,060 --> 00:02:20,650 If I click on the time slider at one eighth, I get this picture. 44 00:02:20,650 --> 00:02:23,570 t equals 0 happens to occur at mid-summer, 45 00:02:23,570 --> 00:02:25,980 so that the signal has a value of 2 46 00:02:25,980 --> 00:02:29,090 in kilograms per unit time. 47 00:02:29,090 --> 00:02:35,780 This phosphate decays away as water comes into the lake 48 00:02:35,780 --> 00:02:38,360 and carries it off according to the weight function. 49 00:02:38,360 --> 00:02:41,927 And this is indicated by the exponential decay function 50 00:02:41,927 --> 00:02:43,010 here in the bottom window. 51 00:02:46,790 --> 00:02:48,940 The weight function is a rate. 52 00:02:48,940 --> 00:02:51,540 It needs to get multiplied by the step size 53 00:02:51,540 --> 00:02:55,450 before it gives an actual amount of phosphate in the lake. 54 00:02:55,450 --> 00:02:59,270 The step size is one eighth, and the product 55 00:02:59,270 --> 00:03:01,980 is the signal, the value of the signal at t 56 00:03:01,980 --> 00:03:06,840 equals 0, that's 2, times the weight function, that's 57 00:03:06,840 --> 00:03:12,360 the exponential decay, times the step size, which is one eighth. 58 00:03:12,360 --> 00:03:15,010 So that gives all together one quarter 59 00:03:15,010 --> 00:03:17,380 times that exponential decay. 60 00:03:17,380 --> 00:03:20,090 And you see that drawn in the top graphing window here, 61 00:03:20,090 --> 00:03:23,480 the value near t equals 0 is a quarter 62 00:03:23,480 --> 00:03:26,880 and it decays away exponentially. 63 00:03:26,880 --> 00:03:30,370 Now let's move on to the next time interval. 64 00:03:30,370 --> 00:03:36,450 I'll click here, and you see what happens. 65 00:03:36,450 --> 00:03:39,970 The signal is now a little bit less 66 00:03:39,970 --> 00:03:44,180 and the time is a little bit later. 67 00:03:44,180 --> 00:03:47,580 So the weight function is scaled and shifted a little bit 68 00:03:47,580 --> 00:03:50,980 differently in this bottom graphing window. 69 00:03:50,980 --> 00:03:54,620 It gets multiplied by the step size one eighth again, 70 00:03:54,620 --> 00:03:59,690 and laid down on top of the graph of the phosphate 71 00:03:59,690 --> 00:04:02,450 arising from the first time interval. 72 00:04:02,450 --> 00:04:06,870 So the sum of those two is a record 73 00:04:06,870 --> 00:04:09,610 of the phosphate in the lake arising from these first two 74 00:04:09,610 --> 00:04:14,070 time intervals as it decays away in later time. 75 00:04:14,070 --> 00:04:16,050 This process continues. 76 00:04:16,050 --> 00:04:19,060 You can see the next few steps by clicking them up. 77 00:04:19,060 --> 00:04:21,490 Here's the effect of the third time interval 78 00:04:21,490 --> 00:04:25,190 as it decays away, but laid down on top of the preceding 79 00:04:25,190 --> 00:04:29,530 contributions to the lake, and so on. 80 00:04:29,530 --> 00:04:32,070 Or I can animate the entire process 81 00:04:32,070 --> 00:04:34,925 and watch the thing evolve as time increases. 82 00:04:44,310 --> 00:04:47,470 So you can see, the effect is a steady state 83 00:04:47,470 --> 00:04:53,210 is reached after a while, you get a sinusoidal total amount 84 00:04:53,210 --> 00:04:56,950 of phosphate in the lake. 85 00:04:56,950 --> 00:05:00,040 It's delayed a little bit from the peak. 86 00:05:00,040 --> 00:05:02,286 The maximum amount of phosphate in the lake 87 00:05:02,286 --> 00:05:03,660 occurs a little after mid-summer. 88 00:05:07,670 --> 00:05:10,820 Now imagine shrinking the step size. 89 00:05:10,820 --> 00:05:14,340 In the limit, as the step size goes to 0, 90 00:05:14,340 --> 00:05:17,940 this process is described by the convolution integral. 91 00:05:17,940 --> 00:05:22,970 At time t, all the contributions from time 0 to time t 92 00:05:22,970 --> 00:05:24,560 are present. 93 00:05:24,560 --> 00:05:27,800 And so we're going to take an integral from u equals 0 to u 94 00:05:27,800 --> 00:05:30,230 equals t. 95 00:05:30,230 --> 00:05:35,650 The contribution from time u decays by the factor of g of t 96 00:05:35,650 --> 00:05:39,970 minus u by time t. 97 00:05:39,970 --> 00:05:45,930 So the contribution from between time u and time u plus du 98 00:05:45,930 --> 00:05:51,690 is given by the product f of u, the signal of time u, times g 99 00:05:51,690 --> 00:05:54,700 of t minus u, the weight function evaluated 100 00:05:54,700 --> 00:05:57,010 at t minus u, times du. 101 00:05:59,890 --> 00:06:01,720 And the integral of this differential, 102 00:06:01,720 --> 00:06:04,790 from u equals 0 to u equals t, is 103 00:06:04,790 --> 00:06:07,570 the amount of phosphate in the lake at time t. 104 00:06:07,570 --> 00:06:11,810 And it's given by the convolution integral. 105 00:06:11,810 --> 00:06:14,820 This system is modeled by a differential equation, 106 00:06:14,820 --> 00:06:20,600 namely dx/dt plus a*x equals f of t. 107 00:06:20,600 --> 00:06:26,940 The weight function of the operator dx/dt plus a*x is e 108 00:06:26,940 --> 00:06:29,290 to the minus a*t. 109 00:06:29,290 --> 00:06:31,400 And the solution to the differential equation 110 00:06:31,400 --> 00:06:33,220 with rest initial conditions is given 111 00:06:33,220 --> 00:06:36,290 by the convolution integral of the input signal 112 00:06:36,290 --> 00:06:38,260 with the weight function. 113 00:06:38,260 --> 00:06:41,740 This statement is a general fact for LTI operators, 114 00:06:41,740 --> 00:06:44,590 not just first-order operators.