0:00

Welcome to module three of control of mobile robots. what we're going to do in

Â this module is try to be a little more systematic in how we think of our design

Â choices and how we actually Model the systems that we're dealing with. So, so

Â far in module one we did some basic control theory. We developed PID

Â regulators. we could do some rather elegant things, but we really didn't know

Â Why anything worked. And in module 2 we started talking about robots and some of

Â the more standard robot models we're going to use, what abstractions are useful for

Â thinking about sensing modalities, and how do the robots know where they are. so what

Â we're going to do in this module is actually take a step back and start to

Â revisit some of the things we did. And what we need to do first of all is develop

Â a Model class that is rich enough in the sense that it's quiet general and it will

Â catch and capture a lot of different robotic systems that we're interested in.

Â But it has to be simple enough so that we can actually say things about it because,

Â you know, very complicated models don't really give us anything because we have no

Â effective ways of interacting with them. the model also needs to be expressive

Â enough and relevant enough, and what I mean about With that is, it has to capture

Â the aspect of the systems that we're interested in, in a way that matters and

Â actually translate into the actual systems doing what they're supposed to be doing.

Â Because one thing to remember is that models are always approximations, adn you

Â want to make suere that you, the things that you don't fully model. Don't matter

Â so much. And what we're going to do is we're going to go into the wonderful world

Â of linear systems. So, linear systems are particularly effective and compact, and

Â well behaved system representations of dynamical systems. So let's start with

Â what I want to call the world's easiest and simplest robot. This is a point mass.

Â So what it is, is that it's just a mass. On a line and I can immediately control

Â the acceleratio n. So if you start controlling but p is the position of the

Â robot then acceleration which is the second derivative of the position is just

Â p double dot is equal to u. Now we won't actually like to write it in this way, we

Â don't want the double dots, we don't want to have. P is for positions and then we're

Â controlling something else. We have new variables. So, we want to come up with a

Â compact/general form that captures what we want but somehow glosses over the, the,

Â the minor details of what separates a point mass robot from a. Humanoid robot,

Â say. So the way to do this is to introduce some new variables. And I'm going to

Â introduce in this case two variables. The first one I'm going to call x1 and simply

Â say that that's the position. So x1 is the position of the robot. And then I'm going

Â to say that x2 is the velocity of the robot. And if I do that, I can actually

Â write down the derivatives. The dynamic's of these new variables. So x1 dot, well,

Â we have x1 dot is equal to p dot but p dot was equal to x2. So, x1 dot is simply

Â equal to x2. X2 dot is P double dot, right? So X2 dot is P double dot, which we

Â have up here, which equal to U. So X2 dot is simply equal to U. So this is a slight

Â reformulation that so far doesn't seem to buy us anything. But what we can do is we

Â can actually We put now this system on what's call state's based form. And the

Â state of the system is going to be our excess. So I'm simply going to lump x1 and

Â x2 into a new variable that I'm going to call x, and now note that this is actually

Â a 2-dimensional object. And then what I'm going to do is I'm going to talk about the

Â dynamics of this 2-dimensional object. So x dot is x1 dot, x2 dot and we know that

Â x1 dot was x2 and x2 dot was u. So I can simply write x dot is this x2 u vector.

Â Well it gets even better because if I have a matrix. If I have x1 x2 there and I

Â multiply this by 2 by 2 matrix, let's say that I would like to get out x2, well what

Â do I have to multiply x1 and x2 with? Well, this is zero times x1 so I'm going

Â to write 0 here and 1 times x2. Is going to give me that, right. So what I am going

Â to do is simply write this as a matrix, so x dot is zero times x1 and 1 times x2 and

Â x2 dot is simply u, so its zero times x1 and zero times x2 but we get one u out of

Â it so I am now rewritten my dynamics using these matrices, which may or may not look

Â easier. But trust me, it actually will be much easier. Moreover, the thing we care

Â about in this case would be x1. So, I'm going to take the output of the system to

Â be x1. And, I can also write this as a matrix. In this case it's a it's role

Â vector times x. This simply means that I get one of x1, and zero of x2. So, I have

Â now re-writ them, everything in a much more, I'm going to claim compact form,

Â using these matrices. So, to summarize, on state space form x dot is this thing, And

