1 00:00:00,500 --> 00:00:01,420 GILBERT STRANG: OK. 2 00:00:01,420 --> 00:00:07,010 So this is a video in which we go for second-order equations, 3 00:00:07,010 --> 00:00:08,680 constant coefficients. 4 00:00:08,680 --> 00:00:12,030 We look for the impulse response, 5 00:00:12,030 --> 00:00:14,860 the key function in this whole business, 6 00:00:14,860 --> 00:00:17,650 and the step response, too. 7 00:00:17,650 --> 00:00:19,850 So those are the responses. 8 00:00:19,850 --> 00:00:23,780 So I'm going to call g-- that will be the impulse 9 00:00:23,780 --> 00:00:26,000 response, where the right-hand side is 10 00:00:26,000 --> 00:00:32,259 a delta function, an impulse, a sudden force at the moment t 11 00:00:32,259 --> 00:00:33,360 equals 0. 12 00:00:33,360 --> 00:00:35,200 So that's the equation. 13 00:00:35,200 --> 00:00:36,680 That's the impulse. 14 00:00:36,680 --> 00:00:40,700 And g is the response, and we want a formula for it. 15 00:00:40,700 --> 00:00:45,790 Then the other possibility, very interesting possibility, 16 00:00:45,790 --> 00:00:49,550 is when the right-hand side is a step function. 17 00:00:49,550 --> 00:00:52,920 And then we want the response to that function. 18 00:00:52,920 --> 00:00:54,010 I click a switch. 19 00:00:56,520 --> 00:00:59,800 The machine starts working, and it 20 00:00:59,800 --> 00:01:03,430 approaches a steady response. 21 00:01:03,430 --> 00:01:06,040 The solution rises from 0. 22 00:01:06,040 --> 00:01:13,950 So it starts at r of 0 equals r prime of 0 equals 0. 23 00:01:13,950 --> 00:01:16,630 The step response starts from rest. 24 00:01:16,630 --> 00:01:20,430 The action happens when I click a switch at t equals 0, 25 00:01:20,430 --> 00:01:24,130 and then r of t will rise to a constant. 26 00:01:24,130 --> 00:01:26,700 Very, very important solutions. 27 00:01:26,700 --> 00:01:31,710 But we'll focus especially on this one. 28 00:01:31,710 --> 00:01:32,530 OK. 29 00:01:32,530 --> 00:01:36,400 So that's our equation with the right-hand side delta. 30 00:01:36,400 --> 00:01:38,760 And of course, that right-hand side 31 00:01:38,760 --> 00:01:43,460 is not totally familiar, not as nice as e to the st. 32 00:01:43,460 --> 00:01:46,770 But there is something that-- there is another way 33 00:01:46,770 --> 00:01:51,150 to approach it-- that's a key idea here-- 34 00:01:51,150 --> 00:01:55,210 that gives us this all-important function from solving 35 00:01:55,210 --> 00:01:56,350 a null equation. 36 00:01:56,350 --> 00:01:58,700 How's that? 37 00:01:58,700 --> 00:02:01,570 I start with a null equation, but now this 38 00:02:01,570 --> 00:02:03,885 had no initial condition. 39 00:02:03,885 --> 00:02:08,229 So this one started from g of 0 and g prime of 0 both 0. 40 00:02:08,229 --> 00:02:11,860 And everything happened, boom, from the delta function. 41 00:02:11,860 --> 00:02:14,320 This is the same function. 42 00:02:14,320 --> 00:02:17,810 Except when I look to see what happens at t 43 00:02:17,810 --> 00:02:24,800 equals 0, what happens is g prime immediately jumps to 1. 44 00:02:24,800 --> 00:02:29,650 So another way I can approach g, the computation of g, 45 00:02:29,650 --> 00:02:33,080 is to think of it-- I'm just looking for a null solution. 46 00:02:33,080 --> 00:02:38,190 I'm looking for the null solution that starts from 0. 47 00:02:38,190 --> 00:02:46,020 But it starts with an initial derivative, slope equal 1. 48 00:02:46,020 --> 00:02:52,240 So I know that g is a combination. 49 00:02:52,240 --> 00:02:57,475 So I know how to solve equations like that, null equation. 50 00:02:57,475 --> 00:03:01,140 You remember s1 and s2? 51 00:03:01,140 --> 00:03:06,190 I look at s squared-- I've made this coefficient 1-- so s 52 00:03:06,190 --> 00:03:11,010 squared plus Bs plus C equals 0. 53 00:03:11,010 --> 00:03:15,710 That gives us s1 and s2. 54 00:03:19,100 --> 00:03:21,710 And now I'll tell you what the g is. 55 00:03:21,710 --> 00:03:25,620 So that gives us the s1 and the s2 in the null solution, 56 00:03:25,620 --> 00:03:28,000 and we're looking for a null solution. 57 00:03:28,000 --> 00:03:33,000 So our g of t is some combination of e 58 00:03:33,000 --> 00:03:36,680 to the s1t and e to the s2t. 59 00:03:40,040 --> 00:03:41,910 OK? 60 00:03:41,910 --> 00:03:44,157 It's some combination of those. 61 00:03:44,157 --> 00:03:47,120 And we want it to be 0. 62 00:03:47,120 --> 00:03:53,990 So no surprise, if I subtract those-- I'm starting at t 63 00:03:53,990 --> 00:03:54,490 equals 0. 64 00:03:54,490 --> 00:03:57,200 I'm starting-- this is 1 minus 1. 65 00:03:57,200 --> 00:03:58,340 It's 0. 66 00:03:58,340 --> 00:04:04,820 And now I just have to fix the initial slope, 67 00:04:04,820 --> 00:04:07,610 the first derivative, to be 1. 68 00:04:07,610 --> 00:04:09,290 Well, what's the derivative of this? 69 00:04:09,290 --> 00:04:11,310 This brings down an s1. 70 00:04:11,310 --> 00:04:14,090 This brings down an s2. 71 00:04:14,090 --> 00:04:16,959 At t equals 0, I'm getting an s1 minus s2. 72 00:04:16,959 --> 00:04:22,600 So I'll just divide by that, s1 minus s2. 73 00:04:22,600 --> 00:04:24,340 There you go. 74 00:04:24,340 --> 00:04:29,760 That's the impulse response-- a null solution 75 00:04:29,760 --> 00:04:35,760 that satisfies these special initial conditions. 76 00:04:35,760 --> 00:04:38,830 So that's the function in mathematics 77 00:04:38,830 --> 00:04:41,640 that's sometimes called the fundamental solution. 78 00:04:41,640 --> 00:04:46,990 It's a solution from which you can create all solutions. 79 00:04:46,990 --> 00:04:49,440 It's really the mother of solutions 80 00:04:49,440 --> 00:04:53,430 to this second-order differential equation. 81 00:04:53,430 --> 00:04:55,990 Because if I have another forcing function, 82 00:04:55,990 --> 00:04:58,140 this tells me that growth rate. 83 00:04:58,140 --> 00:05:03,950 It's just like e to the at for a first-order equation. 84 00:05:03,950 --> 00:05:05,490 Remember the growth rate e to the 85 00:05:05,490 --> 00:05:08,880 at for the simple first-order equation with interest 86 00:05:08,880 --> 00:05:11,480 rate coefficient a? 87 00:05:11,480 --> 00:05:13,310 Now we have two. 88 00:05:13,310 --> 00:05:16,800 Instead of a, we have an s1 and an s2, 89 00:05:16,800 --> 00:05:20,300 and that's the special function. 90 00:05:20,300 --> 00:05:21,580 OK. 91 00:05:21,580 --> 00:05:25,710 We need to get more insight on that for particular cases. 92 00:05:25,710 --> 00:05:32,140 So let me show you the same function when 93 00:05:32,140 --> 00:05:35,230 I have no damping. 94 00:05:35,230 --> 00:05:38,870 Start with that case, always the easiest case. 95 00:05:38,870 --> 00:05:42,270 When B is 0-- B was the damping coefficient, 96 00:05:42,270 --> 00:05:46,370 the first derivative in our differential equation. 97 00:05:46,370 --> 00:05:48,720 Can I just bring down the differential equation? 98 00:05:48,720 --> 00:05:52,720 When B is 0 here, that's no damping. 99 00:05:52,720 --> 00:05:55,680 I just have the second derivative and the function. 100 00:05:55,680 --> 00:05:58,470 That's when things oscillate forever. 101 00:05:58,470 --> 00:06:00,020 So that's what will happen. 102 00:06:00,020 --> 00:06:05,690 With B equals 0, I have pure oscillation. 103 00:06:05,690 --> 00:06:13,070 The s1 and s2 are cosines and sines that oscillate. 104 00:06:13,070 --> 00:06:18,150 Or it's neater to stay with exponentials, the i 105 00:06:18,150 --> 00:06:20,810 omega and minus i omega, where that's 106 00:06:20,810 --> 00:06:23,530 omega n, the natural frequency. 107 00:06:23,530 --> 00:06:29,470 Now, if I just plug in that s1 and s2-- the plus is s1 108 00:06:29,470 --> 00:06:32,020 and the minus is s2-- I plug it in there, 109 00:06:32,020 --> 00:06:35,580 I get a nice formula for g of t. 110 00:06:35,580 --> 00:06:40,600 So that's what g of t looks like for no damping. 111 00:06:40,600 --> 00:06:43,880 It just oscillates. 112 00:06:43,880 --> 00:06:44,830 OK. 113 00:06:44,830 --> 00:06:48,190 The next case is underdamping. 114 00:06:48,190 --> 00:06:51,260 It's good to see all these cases each time. 115 00:06:51,260 --> 00:06:54,200 So that's a small value of B. Underdamping 116 00:06:54,200 --> 00:07:02,770 means there is some damping, but it's 117 00:07:02,770 --> 00:07:07,380 small enough so there's now a real part, 118 00:07:07,380 --> 00:07:10,400 but there's still an imaginary part. 119 00:07:10,400 --> 00:07:16,610 So this is, in a way, the trick is the case when s is complex. 120 00:07:16,610 --> 00:07:20,470 If I go higher with the dampening, increase B further, 121 00:07:20,470 --> 00:07:22,035 then I'll hit a point where there 122 00:07:22,035 --> 00:07:24,950 are two real solutions equal. 123 00:07:24,950 --> 00:07:28,220 And if I push B beyond that, I've got overdamping, 124 00:07:28,220 --> 00:07:31,230 and those two real solutions separate. 125 00:07:31,230 --> 00:07:34,020 They're different, but they're real. 126 00:07:34,020 --> 00:07:36,700 And then my formula, in that case, 127 00:07:36,700 --> 00:07:39,480 overdamping, that would be the best formula. 128 00:07:39,480 --> 00:07:43,510 But with underdamping, I can see the oscillation. 129 00:07:43,510 --> 00:07:47,920 If I just plug in those two solutions for s1 and s2, 130 00:07:47,920 --> 00:07:52,800 you'll see that I have the e to the minus B over 2t 131 00:07:52,800 --> 00:07:54,390 appears throughout. 132 00:07:54,390 --> 00:07:57,870 But then I have the sine of omega over omega, 133 00:07:57,870 --> 00:08:02,570 same as I had before, except now the damping frequency 134 00:08:02,570 --> 00:08:06,370 is a bit slower than the natural frequency. 135 00:08:06,370 --> 00:08:08,460 Damping slows that frequency down. 136 00:08:08,460 --> 00:08:11,540 And in a different video, we had a formula 137 00:08:11,540 --> 00:08:14,740 for omega damping, omega damping. 138 00:08:14,740 --> 00:08:24,100 And then increase the damping some more, then this part-- 139 00:08:24,100 --> 00:08:27,580 this omega damping goes to 0. 140 00:08:27,580 --> 00:08:30,560 We don't see any imaginary part in the solution. 141 00:08:30,560 --> 00:08:33,344 We see two equal real values. 142 00:08:33,344 --> 00:08:34,299 They're simple. 143 00:08:34,299 --> 00:08:37,169 They have to be just minus B/2. 144 00:08:37,169 --> 00:08:42,950 So that's a case of two s's coming together. 145 00:08:42,950 --> 00:08:45,140 And when two things come together, 146 00:08:45,140 --> 00:08:47,980 we're used to seeing a factor t appear. 147 00:08:47,980 --> 00:08:51,360 So I have that they came together at minus B/2. 148 00:08:51,360 --> 00:08:53,500 So I have the exponential of that. 149 00:08:53,500 --> 00:08:58,180 But I have a factor t from the merge of the two. 150 00:08:58,180 --> 00:09:04,350 And then if B increases beyond that, that's my formula. 151 00:09:04,350 --> 00:09:06,020 The two s's are real. 152 00:09:09,310 --> 00:09:11,890 I don't think one memorizes all this. 153 00:09:11,890 --> 00:09:14,600 I had to look them up and write them on the board 154 00:09:14,600 --> 00:09:16,910 before starting this video. 155 00:09:16,910 --> 00:09:22,320 But I hope you see that they're extremely nice. 156 00:09:22,320 --> 00:09:25,670 The no-damping case with [? pure ?] 157 00:09:25,670 --> 00:09:33,350 frequencies and the underdamping case with a real-- a decay. 158 00:09:33,350 --> 00:09:37,770 The critical damping when you increase B further, 159 00:09:37,770 --> 00:09:41,570 you just have that and no oscillation. 160 00:09:41,570 --> 00:09:45,200 And then beyond that is overdamping. 161 00:09:45,200 --> 00:09:45,820 OK. 162 00:09:45,820 --> 00:09:51,060 So we're good for the impulse response. 163 00:09:51,060 --> 00:09:54,520 And now I just have to say, what's the step response? 164 00:09:54,520 --> 00:10:02,030 So can I end this video by going back to my equation? 165 00:10:02,030 --> 00:10:04,700 I have to bring the board down to show it to you. 166 00:10:04,700 --> 00:10:08,740 So now I'm going to deal with the step response. 167 00:10:08,740 --> 00:10:11,290 So the equation is the same. 168 00:10:11,290 --> 00:10:14,460 I'm calling the solution r for response. 169 00:10:14,460 --> 00:10:16,800 And the point is, the right-hand side is now 170 00:10:16,800 --> 00:10:19,480 a step instead of a delta. 171 00:10:19,480 --> 00:10:22,980 So we'd like to solve that equation starting from rest. 172 00:10:22,980 --> 00:10:28,800 So a switch went on, and I want a formula for r of t. 173 00:10:28,800 --> 00:10:30,440 That's all that remains. 174 00:10:30,440 --> 00:10:35,100 And actually, that's just-- well, 175 00:10:35,100 --> 00:10:40,140 you can see what the particular solution is. 176 00:10:40,140 --> 00:10:42,080 We look at a particular solution. 177 00:10:42,080 --> 00:10:45,720 Well, this right-hand side is 1. 178 00:10:45,720 --> 00:10:49,380 This right-hand side is 1 beyond t equals 0. 179 00:10:49,380 --> 00:10:53,380 So I'm looking for a way to get 1 out of that. 180 00:10:53,380 --> 00:10:55,560 Well, or it can be just a constant. 181 00:10:55,560 --> 00:10:58,740 The particular solution is the steady state 182 00:10:58,740 --> 00:10:59,915 that we're approaching. 183 00:10:59,915 --> 00:11:03,090 And there's one little cool thing to do. 184 00:11:03,090 --> 00:11:08,660 Sometimes people who have the dimensions and units of things 185 00:11:08,660 --> 00:11:11,665 clearly in their mind will put a C in there. 186 00:11:16,630 --> 00:11:20,790 This is really the good thing to do is to have that C in there 187 00:11:20,790 --> 00:11:25,195 because now the units for r are the same as-- r 188 00:11:25,195 --> 00:11:26,880 is going to go to the 1. 189 00:11:26,880 --> 00:11:31,085 The steady state will be 1 now because I 190 00:11:31,085 --> 00:11:33,810 have Cr equals C times 1. 191 00:11:33,810 --> 00:11:39,440 And out in infinity, the simple solution is r equal 1. 192 00:11:39,440 --> 00:11:41,700 If when r is 1, its derivative is 0. 193 00:11:41,700 --> 00:11:43,070 Second derivative's 0. 194 00:11:43,070 --> 00:11:45,190 r equal 1 is a solution. 195 00:11:45,190 --> 00:11:47,370 It's a particular solution. 196 00:11:47,370 --> 00:11:49,981 It's the steady-state solution. 197 00:11:49,981 --> 00:11:51,304 Good. 198 00:11:51,304 --> 00:11:57,270 But that r of t equal 1 does not start correctly. 199 00:11:57,270 --> 00:12:01,230 We want to start at 0, with a slope of 0. 200 00:12:01,230 --> 00:12:07,550 So I have to subtract off one of these particular solutions 201 00:12:07,550 --> 00:12:09,250 with e to the s1. 202 00:12:09,250 --> 00:12:12,070 And now I have to get it so that I 203 00:12:12,070 --> 00:12:15,960 have to subtract it off so that this thing starts from 0. 204 00:12:15,960 --> 00:12:17,500 Let me see if I can do it. 205 00:12:17,500 --> 00:12:24,520 I think maybe if I do an s2 e to the s1t 206 00:12:24,520 --> 00:12:30,700 and subtract off an s1 e to the s2t. 207 00:12:35,610 --> 00:12:38,610 Do you see what that one has achieved? 208 00:12:38,610 --> 00:12:45,520 At t equals 0, I have-- well, at least at t equals 0, 209 00:12:45,520 --> 00:12:48,700 I've made the derivative 0 because the derivative 210 00:12:48,700 --> 00:12:50,720 will bring down an s1 there. 211 00:12:50,720 --> 00:12:53,190 That derivative will bring down an s2. 212 00:12:53,190 --> 00:12:57,610 And when I put t equals 0, I get s1, s2 minus s1, s2. 213 00:12:57,610 --> 00:12:59,320 Good, good, good. 214 00:12:59,320 --> 00:13:00,110 OK. 215 00:13:00,110 --> 00:13:05,930 Now I think that together they're all correct. 216 00:13:05,930 --> 00:13:10,940 I need to divide by s1 minus s2. 217 00:13:10,940 --> 00:13:13,310 Let me just say, I think that's it. 218 00:13:13,310 --> 00:13:14,640 I think that's it. 219 00:13:14,640 --> 00:13:17,740 It wouldn't be a bad idea if I just checked. 220 00:13:17,740 --> 00:13:23,480 And having checked, I've learned that that's a plus sign. 221 00:13:23,480 --> 00:13:24,840 OK. 222 00:13:24,840 --> 00:13:27,980 So the graph of r. 223 00:13:27,980 --> 00:13:30,030 This is a graph of r of t. 224 00:13:30,030 --> 00:13:35,830 It starts from 0, and it rises to 1. 225 00:13:35,830 --> 00:13:38,700 Asymptotically it's 1. 226 00:13:38,700 --> 00:13:42,520 This is a graph of r of t. 227 00:13:42,520 --> 00:13:45,480 And in practice, that's a very important number. 228 00:13:45,480 --> 00:13:47,350 What is the rise time? 229 00:13:47,350 --> 00:13:50,440 How far do you have to go in time before it rises up to, 230 00:13:50,440 --> 00:13:53,800 let's say, 95% of 1? 231 00:13:53,800 --> 00:13:56,930 All these questions are extremely practical questions 232 00:13:56,930 --> 00:13:59,076 for an engineer. 233 00:13:59,076 --> 00:14:01,110 What's the rise time? 234 00:14:01,110 --> 00:14:03,290 And you're playing with this formula. 235 00:14:03,290 --> 00:14:07,610 So let me just make another comment 236 00:14:07,610 --> 00:14:11,740 on this r of t step response. 237 00:14:11,740 --> 00:14:15,160 My other comment is I've emphasized g of t, 238 00:14:15,160 --> 00:14:19,240 the impulse response is like responsible for everything. 239 00:14:19,240 --> 00:14:21,170 It's always with us. 240 00:14:21,170 --> 00:14:24,690 And how are those connected? 241 00:14:24,690 --> 00:14:27,450 That's my final question in this video. 242 00:14:27,450 --> 00:14:32,270 How is r of t connected to g of t? 243 00:14:32,270 --> 00:14:35,420 Well, let me ask about the right-hand sides. 244 00:14:35,420 --> 00:14:38,370 How is the step function connected 245 00:14:38,370 --> 00:14:40,720 to the delta function? 246 00:14:40,720 --> 00:14:46,220 Answer, the step function is the integral of the delta function. 247 00:14:46,220 --> 00:14:47,780 The integral of the delta function 248 00:14:47,780 --> 00:14:50,230 is 0 as long as you're integrating off 249 00:14:50,230 --> 00:14:51,850 where the delta function is 0. 250 00:14:51,850 --> 00:14:55,910 But as soon as you pass the big spike, 251 00:14:55,910 --> 00:15:00,900 then the integral jumps to 1, and you have a step function. 252 00:15:00,900 --> 00:15:04,850 So the step function is the integral of the delta function. 253 00:15:04,850 --> 00:15:10,650 So the step response is the integral of the delta response. 254 00:15:10,650 --> 00:15:13,390 It's the integral of the impulse response. 255 00:15:13,390 --> 00:15:15,910 r is the integral of g. 256 00:15:15,910 --> 00:15:21,850 r is the integral of g with the correct initial conditions 257 00:15:21,850 --> 00:15:26,980 that gave us this and eventually [INAUDIBLE] approach 1. 258 00:15:26,980 --> 00:15:34,490 So that is the two key solutions, you could say. 259 00:15:34,490 --> 00:15:39,780 The impulse response important in theory and in practice. 260 00:15:39,780 --> 00:15:42,820 The step response extremely important in practice 261 00:15:42,820 --> 00:15:47,725 because turning on a switch is so basic 262 00:15:47,725 --> 00:15:53,930 an operation in engineering. 263 00:15:53,930 --> 00:15:55,220 Good. 264 00:15:55,220 --> 00:15:57,120 Thank you.