An underactuated system is a mechanical system where the control input cannot accelerate the system in every direction, meaning the rank of the input matrix F2(q, q̇, t) is less than the dimension of the state vector q; this concept is crucial in robotics because most interesting problems—walking, flying, and manipulation—are inherently underactuated, requiring control strategies that exploit the system's natural dynamics rather than simply overriding them with high-gain feedback.
Lecture 1: Underactuated Robotics Introduction & Dynamics
Added:the following content is provided under a Creative Commons license your support will help MIT open courseware continue to offer highquality educational resources for free to make a donation or view additional materials from hundreds of MIT courses visit MIT open courseware at ocw.mit.edu okay welcome to uh underactuated robotics I'm glad you're all here can I get a quick show of hands actually who who considers themselves hardcore robotics types don't be shy it's a good thing to do who's who's sort of here to see what this is all about okay good good um so so I've taught the course twice before um this is the first time that it's a it's a tqe course for area 2 so I'm hoping to excite a slightly more General audience and uh your responsibility then is to to ask me questions if I say things that I if I assume prior now knowled that that people don't have and uh and make sure that that everything is coming across the only real PRX that I assume for the course are basically some comfort with uh differential equations and and ordinary differential equations Odes I assume some comfort with linear algebra and we use a lot of mat lab so it helps if you know Matt lab what I don't assume is that you're sort of you've I mean it's great if you have taken U previous robotics courses that's certainly a good thing but um I'm not going to assume everybody knows how to crank out the kinematics or dynamics of um rigid body manipulators and things like like that so hopefully if You' got a a background in here then everything else should follow and the the course is got a set of course notes that will be published um on the website just after the lectures and uh they should be pretty much uh contain what you need to know or at least have links to the things you need to know okay so today is uh the warmup I want to start with some motivation I want to make sure everybody leaves understanding the title of the course if nothing else so I want to tell you some some motivation why I think underactuated robotics is um such an important topic in robotics I'm going to give you some some basic definitions including the definition of underactuated I'm going to go through an example with um working out um the equations of motion for a simple system to sort of a review of of [Music] Dynamics and then I'm going to tell you quickly um you know in the last minutes everything else you're going to learn in the course right and then we'll go through that more slowly in the next 25 lectures okay so let me actually start with some some motivation that involves plugging in this guy okay how many people have seen azimo before good see um okay so azimo let's let's watch the little promotional video for Honda's azimo azimo is um this is a few years old now but aimo absolutely is sort of the Pinnacle of Robotics engineering over the last uh 20 years I'd say even so so Honda turns out without telling anybody was working on walking robots for about from the early 80s till they announced to the world in 1997 that they'd start building these walking robots and they started putting on these shows where they kick soccer balls and walk upstairs it's absolutely absolutely amazing I mean this is this is it this is what we've been waiting for in robotics for a very long time this is a humanoid robot absolutely um doing fantastic things it's a Marvel of engineering the um the Precision the amount of computation going on in there it's just it's something we've been waiting a long time for okay but let's watch it again and be a little more critical this time so what's wrong with Asa when it's walking okay it looks a little stiff right it looks kind of like a guy in a space suit if you look carefully you'll notice that it's always got one foot flat on the ground that doesn't look quite right okay we we'll forgive the goalie uh he's not he's work in progress I guess but the whole thing just looks a little bit um like a machine that's let me say not comfortable with its own Dynamics it's taking a very conservative approach the fact that it can go upstairs is really remarkable it does have to know exactly where those stairs are and the geometry of the stairs but you see it's taking a very very conservative approach to walking it's always walking with its knees bent its feet flat on the ground and has this sort of rigid you know astronaut walk to it okay why is that bad um it's bad because it it requires a lot of energy first of all so just to imagine walking around with your knees bent right all the time it turns out asmo uses 20 times as much energy if you scale out mass and everything um as a human does when it walks 20 times and that makes a practical difference because the batteries it's got in its belly uh only last 26 minutes right and it's a lot of batteries okay um it matters because it's walking because of this very conservative approach to walking it's walking a lot slower than you and you or I would okay they actually have top running sort of speeds of of aimo there are six um kilometers an hour um but that's a little bit below where you or I would sort of comfortably transition from walking to running if we were just going down the street so it's considerably slower uh than a human when it runs and although there's some really amazing videos of sort of walking on stairs and things like that the videos you won't see are the ones of it sort of walking on terrain it doesn't know everything about or even uneven terrain it doesn't do uneven terrain particularly well okay so in some ways Asimo is the very natural progression of what robotic arm technology which started in factory room floors sort of matured into a walking robot okay it's a very high gain we'll talk a lot what that means it's a very high gain um system it's using a lot of energy and and feedback in order to try to rigidly follow some trajectory that it's thought a lot about okay and it's doing that in a very conservative regime feet flat on the ground knees bent okay so there's a different approach to walking out there um this one was built by Cornell it's called a passive Dynamic Walker okay it's almost not a robot whatsoever it's a it's a of sticks and hinges with ball bearings at the joints but if you put this thing on a small ramp going down and give it a little push look what it can do right that's just falling down a ramp completely passive machine powered only by gravity okay so these passive Walkers are sort of a fantastic demo I mean I just it's unbelievable that they could they can build these things that that walk it's a glorified Slinky but it's it's walking like you and me right probably more so most people would say that looks a little bit more like The Way We Walk than azimo does but what's really amazing about it is it says that this really conservative High Gain feet on the flat flat on the ground uh approach to walking it's certainly not a necessary one okay and it suggests that if you really want to do some energy efficient walking maybe even more robust walking then um then what you need to do is not cancel out your Dynamics with with High Gain feedback and follow some trajectory you need to think a lot about the Dynamics of your robot okay so this is just the Dynamics of the robot doing all the work no control system no computers nothing okay so that's a story in Walking about why maybe Dynamics matter a lot and and we should really start by understanding the Dynamics before we do a whole bunch of sort of robotic arm control it's actually true in a lot of different fields my other favorite story these days is is um flying things okay so if you look at um if you look at state-of-the-art military aircraft um this is a an F14 landing on an aircraft carrier okay um even in the the sort of the most highly engineered Control Systems we have it tends to be that that aircraft stay in a very very conservative flight onel envelope the same way that azimo stays with its feet flat on the ground and does this this really stiff control uh the airplane stays at a very low angle relative to the oncoming flow and uses High Gain Control in order to stabilize it so fighter jets you might you might know the P fighter jets are tend to be um passively unstable and control systems are doing amazing things to make these guys work but they're not doing some basic things that that you could see every time you look out your window right so here's a a cardinal uh doing sort of the same thing you know landing on an aircraft carrier landing on a branch about the same thing okay but unlike the the airplane the Cardinal's got his wings spread out way out to here right um and what that means if you if you know anything about aerodynamics okay if you take your if you take a wing and the air flow is moving this way and you have it at a low angle relative to the oncoming flow then you have a very simple um attached flow on the back of the Wings okay and it turns out that sort of linear control and linear models of the Dynamics work pretty well in that regime if you go up to a small angle of attack kind of like this this the fighter Jet's doing then the air can sort of bend around the wing everything still stays attached they say to the wing and uh and you can still do sort of linear control ideas okay but if you go up and stall your wings out that's what's Happening Here you if you go up to a higher angle of attack right the air sort of can no longer uh bend around the wing fast enough something more dramatic happens you get a big vortex in this picture and what happens is the flow gets much more unsteady it starts shedding vortices and you you start stalling your wing okay now in these regimes so far the Dynamics have proven very very complicated to even understand to even model okay and harder considerably harder to control the bird's doing it every day of the week somehow we don't know exactly how but he does it all the time right and he does it with Gusty environments he does it when the branch is moving right he probably misses every once in a while but he's doing a pretty darn good job okay um there's a reason why he does it too right it's not just to show off or something but uh if you are willing to go into this more complicated flight regime by stalling your wings and and if your goal is stopping then actually you get a huge benefit by going up to that high angle of attack not only do you get more drag just because you have more surface area exposed to the flow but when you start getting Separation on the back of your wing you leave a pocket of low pressure behind the the the the wing the air can't quite come in and fill in the the the space right behind the wing and that acts like an air Brak it's called pressure drag okay so the birds the planes are coming into this conservative approach in order to maintain Control Authority the birds are going hitting the brakes hitting the air brakes and coming to still somehow doing enough control to hit that perch which is kinematically more difficult than I think than even a hitting an aircraft carrier all right so so we've been in my group we've been working on trying to make um planes do that kind of thing so this is our airplane that comes in and tries to execute a very high angle of attack maneuver in order to land on a perch it's a slow motion shot up slowed down so you can see what happens okay and actually just to convince you that the flow is complicated this isn't our best flow visualization but it shows you what's what's going on here the the air flow as it comes in this is now that same plane with with we're meting smoke from the the the front of the wing the Leading Edge of the wing and it comes in at a low angle of attack and you can see the air is mostly it's actually it's actually already stalled because it's a flat plate but the air is sort of on top of the wing in the same way I showed you in that that picture um and as you go up to a high angle of attack uh you get this big tip Vortex that rolls over everything gets a lot more complicated okay so the point I'm trying to make with these two examples are first of all robots today are just really really conservative dynamically they're very very conservative they're operating just a fraction of the the level of performance that they should already expect given the same U mechanical design right with the same mechanical design as simple little plane but better control we can start doing things that look more like birds right and the second point that I'm going to make uh more formally in a minute is that the underactuated systems underactuated robotics is essentially the the art the science of trying to build machines which use their Dynamics more cleverly instead of trying to to build Control Systems which which use actuation motor output in order to override the Dynamics we're going to we're going to to do an underactuated system that just pushes and pulls the natural Dynamics tries to do these more exciting Dynamic things as a consequence we need to do smarter control okay this is a computer science course so so what have I said anything to do with computer science yet I believe that there's new techniques from computer science machine learning motion planning that are basically changing the game it's allowing us to solve some of these control problems that haven't been solved before okay um um just to just to throw a few more cool examples out so so if we're willing to do more clever things with our Dynamics then there's just countless things that we can do so um if you just think of if you just care about efficiency this is an albatross this is a Wandering Albatross okay um if you just measure the the energy in some some metabolic estimate of the energy it it consumes uh versus the distance it travels then it's about the same as a 747 which is actually kind of cool because it's they're quite different sizes but if you do some dimensionless cost of transport it actually works out to be almost the same efficiency as a 747 so maybe we haven't gained anything but it turns out if you if you look more carefully the albatross uses the same amount of energy when it's sitting on the beach as it does when it's uh flying across the ocean so this guy can fly for hours days without ever flapping its wings okay they take the go across the entire ocean that way right into the wind out of the Wind name it because they're sitting there and they're just riding on um gradients over the due to the wind over the ocean okay so so the energetic cost of this guy's experiencing is just digestion and things like that it's he's actually not doing hardly any mechanical work in order to fly across the ocean okay if you care about maneuverability you know so Falcons have been recently clocked at diving at 240 miles an hour this one is pulling out of that 240 M hour dive to catch a sparrow right that's pretty good I mean planes in terms of she sheer speed planes are going to win every day of the week but if you look at some sort of dimensionless um aspect of maneuverability then then birds are still the masters of the sky okay bats can actually been be flying full speed this way in two flaps which turns out to be just over just under half of the wingspan they can be flying full speed the other way right two to five flaps these guys at Browner have been recording this okay they can obviously bats bats are actually some of the most maneuverable they can fly at high speeds through thick rainforest they can fly in caves with a thousand other bats on top of them at least that's what I get out of the movies right and they're doing all these just incredibly Dynamic things in ways that our control systems can't even come close to right now and this is one of my favorite videos of all time um if you again the story about efficiency this is a fish now not a not a bird but um it's almost the same thing they're both operating in a fluid these this is a rainbow trout okay so the rainbow trout um are the fish that swim up stream at Mating Season okay so so every year they make their their March up the streams um it turns out if you watch these rainbow trout they tend to hang out behind rocks okay someone thought maybe that's it seems like it's tiring work going Upstream maybe there's something clever going on when they're hanging out behind these rocks um so what they did is they took that rainbow out they put it in a water tunnel okay and you're looking at a view from above of the fish swimming in the water tunnel this is George L lud's Lab at Harvard and that's what it looks like when it's just swimming in sort of Open Water okay if you take that same fish put it in the water tunnel but put a rock in front of it now if you've looked at rocks in a in in a river uh behind a rock you'll get some swirling vortices some edies okay um the fish behind the rock just completely changes the kin matics of its gate okay so that's suggestive that there's something clever going on here but here's the this is the Clincher here the Dynamics matter if you're a fish okay this is now a dead fish right it's a dead fish there's a piece of string making sure it doesn't go back and get caught in the the the grates that would be messy okay but it's it's slack if it if it if it's as it's moving around you'll see what when the the the string is catching this is our Rock now it's a half cylinder the water's going this way there's going to be swirling vortices off the back of that rock let's see what happens if you put a dead fish behind the uh behind the rock okay so the vortices are knocking the fish around that's not too surprising what's really cool is when the dead fish start swimming Upstream right that's pretty good so the water's going that way and the fish just went that way okay um and it's dead so so Dynamics matter if you're a fish and um if you care about birds mechanically we're capable now of building robotic Birds this is our best copy of a hobby ornithopter um but we can build birds that that fly around with with Derek at the controls but if you ask me how to control this bird to make it do you know land on a perch pull energy out of the air we haven't got a clue right we're working on it we haven't got a clue yeah that hit a tree and D dere covered we've got our first um the first flight of our big 2 meter wingspan auton this is an autonomous flight you can tell it's autonomous because it flies straight until it about runs into the building and then we hit the brakes and it has to go and hit the trash can but um mechanically we're close to where we want to be uh to to replicate some of Nature's machines I we got a long way to go but but really we're at the point where we have to figure out how to take these magnificent dynamical machines and control them and that's what the course is about okay okay so let's get a a little bit more um careful in in uh what I mean by underactuated system so we we give you some motivation we're going to try to make robots that that run like humans run like gazel right swim like dead fish and uh and fly like that that Falcon that that comes down so um not a tall order at all right um so in order to start doing that let's start by just uh defining what it means to be underactuated okay let me ground things in uh in an example let's take a um a two-link robotic arm okay I'm going to um describe the state of this system with Theta 1 and a relative angle here Theta 2 you know let me quickly draw that sort of twice as [Applause] big we'll parameterize it here with the that'll be L1 the length this will be L2 here so we'll call this Mass one Mass 2 so we'll assume it's a a massless rod with a point mass at the end just to keep the equations a little cleaner for today okay and it's got two angles that I care about and there's a couple lengths at play so throughout the class I'm going to use uh the convention that Q is a a vector of the sort of joint angles or the the the coordinates of the robot in this case it's going to be Theta 1 and Theta 2 okay if I have Motors on the robot let's say I can apply a torque here because I have a motor at the elbow maybe a torque here so I'll call this torque one this torque 2 I'm going to call that U a vector U there's all the inputs to the system so this is the um joint coordinates these are the control inputs okay so it turns out if you want to write out the dynamics of this system if you want to be able to say simulate the um the way that this pendulum moves well most of the robots we care about in this class are are second order right so so everything's based on their mechanical system so we've got FAL ma governing everything in this case um a is going to be the D the second derivative of Q right so what I really have I'm G I should also say that Q dot is going to be the joint velocities and Q double dot is the joint accelerations so if I want to write describe the motion of these systems of these of this kind of a robot then what I need is to find um an equation that tells me the acceleration of that system based on the current uh position velocity of the robot and the current control inputs okay if we're living in second order um mechanical systems world then that means I'm I'm looking for for a governing equation equations of motion of the form f is some nonlinear function of q q do U potentially time too if there's a if it's a Time varying Dynamics if there's something else going on clocked by time okay so so basically the entire class we're going to be looking at second order systems governed by some nonlinear equations like that it turns out that actually most of the robots we care about there's even a simpler form um turns out we can almost always find it's not always but uh for Many Robots we find that the equations of motion are actually linear in U okay if I'm going to put in um torqus or something to my robot then it turns out that the way that the Torx effect accelerations is is is linear in the input so let me write a second form which takes advantage of that observation okay so it's just I've I've said almost nothing here this is I'm just saying there's some nonlinear terms that depend on the current state and velocity and time there's some other nonlinear terms that get multiplied by U but the only Power in this is that I'm saying that the the whole thing is linear in you and that turns out to be I'll convince you as we go forward that that's true okay so here's our we're finally grounding everything here let me tell you what fully actuated means just think about what this equation is too so Q is a vector qou dot is also a vector in this case Q is a 2x1 vector Q dot then is also a 2x1 vector right Q double dot is also a 2x1 vector so this is a vector equation of a 2x1 vector in this case this is some Vector 2 by one vector this is in my case I I had also two control inputs so this is also a 2 by1 Vector which means what do this thing got to be that's got to be a 2 by two Matrix in that example right what matters what makes life dramatically easier and what most robots today have really assumed is that they assume that F2 is full rank okay so so a robot is fully actuated a robot of this form is fully actuated if the rank of F2 q q do in time is equal I'll write the dimension of Q here it's full rank okay why does that matter what does that mean first what it means is that um if I know F1 and F2 then I can use you to do anything I want to Q double dot okay I'll show you that I could say that right now pretty explicitly okay so let's say I know exactly what F1 and F2 are right let's say I choose a control law I want to choose U um as some function I'll just call it Pi of q q Dot and time right so I want to come up with a controller which looks at my positions my velocities what time it is and comes up with a a torque let's say I did um F2 inverse q q Dot and time um times F1 q q do time plus I don't know some other controlling but I Want U Prime let's call it so if the rank of F2 if it's full rank if it's got the same rank is the dimension of Q then that means that this F2 inverse exists right and I think that if you plug this in for you right there what you're going to see is that this cancels out this right if I did it right then and this cancels out this and what I'm left with is a simple system now Q do equal U Prime where do you where do you want Q do this is um this is U Prime so just some other U so what what I'm trying to do is is now say that I'm going to change the effectively change the the equations of motion of my system into this U Prime okay you could I might have called that maybe q. desired or something like that that would be fine too okay so what did we just do we did a trick called feedback linearization okay I took what was potentially a very complicated nonlinear equations of motion and because I could using my control input command every qou dot I can essentially effectively replace the equations of motion with a simpler equations this is actually a trivially simple equations this is a for those of you that know this is which would be a a series of of single input single output systems the they're they're decoupled right so q.
one is is equal to the first element of this it's just two vectors so that just looks like a trick I'm going to ground it in a in a in some in an example in a second here but first let's let's finish defining what underactuated means so what is underactuated going to mean if the F Matrix is inal that's right good okay yeah it's under a system of that form is underactuated if um the rank of F2 q q Dot and time is less than the dimension of Q in words what underactuated means a system is underactuated if the control input cannot accelerate the system in every direction okay that's what that's what this equation says if the control input U cannot produce okay that's just what the equation said you could imagine if the uh um if the form of the equations wasn't linear in U then we'd have to adapt our um this rank condition to to do this but this I think for today is a is a very good working definition of of underactuated and we'll we'll improve it as we go through the class there's a couple things to note about it first of all as I've defined it here whether you're underactuated or not actually depends on your state right so you could call say that that a robot was was fully actuated in some states and underactuated in other states now why would that happen maybe you're maybe there's a a torque limit or there's an obstacle or something like this that that prevents you from producing accelerations when you're in some configurations okay intuitively um what's happening in azimo is that it's trying to stay in this very conservative regime because then it can those are the states where it can act like it's fully actuated and if it was running like you or me then it's underactuated but what I want to try to impress on you is that um this dichotomy between fully actuated and underactuated systems it's it's pervasive I mean it's so robotics for the last uh 30 some easily years has almost um completely made this this assumption that F2 is is um full rank when designing controllers if you learn about adaptive control all these manipulator control ideas computat toric methods all these things you're implicitly making this assumption that you can produce arbitrary um torqus you can use you can use arbitrary control effort to produce arbitrary accelerations what that does that's why all these proofs exist for adaptive control and the like because you can you can then effectively turn your system into a linear system that we know how to think about and the reason the dichotomy is so strong is because what happens if you're a control designer and you don't have the ability to take your nonlinear system and turn it into a linear system is that you have no choice but to start reasoning about the nonlinear dynamics of your system reasoning about the long-term nonlinear dynamics of the system okay and analytics break down pretty quick but computers can help Okay that's why we're revisiting this kind of idea so factory room robotic arms tend to be fully actuated except for very exceptional cases um walking robots and things like that as we'll see are underactuated so so let's do that that example absolutely I'm going to finish making that argument but but absolutely that's exactly what I'm saying the question was am I implying that um that we need to do underactuated robotics to have agile robots yeah I would even say that I'm implying I'm a little biased but I'm implying that every interesting problem in robotics is interesting because it's underactuated if you think about the problems that are unsolved in robotics maybe manipulation walking cool flying things if you look closely if you if the control problem is considered unsolved uh it's probably underactuated okay the things we know how to do really well you know picking and placing Parts in a on a factory room floor it's fully actuated okay now manipulation is hard for many other reasons you have to find the thing you're manipulating you have to think about it but uh but there's something fundamental in robotics research that happens if your system suddenly if you don't have complete Control Authority and it all the interesting problems that are left seem to be underactuated okay so instead of talking about abstract FS let's make it specific okay um let's write the equations of motion for our two-link robotic arm um so I I I'll how many people have seen lran mechanics cool um so the the class isn't going to depend on it I'm going to do it once quickly and it's in the notes um if you haven't seen Loni mechanics it's a good thing to know um and it's in the appendix of the course notes it'll be posted um but I want you to see it once to just see see that there is is actually if what you care about first is just coming up with the equations of motion then there's actually a fairly um procedural way to do that for for even pretty complicated systems so let's do it for this not very complicated system um okay so let me let me do that um in pieces so let's say um this is mass one um let's say that I it's at position X1 okay if I if I call this sort of X1 and X2 X and Y that make some coordinate system there let's call let's say that the the mass here is at X1 and the mass 2 is at X2 so the first thing to do is just to think about um the kinematics of the robot and in this case they're pretty simple so as I've written it X1 is what is it the the X position in X1 here is L Time s or cosine s of theta 1 okay and the other one is L1 cosine Theta 1 now we're going to all get bored real quick if I don't adopt a short hand so let me just call that L1 S1 so that'll be Shand for S of theta 1 okay and this will be L1 cosine 1 okay if I want to do the um kinematics of X2 here um that's going to depend on Theta 2 it's actually also going to depend on Theta 1 because I've got this in a relative frame that Theta 2 is relative to the first link so it turns out the the kinematics of X2 we can actually start with just X1 it's the position of X1 plus another Vector which is um L2 s of theta 1 + Theta 2 if you work it out that's the the right thing cosine Theta 1 + Theta 2 which I'll Shand as X1 + L2 S1 + 2ga L2 C1 + [Applause] [Music] 2 okay so the derivatives aren't too bad I can do those Let's uh let's see say if I want the rate of change of X1 that's going to now intuitively that's going to start depending on the um on the joint velocities right so how does that work out the time derivative of X1 is going to be L1 cosine um Theta 1 * Theta 1 dot right and then L1 sin Theta 1 * Theta 1 Dot and X2 dot it's going to be X1 dot plus um L2 C1 + 2 * Theta 1 dot plus Theta 2 Dot and L2 s 1 + 2 Theta 1.
plus Theta 2 dot okay so we we now we solve the kinematics of the machine to write the Dynamics lran style we need to think about the energy of the system so let's call T the total kinetic energy and in this case it's pretty simple that's this is why I went with Point masses okay it's 1 12 mv^ 2 right which in Vector form looks like 12 um X1 dot transpose M1 X1 Dot plus 12 X2 dot transpose M2 X2 [Music] do okay and then we're going to define the total potential energy as U and this it's just mg times the position the vertical position of the thing so it's just Mass 1 time gravity times um I'll call it um I guess I'll just call it y1 which which is the the second element of that why don't even not introduce a new symbol we'll just do L1 C1 negative and this is minus M2 G um Y2 which is L1 C1 plus L2 C1 + 2 sorry for going into the corner okay but you can all write the um the the kinetic and potential energy of the system okay so lran um derivations of the equations of motion just uses this lran which is the the difference in the kinetic minus potential and now we I think a very good exercise is to understand the the reason why this works but for our class we can actually just use it as a as a crank that we can turn if if we write this out um and then you do some simple math on it where this is called a generalized Force then it turns out if you plug these in to this equation turn your Calculus crank then you end up with the equations of motion you end up with two equations that have the form um they give you some equations in terms of F Q Q do Q dble dot um is some function of q and and this is actually where the U's come in so in the simplest form it comes up like this and with a little work let me call that F lran so it's not the same f with a little work you can separate out the Q double dots and get it to um the vector equations we were talking about before okay if you take those equations that you get and you pop them into mat lab then it's pretty simple to uh start simulating the equations of motion of the two link arm this is with zero control input so this is just what happens if you take some um two-link arm apply no torque let it go then you get this now I put some damping in there extra so we didn't have a demonstration of Chaos but uh there's a pretty procedural way to go from very simple kinematics doing some pretty um simple energy calculations and getting yourself to a simulation of even very complicated um mechanical systems okay so the for Dynamics we understand now it turns out there's actually very good algorithms for this too if you have a 100 link robot you certainly wouldn't want to go turn the crank by hand but you can um download good software packages that write recursive versions of this algorithm that that have very efficient computation of those Dynamics okay now let's start thinking about what it means to have control in that [Applause] system turns out if you do enough of these equations if you punch in enough different robotic arms and walking robots or whatever oh done yeah maybe is yeah okay good catch um okay so if you start punching these equations enough then then you start noticing a pattern turns out even very complicated uh robotic arms tend to have equations that fall into this stereotype form okay this is almost just fals ma this is the mass Matrix The inertial Matrix the C here is the uh coriolis terms the G here is the gravitational terms potential terms and then this is the torque these are called the manipulator equations we're going to revisit them you don't have to have complete intuition about them right now but what I want you to understand is that if you take the lran Dynamics on some rigid body manipulator then you're going to get something out in a form that looks like this now this is actually a pretty powerful equation it tells you that you know tells you a lot of things so there's a a q double dot term that's multiplied linearly by something that only depends on Q okay so by leaving out Q dot here I've already strengthened my form by putting qou dot in linear here so not arbitrary equations don't fit this this is a pretty special set of equations there's some terms that depend on Q Dot and then there's some potential terms which only depend on Q and then we have our joint torque kind of things over here okay and in fact there's actually a lot of well-known structure in these equations so it turns out I could have written the energy of the system as 1/2 um q.
transpose HQ Q dot this inertial Matrix analogous to Mass is related to the kinetic energy of the system and what that means actually just by thinking of it this way um we actually it's well known that H is positive definite it's uniformly positive definite okay you can't have a negative energy NE negative kinetic energy and that manifests itself that that this Matrix H which appears all the time turns out to be um equivalent to its transpose it's symmetric and it's positive definite that's shorthand for positive definite right it's a matrix greater than zero and in fact if you if you look at the uh equations I punched in for the uh the robotic arm it's exactly just a matter of computing h c g and B which is the Matrix that Maps your control inputs into joint torqus so H is a ntial matrix C is coris G is gravity I think B was just cuz people were running out of letters I don't know I don't know a reason to call it B but in general b could be a function of Q maybe but it's just some mapping between your control inputs and the torqux that you want to get okay so um so knowing that I've I've take taken my simple manipulator I found equations a motion to take this form um if I have uh torqux to give torqus at both the um elbow and the shoulder then it turns out for that example H and C and G all just come from lran and B what's B going to be in that example what size is it going to be first 2 by two and if I'm assuming that my control inputs are exactly um uh the Torx Then I then B is just the identity Matrix 2 X2 identity Matrix okay is the system fully actuated yes why is it fully actuated the r Matrix is two okay but there's one other term that there's one other part of that statement that's equal the dimension but but I need to I need to get the mapping from Q dot to U yeah because the inertial matrices are always also positive definite right that if I actually write out Q dot for these systems I get an H inverse Q times all that stuff right BQ U minus C well leave the Q dot minus G okay and we know H inverse exists I told you it's positive definite so as long as this thing is full rank which as you said it is then that system is fully actuated okay that means I can do anything I want to that system what should we do to that system what should we do let's uh let's replace the Dynamics with something else okay what can't do anything it's going to have to be um two variables or less the system I want to simulate right I can't make it simulate a whip if I've only got two but I can make it simulate any sort of two-dimensional second order system okay how about um how about we take our two-link pendulum and make it act like a on link P pendulum that's a simple enough thing to do okay so what I'd do is I'd find the equations of motion for the one link pendulum and I'd just do my feedback linearization trick I'd cancel it out and I'd replace um the Dynamics with the onelink pendulum okay all right so if you can see this the um it's just a matter of saying U is C * x dot in my in my mat lab code and in lecture I I I'll use x to mean um Q the combination of Q and Q dot okay I can just do my exact feedback linearization trick c u is C plus G um let's see if I can make this show up a little better and there's the equations of a simple pendulum with a little damping okay my control system if I say lecture one I think I put under simple pend then suddenly my two- link pendulum the Dynamics of my two- link pendulum I'm simulating those entire Dynamics work out to be dynamics of my one link pendulum okay so maybe not a useful trick if I really wanted a onelink pendulum I could have done a one link pendulum let's say I want to do something more clever maybe um let's invert gravity right let's just let's take my inverted pendulum problem and make it work by just replacing the Dynamics of my pendulum with an upside down pendulum right so maybe if I if I want to just get the pendulum to the top let's just make it act like an upside down pendulum okay so we can do that too right when I say it the way I'm saying it I hope it sounds sort of like you know of course if the system's feedback linearizable you can do whatever you want you know it's easy it's not worth thinking about these kind of things right I mean that's what I'm trying to communicate but but almost every cool robot that works you know works because of these kind of tricks right they're hidden they're but they're there right the reason a lot of the the the reason robotic arms work as well as they do is because you can do this okay now there's limits right you can only do this if you have unlimited torque right in practice a lot of robotic arms have almost unlimited torque to give right you got big gearboxes right uh you'd be surprised how how pervasive this idea is okay so um what this class is about is what happens if you can't do that all right so let's take our our two link arm how are we going to break it how are we going to make it so we can't do that anymore what's a more interesting problem M get get rid of a motor let's let's get rid of you know let's get rid of the shoulder motor that seems like an important one let's see what happens if we take rid of that right out of there okay so the equations of motion actually stay exactly the same except for now um B of Q is going to have to be smaller If U is now um If U is now just onedimensional right I got a single control input then B of Q is just going to be what size it's going to be uh it's got to get to a two-dimensional thing so it's going to be a 2X one right and let's say if I as I drew it that 2x1 it's going to have nothing to do to the shoulder motor if I assume the the first one is the the shoulder and it's going to have direct control of the elbow okay sudden that's it's a whole different game okay turns out you can still solve that problem I wasn't thinking of showing this but let me preview something to come quickly here this is exactly that that system it's a system we're going to talk about it's called the acrobot it's got inertia in the links instead of the the mass and if you take these computer science techniques I'm going to tell you about um then you can for instance find a solution for the torque at the elbow to try to make this thing go to the top okay if you think about it it's actually it's called the acrobot because it's like an acrobat on the high bar right where you don't have you know you can only give a little bit of torque at the wrist you can do a lot with your waist potentially with your so this if you do it a clever job you can actually pump up energy and swing up and get to the top okay but that's a lot harder problem right I can't write that down in a a single uh board here at 72 Point font but we're going to do that in in very very soon okay so um so I I hope you sort of know what underactuated means now um why would I care about a system that's missing its shoulder motor that seems pretty arbitrary if I'm building a robot I might as well order enough Motors to put them everywhere right turns out if you care about walking robots um the simplest one of the simplest models of a walking robot it's called the compass gate robot it's got a mass at the hip it's got two legs um we can even assume it's got a pin joint here that's the connection to the that's the foot on the ground um and it's got a torque to give here at the hip but it can't apply torque to the ground it's not because it's not an artificial if I had a foot then then suddenly my toe somewhere somewhere you're not bolted to the ground right so you've got a bunch of interesting links and you can control your your um you can you can apply torque between your links but the place where you might want it the most your shoulder motor your elbow motor whatever it is the place that connects you to the ground you don't have a a motor and you can't have a motor unless you're willing to stick yourself to the ground suction cups are a viable thing for walking robots I guess but um the more interesting problem is how do you do control if you don't have to be stuck to the ground okay so that two link uh simple Point Mass thing is actually exactly the Dynamics of the compass gate Walker that we'll talk about um fairly soon okay so I've got no torque here torque equals zero there okay every walking robot is underactuated um the same thing's true if if if I'm a u if I'm a you know a humanoid I'm trying to control all of my state variabl that's the question right can I do I have enough um Motors to to instantaneously affect every state variable that's the question um if you count the number of motors on me right it's a lot I know they might not be as strong as they used to be but they're they're there there's a lot of of them um if you count the number of degrees of freedom that's hard too but no matter what you count your tally adds up to if I jump uh when I'm up in the air I'm not going to do that for you but uh when I'm up in the air none of those Motors no matter what I do I can do something with my arms whatever ignoring aerodynamic forces none of those Motors are going to change the trajectory of my center of mass right there's nothing I can do to change the trajectory of my center of mass I can move relative to my center of mass change my angular momentum I cons my but I can I can move things around um but nothing I can do is going to move my center of mass right a walking robot a jumping robot for sure is underactuated okay a flying machine is underactuated okay you I mean fighter jets are a good example you can go that way pretty well you know they don't go backwards so well for instance right right they don't go directly up so well although I could show you videos of that kind of thing um right Birds you name it these systems tend to have control variables that that are not you're not in complete control of manipulation if I'm throwing this chalk around I don't have complete control of that chalk okay if I if I form a force closure with it then you could maybe start thinking I'm a I'm I'm a fully actuated system I can move this this thing around that's fine but I think the interesting part of manipulation is before you get that Force closure okay so every interesting problem in robotics is underactuated um I'm going to um give a quick um sketch of what the rest of the term has for you and then we're actually I'm going to try we're going to try something new um on the website so the website's going to contain everything after today it's we're a paper lless existence um the website will have your problem sets it'll have the lecture notes you can submit your problem sets on the website okay we're also going to try a new thing when I post the PDFs of the problem set um you'll be able to download them and print them out if you like um but you'll also be able to to to uh use this sort of interactive PDF viewer where people instead of having a forum or something on the on the website you could you could go right into the PDF and Mark say I don't understand what this means um you can choose whether it's Anonymous you can choose whether it's everybody knows who said it you can choose if it's just private um s just a minute we just s show so it's a demo of that um we'll see if it works and and uh it might be a cool way to to uh uh communicate outside of the the room but let me tell you let me forecast um what's what's coming here okay I haven't actually told you why this is a computer science class yet so I can't can't let you leave without that here's roughly what we're doing okay on on Thursday um we're going to talk about the simple pendulum right so I just we talked about a two link pendulum just now we're going to take a step backwards on Thursday we're going to talk about the Dynamics of a simple pendulum but we're going to talk about everything there is to know about the simple pendulum and we're going to really think about the nonlinear Dynamics and how to think about about that okay and then we're going to think about how to control that simple pendulum but as we go in the class we're going to get to more and more interesting systems okay um we're going to get to uh a cart pole system these are some of the model systems in uh um underactuated robotics we're going to get to the acrobot system I just showed you a two-link thing with a torque here and no torque there this one has a force here we're going to think about sort of the toy systems for underactuated robotics and then we're going to start splintering into um into different uh domains if we care about walking then we can start thinking about these sort of compass gate type robots and I'll we'll talk about more complicated robots and the key difference between here and here is just we added a few um extra degrees of freedom here to here the the dimensionality of walking robots isn't actually necessarily that high but what happens is you have to think about systems with impacts and you have to think about limit Cycles we'll we'll develop some of those tool okay and then we're going to think about how do you get away from these toy systems by making higher dimensional systems and it can sort of come from walking to we'll we'll have for instance you know multi-link robots Okay and think about how to control the higher dimensional systems more degrees of freedom d fs okay then we're going to think about what happens if I take these model systems and add some um uncertainty or stochasticity and so a toy example for that might be a walking robot walking on rough terrain let's say okay and then we're going to think about how to take these model systems and what happens if we don't know the model okay um and that's certainly the case if you got a A little perching airplane for instance or a a little robotic bird I have a two-year-old daughter and I've started being asked to cartoon everything I I say so um I'll subject you to some very bad but sort of quick cartoons um okay so that's the systems we're going to think about and the reasons that they're interesting turns out we're going to take a very computational approach to them okay so in this system we're going to start introducing optimal control we're going to say let's say I want to get the pendulum to the top but I want to do it for instance by minimizing energy or minimizing the time I get there so we're going to talk about optimal control and as much as we can we're going to talk about analytical optimal control but pretty quick we're going to run out of things we can do analytically and we're going to start looking at numerical optimal control computer science again um based on dynamic programming okay and that's going to get us somewhere when we start taking these slightly more interesting systems like this we're going to have to develop some some better tools we're going to do um numerical optimal control with something called policy search which is a combination of tools from reinforcement learning machine learning and numerical optimization okay we'll be able to do some of our impact modeling with that too I guess when we start getting into higher and higher dimensional systems we're going to have to give up on the opportunity to completely solve an optimal control problem numerically or analytically and we're going to start talking about approximate policy search and motion planning okay and I'm drawing it like this because I want you to see the that we're taking a very spiral course through the class we're going to develop tools that every time I develop a new tool we're going to make sure we understand what the heck they do to the pendulum the cart pole and things like that and work back up so we're going to cover motion planning if you know um randomized motion planning rrts feedback motion planning you're going to see that here okay and then when you get into the the really good stuff here when you got uncertainty stochasticity and unknown models that we're going to have to get into pure machine learning approaches some cases um that looks just like my yellow but control based on reinforcement learning for instance and that's how we're going to address some of these systems that are more complicated still okay so we're going to root everything in mechanical systems because that's what I care about I want things to move um but we're going to do it in a pretty computer sciency way okay because I think the computer scientists have turned a corner and are going to solve all these problems
Up Next

DIY Hexapod Robot Build: Mechanics, Electronics, and Code
@TazerTechnical
36.5K views•2024-10-25

RatSLAM: Biologically Inspired Robot Mapping and Navigation
@milfordrobotics
20.9K views•2012-08-03

How to Build a Self-Balancing Robot: Arduino Nano & MPU6050
@easytechzones
16.8K views•2022-03-09

Introduction to Robotics | Stanford CS223A Lecture 1
@stanford
744.4K views•2008-07-22
Related Study Plans & Knowledge Roadmaps
Structured learning paths in Robotics

![[물리를 이해하며 함께하는 수학, 무리함수] Lagrangian의 정의로부터 Euler-Lagrange equation까지](https://i.ytimg.com/vi/rNgZ9apqeMw/maxresdefault.jpg)




