Â x and y. Sorry. The output is this thing. Now, if I

Â introduce some matrices. I'm going to call this thing my a matrix. I'm going to call

Â this thing my b matrix. And this thing my c matrix. Then, all of a sudden, I can

Â write everything like this. x dot is ax plus bu, y is cx. And now we've hidden all

Â the particulars of the model inside this a, b, and c matrices. But this is a very.

Â General way of writting systems so this in fact clearly deserves one of these

Â sweethearts because what we have done is to take a system that was really

Â particular and written it in a very general form involving these system

Â matrisis and to make sure that we believe this is in fact generally usefull let's

Â consider 2-dimensional point mass now. Where, what I can do, is I can move in

Â both the x and y directions say. So, the position is going to be the x and y

Â position, the input is my acceleration in the x and y direction. And then the

Â dynamics of course is p double dot x is ux, which means my acceleration, my

Â accelerating in the x direction with the my ux input, and similarly for my, My y

Â direction. Well, now we need to do the same thing. So I'm going to introduce a

Â bunch of new variabl es. So x1 is px. x2 is p.x. As I said before.

Â But now I'm introducing 2 more. X3 is py, and x4 is p.y. I have two inputs and two

Â outputs. So if I do this. I can actually write this new system, also using a b and

Â c matrixes. So if you take a look at this a matrix, up here in this corner is the

Â old a matrix that we had for a 1D point-mass. Well this is just the x

Â component of the a matrix. And this would be the y component. Similarly b, this is

Â my old b Now I have two copies of it. And for C, this is my old C. Now I have a copy

Â of it. So with this choice of A, B and C matrices, voila. I can write the same Or

Â that this system on exactly the same form X dot is Ax + Bu. Y is Cx.

Â And one thing that I'm going to encourage you to do is make sure that you go through

Â the matrix multiplications here and convince yourself that this choice of a,

Â b, and c matrixes is actually corresponds to the original dynamics that we had up

Â here. but the point that I really want to make with all this is You know what, x dot

Â is Ax plus Bu, y is Cx, is a very general way of writing down, the system dynamics

Â that you have. And in fact, this is what's called an LTI system. Linear time

Â invariant system on state space form, and we're going to see this a, b, and c.

Â triple quite a lot in this course, because they will show up over and over again. And

Â they will allow us to be general about how we reason about our systems. And then

Â we're going to hide the particulars of the dynamics inside the a, b, and c matrices.

Â Before we move on to the next lecture we're actually going to see a little bit

Â more where these models come from. Let's say a few words though about the

Â dimensions of what we have here. If x is an n dimensional vector so it's a Rn for

Â the point mass on the line x is 2-dimensional or a 2D point where we

Â control exploration x was 4-dimensional. Anyway, x is in Rn, then A is an n by n

Â matrix. If U is in Rm, meaning we have an m dimensional inputs, then V is going to

Â be an n by m matrix. And similarly if the output is p dimensional, meaning we're

Â sucking out p different things from our system, then the C matrix is a. P by n

Â matrix. And the reason this is right. you can see that if you actually write down

Â the equation. X dot is Ax plus Bu. Well, x dot has to have the same dimension as x.

Â So it has to be n by one. Now, I know that a is n by n. And x is n by one. Whenever

Â you have matrix multiplication like that. The first thing is that these numbers have

Â to be the same otherwise you cannot do this multiplication. So you have to make

Â sure these are the same. And when you end up with n at the end, it's an n by one or

Â n pieces here Which means that ax actually becomes and n by one factor. Which is what

Â we need, right? Because x dot n by one. Similarly with b, b is n by m And you u is

Â m by one, well these things cancel out that they should and we end up with

Â something that's n by one. If you look at y similarly, y is p by one, well is p bt n

Â and x is n by one. These guys cancel out, and what we end up with is a P by one

Â vector. And, it's important that the dimensions lineup. So, as a sanity check,

Â we're always going to be forced to insure that the things that we build, have the

Â right dimensions. And, if they don't have these dimensions, then what we write down

Â is actually nonsense, and we can't perform these multiplications. Okay, that

Â concludes the first lecture on linear systems. And in the next lecture, we're

Â going to see a little bit more where these systems actually come from.

Â