0:00

So the outcome of last lecture was on one hand a little bit exciting because what we

Â did is we took the measurements that we get and we try to use them as a, for as a

Â way of designing controllers to stabilize the system. We actually know how to

Â stabilize systems. We need the real parts of the eigen values are all strictly

Â negative. On the other hand, the outcome of the last

Â lecture was wildly disappointing because we couldn't actually do it. And the reason

Â for that was that we only looked at the output and not at the full state

Â information. So today, we're going to look at How do we design controllers when we

Â take all of x into account, and not just y. so if you recall this picture. What

Â we're going to do today is simply say, you know what? I don't care about y. In fact,

Â forget about measurements. What comes out here is x itself. And then, what can we

Â actually do? Now, obviously. What we need to which is the topic of the next modal is

Â create a way of actually sucking out x from y but for now lets just pretend for a

Â moment that we do have access to the full state information. Well if we have that

Â first off we dont have to worry about y what so ever So x dot is Ax plus Bu,

Â forget about y. Then what we do is instead of saying u is negative Ky, we're now

Â going to say u is negative Kx, where K is the matrix of various gains in it. In the

Â previous example, it was just a scalar with a 1 in it, but in general it could be

Â a matrix. Now, just like last time, we plug this choice of u Back into the

Â equation for x., and then we get x., this ax, plus bu, well u is negative kx. So

Â then we can put everything together in this matrix, a minus bk.

Â And if we call this A hat, we all of a sudden have a new system matrix and our

Â job is to make A hat as pretty as possible. Well in particular A hat is

Â known as the closed loop dynamics because now we have closed the loop of the system.

Â We're feeding back the state information. Into the system and in that way we are

Â getting rid of the Ax's or x dot is Ax plus Bu and we are getting x dot is A

Â minus BKx and they control the sign task from a stability point of is simply pick

Â if possible K such that the closed-loop system is stabilized and luckily for us we

Â now know. Exactly what this means. It means that the real part of the

Â eigenvalues of the closed-loop dynamics, A minus BK, has to be strictly negative. So,

Â let's go back again to our simple robot to see how can we understand this in the

Â context of the simple robot. And arguably, the entire next module, module 4, is going

Â to be devoted to this question. How do we pick K such that we can stabilize this

Â system, get the eigen values we want? And on top of that, how do we get around this

Â rather peculiar conundrum where we only have y but we would like to have x and

Â we're going to pretend that we have X. Well, that, we will have wait for. But for

Â now, let's go back to the robot. Let's note, though, first of all, that u is in

Â r, and x is in r squared, or r2. And, in fact, if u is negative kx. It's always

Â useful to write down this kind of dimensional analysis. Where x is n by 1.

Â In this case, u is in general, let's say that u is m x 1, in this case it's

Â actually 1 x 1, then, from a dimensional point of view, K has to be m x n, because

Â otherwise it doesn't work out, so we have to be able to cancel these things out, and

Â out comes soemthing that's m x 1. So in general, K is a m x 1 Matrix where m is

Â the dimension of the output and the n is the dimension of the state. Okay, in this

Â case m by 1 means 1 by 2, we pick k1 and k2 here, those are our control gains, we

Â plug it to the A-Bk equation here. So this is. This is a, this is b, and this is k,

Â right? So if we do that, we get this system. And we perform the matrix

Â multiplication. I would encourage you to make sure that I got the matrix

Â multiplication right by doing it yourselves. But, for now, let's just

Â accept the fact that the close loop dynamics becomes x dot, is 0, 1 minus k1

Â minus k2x. Okay, so now we have this 2 knobs that we can tweak, k1 and k2, and w

Â hen we tweak them, the eigen values of the closed loop dynamics are going to move

Â around. So, in the next module we'll be systematic in terms of how we actually

Â pick this case. For now. Let's just put some case pull some case

Â out of a hat. Oh, and I'm a lazy man, so I'm pull once out of the hat. So let's

Â just try k1 equals k2 equals to 1. Why not? As a first, first attempt, at least.

Â Well, if I plug this in to my A mius BK equation, I get the following closed-loop

Â system dynamics. And let's check the eigenvalues of these things. So list write

Â eig in MATLAB or whatever system you want to use. if you do that, you'll find out

Â that the eigenvalues are negative 0.5 - plus minus something, something,

Â something, j. What are the real parts of the eigenvalues? Well the real parts of

Â the eigenvalues. ,, . There, -0.5, so there strictly negative, which of course

Â is what we needed for stability. So we have asymptotic stability, so we have in

Â fact Achieved asymptotic stability. Now, the other thing to note is that the fact

Â that we have a J hanging around there, meaning we have an imaginary component to

Â our eigenvalues, that means that we can expect oscillations in the way the system

Â behaves. So we have an asymptotically stable system with some oscillations

Â floating around, and they are in fact damped oscillations because, since the

Â system is stable, the oscillations are going to become smaller and smaller in

Â amplitude, and as t goes to infinity, they are going to in fact go away completely.

Â So if I do this, then here is what it looks like. As you can see very quickly we

Â get close to the origin we overshot a little bit and this because of these

Â osculations. So lets see if we can do something about these osculations. Well

Â here is another attempt completely arbitrary. I am going to make k1 smaller

Â which means k1 tells me how much I react to position and k2 tells me how much I

Â react to volicity You can always think of, almost think of this as a p parameter in a

Â PID regulator, and this is the d parameter i n the PID regulator. Because p is the

Â position in this case, and d is the derivative of position, which is velocity.

Â And that's what k2 is, is affecting. Okay. If I do that, then my new system matrix

Â becomes this beast here. Well, let's check its eigenvalues. In this case, the

Â eigenvalues end up being these 2 numbers. And they're real, which means we cannot

Â expect, really, any oscillations. and even better yet. The real and strictly

Â negatives. So this is an asymptotically stable system with no oscillation.

Â Oscillations. So, this seems like a pretty decent design

Â to me. Let's see what it would actually do to the robot. So the robot, eh, well, it's

Â not oscillating but it's unbearably slow. So, what we saw here is that we actually

Â got rid of the oscillations but we got assistance that was much more or sluggish

Â in the sense that iti's slow and borderline annoying from a performance

Â point of view. But for now asymptotic stability is achieved and what we saw we

Â need to do is to be able to achieve stability while doing other things at the

Â same time. But one thing that is absolutely clear is that some eigenvalues

Â are better than others. And our design of control gain, somehow, should be reflected

Â by, what are good eigenvalues. So, some eigenvalues cause oscillation. Some

Â eigenvalues cause instability. Some eigenvalues make the system Respond too

Â slowly and so forth. So what I want to leave you with now is it seems like state

Â feedback is the way to go. Even though we don't really know how to get to state yet.

Â But we will by the end of the next module. And we have to be careful and creative and

Â clever in terms of how we select our eigenvalues. And that's another topic for

Â the next module. which is how do we actually Select the appropriate

Â eigenvalues to get the closed loop system behavior that we want.

Â