1 00:00:00,000 --> 00:00:02,520 The following content is provided under a Creative 2 00:00:02,520 --> 00:00:03,970 Commons license. 3 00:00:03,970 --> 00:00:06,330 Your support will help MIT OpenCourseWare 4 00:00:06,330 --> 00:00:10,660 continue to offer high-quality educational resources for free. 5 00:00:10,660 --> 00:00:13,320 To make a donation or view additional materials 6 00:00:13,320 --> 00:00:17,190 from hundreds of MIT courses, visit MIT OpenCourseWare 7 00:00:17,190 --> 00:00:18,370 at ocw.mit.edu. 8 00:00:21,507 --> 00:00:22,090 PROFESSOR: OK. 9 00:00:22,090 --> 00:00:23,620 Welcome back. 10 00:00:23,620 --> 00:00:25,720 If all goes well, we'll be joined in a few minutes 11 00:00:25,720 --> 00:00:27,668 by a simple pendulum, a little robot 12 00:00:27,668 --> 00:00:29,460 that we're going to demonstrate everything. 13 00:00:29,460 --> 00:00:32,049 It turns out we had a little license 14 00:00:32,049 --> 00:00:34,900 issues in the last minute, but we're 15 00:00:34,900 --> 00:00:36,580 hoping to bring down and actually play 16 00:00:36,580 --> 00:00:38,950 with a real pendulum today. 17 00:00:38,950 --> 00:00:41,980 The goal of today is fairly modest. 18 00:00:41,980 --> 00:00:44,590 We're just going to think about pendula, a simple pendulum. 19 00:00:44,590 --> 00:00:46,390 When I say a simple pendulum, I mean 20 00:00:46,390 --> 00:00:48,580 the mass is concentrated at the endpoint. 21 00:00:48,580 --> 00:00:50,760 Typically, we assume that the inertia of the rod 22 00:00:50,760 --> 00:00:52,630 is negligible. 23 00:00:52,630 --> 00:00:56,300 In many cases, I'll write the inertia in there just in case. 24 00:00:56,300 --> 00:00:56,800 OK. 25 00:00:56,800 --> 00:01:00,340 So why should we spend an entire lecture on a simple pendulum? 26 00:01:00,340 --> 00:01:00,930 Right? 27 00:01:00,930 --> 00:01:02,620 It seems boring. 28 00:01:02,620 --> 00:01:05,290 Well, I think you could argue that if you 29 00:01:05,290 --> 00:01:08,140 know what the simple pendulum does, 30 00:01:08,140 --> 00:01:09,730 and you know what it does when it's 31 00:01:09,730 --> 00:01:11,230 got complicated interaction forces, then 32 00:01:11,230 --> 00:01:12,813 everything, because most of our robots 33 00:01:12,813 --> 00:01:14,410 are just a bunch of pendula. 34 00:01:14,410 --> 00:01:18,280 But more important, I think, is that the pendulum 35 00:01:18,280 --> 00:01:21,010 is simple enough that we can pretty much 36 00:01:21,010 --> 00:01:23,650 completely understand it in a single lecture. 37 00:01:23,650 --> 00:01:26,620 And it's going to be an opportunity for me to introduce 38 00:01:26,620 --> 00:01:30,550 basically all of the topics I want to introduce in terms 39 00:01:30,550 --> 00:01:33,580 of nonlinear dynamics and the basic definitions 40 00:01:33,580 --> 00:01:36,010 that we're going to use throughout the class, 41 00:01:36,010 --> 00:01:38,000 and I can plot everything about it. 42 00:01:38,000 --> 00:01:41,350 So actually, even in research, when we're testing out 43 00:01:41,350 --> 00:01:44,980 new algorithms, we almost always spend a lot of time thinking 44 00:01:44,980 --> 00:01:47,420 about how it works on the simple pendulum. 45 00:01:47,420 --> 00:01:47,920 OK? 46 00:01:47,920 --> 00:01:53,110 It's so simple, but it's a staple. 47 00:01:55,460 --> 00:01:55,960 OK. 48 00:01:55,960 --> 00:01:58,600 So what are the dynamics of the simple pendulum? 49 00:01:58,600 --> 00:02:01,240 I told you how to do the Lagrangian dynamics quickly 50 00:02:01,240 --> 00:02:03,957 yesterday, and there's a more worked-out example 51 00:02:03,957 --> 00:02:04,540 in your notes. 52 00:02:07,750 --> 00:02:11,380 If you pop in the Lagrangian, the energy terms, 53 00:02:11,380 --> 00:02:17,530 into the Lagrangian for this system, then what you get is I 54 00:02:17,530 --> 00:02:29,890 theta double dot t plus mgl sine theta equals whatever 55 00:02:29,890 --> 00:02:36,076 my generalized forces are, which I've been calling Q. 56 00:02:36,076 --> 00:02:38,800 And for today's purposes, let's assume 57 00:02:38,800 --> 00:02:42,950 that Q, there's two generalized torques that I care about. 58 00:02:42,950 --> 00:02:44,920 I want to model a damping torque, 59 00:02:44,920 --> 00:02:48,250 because most pendula have some damping, 60 00:02:48,250 --> 00:02:51,260 and I want to model a control input torque. 61 00:02:51,260 --> 00:02:51,760 OK? 62 00:02:51,760 --> 00:02:53,650 So I'm going to worry about the case 63 00:02:53,650 --> 00:03:03,280 where Q is of the form negative B theta dot plus some control 64 00:03:03,280 --> 00:03:04,060 input u of t. 65 00:03:09,250 --> 00:03:11,390 The damping doesn't come out of Lagrange. 66 00:03:11,390 --> 00:03:14,520 You think of that as an external input. 67 00:03:14,520 --> 00:03:15,020 OK. 68 00:03:15,020 --> 00:03:27,980 So all together, b theta dot plus mgl sine theta equals u. 69 00:03:34,420 --> 00:03:36,950 OK? 70 00:03:36,950 --> 00:03:37,450 All right. 71 00:03:37,450 --> 00:03:41,710 So this is a one-dimensional, second-order differential 72 00:03:41,710 --> 00:03:42,808 equation. 73 00:03:42,808 --> 00:03:45,100 What would it mean to solve this differential equation? 74 00:03:49,250 --> 00:03:51,250 To really solve this differential equation, what 75 00:03:51,250 --> 00:04:00,970 that would mean is that if I gave you theta times 0 76 00:04:00,970 --> 00:04:03,860 and theta dotted times 0, the initial conditions. 77 00:04:03,860 --> 00:04:04,360 Right? 78 00:04:04,360 --> 00:04:10,540 And I gave you some control input over time, 79 00:04:10,540 --> 00:04:14,860 then I'd like you to be able to tell me theta of t 80 00:04:14,860 --> 00:04:15,915 and theta dot of t. 81 00:04:15,915 --> 00:04:16,415 Right? 82 00:04:22,600 --> 00:04:25,690 That would be a satisfying solution to the differential 83 00:04:25,690 --> 00:04:29,620 equation, if we could have that, and that's the standard way 84 00:04:29,620 --> 00:04:31,700 to think about solving the differential equation. 85 00:04:31,700 --> 00:04:33,908 It turns out for the pendulum, if what you care about 86 00:04:33,908 --> 00:04:36,190 is the long-term dynamics of the pendulum, that's 87 00:04:36,190 --> 00:04:38,170 actually not a very practical way to think 88 00:04:38,170 --> 00:04:39,670 about the pendulum. 89 00:04:39,670 --> 00:04:42,650 It turns out if you just try to integrate this enclosed form, 90 00:04:42,650 --> 00:04:46,610 there's no solution in terms of elementary functions. 91 00:04:46,610 --> 00:04:49,420 In fact, the integral of these sine terms 92 00:04:49,420 --> 00:04:51,670 comes up enough that people created 93 00:04:51,670 --> 00:04:54,400 a different type of function which are 94 00:04:54,400 --> 00:04:55,990 sort of elementary functions. 95 00:04:55,990 --> 00:04:58,750 They're called elliptic integrals of the first kind, 96 00:04:58,750 --> 00:05:02,170 and long story short, there's not a lot of insight 97 00:05:02,170 --> 00:05:04,570 to be gained by actually integrating, 98 00:05:04,570 --> 00:05:07,420 in just a pure calculus sense, these equations. 99 00:05:07,420 --> 00:05:09,070 It'll give you an elliptic function 100 00:05:09,070 --> 00:05:12,010 that you could pop into Matlab and make a plot, 101 00:05:12,010 --> 00:05:14,440 but it's not going to give you a lot of insight. 102 00:05:14,440 --> 00:05:17,320 And actually in the notes, for completeness, I 103 00:05:17,320 --> 00:05:19,570 did give you the elliptic integral form, 104 00:05:19,570 --> 00:05:25,760 but I won't trouble you with that on the board here. 105 00:05:25,760 --> 00:05:26,260 OK. 106 00:05:26,260 --> 00:05:27,570 So maybe there's another way. 107 00:05:27,570 --> 00:05:29,320 If I care about what this pendulum's going 108 00:05:29,320 --> 00:05:33,220 to do in the long term, if I care about where theta is going 109 00:05:33,220 --> 00:05:35,470 to be as time goes to infinity, then there 110 00:05:35,470 --> 00:05:37,450 are a bunch of other techniques I can use. 111 00:05:37,450 --> 00:05:38,080 OK? 112 00:05:38,080 --> 00:05:40,990 And the ones that I'm going to use today 113 00:05:40,990 --> 00:05:43,210 are graphical solution techniques. 114 00:05:43,210 --> 00:05:48,130 And it's actually the best reference 115 00:05:48,130 --> 00:05:55,480 for that is this book by Steve Strogatz called 116 00:05:55,480 --> 00:05:56,950 Nonlinear Dynamics and Chaos. 117 00:05:56,950 --> 00:05:59,450 Has anybody seen that book? 118 00:05:59,450 --> 00:06:03,740 It's a great book, very, very readable book, just brilliant. 119 00:06:03,740 --> 00:06:17,740 So it's a Nonlinear Dynamics and Chaos by Steve Strogatz. 120 00:06:17,740 --> 00:06:18,460 He's at Cornell. 121 00:06:25,380 --> 00:06:25,880 OK. 122 00:06:25,880 --> 00:06:29,240 So let's think about how we could possibly 123 00:06:29,240 --> 00:06:38,585 solve that system graphically, and let me start by solving 124 00:06:38,585 --> 00:06:39,710 a slightly simpler problem. 125 00:06:39,710 --> 00:06:42,270 Instead of making u a function of time, 126 00:06:42,270 --> 00:06:44,270 let's make a constant torque. 127 00:06:44,270 --> 00:06:46,190 OK? 128 00:06:46,190 --> 00:06:48,440 And I'm going to look at a special case, where 129 00:06:48,440 --> 00:06:51,530 the system has very heavy damping, just to get started. 130 00:06:51,530 --> 00:07:10,400 Let's think about a special case, a very heavily damped 131 00:07:10,400 --> 00:07:12,350 pendulum with constant torque. 132 00:07:20,090 --> 00:07:22,680 OK? 133 00:07:22,680 --> 00:07:23,180 OK. 134 00:07:23,180 --> 00:07:24,520 So what do I mean by that? 135 00:07:24,520 --> 00:07:29,120 So in this equation, the heavily damped, what I care about 136 00:07:29,120 --> 00:07:34,340 is that the viscous forces do the damping are significant 137 00:07:34,340 --> 00:07:37,310 compared to the inertial forces of the pendulum. 138 00:07:37,310 --> 00:07:40,770 If you're in fluid's, it feels like a Reynolds number 139 00:07:40,770 --> 00:07:41,270 argument. 140 00:07:41,270 --> 00:07:43,520 This would be equivalent to having a very low Reynolds 141 00:07:43,520 --> 00:07:44,170 number system. 142 00:07:44,170 --> 00:07:44,840 OK? 143 00:07:44,840 --> 00:07:47,360 But what I care about for this argument, 144 00:07:47,360 --> 00:07:52,950 I want to say that b over I is much, much greater than 1. 145 00:07:52,950 --> 00:07:53,450 Right? 146 00:07:58,940 --> 00:08:03,560 And I'm going to say that u of t is just 147 00:08:03,560 --> 00:08:07,130 some nominal, some constant u0. 148 00:08:07,130 --> 00:08:09,050 OK? 149 00:08:09,050 --> 00:08:11,720 AUDIENCE: [INAUDIBLE] 150 00:08:11,720 --> 00:08:13,610 PROFESSOR: It's not a dimensionless quantity. 151 00:08:13,610 --> 00:08:14,110 Right? 152 00:08:14,110 --> 00:08:16,530 So if you want a dimensionless Reynolds number, 153 00:08:16,530 --> 00:08:19,280 an analogy would be you'd need a square root of g 154 00:08:19,280 --> 00:08:21,110 over l or some time constant on the bottom, 155 00:08:21,110 --> 00:08:26,540 but this is a number with units that's greater than 1. 156 00:08:26,540 --> 00:08:28,050 Good catch. 157 00:08:28,050 --> 00:08:28,550 OK. 158 00:08:28,550 --> 00:08:31,950 So why is this the relevant thing? 159 00:08:31,950 --> 00:08:35,000 So now, if I look at the same equation, 160 00:08:35,000 --> 00:08:42,470 if I do u0 minus mgl sine theta equals I 161 00:08:42,470 --> 00:08:47,840 theta double dot plus be theta dot. 162 00:08:47,840 --> 00:08:51,890 If b is dramatically bigger than I, 163 00:08:51,890 --> 00:08:59,090 then this right-hand side looks about like just b theta dot. 164 00:08:59,090 --> 00:09:01,383 These terms swap these terms. 165 00:09:01,383 --> 00:09:03,050 Then, I'm going to make an approximation 166 00:09:03,050 --> 00:09:07,910 of this right-hand side with just b theta dot. 167 00:09:07,910 --> 00:09:09,080 Reasonable. 168 00:09:09,080 --> 00:09:09,710 OK. 169 00:09:09,710 --> 00:09:12,252 So the reason I'm thinking about this heavily-damped pendulum 170 00:09:12,252 --> 00:09:15,170 example is because it changes our second-order system 171 00:09:15,170 --> 00:09:16,430 into our first-order system. 172 00:09:16,430 --> 00:09:17,160 OK? 173 00:09:17,160 --> 00:09:18,470 It'll just be a way to start. 174 00:09:21,450 --> 00:09:23,083 And that's a general thing. 175 00:09:23,083 --> 00:09:24,500 At a very low Reynolds number, you 176 00:09:24,500 --> 00:09:30,100 can start thinking of things as being mostly first order also. 177 00:09:30,100 --> 00:09:30,600 OK. 178 00:09:30,600 --> 00:09:32,225 So now, I've got this simpler equation. 179 00:09:32,225 --> 00:09:35,688 I want to make one more simplification, actually, 180 00:09:35,688 --> 00:09:36,230 for a minute. 181 00:09:36,230 --> 00:09:38,120 I'm going to just forget about the fact 182 00:09:38,120 --> 00:09:40,350 that theta wraps around on top of each other. 183 00:09:40,350 --> 00:09:40,850 OK? 184 00:09:40,850 --> 00:09:46,265 So just let's ignore wrapping. 185 00:09:50,360 --> 00:09:53,120 It's not a big deal, but let's just keep it clean. 186 00:09:53,120 --> 00:09:54,830 And to be very explicit about that, I'm 187 00:09:54,830 --> 00:09:57,910 going to replace theta with x. 188 00:09:57,910 --> 00:09:59,660 Just remember that we've ignored wrapping. 189 00:09:59,660 --> 00:10:04,100 So my equations now are bx dot-- 190 00:10:04,100 --> 00:10:12,740 excellent-- is u0 minus mgl sine x. 191 00:10:12,740 --> 00:10:15,525 Thanks, guys. 192 00:10:15,525 --> 00:10:17,863 AUDIENCE: [INAUDIBLE] 193 00:10:17,863 --> 00:10:18,530 PROFESSOR: Yeah. 194 00:10:18,530 --> 00:10:19,640 OK. 195 00:10:19,640 --> 00:10:21,800 So we have a pendulum, but it's got a boot. 196 00:10:21,800 --> 00:10:25,886 So it's amazing that clocks work so well. 197 00:10:29,150 --> 00:10:31,970 OK. 198 00:10:31,970 --> 00:10:34,865 Simple, first-order equation, it's a nonlinear equation. 199 00:10:34,865 --> 00:10:36,740 So how do I understand the long-term behavior 200 00:10:36,740 --> 00:10:37,980 of that system? 201 00:10:37,980 --> 00:10:38,480 OK. 202 00:10:38,480 --> 00:10:42,440 Well, Strogatz says, if you've got a one-dimensional system, 203 00:10:42,440 --> 00:10:46,490 first-order, then you can think of that like a flow on a line. 204 00:10:46,490 --> 00:10:47,540 So let me tell you what. 205 00:10:47,540 --> 00:10:57,230 So one d, first-order, we're going 206 00:10:57,230 --> 00:11:03,560 to do it a flow on a line. 207 00:11:03,560 --> 00:11:04,910 OK? 208 00:11:04,910 --> 00:11:11,750 So what I want to plot here, I'll plot it really big. 209 00:11:20,240 --> 00:11:23,930 I'm going to plot theta over here, x over here. 210 00:11:23,930 --> 00:11:26,210 We're in x-coordinates here, x, and I 211 00:11:26,210 --> 00:11:28,930 want to plot x dot over here. 212 00:11:28,930 --> 00:11:30,343 OK? 213 00:11:30,343 --> 00:11:31,760 So this is just a simple function, 214 00:11:31,760 --> 00:11:33,800 x dot as a function of x. 215 00:11:33,800 --> 00:11:37,770 What does it look like? 216 00:11:37,770 --> 00:11:40,930 Well, it looks like negative sine of x possibly shifted 217 00:11:40,930 --> 00:11:41,930 up or down a little bit. 218 00:11:41,930 --> 00:11:42,890 Right? 219 00:11:42,890 --> 00:11:48,500 Let's say, let me draw the no-torque input case first. 220 00:11:48,500 --> 00:11:52,610 Then, it just looks like x dot is negative sine of x, 221 00:11:52,610 --> 00:11:54,410 so something like this. 222 00:12:02,610 --> 00:12:03,680 OK? 223 00:12:03,680 --> 00:12:09,380 Where the height of that is mgl over b. 224 00:12:09,380 --> 00:12:09,880 Right? 225 00:12:17,530 --> 00:12:19,890 OK? 226 00:12:19,890 --> 00:12:22,980 So now, can you tell me quickly where the fixed 227 00:12:22,980 --> 00:12:28,600 points of the system Are 228 00:12:28,600 --> 00:12:30,413 AUDIENCE: [INAUDIBLE] 229 00:12:30,413 --> 00:12:31,080 PROFESSOR: Yeah. 230 00:12:31,080 --> 00:12:33,390 So any time x dot equals 0, we have a fixed point 231 00:12:33,390 --> 00:12:36,510 of the system, and that's really the first dynamic concept 232 00:12:36,510 --> 00:12:45,530 I care about here is when, in this case, x dot equals 0. 233 00:12:45,530 --> 00:12:46,470 OK? 234 00:12:46,470 --> 00:12:49,020 And in this case, it's not too hard to solve 235 00:12:49,020 --> 00:12:50,520 for the 0s of that equation anyways, 236 00:12:50,520 --> 00:12:52,350 but graphically, it's blatantly obvious 237 00:12:52,350 --> 00:12:56,970 that you get a fixed point here, a fixed point here, a fixed 238 00:12:56,970 --> 00:13:00,030 point here, and of course, every 2 pi, it'll repeat. 239 00:13:00,030 --> 00:13:00,900 Right? 240 00:13:00,900 --> 00:13:03,660 Every pi it'll repeat. 241 00:13:03,660 --> 00:13:04,410 Right? 242 00:13:04,410 --> 00:13:05,710 Pretty simple. 243 00:13:05,710 --> 00:13:06,210 OK. 244 00:13:06,210 --> 00:13:08,040 But now, let's think about the stability of those fixed 245 00:13:08,040 --> 00:13:09,720 points and not just in a local sense, 246 00:13:09,720 --> 00:13:12,240 but let's really think about the stability of those fixed 247 00:13:12,240 --> 00:13:12,740 points. 248 00:13:15,690 --> 00:13:17,160 Is this fixed point stable? 249 00:13:22,170 --> 00:13:22,840 Yes. 250 00:13:22,840 --> 00:13:23,490 OK. 251 00:13:23,490 --> 00:13:27,435 How can you see graphically that it's stable? 252 00:13:27,435 --> 00:13:29,578 AUDIENCE: The slope is negative. 253 00:13:29,578 --> 00:13:31,620 PROFESSOR: So locally, the slope tells me exactly 254 00:13:31,620 --> 00:13:34,170 that if the slope is negative, then it's got to be stable. 255 00:13:34,170 --> 00:13:36,720 But even in a more global nonlinear thinking about it 256 00:13:36,720 --> 00:13:40,860 sense, anywhere that this curve is above the line, 257 00:13:40,860 --> 00:13:44,470 that means I have a flow going to the right. 258 00:13:44,470 --> 00:13:45,270 Right? 259 00:13:45,270 --> 00:13:48,210 So everywhere in this regime, I know that the system 260 00:13:48,210 --> 00:13:49,200 is moving that way. 261 00:13:49,200 --> 00:13:50,070 Right? 262 00:13:50,070 --> 00:13:51,540 Everywhere in this regime, I know 263 00:13:51,540 --> 00:13:55,110 the flow's going to this way, and so on and so forth. 264 00:14:01,520 --> 00:14:02,030 OK? 265 00:14:02,030 --> 00:14:04,760 So even without any local analysis, 266 00:14:04,760 --> 00:14:09,650 it's crystal clear that if I start the system somewhere 267 00:14:09,650 --> 00:14:13,700 over here, some amount of time later it's going to be there. 268 00:14:13,700 --> 00:14:14,780 Right? 269 00:14:14,780 --> 00:14:17,000 So I'm going to use a filled in circle 270 00:14:17,000 --> 00:14:20,660 to describe that stable fixed point, 271 00:14:20,660 --> 00:14:23,270 and this one is going to be stable also. 272 00:14:23,270 --> 00:14:25,698 And then is this fixed point stable or unstable? 273 00:14:25,698 --> 00:14:26,490 AUDIENCE: Unstable. 274 00:14:26,490 --> 00:14:28,280 PROFESSOR: Unstable, right? 275 00:14:28,280 --> 00:14:31,730 Nearby points are going to leave that fixed point 276 00:14:31,730 --> 00:14:34,410 and go somewhere else. 277 00:14:34,410 --> 00:14:34,910 OK. 278 00:14:34,910 --> 00:14:36,950 But stability is such a central concept 279 00:14:36,950 --> 00:14:39,110 in robotics and in this class that I 280 00:14:39,110 --> 00:14:42,740 want to be a little careful about it. 281 00:14:42,740 --> 00:14:46,850 There's multiple forms of stability that we care about. 282 00:15:00,370 --> 00:15:03,295 Typically, we talk about even local stability. 283 00:15:09,543 --> 00:15:10,960 The first definition we care about 284 00:15:10,960 --> 00:15:18,460 is a fixed point can be locally stable in the sense 285 00:15:18,460 --> 00:15:34,000 of Lyapunov, which is often shorthand isl. 286 00:15:34,000 --> 00:15:54,760 A fixed point can be locally, asymptotically stable, 287 00:15:54,760 --> 00:15:57,580 and a fixed point can be locally, exponentially stable. 288 00:16:09,850 --> 00:16:10,540 OK. 289 00:16:10,540 --> 00:16:13,190 Who knows what it means to be stable in the sense 290 00:16:13,190 --> 00:16:13,690 of Lyapunov? 291 00:16:16,990 --> 00:16:18,688 Anybody have an intuitive understanding 292 00:16:18,688 --> 00:16:19,480 of what that means? 293 00:16:22,920 --> 00:16:25,830 AUDIENCE: We start within a certain distance of that point. 294 00:16:25,830 --> 00:16:30,418 Well, it's kind of founded the more we go farther away. 295 00:16:30,418 --> 00:16:31,210 PROFESSOR: Perfect. 296 00:16:31,210 --> 00:16:32,550 Yeah. 297 00:16:32,550 --> 00:16:36,540 So typically, I have to define some sort of distance metric, 298 00:16:36,540 --> 00:16:38,250 let's say just some Euclidean distance. 299 00:16:38,250 --> 00:16:40,080 What I want to say is that, if I start 300 00:16:40,080 --> 00:16:44,600 with my initial conditions are near some point, 301 00:16:44,600 --> 00:16:46,970 then they're not going to go away from that point. 302 00:16:46,970 --> 00:16:50,330 And specifically, the way that the sense of Lyapunov 303 00:16:50,330 --> 00:16:54,740 is written, it says if I want to guarantee that for all time 304 00:16:54,740 --> 00:16:59,120 I am within this distance, say epsilon distance of the fixed 305 00:16:59,120 --> 00:17:01,540 point, then you need to be able to pick 306 00:17:01,540 --> 00:17:04,160 some delta, some small delta, for which 307 00:17:04,160 --> 00:17:07,013 if I start the system inside the delta-- 308 00:17:07,013 --> 00:17:09,180 delta is going to have to be less than the epsilon-- 309 00:17:09,180 --> 00:17:10,849 then it'll always, for all time, it'll 310 00:17:10,849 --> 00:17:13,130 stay inside the epsilon ball. 311 00:17:13,130 --> 00:17:15,930 I'm going to write it down. 312 00:17:15,930 --> 00:17:16,430 OK. 313 00:17:16,430 --> 00:17:25,099 A fixed point, let's say that a fixed point x 314 00:17:25,099 --> 00:17:38,510 star is stable in the sense of Lyapunov if for all epsilon 315 00:17:38,510 --> 00:17:47,390 there exists a delta for which if x of 0 minus x 316 00:17:47,390 --> 00:17:52,220 star in some norm, let's say a Euclidean distance 317 00:17:52,220 --> 00:17:57,110 or something like that, is less than delta, 318 00:17:57,110 --> 00:18:05,840 then for all t, x of t minus x star is less than epsilon. 319 00:18:10,205 --> 00:18:11,250 Does that make sense? 320 00:18:24,320 --> 00:18:24,820 OK. 321 00:18:24,820 --> 00:18:27,250 So we've got a simple pendulum plot that tells us 322 00:18:27,250 --> 00:18:28,930 something about stability here. 323 00:18:28,930 --> 00:18:31,450 Is this fixed point stable in the sense of Lyapunov? 324 00:18:35,300 --> 00:18:36,120 Yeah. 325 00:18:36,120 --> 00:18:36,620 Right? 326 00:18:36,620 --> 00:18:38,162 It's stable in the sense of Lyapunov. 327 00:18:38,162 --> 00:18:40,400 Let's say you tell me that for all time 328 00:18:40,400 --> 00:18:44,660 I want this thing to be within this epsilon distance. 329 00:18:44,660 --> 00:18:46,430 Right? 330 00:18:46,430 --> 00:18:48,710 Then you can pick anything, any delta 331 00:18:48,710 --> 00:18:50,690 smaller than that epsilon, and I know that it's 332 00:18:50,690 --> 00:18:52,550 going to stay inside that ball. 333 00:18:52,550 --> 00:18:53,420 Right? 334 00:18:53,420 --> 00:18:57,920 So in fact in this one, you could choose delta as epsilon, 335 00:18:57,920 --> 00:18:59,600 and it would be fine. 336 00:18:59,600 --> 00:19:01,190 OK? 337 00:19:01,190 --> 00:19:02,840 So these flows on a line are certainly 338 00:19:02,840 --> 00:19:05,810 sufficient for checking stability 339 00:19:05,810 --> 00:19:08,810 in the sense of Lyapunov. 340 00:19:08,810 --> 00:19:10,680 People OK with that? 341 00:19:10,680 --> 00:19:11,180 Good. 342 00:19:11,180 --> 00:19:11,780 OK. 343 00:19:11,780 --> 00:19:13,940 What about asymptotically stable? 344 00:19:13,940 --> 00:19:17,459 What does it mean intuitively to be asymptotically stable? 345 00:19:17,459 --> 00:19:20,910 AUDIENCE: [INAUDIBLE] 346 00:19:25,390 --> 00:19:26,560 PROFESSOR: Good. 347 00:19:26,560 --> 00:19:30,550 So a system is asymptotically stable, 348 00:19:30,550 --> 00:19:32,888 if as t goes to infinity x is actually 349 00:19:32,888 --> 00:19:34,180 going to be at the fixed point. 350 00:19:34,180 --> 00:19:37,973 If you start in a neighborhood, then as time goes to infinity, 351 00:19:37,973 --> 00:19:39,640 x is actually going to get to the point. 352 00:19:44,380 --> 00:19:52,210 So if x0 equals x star plus some epsilon-- 353 00:19:52,210 --> 00:19:55,060 I'm saying epsilon and delta meaning things that are small, 354 00:19:55,060 --> 00:19:57,520 because these are, when I talk about local stability, 355 00:19:57,520 --> 00:20:01,030 I mean these small things. 356 00:20:01,030 --> 00:20:06,110 If x0 starts a small distance away from the fixed point, 357 00:20:06,110 --> 00:20:11,762 then x at infinity equals a fixed point. 358 00:20:20,910 --> 00:20:21,410 OK. 359 00:20:21,410 --> 00:20:23,360 So can we tell from our plots that this thing 360 00:20:23,360 --> 00:20:25,100 is asymptotically stable? 361 00:20:31,548 --> 00:20:33,036 What's that? 362 00:20:33,036 --> 00:20:36,508 AUDIENCE: [INAUDIBLE] 363 00:20:39,453 --> 00:20:40,120 PROFESSOR: Yeah. 364 00:20:40,120 --> 00:20:41,492 I think you can. 365 00:20:41,492 --> 00:20:42,950 I think that this system we know is 366 00:20:42,950 --> 00:20:45,050 going to go to this, as time goes to infinity. 367 00:20:45,050 --> 00:20:46,490 I think that's quite OK. 368 00:20:51,710 --> 00:20:54,440 Asymptotic stability is considered a stricter form 369 00:20:54,440 --> 00:20:58,300 of stability than stability in the sense of Lyapunov. 370 00:20:58,300 --> 00:20:59,280 Right? 371 00:20:59,280 --> 00:20:59,780 OK. 372 00:20:59,780 --> 00:21:03,350 What about exponential stability? 373 00:21:03,350 --> 00:21:05,000 Exponential stability means not just 374 00:21:05,000 --> 00:21:06,500 that I'm going to get there, but I'm 375 00:21:06,500 --> 00:21:09,680 going to get there at some rate, at some exponential rate. 376 00:21:09,680 --> 00:21:16,640 So if x0 is x star plus some epsilon, that implies, 377 00:21:16,640 --> 00:21:23,600 exponential stability implies, that x of t minus x star 378 00:21:23,600 --> 00:21:35,170 is less than some exponential for C alpha greater than 0. 379 00:21:38,100 --> 00:21:38,830 OK. 380 00:21:38,830 --> 00:21:42,610 Then, I'm going to get there in exponential fashion, 381 00:21:42,610 --> 00:21:44,923 at least as fast as an exponential. 382 00:21:44,923 --> 00:21:46,840 So can you tell exponential stability in this? 383 00:21:54,845 --> 00:21:56,220 The point of these methods is not 384 00:21:56,220 --> 00:21:58,640 to talk about the rate of something converging. 385 00:21:58,640 --> 00:22:00,390 So I think the first answer is not really. 386 00:22:00,390 --> 00:22:11,970 But if you think about it, if you were to draw some line, 387 00:22:11,970 --> 00:22:15,330 if something was a constant slope here, 388 00:22:15,330 --> 00:22:18,300 then that system would converge exponentially fast. 389 00:22:18,300 --> 00:22:20,670 So I think as long as your curve is bounded by-- 390 00:22:20,670 --> 00:22:24,090 is above some line, then that would satisfy the time 391 00:22:24,090 --> 00:22:26,230 constant criteria. 392 00:22:26,230 --> 00:22:26,730 OK? 393 00:22:26,730 --> 00:22:28,110 But we're going to use those different definitions 394 00:22:28,110 --> 00:22:30,078 throughout the class, so I want to make sure 395 00:22:30,078 --> 00:22:30,870 that they're clear. 396 00:22:44,980 --> 00:22:46,080 OK. 397 00:22:46,080 --> 00:22:47,080 So we said fixed points. 398 00:22:47,080 --> 00:22:49,990 We talked about a little bit about local stability. 399 00:22:49,990 --> 00:23:00,260 Let's talk about another important concept which 400 00:23:00,260 --> 00:23:02,245 is the basins of attraction. 401 00:23:12,440 --> 00:23:13,790 OK? 402 00:23:13,790 --> 00:23:20,160 So for some fixed point x star, some stable fixed point x star, 403 00:23:20,160 --> 00:23:23,210 I want to know, if I ask what the basin of attraction is, 404 00:23:23,210 --> 00:23:30,530 that means it's the set of initial conditions, which will 405 00:23:30,530 --> 00:23:32,710 get me to this fixed point. 406 00:23:32,710 --> 00:23:33,210 Right? 407 00:23:37,940 --> 00:23:40,110 It's the bounded region of initial conditions, 408 00:23:40,110 --> 00:23:59,790 then set of initial conditions for which x of t as t 409 00:23:59,790 --> 00:24:03,840 goes to infinity equals x star. 410 00:24:08,330 --> 00:24:10,580 So what's the basin of attraction of that fixed point? 411 00:24:16,014 --> 00:24:17,653 AUDIENCE: [INAUDIBLE] 412 00:24:17,653 --> 00:24:18,320 PROFESSOR: Yeah. 413 00:24:18,320 --> 00:24:19,160 Good. 414 00:24:19,160 --> 00:24:19,660 Right? 415 00:24:28,680 --> 00:24:29,180 OK? 416 00:24:29,180 --> 00:24:32,840 So this entire region here, not including those points, 417 00:24:32,840 --> 00:24:35,150 but this entire region here is the basin of attraction 418 00:24:35,150 --> 00:24:39,830 of that fixed point, and these borders here, these lines which 419 00:24:39,830 --> 00:24:41,360 separate the basins of attraction, 420 00:24:41,360 --> 00:24:42,650 they're called the separatrix. 421 00:24:42,650 --> 00:24:43,150 Right? 422 00:24:49,611 --> 00:24:50,903 Does it look like it's working? 423 00:24:50,903 --> 00:24:51,750 AUDIENCE: It will. 424 00:24:51,750 --> 00:24:52,333 PROFESSOR: OK. 425 00:24:55,740 --> 00:24:56,240 OK. 426 00:24:56,240 --> 00:24:58,282 So let's just think about this for a second here. 427 00:24:58,282 --> 00:25:00,060 So I've got an overdamped pendulum. 428 00:25:00,060 --> 00:25:00,980 OK? 429 00:25:00,980 --> 00:25:04,640 This is the fixed point at 0. 430 00:25:04,640 --> 00:25:07,760 My coordinate system is sets of 0 is the bottom. 431 00:25:07,760 --> 00:25:09,455 Right? 432 00:25:09,455 --> 00:25:10,580 I don't have to use my arm. 433 00:25:10,580 --> 00:25:12,330 I've got a pendulum right here, and even if it's off-- 434 00:25:12,330 --> 00:25:12,913 can I move it? 435 00:25:12,913 --> 00:25:13,710 Yeah. 436 00:25:13,710 --> 00:25:14,210 OK. 437 00:25:14,210 --> 00:25:16,820 So this is state equals 0. 438 00:25:16,820 --> 00:25:18,860 We just said that, if the system's overdamped, 439 00:25:18,860 --> 00:25:20,943 then we've got a stable fixed point at the bottom. 440 00:25:20,943 --> 00:25:23,690 I think we can all believe that. 441 00:25:23,690 --> 00:25:27,180 If it was overdamped, it would just go like this. 442 00:25:27,180 --> 00:25:27,680 Right? 443 00:25:27,680 --> 00:25:31,340 This is an underdamped system, but the first-order dynamics 444 00:25:31,340 --> 00:25:33,810 will take it to this stable fixed point. 445 00:25:33,810 --> 00:25:34,460 OK? 446 00:25:34,460 --> 00:25:36,890 The separatrix of that stable fixed point 447 00:25:36,890 --> 00:25:39,560 are the unstable fixed points, up here. 448 00:25:39,560 --> 00:25:40,370 Right? 449 00:25:40,370 --> 00:25:45,260 So an overdamped pendulum, if it's right here, 450 00:25:45,260 --> 00:25:47,270 will come to rest here. 451 00:25:47,270 --> 00:25:47,770 Right? 452 00:25:47,770 --> 00:25:51,110 If it's right here, it'll come to rest on the other side. 453 00:25:51,110 --> 00:25:51,860 Right? 454 00:25:51,860 --> 00:25:53,152 That's the basin of attraction. 455 00:25:53,152 --> 00:25:54,290 That's the separatrix. 456 00:25:54,290 --> 00:25:56,760 I think it makes total sense. 457 00:25:56,760 --> 00:25:59,180 OK. 458 00:25:59,180 --> 00:26:02,510 What happens now, if we start adding control torque 459 00:26:02,510 --> 00:26:05,540 to this overdamped pendulum? 460 00:26:05,540 --> 00:26:07,910 It's just this constant control torque, what happens? 461 00:26:14,205 --> 00:26:15,580 AUDIENCE: [INAUDIBLE] up or down. 462 00:26:15,580 --> 00:26:15,890 PROFESSOR: Good. 463 00:26:15,890 --> 00:26:16,540 Yeah. 464 00:26:16,540 --> 00:26:19,870 So remember, I'm just working of this equation here. 465 00:26:19,870 --> 00:26:21,890 That's going to move that whole line up or down. 466 00:26:21,890 --> 00:26:22,390 All right? 467 00:26:22,390 --> 00:26:25,360 So what's that going to do to the fixed points? 468 00:26:25,360 --> 00:26:31,390 What happens if I do u0 equals mgl over 2b? 469 00:26:36,836 --> 00:26:40,490 You see where I'm going with that? 470 00:26:40,490 --> 00:26:43,752 AUDIENCE: [INAUDIBLE] 471 00:26:44,443 --> 00:26:45,110 PROFESSOR: Yeah. 472 00:26:45,110 --> 00:26:46,110 It might be that simple. 473 00:26:46,110 --> 00:26:48,980 It could be that. 474 00:26:48,980 --> 00:26:50,850 I didn't think it out that far. 475 00:26:59,750 --> 00:27:00,250 OK. 476 00:27:00,250 --> 00:27:11,720 So if u0 not equals mgl over 2b, then this curve 477 00:27:11,720 --> 00:27:12,470 is going to be up. 478 00:27:12,470 --> 00:27:12,970 Right? 479 00:27:12,970 --> 00:27:15,430 So it's going to be some sine wave like this. 480 00:27:18,540 --> 00:27:19,590 OK. 481 00:27:19,590 --> 00:27:24,000 And the fixed points are going to move together. 482 00:27:24,000 --> 00:27:24,840 Right? 483 00:27:24,840 --> 00:27:30,415 So I've got fixed points like this, fixed points like this. 484 00:27:30,415 --> 00:27:33,726 AUDIENCE: [INAUDIBLE] 485 00:27:36,100 --> 00:27:38,420 PROFESSOR: Why do you say that? 486 00:27:38,420 --> 00:27:43,320 AUDIENCE: Well, just because it gets divided by d. 487 00:27:43,320 --> 00:27:45,070 PROFESSOR: Oh, it does get-- you're right. 488 00:27:45,070 --> 00:27:45,570 Good call. 489 00:27:45,570 --> 00:27:47,150 Yep. 490 00:27:47,150 --> 00:27:47,650 Thank you. 491 00:27:47,650 --> 00:27:48,370 Just mgl over 2. 492 00:27:48,370 --> 00:27:48,870 Good. 493 00:27:52,290 --> 00:27:54,110 Yep. 494 00:27:54,110 --> 00:27:54,610 OK. 495 00:27:54,610 --> 00:27:55,940 So the fixed point start moving together. 496 00:27:55,940 --> 00:27:56,820 Do you believe that? 497 00:27:56,820 --> 00:27:58,960 Do you believe that in the physical interpretation 498 00:27:58,960 --> 00:28:00,310 of the pendulum? 499 00:28:00,310 --> 00:28:01,810 This one's still going to be stable. 500 00:28:01,810 --> 00:28:03,012 We could see that quickly. 501 00:28:03,012 --> 00:28:04,345 This one's going to be unstable. 502 00:28:08,510 --> 00:28:09,620 Right? 503 00:28:09,620 --> 00:28:11,270 So if I apply a constant torque, which 504 00:28:11,270 --> 00:28:14,600 I will do as soon as Zack gives me a green light, 505 00:28:14,600 --> 00:28:17,912 but if I apply constant torque, positive torque, 506 00:28:17,912 --> 00:28:20,120 it's going to start moving the fixed point like this. 507 00:28:20,120 --> 00:28:20,970 OK? 508 00:28:20,970 --> 00:28:23,400 The unstable fixed point is also going to move. 509 00:28:23,400 --> 00:28:23,900 Right? 510 00:28:23,900 --> 00:28:27,470 It's going to be coming down like this, 511 00:28:27,470 --> 00:28:29,185 and the basins of attraction changed. 512 00:28:29,185 --> 00:28:30,060 The separatrix moved. 513 00:28:30,060 --> 00:28:31,685 So if this system's here, it's actually 514 00:28:31,685 --> 00:28:35,150 going to go around to this and likewise. 515 00:28:35,150 --> 00:28:35,930 OK? 516 00:28:35,930 --> 00:28:39,580 It's nice you can see that so easily from these little plots. 517 00:28:39,580 --> 00:28:46,841 OK, and what happens if I put in u is 2mgl? 518 00:28:46,841 --> 00:28:49,003 AUDIENCE: [INAUDIBLE] 519 00:28:49,003 --> 00:28:49,670 PROFESSOR: Yeah. 520 00:28:49,670 --> 00:28:50,150 Exactly. 521 00:28:50,150 --> 00:28:50,650 Right? 522 00:28:50,650 --> 00:28:53,000 I won't do that, because I might hurt Zack. 523 00:28:53,000 --> 00:28:55,580 But as soon as this, at the critical point 524 00:28:55,580 --> 00:28:59,810 where this whole curve is above the line, 525 00:28:59,810 --> 00:29:02,990 then the thing's just going to move this way forever. 526 00:29:02,990 --> 00:29:03,530 OK. 527 00:29:03,530 --> 00:29:05,405 So just thinking about these flows on a line, 528 00:29:05,405 --> 00:29:09,380 you could start seeing what first-order, 529 00:29:09,380 --> 00:29:12,650 single, one-dimensional systems can do. 530 00:29:12,650 --> 00:29:16,490 So you know they can go to a fixed point. 531 00:29:16,490 --> 00:29:22,790 We just saw they can go to infinity, if u0 is 2mgl. 532 00:29:22,790 --> 00:29:24,084 Can they ever oscillate? 533 00:29:34,615 --> 00:29:35,740 I don't see how they could. 534 00:29:35,740 --> 00:29:36,450 Right? 535 00:29:36,450 --> 00:29:38,460 I said, it's either going this way, or it's going this way. 536 00:29:38,460 --> 00:29:40,460 There's no oscillations in a first-order system, 537 00:29:40,460 --> 00:29:43,110 and the mechanical engineers know that, 538 00:29:43,110 --> 00:29:45,000 but this is a graphical way to see what 539 00:29:45,000 --> 00:29:47,050 that happens, what that means. 540 00:29:47,050 --> 00:29:49,770 So actually, it turns out the only thing 541 00:29:49,770 --> 00:29:54,720 that a first-order, one-dimensional system could do 542 00:29:54,720 --> 00:29:57,270 is end up at a fixed point or blow up. 543 00:29:57,270 --> 00:29:57,770 Right? 544 00:30:00,922 --> 00:30:02,380 There can be a lot of fixed points. 545 00:30:02,380 --> 00:30:02,590 Right? 546 00:30:02,590 --> 00:30:03,550 It could be a flat line. 547 00:30:03,550 --> 00:30:05,425 It could be that it could be stable anywhere. 548 00:30:05,425 --> 00:30:08,260 That's fine, but it'll always either end up at a fixed point, 549 00:30:08,260 --> 00:30:10,010 or it'll blow up. 550 00:30:10,010 --> 00:30:10,510 OK? 551 00:30:17,930 --> 00:30:18,430 All right. 552 00:30:18,430 --> 00:30:20,980 So it's a general tool. 553 00:30:20,980 --> 00:30:26,980 It's certainly good for things other than pendula. 554 00:30:26,980 --> 00:30:29,650 Let me just give one other nonlinear system 555 00:30:29,650 --> 00:30:34,060 example that's one dimensional and first order, so we can 556 00:30:34,060 --> 00:30:38,270 think about a few more terms. 557 00:30:38,270 --> 00:30:38,770 OK. 558 00:30:38,770 --> 00:30:44,987 So this one is called, just another example, 559 00:30:44,987 --> 00:30:46,945 this one's actually called a nonlinear autapse. 560 00:30:54,590 --> 00:30:56,590 Anybody have any guess what the heck that means? 561 00:31:00,760 --> 00:31:05,320 Even a crazy guess? 562 00:31:05,320 --> 00:31:06,960 It's actually a model of a neuron. 563 00:31:06,960 --> 00:31:07,930 OK? 564 00:31:07,930 --> 00:31:09,520 I did my PhD with the neuroscientists, 565 00:31:09,520 --> 00:31:13,040 so I often think about things that are like neurons. 566 00:31:13,040 --> 00:31:13,540 OK? 567 00:31:13,540 --> 00:31:16,000 If you've ever seen neural networks, 568 00:31:16,000 --> 00:31:20,020 dynamic neural networks, a pretty common representation 569 00:31:20,020 --> 00:31:26,140 of a neural network is with one of these sigmoid functions that 570 00:31:26,140 --> 00:31:28,630 are weighted by some parameter w, 571 00:31:28,630 --> 00:31:32,103 let's say, a weight parameter, but that's inconsequential. 572 00:31:32,103 --> 00:31:33,520 All you have to care about here is 573 00:31:33,520 --> 00:31:37,150 that I've got a first-order, nonlinear system 574 00:31:37,150 --> 00:31:39,040 with a parameter w. 575 00:31:39,040 --> 00:31:39,760 OK? 576 00:31:39,760 --> 00:31:41,802 And again graphically, we can tell you everything 577 00:31:41,802 --> 00:31:44,330 you need to know about the system pretty quickly. 578 00:31:44,330 --> 00:31:44,830 OK? 579 00:31:44,830 --> 00:31:49,255 So who knows what it tanh looks like? 580 00:31:49,255 --> 00:31:50,380 I just said it's a sigmoid. 581 00:31:50,380 --> 00:31:50,880 Right? 582 00:31:50,880 --> 00:31:56,800 So if you know a lot about a tanh, so a tanh, 583 00:31:56,800 --> 00:31:59,710 it goes from 1 to negative 1. 584 00:32:02,500 --> 00:32:04,180 This is x. 585 00:32:04,180 --> 00:32:08,686 This is tanh of wx. 586 00:32:08,686 --> 00:32:12,550 For w equals 1, it turns out you have a slope of 1 here, 587 00:32:12,550 --> 00:32:17,210 and you go up, and you asymptote like this. 588 00:32:17,210 --> 00:32:18,040 OK? 589 00:32:18,040 --> 00:32:19,390 That's w equals 1. 590 00:32:21,940 --> 00:32:31,310 For w a lot greater than 1, you're even steeper, 591 00:32:31,310 --> 00:32:32,560 but you get to the same place. 592 00:32:37,070 --> 00:32:40,210 So let's say that's w equals 3. 593 00:32:40,210 --> 00:32:42,700 And then if you're less than 1, it's 594 00:32:42,700 --> 00:32:45,160 going to be even more shallower. 595 00:32:45,160 --> 00:32:49,340 This is why bring sidewalk chalk to class. 596 00:32:49,340 --> 00:32:49,840 OK? 597 00:32:54,680 --> 00:33:02,110 So let's say that's w equals 0.5. 598 00:33:02,110 --> 00:33:02,610 OK. 599 00:33:02,610 --> 00:33:07,740 So now, what is the system x dot equals 600 00:33:07,740 --> 00:33:10,560 negative x plus tanh look like? 601 00:33:10,560 --> 00:33:12,658 If I want to actually draw my flow on the line, 602 00:33:12,658 --> 00:33:13,950 what's that going to look like? 603 00:33:27,070 --> 00:33:36,730 If I want to plot x versus x dot here, OK, well, I 604 00:33:36,730 --> 00:33:38,510 could plot both of them independently. 605 00:33:38,510 --> 00:33:41,350 So I know how x dot equals negative x looks. 606 00:33:41,350 --> 00:33:44,535 I know how tanh looks. 607 00:33:44,535 --> 00:33:45,910 That function is just going to be 608 00:33:45,910 --> 00:33:49,930 this thing put on the line x dot equals negative x. 609 00:33:49,930 --> 00:33:55,960 So what that means is for w equals 1, 610 00:33:55,960 --> 00:34:02,380 I have a system that comes in like this and goes like that. 611 00:34:02,380 --> 00:34:13,400 For w equals 3, I have a system that goes like this, 612 00:34:13,400 --> 00:34:17,060 and for w equals 1/2, I have a system that goes like this. 613 00:34:20,330 --> 00:34:20,830 OK? 614 00:34:27,005 --> 00:34:30,489 Does that make sense? 615 00:34:30,489 --> 00:34:32,650 So the reason I chose this system 616 00:34:32,650 --> 00:34:37,210 is I want to tell you quickly about bifurcations 617 00:34:37,210 --> 00:34:39,630 and how to make bifurcation diagrams. 618 00:34:39,630 --> 00:34:41,320 OK? 619 00:34:41,320 --> 00:34:44,830 So where are the fixed points of this system? 620 00:34:47,966 --> 00:34:50,100 AUDIENCE: [INAUDIBLE] 621 00:34:50,100 --> 00:34:51,210 PROFESSOR: Good. 622 00:34:51,210 --> 00:34:53,699 So I definitely have a fixed point here. 623 00:34:53,699 --> 00:34:56,544 Is it stable or unstable? 624 00:34:56,544 --> 00:34:57,383 AUDIENCE: Unstable? 625 00:34:57,383 --> 00:34:58,800 PROFESSOR: It depends on w though. 626 00:34:58,800 --> 00:35:00,330 Right? 627 00:35:00,330 --> 00:35:04,120 In one case, it's unstable, and in one case, it's stable. 628 00:35:04,120 --> 00:35:04,770 OK? 629 00:35:04,770 --> 00:35:08,280 And then in some cases, in the blue case, 630 00:35:08,280 --> 00:35:13,170 I have fixed points here, and in the red case, I don't. 631 00:35:13,170 --> 00:35:15,920 Right? 632 00:35:15,920 --> 00:35:21,080 So this is a system which, as I change my run parameter w, 633 00:35:21,080 --> 00:35:22,580 I change the number of fixed points, 634 00:35:22,580 --> 00:35:24,710 and I change the stability of those fixed points. 635 00:35:24,710 --> 00:35:25,210 OK? 636 00:35:25,210 --> 00:35:27,550 It's one of the simpler systems where you see that. 637 00:35:36,304 --> 00:35:41,840 So a change in the number of fixed points, 638 00:35:41,840 --> 00:35:44,500 as you vary parameter is called the bifurcation. 639 00:35:44,500 --> 00:35:45,000 OK? 640 00:35:52,550 --> 00:35:57,860 And you can make bifurcation diagrams, 641 00:35:57,860 --> 00:36:02,300 which for a system like this, the x-axis is 642 00:36:02,300 --> 00:36:08,630 the parameter you're changing, and the y-axis is the fixed 643 00:36:08,630 --> 00:36:10,560 point. 644 00:36:10,560 --> 00:36:11,060 OK? 645 00:36:15,350 --> 00:36:21,500 So if w is less than 1, what did we say? 646 00:36:21,500 --> 00:36:25,010 We've got a fixed point at the origin, 647 00:36:25,010 --> 00:36:26,270 and is it stable or unstable? 648 00:36:29,992 --> 00:36:30,700 AUDIENCE: Stable? 649 00:36:30,700 --> 00:36:31,900 PROFESSOR: Stable. 650 00:36:31,900 --> 00:36:32,830 OK? 651 00:36:32,830 --> 00:36:35,770 So there's a critical point here, where w equals 1. 652 00:36:35,770 --> 00:36:41,140 We know that now, because that's where the slope of tanh is 1. 653 00:36:41,140 --> 00:36:45,460 And if it's less than 1, it turns out 654 00:36:45,460 --> 00:36:49,090 for all w less than 1, I have a stable fixed point 655 00:36:49,090 --> 00:36:49,790 at the origin. 656 00:36:49,790 --> 00:36:52,210 So I use a solid line to say a stable fixed 657 00:36:52,210 --> 00:36:57,540 point and a dashed line for an unstable fixed point. 658 00:37:03,210 --> 00:37:04,450 OK? 659 00:37:04,450 --> 00:37:06,850 And then for w greater than 1, what do I have? 660 00:37:10,330 --> 00:37:12,973 I've got three fixed points. 661 00:37:12,973 --> 00:37:13,890 Which ones are stable? 662 00:37:13,890 --> 00:37:16,690 Which one's unstable? 663 00:37:16,690 --> 00:37:18,220 I just used my plurals in a way that 664 00:37:18,220 --> 00:37:19,960 could only imply one solution. 665 00:37:19,960 --> 00:37:21,880 AUDIENCE: The middle one is not as stable. 666 00:37:21,880 --> 00:37:24,400 PROFESSOR: The middle one is not stable, is unstable, 667 00:37:24,400 --> 00:37:26,750 and the outside ones are stable. 668 00:37:26,750 --> 00:37:27,250 OK? 669 00:37:27,250 --> 00:37:31,420 So and it turns out, if you vary w smoothly, then you get this. 670 00:37:35,330 --> 00:37:36,290 OK? 671 00:37:36,290 --> 00:37:43,000 Where this goes to 1, something like 1. 672 00:37:43,000 --> 00:37:44,330 It's not quite 1. 673 00:37:44,330 --> 00:37:46,850 It's around 1. 674 00:37:46,850 --> 00:37:50,930 It's whatever 1 plus the tanh of 1 is. 675 00:37:50,930 --> 00:37:51,860 OK? 676 00:37:51,860 --> 00:37:57,140 It asymptotes like this, and this fixed point in the middle 677 00:37:57,140 --> 00:37:59,105 remains, but it becomes unstable. 678 00:38:02,760 --> 00:38:03,260 OK? 679 00:38:06,950 --> 00:38:12,080 So bifurcations are a critical concept in nonlinear dynamics. 680 00:38:12,080 --> 00:38:14,360 Give us a crash course. 681 00:38:14,360 --> 00:38:18,290 This is actually called a pitchforked bifurcation 682 00:38:18,290 --> 00:38:19,500 for obvious reasons. 683 00:38:19,500 --> 00:38:20,000 Right? 684 00:38:26,690 --> 00:38:30,020 And that's actually a pretty common one. 685 00:38:30,020 --> 00:38:31,340 You'll run into many others. 686 00:38:31,340 --> 00:38:36,320 There's saddle bifurcations, and there's also, 687 00:38:36,320 --> 00:38:38,480 I think there's just strangely named ones. 688 00:38:38,480 --> 00:38:41,690 I think there's a blue sky bifurcation. 689 00:38:41,690 --> 00:38:45,410 Pretty much any name you look for, you can find 690 00:38:45,410 --> 00:38:47,790 a bifurcation named after it. 691 00:38:47,790 --> 00:38:48,290 OK. 692 00:38:48,290 --> 00:38:51,140 So good. 693 00:38:51,140 --> 00:38:53,420 I think we know a lot of what there 694 00:38:53,420 --> 00:38:58,130 is to know about first-order, nonlinear, one-dimensional 695 00:38:58,130 --> 00:38:58,630 systems. 696 00:38:58,630 --> 00:38:59,130 OK? 697 00:38:59,130 --> 00:39:00,653 I think in a lot of classes, we're 698 00:39:00,653 --> 00:39:03,320 trained to think linear systems, linear systems, linear systems. 699 00:39:03,320 --> 00:39:04,772 I can do everything in linear. 700 00:39:04,772 --> 00:39:06,230 It turns out, you can do everything 701 00:39:06,230 --> 00:39:08,600 in a nonlinear system too, if it's 702 00:39:08,600 --> 00:39:10,730 first-order one-dimensional. 703 00:39:10,730 --> 00:39:13,730 But that's an important axis that we don't see too much, 704 00:39:13,730 --> 00:39:17,540 I think, and it helps to know what all these concepts are. 705 00:39:17,540 --> 00:39:20,660 I think Zack says can now do-- 706 00:39:20,660 --> 00:39:22,940 can we do the overdamped. 707 00:39:22,940 --> 00:39:23,440 ZACK: Sure. 708 00:39:26,445 --> 00:39:27,780 How overdamped do you want it? 709 00:39:27,780 --> 00:39:31,160 PROFESSOR: We wanted gravity to be at 0.8. 710 00:39:31,160 --> 00:39:32,090 ZACK: OK. 711 00:39:32,090 --> 00:39:38,380 PROFESSOR: And we wanted to damping to be, I think-- 712 00:39:38,380 --> 00:39:38,880 I'm sorry. 713 00:39:38,880 --> 00:39:43,014 Damping is negative 8, and gravity was positive 0.85. 714 00:39:43,014 --> 00:39:44,117 ZACK: OK. 715 00:39:44,117 --> 00:39:44,700 PROFESSOR: OK. 716 00:39:44,700 --> 00:39:45,700 So what do we have here? 717 00:39:45,700 --> 00:39:48,780 We've got a big motor, a little pendulum. 718 00:39:48,780 --> 00:39:49,556 Yeah? 719 00:39:49,556 --> 00:39:52,380 ZACK: Could you move it into [INAUDIBLE]?? 720 00:39:52,380 --> 00:39:53,480 PROFESSOR: Can I move it? 721 00:39:53,480 --> 00:39:54,074 Yeah? 722 00:39:54,074 --> 00:39:55,277 ZACK: As long as we don't-- 723 00:39:55,277 --> 00:39:56,610 PROFESSOR: Don't pull the power. 724 00:39:56,610 --> 00:39:59,230 Right? 725 00:39:59,230 --> 00:39:59,730 Good. 726 00:39:59,730 --> 00:40:01,390 That's fine. 727 00:40:01,390 --> 00:40:03,420 OK. 728 00:40:03,420 --> 00:40:06,000 Big motor, DC motor. 729 00:40:06,000 --> 00:40:07,377 There's a gearbox here, but we're 730 00:40:07,377 --> 00:40:09,210 going to be commanding current which is just 731 00:40:09,210 --> 00:40:11,370 like applying that torque there, modulo 732 00:40:11,370 --> 00:40:14,530 some errors in the gearbox, and just 733 00:40:14,530 --> 00:40:16,740 an otherwise passive pendulum. 734 00:40:16,740 --> 00:40:18,240 OK? 735 00:40:18,240 --> 00:40:23,500 So Zack has written the basic system identification, 736 00:40:23,500 --> 00:40:25,590 so we know what the mass is, what the damping is. 737 00:40:25,590 --> 00:40:27,548 It's not quite the simple damping I showed you, 738 00:40:27,548 --> 00:40:29,340 but it's not too much worse. 739 00:40:29,340 --> 00:40:31,950 And now, he can do things like cancel out. 740 00:40:31,950 --> 00:40:33,150 He can change the damping. 741 00:40:33,150 --> 00:40:34,233 He can remove the damping. 742 00:40:34,233 --> 00:40:35,280 He can add more damping. 743 00:40:35,280 --> 00:40:36,343 He can change gravity. 744 00:40:36,343 --> 00:40:38,010 Its just the feedback linearization game 745 00:40:38,010 --> 00:40:38,850 we said yesterday. 746 00:40:38,850 --> 00:40:39,120 All right. 747 00:40:39,120 --> 00:40:40,703 So we just said we're going to make it 748 00:40:40,703 --> 00:40:41,790 an overdamped system here. 749 00:40:41,790 --> 00:40:43,538 So there you go. 750 00:40:43,538 --> 00:40:45,330 Now, overdamped is actually the hardest one 751 00:40:45,330 --> 00:40:46,440 I'm going to show today from the control 752 00:40:46,440 --> 00:40:48,940 plane of view, because you get chatter like crazy when you-- 753 00:40:48,940 --> 00:40:52,050 [BUZZING] See? 754 00:40:52,050 --> 00:40:54,000 Because there's an encoder that's discreet, 755 00:40:54,000 --> 00:40:55,150 and we're sampling it. 756 00:40:55,150 --> 00:40:55,650 OK. 757 00:40:55,650 --> 00:40:56,567 So that's an overdamp. 758 00:40:56,567 --> 00:40:59,710 Now, can you give me a little bit of a constant torque? 759 00:40:59,710 --> 00:41:00,210 ZACK: Sure. 760 00:41:03,030 --> 00:41:04,710 PROFESSOR: Like 0.1. 761 00:41:04,710 --> 00:41:06,150 ZACK: Yeah. 762 00:41:06,150 --> 00:41:07,858 PROFESSOR: I changed it to the gain. 763 00:41:07,858 --> 00:41:08,400 ZACK: I know. 764 00:41:08,400 --> 00:41:09,940 I'm trying to figure out where that-- 765 00:41:09,940 --> 00:41:10,648 PROFESSOR: It's-- 766 00:41:13,480 --> 00:41:15,100 ZACK: There. 767 00:41:15,100 --> 00:41:17,750 PROFESSOR: I think it's probably that torque. 768 00:41:17,750 --> 00:41:18,250 Yeah. 769 00:41:18,250 --> 00:41:18,670 ZACK: Yeah. 770 00:41:18,670 --> 00:41:19,060 OK. 771 00:41:19,060 --> 00:41:19,935 How much do you want? 772 00:41:19,935 --> 00:41:21,340 PROFESSOR: 0.1. 773 00:41:21,340 --> 00:41:22,050 ZACK: OK. 774 00:41:22,050 --> 00:41:22,717 PROFESSOR: Yeah. 775 00:41:25,570 --> 00:41:26,070 OK. 776 00:41:26,070 --> 00:41:27,648 So I applied 0.1 of torque. 777 00:41:27,648 --> 00:41:29,940 Actually, we've got a sign error compared to my things, 778 00:41:29,940 --> 00:41:31,050 but that's OK. 779 00:41:31,050 --> 00:41:31,890 Now, I've got a fixed point here. 780 00:41:31,890 --> 00:41:32,390 Right? 781 00:41:32,390 --> 00:41:34,800 So the same overdamped pendulum, it's stable here. 782 00:41:34,800 --> 00:41:36,508 There's a little bit of stiction in here, 783 00:41:36,508 --> 00:41:37,600 so it's not going exactly. 784 00:41:37,600 --> 00:41:38,100 OK. 785 00:41:38,100 --> 00:41:40,322 The other place we feel it is right up there. 786 00:41:40,322 --> 00:41:41,530 That's the other fixed point. 787 00:41:41,530 --> 00:41:42,030 Right? 788 00:41:42,030 --> 00:41:44,070 If I put it over here, then that constant torque 789 00:41:44,070 --> 00:41:46,620 moves me right over there, just like I said. 790 00:41:46,620 --> 00:41:49,230 OK? 791 00:41:49,230 --> 00:41:49,950 It's all good. 792 00:41:49,950 --> 00:41:54,093 Let's just-- we can play with it a little bit now. 793 00:41:54,093 --> 00:41:56,510 So give me maybe twice the gravity or something like that. 794 00:41:56,510 --> 00:41:57,010 ZACK: OK. 795 00:41:57,010 --> 00:41:57,718 PROFESSOR: Right? 796 00:41:57,718 --> 00:42:01,046 What's going to happen if I double gravity? 797 00:42:01,046 --> 00:42:03,178 AUDIENCE: Nothing. 798 00:42:03,178 --> 00:42:04,136 PROFESSOR: What's that? 799 00:42:04,136 --> 00:42:05,090 AUDIENCE: Nothing. 800 00:42:05,090 --> 00:42:06,020 PROFESSOR: Nothing. 801 00:42:06,020 --> 00:42:08,923 ZACK: Let me turn this damping gain back down. 802 00:42:08,923 --> 00:42:09,590 PROFESSOR: Yeah. 803 00:42:09,590 --> 00:42:10,180 Good idea. 804 00:42:10,180 --> 00:42:11,013 OK? 805 00:42:11,013 --> 00:42:12,680 ZACK: OK, and now we want twice gravity? 806 00:42:20,530 --> 00:42:22,040 OK. 807 00:42:22,040 --> 00:42:24,260 PROFESSOR: OK. 808 00:42:24,260 --> 00:42:26,510 Changes the natural frequency, right? 809 00:42:26,510 --> 00:42:28,010 We're going to see that in a second. 810 00:42:28,010 --> 00:42:30,200 I didn't actually do all this secondary stuff yet. 811 00:42:30,200 --> 00:42:31,825 Still got high damping in there though. 812 00:42:31,825 --> 00:42:32,950 ZACK: Yeah. 813 00:42:32,950 --> 00:42:33,450 Oh. 814 00:42:33,450 --> 00:42:33,997 Yeah. 815 00:42:33,997 --> 00:42:34,580 PROFESSOR: OK. 816 00:42:34,580 --> 00:42:35,390 ZACK: Take that out. 817 00:42:35,390 --> 00:42:35,660 PROFESSOR: Cool. 818 00:42:35,660 --> 00:42:37,430 So we're going to play with that again, 819 00:42:37,430 --> 00:42:39,140 when I do the second-order version here. 820 00:42:39,140 --> 00:42:43,940 But at least I hope you believe wherever 821 00:42:43,940 --> 00:42:47,662 it went the constant torque overdamped tells me everything 822 00:42:47,662 --> 00:42:49,370 I need to know about the simple pendulum, 823 00:42:49,370 --> 00:42:50,080 so that's kind of cool. 824 00:42:50,080 --> 00:42:50,580 OK. 825 00:42:56,120 --> 00:42:58,550 Let's get rid of this overdamped constraint which 826 00:42:58,550 --> 00:43:02,790 is the only reason it was first order, 827 00:43:02,790 --> 00:43:05,680 and let's get to the second-order case. 828 00:43:05,680 --> 00:43:08,000 OK? 829 00:43:08,000 --> 00:43:11,300 But before we do the whole dynamics, 830 00:43:11,300 --> 00:43:15,463 we'll make another quick assumption. 831 00:43:15,463 --> 00:43:16,880 Let's do a different special case. 832 00:43:16,880 --> 00:43:18,213 I could have left that, I guess. 833 00:43:30,490 --> 00:43:42,500 Let's do an undamped pendulum, and we'll start with 0 torque. 834 00:43:47,020 --> 00:43:47,740 OK. 835 00:43:47,740 --> 00:43:52,510 So b equals 0, and u0 equals 0. 836 00:43:52,510 --> 00:43:55,030 OK? 837 00:43:55,030 --> 00:43:55,530 All right. 838 00:43:55,530 --> 00:43:57,550 So what do those equations look like? 839 00:43:57,550 --> 00:44:08,380 Now, I've just got I theta double dot is negative mgl sine 840 00:44:08,380 --> 00:44:08,880 theta. 841 00:44:08,880 --> 00:44:09,380 Right? 842 00:44:12,590 --> 00:44:13,090 OK. 843 00:44:13,090 --> 00:44:15,630 So how am I going to graphically investigate 844 00:44:15,630 --> 00:44:18,900 this second-order system? 845 00:44:18,900 --> 00:44:21,510 Well now, there's two things I care about evolving over time. 846 00:44:21,510 --> 00:44:22,110 Right? 847 00:44:22,110 --> 00:44:25,840 I need to know what theta does over time, 848 00:44:25,840 --> 00:44:29,020 but I also need to know what theta dot does over time. 849 00:44:29,020 --> 00:44:29,520 OK? 850 00:44:29,520 --> 00:44:31,980 So I'm going to need a two-dimensional plot, 851 00:44:31,980 --> 00:44:33,120 and this is the phase plot. 852 00:44:44,700 --> 00:44:45,200 OK? 853 00:44:45,200 --> 00:44:46,420 So let's make a phase plot. 854 00:44:51,480 --> 00:44:51,980 OK. 855 00:44:51,980 --> 00:44:59,510 So a phase plot, what I'm going to plot 856 00:44:59,510 --> 00:45:08,090 is theta versus theta dot, and what I'm going to plot is not-- 857 00:45:08,090 --> 00:45:10,100 my separatrix doesn't want to go away. 858 00:45:14,670 --> 00:45:17,080 What I'm going to plot on this, it's a vector plot. 859 00:45:17,080 --> 00:45:18,090 OK? 860 00:45:18,090 --> 00:45:22,900 I'm going to plot I have two equations floating. 861 00:45:22,900 --> 00:45:23,400 Right? 862 00:45:23,400 --> 00:45:28,780 This is the second-order system is equivalent to two equations. 863 00:45:28,780 --> 00:45:36,270 One is theta dot, looks a little silly to write this, 864 00:45:36,270 --> 00:45:39,180 but you can think of a second-order system 865 00:45:39,180 --> 00:45:45,070 as coupled first-order systems of two variables here, 866 00:45:45,070 --> 00:45:48,180 and this is mgl sine theta. 867 00:45:52,080 --> 00:45:53,430 OK? 868 00:45:53,430 --> 00:45:56,170 So what I'm going to plot here is a vector 869 00:45:56,170 --> 00:45:59,055 which is theta dot versus theta double dot 870 00:45:59,055 --> 00:46:03,780 as a function of theta and theta dot. 871 00:46:03,780 --> 00:46:07,800 I see angry looks. 872 00:46:07,800 --> 00:46:09,690 Right? 873 00:46:09,690 --> 00:46:14,370 I can write this as, if I want to think 874 00:46:14,370 --> 00:46:17,220 of this as a first-order system, I'm 875 00:46:17,220 --> 00:46:19,480 going to say that x is theta, theta dot. 876 00:46:19,480 --> 00:46:20,460 Right? 877 00:46:20,460 --> 00:46:25,185 And now, I can write x dot is some function of x, 878 00:46:25,185 --> 00:46:27,900 a first-order equation which describes 879 00:46:27,900 --> 00:46:30,160 this second-order system. 880 00:46:30,160 --> 00:46:30,660 OK? 881 00:46:30,660 --> 00:46:34,890 It's a vector equation, and what I want to plot is, for all x, 882 00:46:34,890 --> 00:46:36,655 I want to plot x dot. 883 00:46:36,655 --> 00:46:43,050 x is 2 by 1, and it happens to be theta dot, theta double dot. 884 00:46:43,050 --> 00:46:44,760 And it's a function of a 2 by 1, so I'm 885 00:46:44,760 --> 00:46:49,050 going to make a vector plot on this two-dimensional system. 886 00:46:49,050 --> 00:46:50,220 OK? 887 00:46:50,220 --> 00:46:55,720 Maybe as I start drawing things, it'll become crystal clear. 888 00:46:55,720 --> 00:46:57,870 OK. 889 00:46:57,870 --> 00:47:09,178 So given this equation here for the undamped pendulum, 890 00:47:09,178 --> 00:47:10,470 let's plot some of the vectors. 891 00:47:10,470 --> 00:47:10,970 OK? 892 00:47:10,970 --> 00:47:15,990 So it turns out that it's simple to think 893 00:47:15,990 --> 00:47:19,800 about it along the line of theta dot equals 0. 894 00:47:19,800 --> 00:47:21,880 Let's think about that. 895 00:47:21,880 --> 00:47:27,030 I have a vector who's y component is going to be 0, 896 00:47:27,030 --> 00:47:29,130 and its x component-- 897 00:47:29,130 --> 00:47:30,690 sorry. 898 00:47:30,690 --> 00:47:32,160 This component is going to be 0. 899 00:47:32,160 --> 00:47:33,535 I should call it the x component, 900 00:47:33,535 --> 00:47:37,560 and its y component is going to be negative mgl sine theta. 901 00:47:37,560 --> 00:47:38,430 OK? 902 00:47:38,430 --> 00:47:41,580 So at 0, I've got nothing. 903 00:47:41,580 --> 00:47:44,220 Here, I've got a little vector going down. 904 00:47:44,220 --> 00:47:45,735 Its y component is this. 905 00:47:49,112 --> 00:47:53,480 It gets back to another 0. 906 00:47:53,480 --> 00:47:57,210 So if I plot this vector field along that line, I get this. 907 00:48:03,390 --> 00:48:05,200 Right? 908 00:48:05,200 --> 00:48:06,210 OK? 909 00:48:06,210 --> 00:48:08,280 If I plot it up at some positive-- or let's 910 00:48:08,280 --> 00:48:10,420 even plot it now along the other line. 911 00:48:10,420 --> 00:48:13,290 So if theta is 0, then I get a thing 912 00:48:13,290 --> 00:48:16,050 that's only got an x component. 913 00:48:16,050 --> 00:48:20,280 This term is 0, and it's actually a linear thing, 914 00:48:20,280 --> 00:48:22,800 so it just looks like this. 915 00:48:32,510 --> 00:48:33,990 You with me on that? 916 00:48:33,990 --> 00:48:35,330 OK? 917 00:48:35,330 --> 00:48:40,940 And if I plot something in between some positive x, 918 00:48:40,940 --> 00:48:43,340 some positive theta, positive theta dot, 919 00:48:43,340 --> 00:48:45,360 then I'm going to get a combination of these two 920 00:48:45,360 --> 00:48:45,860 things. 921 00:48:45,860 --> 00:48:47,360 I'm going to get a vector like this. 922 00:48:51,920 --> 00:48:52,420 Right? 923 00:48:59,340 --> 00:49:00,990 If you plot that through, or if you 924 00:49:00,990 --> 00:49:03,840 hand it to Matlab to plot it through, for instance, 925 00:49:03,840 --> 00:49:08,400 then you can again graphically quickly interrogate 926 00:49:08,400 --> 00:49:11,400 the nonlinear dynamics of the system. 927 00:49:11,400 --> 00:49:12,570 OK? 928 00:49:12,570 --> 00:49:15,870 So in this phase plot, if I start 929 00:49:15,870 --> 00:49:21,300 with some positive velocity and 0 angle, 930 00:49:21,300 --> 00:49:25,080 then I'm going to get some angle. 931 00:49:25,080 --> 00:49:26,040 Right? 932 00:49:26,040 --> 00:49:31,560 I'm going to go around until I get to the theta dot equals 0. 933 00:49:31,560 --> 00:49:33,985 I go around. 934 00:49:33,985 --> 00:49:36,360 That could have been more circular, but you get the idea. 935 00:49:40,030 --> 00:49:40,950 OK. 936 00:49:40,950 --> 00:49:42,660 It turns out in here, things really 937 00:49:42,660 --> 00:49:45,150 do look like circles around the origin, 938 00:49:45,150 --> 00:49:47,670 and they should be cocentric. 939 00:49:47,670 --> 00:49:53,220 Out here, the nonlinearity shows up a little bit more. 940 00:49:53,220 --> 00:49:54,960 You get these eyeball looking things. 941 00:49:58,830 --> 00:49:59,330 OK? 942 00:50:03,130 --> 00:50:03,630 All right. 943 00:50:03,630 --> 00:50:04,547 So what does that say? 944 00:50:04,547 --> 00:50:06,350 So if I start my pendulum-- is it-- 945 00:50:06,350 --> 00:50:07,290 ZACK: It's ready. 946 00:50:07,290 --> 00:50:08,870 PROFESSOR: OK. 947 00:50:08,870 --> 00:50:13,820 If I start my pendulum with 0 position and some velocity, 948 00:50:13,820 --> 00:50:16,190 is it 0 damping [INAUDIBLE] good man. 949 00:50:16,190 --> 00:50:16,760 OK. 950 00:50:16,760 --> 00:50:18,420 Then, what's it going to do? 951 00:50:18,420 --> 00:50:20,900 It's going to start oscillating forever. 952 00:50:20,900 --> 00:50:21,620 Right? 953 00:50:21,620 --> 00:50:24,290 As close as we can to canceling out damping by measuring it 954 00:50:24,290 --> 00:50:25,620 and subtracting it. 955 00:50:25,620 --> 00:50:26,267 OK? 956 00:50:26,267 --> 00:50:27,350 So it's just going around. 957 00:50:27,350 --> 00:50:30,110 It's got some positive theta, negative theta dot, 958 00:50:30,110 --> 00:50:33,350 positive theta dot, negative theta dot, 959 00:50:33,350 --> 00:50:34,550 and it was pretty close. 960 00:50:34,550 --> 00:50:36,680 I'll give you a better chance by going like that. 961 00:50:36,680 --> 00:50:37,180 OK? 962 00:50:40,520 --> 00:50:46,298 And I can really test our model by starting it up here. 963 00:50:46,298 --> 00:50:47,090 That's pretty good. 964 00:50:47,090 --> 00:50:48,230 Right? 965 00:50:48,230 --> 00:50:52,700 So if I start way up here, it's going to take these orbits. 966 00:50:52,700 --> 00:50:53,420 OK? 967 00:50:53,420 --> 00:50:57,890 And it turns out, if I were to wrap the pendulum around once-- 968 00:50:57,890 --> 00:50:59,960 again, now I'm testing the encoder counts. 969 00:50:59,960 --> 00:51:00,680 ZACK: [INAUDIBLE] 970 00:51:00,680 --> 00:51:01,263 PROFESSOR: OK. 971 00:51:01,263 --> 00:51:03,530 Well then, I would do the same thing but over 972 00:51:03,530 --> 00:51:04,820 by that other fixed point. 973 00:51:04,820 --> 00:51:06,110 Right? 974 00:51:06,110 --> 00:51:09,860 So this whole pattern repeats over here. 975 00:51:09,860 --> 00:51:12,188 Right? 976 00:51:12,188 --> 00:51:13,670 ZACK: [INAUDIBLE] 977 00:51:13,670 --> 00:51:14,544 PROFESSOR: Yep. 978 00:51:14,544 --> 00:51:16,400 ZACK: [INAUDIBLE] 979 00:51:16,400 --> 00:51:17,670 PROFESSOR: Oh, great. 980 00:51:17,670 --> 00:51:21,410 We should plug that in which is going 981 00:51:21,410 --> 00:51:24,440 to be mechanically impossible. 982 00:51:24,440 --> 00:51:27,220 OK. 983 00:51:27,220 --> 00:51:28,654 ZACK: There we go. 984 00:51:30,937 --> 00:51:33,270 PROFESSOR: You can sort of see there's an eyeball there. 985 00:51:33,270 --> 00:51:34,070 Right? 986 00:51:34,070 --> 00:51:35,930 This is the real data from the encoders. 987 00:51:35,930 --> 00:51:36,680 OK? 988 00:51:36,680 --> 00:51:40,085 So I moved it around there, and then I jerked it over here. 989 00:51:40,085 --> 00:51:43,130 I got an orbit there, moved it over here, 990 00:51:43,130 --> 00:51:45,090 and got that nonlinear orbit. 991 00:51:45,090 --> 00:51:45,590 OK? 992 00:51:48,770 --> 00:51:51,720 That's the exact same phase plot that we just did. 993 00:51:51,720 --> 00:51:52,220 OK. 994 00:51:52,220 --> 00:51:57,620 So now, where are the fixed points of the system? 995 00:51:57,620 --> 00:52:01,930 On a phase plot, two variables, where can the fixed points even 996 00:52:01,930 --> 00:52:02,680 be? 997 00:52:02,680 --> 00:52:04,055 Can I have a fixed point up here? 998 00:52:08,730 --> 00:52:11,842 If I have a velocity, I don't have a fixed point. 999 00:52:11,842 --> 00:52:13,300 So right away, you know you're only 1000 00:52:13,300 --> 00:52:17,500 going to be looking for fixed points on the x-axis here. 1001 00:52:17,500 --> 00:52:18,000 Right? 1002 00:52:21,400 --> 00:52:26,810 And again, on the x-axis, it just reduced to the sine. 1003 00:52:26,810 --> 00:52:28,910 So I've got a fixed point here. 1004 00:52:28,910 --> 00:52:30,860 I've got a fixed point at pi. 1005 00:52:30,860 --> 00:52:34,790 I've got a fixed point at 2 pi. 1006 00:52:34,790 --> 00:52:37,110 Right? 1007 00:52:37,110 --> 00:52:37,730 OK. 1008 00:52:37,730 --> 00:52:38,420 Are they stable? 1009 00:52:41,850 --> 00:52:42,750 Is this one stable? 1010 00:52:47,280 --> 00:52:48,750 You should ask, what do I mean? 1011 00:52:48,750 --> 00:52:49,440 One more sense. 1012 00:52:49,440 --> 00:52:50,730 Good. 1013 00:52:50,730 --> 00:52:52,460 Is it asymptotically stable? 1014 00:52:52,460 --> 00:52:53,340 AUDIENCE: No. 1015 00:52:53,340 --> 00:52:54,115 PROFESSOR: No. 1016 00:52:54,115 --> 00:52:55,142 Right? 1017 00:52:55,142 --> 00:52:57,600 If I start it here, it's just going to go around and around 1018 00:52:57,600 --> 00:52:58,602 and around forever. 1019 00:52:58,602 --> 00:53:00,060 It's not going to get to the point. 1020 00:53:00,060 --> 00:53:02,160 Is it stable in the sense of Lyapunov? 1021 00:53:02,160 --> 00:53:03,030 Yes. 1022 00:53:03,030 --> 00:53:04,080 Good. 1023 00:53:04,080 --> 00:53:05,850 And this one is not stable at all. 1024 00:53:05,850 --> 00:53:08,260 Right? 1025 00:53:08,260 --> 00:53:09,000 OK. 1026 00:53:09,000 --> 00:53:09,500 Cool. 1027 00:53:19,230 --> 00:53:19,730 All right. 1028 00:53:19,730 --> 00:53:21,770 Let's add a little damping in. 1029 00:53:21,770 --> 00:53:24,050 What happens if I add my damping back in but leave 1030 00:53:24,050 --> 00:53:26,168 my torque off? 1031 00:53:26,168 --> 00:53:26,960 What do I get then? 1032 00:53:35,680 --> 00:53:39,150 I want to ask you one more question. 1033 00:53:39,150 --> 00:53:41,400 So this thing is a trajectory. 1034 00:53:41,400 --> 00:53:43,710 I didn't tell you carefully what-- 1035 00:53:43,710 --> 00:53:44,790 this is a closed orbit. 1036 00:53:44,790 --> 00:53:46,650 Right? 1037 00:53:46,650 --> 00:53:48,966 Is that closed orbit stable? 1038 00:53:48,966 --> 00:53:51,460 AUDIENCE: What do you mean? 1039 00:53:51,460 --> 00:53:53,000 PROFESSOR: That's a fair question. 1040 00:53:53,000 --> 00:53:54,040 What do I mean? 1041 00:53:54,040 --> 00:53:59,170 So we have to define orbital stability, and we will. 1042 00:53:59,170 --> 00:54:01,730 But just intuitively, what do you feel about-- 1043 00:54:01,730 --> 00:54:04,660 do you think that trajectories that are near that 1044 00:54:04,660 --> 00:54:06,980 are going to get to that? 1045 00:54:06,980 --> 00:54:07,600 No, right? 1046 00:54:07,600 --> 00:54:10,510 This is the same sort of marginal stability case 1047 00:54:10,510 --> 00:54:12,180 that you see here. 1048 00:54:12,180 --> 00:54:14,230 So if there was a sense of Lyapunov sort 1049 00:54:14,230 --> 00:54:18,672 of definition for the orbit, then we might say that. 1050 00:54:18,672 --> 00:54:21,130 It's not a limit cycle stability we're going to talk about, 1051 00:54:21,130 --> 00:54:23,880 where it's not going to converge to that trajectory. 1052 00:54:23,880 --> 00:54:24,430 OK? 1053 00:54:24,430 --> 00:54:27,460 If I'm on this orbit, and I give it a little push, 1054 00:54:27,460 --> 00:54:29,650 then it'll start moving in this different orbit. 1055 00:54:29,650 --> 00:54:32,090 OK? 1056 00:54:32,090 --> 00:54:32,750 OK. 1057 00:54:32,750 --> 00:54:35,390 Now, what happens if I do the damping case? 1058 00:54:35,390 --> 00:54:36,440 So my equations are-- 1059 00:54:41,080 --> 00:54:44,570 I think it's just unsatisfying to see that. 1060 00:54:44,570 --> 00:54:50,900 Let me just write x dot is still going to be theta dot out here, 1061 00:54:50,900 --> 00:54:54,350 but now it's going to be negative b 1062 00:54:54,350 --> 00:54:56,300 theta dot minus mgl sine theta. 1063 00:54:56,300 --> 00:54:56,800 Right? 1064 00:55:02,730 --> 00:55:09,260 It turns out, if I make that same plot, at the origin 1065 00:55:09,260 --> 00:55:10,130 all is well. 1066 00:55:10,130 --> 00:55:11,000 It's the same thing. 1067 00:55:11,000 --> 00:55:12,020 Right? 1068 00:55:12,020 --> 00:55:15,620 I still get my sine wave dynamics at the origin. 1069 00:55:28,620 --> 00:55:29,900 OK, but what happens up here? 1070 00:55:29,900 --> 00:55:36,320 Now, this is still theta versus theta dot phase plot, 1071 00:55:36,320 --> 00:55:44,060 but now when I have 0 theta, I have the same x component, 1072 00:55:44,060 --> 00:55:49,520 theta dot, but now I have some negative y component. 1073 00:55:49,520 --> 00:55:51,050 Yeah? 1074 00:55:51,050 --> 00:55:53,930 So I'm going to get a vector that looks like this, 1075 00:55:53,930 --> 00:55:56,610 and these things go down like that. 1076 00:56:01,620 --> 00:56:02,120 OK? 1077 00:56:02,120 --> 00:56:10,290 And in general, it looks something like this, 1078 00:56:10,290 --> 00:56:13,540 and what are my trajectories going to look like? 1079 00:56:13,540 --> 00:56:14,390 AUDIENCE: Spirals. 1080 00:56:14,390 --> 00:56:16,212 PROFESSOR: Spirals, good. 1081 00:56:16,212 --> 00:56:16,712 Right? 1082 00:56:33,312 --> 00:56:34,520 You might want to restart it. 1083 00:56:34,520 --> 00:56:36,260 I might have moved it too quick. 1084 00:56:36,260 --> 00:56:38,020 It's got to grab the encoder 0. 1085 00:56:38,020 --> 00:56:38,520 ZACK: OK. 1086 00:56:38,520 --> 00:56:39,103 PROFESSOR: OK. 1087 00:56:42,780 --> 00:56:44,205 That's no damping still, right? 1088 00:56:44,205 --> 00:56:44,550 ZACK: Yep. 1089 00:56:44,550 --> 00:56:45,735 PROFESSOR: Let's put some damping in there. 1090 00:56:45,735 --> 00:56:46,080 ZACK: No, wait. 1091 00:56:46,080 --> 00:56:47,130 That's with normal damping. 1092 00:56:47,130 --> 00:56:47,820 PROFESSOR: Normal damping. 1093 00:56:47,820 --> 00:56:49,362 ZACK: Yeah, not doing anything to it. 1094 00:56:49,362 --> 00:56:52,380 PROFESSOR: OK, so this is normal damping, 1095 00:56:52,380 --> 00:56:55,523 just the damping from the motor, the friction and the gearbox 1096 00:56:55,523 --> 00:56:56,190 mostly probably. 1097 00:56:58,860 --> 00:56:59,400 OK. 1098 00:56:59,400 --> 00:57:00,460 Let's see a phase plot. 1099 00:57:00,460 --> 00:57:00,960 ZACK: OK. 1100 00:57:00,960 --> 00:57:01,890 Let me get the data off it. 1101 00:57:01,890 --> 00:57:02,515 PROFESSOR: Yep. 1102 00:57:21,460 --> 00:57:22,210 ZACK: There we go. 1103 00:57:27,670 --> 00:57:28,320 PROFESSOR: OK. 1104 00:57:28,320 --> 00:57:32,130 So you'll see a few blips in the plot. 1105 00:57:32,130 --> 00:57:34,900 That's when the encoders are slipping away, 1106 00:57:34,900 --> 00:57:38,493 but you can see a pretty spirally trajectory. 1107 00:57:38,493 --> 00:57:40,410 I think if we triple the damping or something, 1108 00:57:40,410 --> 00:57:41,280 it'll look more compelling. 1109 00:57:41,280 --> 00:57:41,730 ZACK: Yeah. 1110 00:57:41,730 --> 00:57:41,985 PROFESSOR: Let's try that. 1111 00:57:41,985 --> 00:57:42,240 Yeah? 1112 00:57:42,240 --> 00:57:42,740 ZACK: OK. 1113 00:57:46,177 --> 00:57:46,760 PROFESSOR: OK. 1114 00:57:46,760 --> 00:57:49,640 So while he's setting that up, what 1115 00:57:49,640 --> 00:57:52,370 happens to the fixed point over here? 1116 00:57:55,250 --> 00:57:58,430 It's going to have some sort of dynamics over here. 1117 00:57:58,430 --> 00:57:58,980 OK? 1118 00:57:58,980 --> 00:57:59,480 Right? 1119 00:57:59,480 --> 00:58:03,310 It's going to have spiral dynamics down here, 1120 00:58:03,310 --> 00:58:11,170 but what happens if I start with a really large velocity 1121 00:58:11,170 --> 00:58:16,820 or a really large negative velocity, let's say, and 0. 1122 00:58:16,820 --> 00:58:18,610 AUDIENCE: [INAUDIBLE] 1123 00:58:18,610 --> 00:58:19,360 PROFESSOR: Yeah. 1124 00:58:19,360 --> 00:58:20,470 Right? 1125 00:58:20,470 --> 00:58:26,860 So this is my unstable equilibrium. 1126 00:58:26,860 --> 00:58:29,800 If I'm coming down, and I don't make it 1127 00:58:29,800 --> 00:58:32,530 to that unstable equilibrium, then it 1128 00:58:32,530 --> 00:58:35,290 will actually tip back up, and I'll go in 1129 00:58:35,290 --> 00:58:37,370 and spiral to this fixed point. 1130 00:58:37,370 --> 00:58:37,870 Right? 1131 00:58:40,730 --> 00:58:42,500 So let's see how-- 1132 00:58:42,500 --> 00:58:44,090 ZACK: You going to give that a try? 1133 00:58:44,090 --> 00:58:45,840 Let's do just the normal-- 1134 00:58:45,840 --> 00:58:46,340 ZACK: OK. 1135 00:58:46,340 --> 00:58:46,930 It's ready to go. 1136 00:58:46,930 --> 00:58:47,513 PROFESSOR: OK. 1137 00:58:50,240 --> 00:58:50,740 OK. 1138 00:58:50,740 --> 00:58:52,540 That was the benign case. 1139 00:58:52,540 --> 00:58:56,124 We'll try the high energy case in just a second here. 1140 00:58:56,124 --> 00:58:59,290 ZACK: Let me get that data [INAUDIBLE].. 1141 00:58:59,290 --> 00:59:01,885 PROFESSOR: Yeah. 1142 00:59:01,885 --> 00:59:02,819 ZACK: There we go. 1143 00:59:06,427 --> 00:59:07,010 PROFESSOR: OK. 1144 00:59:07,010 --> 00:59:10,508 Minus the little blips, you can see that's the spiral going in. 1145 00:59:10,508 --> 00:59:11,550 Now, let's see if I can-- 1146 00:59:11,550 --> 00:59:12,842 ZACK: Let me restart the-- 1147 00:59:12,842 --> 00:59:13,550 PROFESSOR: Sorry. 1148 00:59:13,550 --> 00:59:16,190 Let me leave it. 1149 00:59:16,190 --> 00:59:17,000 ZACK: OK. 1150 00:59:17,000 --> 00:59:18,770 PROFESSOR: OK? 1151 00:59:18,770 --> 00:59:19,270 Yep. 1152 00:59:26,440 --> 00:59:31,422 So it looks like it hit the brakes here and came back down. 1153 00:59:31,422 --> 00:59:33,880 You might think it's like a discontinuity in the trajectory 1154 00:59:33,880 --> 00:59:35,397 or something, but hopefully, it'll 1155 00:59:35,397 --> 00:59:37,480 look exactly like what I pictured up on the board. 1156 00:59:40,600 --> 00:59:44,470 Yep, again, minus the encoders slipping, 1157 00:59:44,470 --> 00:59:46,420 and this is me lifting it. 1158 00:59:46,420 --> 00:59:48,760 It goes around and finds, stabilizes 1159 00:59:48,760 --> 00:59:50,590 into that fixed point. 1160 00:59:50,590 --> 00:59:51,090 OK? 1161 00:59:54,800 --> 00:59:55,300 All right. 1162 00:59:55,300 --> 01:00:01,150 So finally now, for those of you that 1163 01:00:01,150 --> 01:00:03,370 are quite familiar with dynamics, 1164 01:00:03,370 --> 01:00:04,660 thank you for listening. 1165 01:00:04,660 --> 01:00:07,380 Let's think about controlling this system. 1166 01:00:07,380 --> 01:00:08,412 OK? 1167 01:00:08,412 --> 01:00:10,120 What does it mean to control this system? 1168 01:00:13,260 --> 01:00:18,090 Let's say, I put in u again. 1169 01:00:18,090 --> 01:00:19,410 Forget about constant u. 1170 01:00:19,410 --> 01:00:20,610 We're past that now. 1171 01:00:20,610 --> 01:00:22,230 Let's say, in general, I can make 1172 01:00:22,230 --> 01:00:27,260 u be a function of the theta and theta dot. 1173 01:00:31,420 --> 01:00:32,860 Right? 1174 01:00:32,860 --> 01:00:34,450 And my equations now are going to have 1175 01:00:34,450 --> 01:00:42,160 this plus u which could in general be a function of theta 1176 01:00:42,160 --> 01:00:43,106 and theta dot. 1177 01:00:43,106 --> 01:00:43,606 OK? 1178 01:00:46,193 --> 01:00:47,860 What is it going to do to my phase plot? 1179 01:00:54,350 --> 01:00:57,950 Doesn't change this component, right? 1180 01:00:57,950 --> 01:01:00,475 Which means things are basically still going to go around. 1181 01:01:00,475 --> 01:01:01,850 Things always go around this way. 1182 01:01:01,850 --> 01:01:04,590 That's how it works. 1183 01:01:04,590 --> 01:01:06,020 OK? 1184 01:01:06,020 --> 01:01:11,450 But what I can do is I can move this guy up or down. 1185 01:01:11,450 --> 01:01:13,160 Right? 1186 01:01:13,160 --> 01:01:15,380 That's all I can do. 1187 01:01:15,380 --> 01:01:19,560 Now, in a lot of cases, that's everything I'd want to do, 1188 01:01:19,560 --> 01:01:20,900 so maybe we should. 1189 01:01:20,900 --> 01:01:23,390 You want to do the feedback linearization 1190 01:01:23,390 --> 01:01:24,480 of gravity example? 1191 01:01:24,480 --> 01:01:24,980 ZACK: Yeah. 1192 01:01:24,980 --> 01:01:25,370 PROFESSOR: OK. 1193 01:01:25,370 --> 01:01:26,662 ZACK: Give me a couple seconds. 1194 01:01:26,662 --> 01:01:28,010 PROFESSOR: Sure. 1195 01:01:28,010 --> 01:01:28,880 Right? 1196 01:01:28,880 --> 01:01:30,470 So it turns out, that's enough, if you 1197 01:01:30,470 --> 01:01:32,060 think about what this plot looks like, 1198 01:01:32,060 --> 01:01:33,450 even if I have a damped thing. 1199 01:01:33,450 --> 01:01:35,840 So for instance, if I do my feedback linearization, 1200 01:01:35,840 --> 01:01:37,730 and I make this function. 1201 01:01:37,730 --> 01:01:41,420 Let me be a little bit more careful, I'll call this pi. 1202 01:01:41,420 --> 01:01:44,450 I'll say u is pi of theta, theta dot. 1203 01:01:44,450 --> 01:01:48,480 That's the notation we use most of the time here. 1204 01:01:48,480 --> 01:01:53,435 Let's say, I just made it b theta dot. 1205 01:01:53,435 --> 01:01:56,630 That cancels out this component the thing, 1206 01:01:56,630 --> 01:01:58,610 flattens it out, and gets me back to that plot. 1207 01:01:58,610 --> 01:02:01,540 That's actually exactly how we did the 0 damping case there. 1208 01:02:01,540 --> 01:02:02,040 Right? 1209 01:02:02,040 --> 01:02:04,970 We just canceled out the damping to make that plot, 1210 01:02:04,970 --> 01:02:06,830 because the real thing has damping. 1211 01:02:06,830 --> 01:02:07,580 OK? 1212 01:02:07,580 --> 01:02:10,010 And if we do the feedback linearization, 1213 01:02:10,010 --> 01:02:15,950 we can actually do plus 2mgl sine theta. 1214 01:02:15,950 --> 01:02:17,711 Right? 1215 01:02:17,711 --> 01:02:24,140 If I make the controller look like that then, lo and behold, 1216 01:02:24,140 --> 01:02:26,800 the system's now an upside-down pendulum. 1217 01:02:26,800 --> 01:02:27,300 Right? 1218 01:02:27,300 --> 01:02:29,120 Same thing I showed you last time. 1219 01:02:29,120 --> 01:02:31,117 This time it's on a piece of metal, 1220 01:02:31,117 --> 01:02:32,200 so that's more impressive. 1221 01:02:32,200 --> 01:02:34,500 Right? 1222 01:02:34,500 --> 01:02:35,000 OK? 1223 01:02:38,790 --> 01:02:39,290 OK. 1224 01:02:39,290 --> 01:02:46,980 So here's the name of the game, and I 1225 01:02:46,980 --> 01:02:50,400 want you to think about this between now 1226 01:02:50,400 --> 01:02:53,472 and next week, let's say. 1227 01:02:53,472 --> 01:02:57,900 Let's say, I want to put a fixed point. 1228 01:02:57,900 --> 01:03:00,682 You can only put fixed points along here. 1229 01:03:00,682 --> 01:03:02,640 Let's say, I want to stabilize, turn the system 1230 01:03:02,640 --> 01:03:05,610 into a system that's stable at this fixed point, 1231 01:03:05,610 --> 01:03:06,540 unstable here. 1232 01:03:06,540 --> 01:03:10,050 I want all trajectories to end here, 1233 01:03:10,050 --> 01:03:14,520 and I want to do it by making minimal changes to that vector, 1234 01:03:14,520 --> 01:03:17,610 by adding minimal torque. 1235 01:03:17,610 --> 01:03:18,150 OK? 1236 01:03:18,150 --> 01:03:22,770 So you get this geometric phase plot view of the world now. 1237 01:03:22,770 --> 01:03:24,900 What would you do to those vectors 1238 01:03:24,900 --> 01:03:29,400 to try to get all trajectories to get there 1239 01:03:29,400 --> 01:03:31,140 with minimal torque? 1240 01:03:31,140 --> 01:03:34,020 Or another nice version of the problem 1241 01:03:34,020 --> 01:03:37,050 is let's say I have a bounded torque. 1242 01:03:37,050 --> 01:03:39,202 Let's say, I don't care about being minimal, 1243 01:03:39,202 --> 01:03:41,160 but let's say I just have a motor that can only 1244 01:03:41,160 --> 01:03:43,410 put out so many newton meters. 1245 01:03:43,410 --> 01:03:45,240 Right? 1246 01:03:45,240 --> 01:03:47,310 Let's say, that means there's a limit to how much 1247 01:03:47,310 --> 01:03:48,900 I can move those vectors. 1248 01:03:48,900 --> 01:03:49,830 OK? 1249 01:03:49,830 --> 01:03:52,620 How do I shape those vectors in order 1250 01:03:52,620 --> 01:03:56,730 to guide all system trajectories where I want to go? 1251 01:03:56,730 --> 01:03:58,020 OK? 1252 01:03:58,020 --> 01:03:59,910 It's when those constraints start 1253 01:03:59,910 --> 01:04:03,510 coming into play that you can't just change these vectors to be 1254 01:04:03,510 --> 01:04:04,440 whatever you want. 1255 01:04:04,440 --> 01:04:06,690 You have to think about pushing them and pulling them. 1256 01:04:06,690 --> 01:04:07,830 Right? 1257 01:04:07,830 --> 01:04:11,700 And that's the under-actuated robotics case, 1258 01:04:11,700 --> 01:04:15,000 where you're thinking about moving your dynamics around 1259 01:04:15,000 --> 01:04:17,860 instead of squashing them. 1260 01:04:17,860 --> 01:04:20,010 OK? 1261 01:04:20,010 --> 01:04:22,350 And for the computer scientists out there, 1262 01:04:22,350 --> 01:04:24,630 I'd actually love to see what you come up with. 1263 01:04:24,630 --> 01:04:29,520 Think about-- write a program that 1264 01:04:29,520 --> 01:04:33,240 could try to in some minimal way stabilize that fixed point 1265 01:04:33,240 --> 01:04:35,500 on the vector field. 1266 01:04:35,500 --> 01:04:37,125 I think there's a lot of ways to do it. 1267 01:04:37,125 --> 01:04:40,260 It'd be interesting to see what you come up with. 1268 01:04:40,260 --> 01:04:40,773 OK? 1269 01:04:40,773 --> 01:04:41,940 That's the name of the game. 1270 01:04:46,880 --> 01:04:50,490 Turns out, there's the right way to formulate those problems, 1271 01:04:50,490 --> 01:04:55,170 I think, is we're going to talk about optimal control 1272 01:04:55,170 --> 01:04:55,680 next week. 1273 01:05:06,580 --> 01:05:11,740 The most straightforward answer I have for the computer science 1274 01:05:11,740 --> 01:05:17,050 world is that, if I can describe some function on my vector 1275 01:05:17,050 --> 01:05:20,290 field that I want to minimize, some cost function, I'll 1276 01:05:20,290 --> 01:05:22,390 call it g of x. 1277 01:05:22,390 --> 01:05:28,660 Possibly it depends, I want to penalize actions too, 1278 01:05:28,660 --> 01:05:37,180 some cost function, and let's say, 1279 01:05:37,180 --> 01:05:44,050 I care about the long-term cost over some trajectory. 1280 01:05:44,050 --> 01:05:49,555 We're going to call this thing J, where this is x of t, 1281 01:05:49,555 --> 01:05:50,320 u of t. 1282 01:05:54,270 --> 01:05:56,740 If you can define a cost function that 1283 01:05:56,740 --> 01:06:00,890 describes the thing I just said in this form, 1284 01:06:00,890 --> 01:06:03,430 then that's going to turn everything from this fuzzy 1285 01:06:03,430 --> 01:06:07,240 dynamics problem into a strict computational problem, 1286 01:06:07,240 --> 01:06:11,990 and we can use all our favorite optimization tools to solve it. 1287 01:06:11,990 --> 01:06:12,490 OK? 1288 01:06:15,760 --> 01:06:20,020 We're going to hammer that out big time next week. 1289 01:06:23,440 --> 01:06:23,990 Good. 1290 01:06:23,990 --> 01:06:25,580 I think you know most of what there 1291 01:06:25,580 --> 01:06:26,830 is to know about the pendulum. 1292 01:06:26,830 --> 01:06:30,410 Anybody have any questions? 1293 01:06:30,410 --> 01:06:31,900 You know fixed points. 1294 01:06:31,900 --> 01:06:34,060 You know stability in the sense of Lyapunov, 1295 01:06:34,060 --> 01:06:36,880 asymptotic stability, exponential stability, basins 1296 01:06:36,880 --> 01:06:40,810 of attraction, separatrix. 1297 01:06:40,810 --> 01:06:41,710 What else? 1298 01:06:41,710 --> 01:06:44,580 Closed orbits, you've got it all. 1299 01:06:44,580 --> 01:06:45,080 OK? 1300 01:06:49,110 --> 01:06:49,870 That's mostly it. 1301 01:06:49,870 --> 01:06:52,510 Let me just say a couple of the administrative details 1302 01:06:52,510 --> 01:06:54,910 that I didn't get to last time. 1303 01:06:54,910 --> 01:06:58,360 Your first problem set is posted tonight. 1304 01:06:58,360 --> 01:06:59,560 It's going to be due-- 1305 01:06:59,560 --> 01:07:01,840 problem sets will be due basically every other week, 1306 01:07:01,840 --> 01:07:03,490 on Tuesdays. 1307 01:07:03,490 --> 01:07:05,912 It happens that the first Tuesday that it's 1308 01:07:05,912 --> 01:07:07,870 going to be due is one of those weird Tuesdays, 1309 01:07:07,870 --> 01:07:10,520 but just to keep the clock on schedule, 1310 01:07:10,520 --> 01:07:15,300 we're going to ask for an online submission on that Tuesday. 1311 01:07:15,300 --> 01:07:16,510 They'll be every two weeks. 1312 01:07:16,510 --> 01:07:18,760 There's six of them throughout the term. 1313 01:07:18,760 --> 01:07:21,730 We do have a midterm in the class. 1314 01:07:21,730 --> 01:07:24,550 It's just before spring break, I think, 1315 01:07:24,550 --> 01:07:27,610 and so you can enjoy spring break. 1316 01:07:27,610 --> 01:07:30,950 We don't have a final exam in the class. 1317 01:07:30,950 --> 01:07:33,130 We're going to do final projects instead. 1318 01:07:33,130 --> 01:07:36,190 So I'd like you to start thinking soon 1319 01:07:36,190 --> 01:07:41,380 about final projects, and feel free to ask me. 1320 01:07:41,380 --> 01:07:43,530 Homeworks, you're fine to work on as a group. 1321 01:07:43,530 --> 01:07:46,840 I don't care, whatever it takes to learn the material. 1322 01:07:46,840 --> 01:07:48,900 Everybody should turn in their own problem set. 1323 01:07:48,900 --> 01:07:50,770 The midterm, you'll work by yourself. 1324 01:07:50,770 --> 01:07:54,040 The final project, you can team up with somebody, 1325 01:07:54,040 --> 01:07:57,370 as long as the contributions are clear from each person, 1326 01:07:57,370 --> 01:08:00,622 and that's totally fine with me. 1327 01:08:00,622 --> 01:08:02,330 Throughout the class, as you might guess, 1328 01:08:02,330 --> 01:08:07,630 we're going to have Matlab simulations and physical robots 1329 01:08:07,630 --> 01:08:10,745 trying to show the basic phenomenon. 1330 01:08:10,745 --> 01:08:12,370 Many of those will be available for you 1331 01:08:12,370 --> 01:08:15,580 for your final projects, if you so choose. 1332 01:08:15,580 --> 01:08:17,770 Maybe I'll ask you to show me that something's 1333 01:08:17,770 --> 01:08:19,510 stable on a simulation, before we put it 1334 01:08:19,510 --> 01:08:22,359 on the robot or something like that, but it should be fun. 1335 01:08:22,359 --> 01:08:26,710 I think it's such a young field that we can definitely 1336 01:08:26,710 --> 01:08:29,750 do publication quality final projects. 1337 01:08:29,750 --> 01:08:31,990 So those of you that are in robotics, 1338 01:08:31,990 --> 01:08:34,390 think about writing an [INAUDIBLE] paper 1339 01:08:34,390 --> 01:08:37,359 for the final project. 1340 01:08:37,359 --> 01:08:38,109 I think that's it. 1341 01:08:38,109 --> 01:08:41,950 I think we've got a, yeah, the PDFs from the lecture one 1342 01:08:41,950 --> 01:08:44,950 were online sometime yesterday. 1343 01:08:44,950 --> 01:08:47,380 Today's will be online immediately, 1344 01:08:47,380 --> 01:08:51,310 and let me know what you think about this [INAUDIBLE] thing. 1345 01:08:51,310 --> 01:08:55,720 I saw one comment last night, anonymous, but that's good, 1346 01:08:55,720 --> 01:08:59,369 and I'll see you next week.