**Instructor (Oussama Khatib)**:Okay. Let’s get started. So today’s video is about dampening. This is from Vancouver Tech and it was presented as ISRR, International Symposium of Robotic Research in ’93.

**
[Video playing] **

At the University of Michigan Robotics Laboratory, we’re interested in tasks involving dynamically dexterous interaction between robots and their environments. Computers currently play chess better that all but a few of the best human experts. But no machine has yet been built that can manipulate the physical pieces with anywhere near the skill and reliability of the youngest human chess novice. Our three degree of freedom direct drive robot is endowed with a juggling algorithm that transforms the positions and velocities of a falling ball into desired joint positions and velocities, which the robot is forced to track by use of a nonlinear inverse dynamics controller. Smooth position and velocity estimates are produced by a linear observer, which in turn, receives input from a real-time stereo vision system. The one juggle tasks requires the machine to bat a single ball into a stable periodic trajectory, passing through a user-specified apex. Adding a second ball with an independently specified apex point defines a two-juggle task. The juggling algorithm shown here employs an urgency measure to switch the machine’s interest between the reference command corresponding to the two independent one juggles. It’s worth emphasizing that there is no planning in the conventional sense taking place in this system. Rather, the robot’s impact decisions are induced by its continuous motions in the effort to track a carefully distorted version of the positions and velocities of the two balls. Machine juggling skills, in and of themselves, seem unlikely to play a direct role in the social and economic impact of advanced robotics. However, we are convinced that the problems of controlling contexts, focusing visual attention, and coordinating in real time the constituent behaviors of such skills provides an invaluable laboratory for understanding what is hard about dynamical dexterity. Without a phase regulation control term, the balls quickly wander in phase and eventually fall in simultaneously. In contrast, with phrase regulation again enabled, nearly simultaneous falling balls are successfully separated. In this experiment, we failed to prevent a spatial collision. We hope in the future to better understand the nature of these and other dynamical obstacles, or order to control around them more effectively. Of course, there will always be situations from which the machine cannot recover.

**Instructor (Oussama Khatib)**:Okay. So who’s interested in juggling? Well, those who are interested in juggling could try it next quarter in Experimental Robotics. In fact, a lot of the projects in Experimental Robotics involve dynamic skills, throwing a ball into a basket, playing ping-pong, or whatever. So juggling is quite challenging, actually. Well, juggling requires control and here we are. So this is a little bit of a concept that we are going to see over the discussions on control. And the concept is instead of really thinking about the robot as a programmable machine where you need to find all the join motions corresponding to your task.
So you want to move to some location and you want to be able to reach that location with some orientation of your vector. Well, basically, what you have to do is you have to solve this inverse kinematic problem to find the joint angles that would allow you to be in that configuration. I’m not sure if a human can do that. Humans usually are really poor at computation, so finding the inverse kinematics, finding all the joint angles that will put you in that final configuration is really difficult. So what do you think humans do?

**Student:**[Inaudible].

**Instructor (Oussama Khatib)**:Feedback of what?

**Student:**[Inaudible].

**Instructor (Oussama Khatib)**:So you sort of like think – try to reach for something. Try to reach for the chair in front of you. How do you do it? So you’re looking at your hand and you look at the chair and you have this visual feedback. So it’s sort of like your hand is attracted by a force pulling you toward that goal position you describe. And this is the concept you see here. It’s sort of like potential energy, where the minimum of this potential energy is located at the goal position. And that is going to create a force pulling your hand toward the goal. Your hand is going to just move toward this goal without a priori imaging or knowing where your final configuration is going to be.
The final configuration is going to emerge from your motion. We will come to this later. But this kind of idea is really what we call task oriented or operation space control. The idea of really doing the control, not through this inverse kinematic and programming the robot. Well, there is another method, and most robots today are controlled through inverse kinematic, that is, we control the joint motions. So you first decide where you’re going to position your hand. So you need to find this configuration, which means all that you know is the position and orientation of the hand. You don’t know yet this.
So you need to do the inverse kinematic. You solve the inverse kinematic for six degrees of freedom. How about inverse kinematic for this? I’m not sure. But anyway, you might maybe use a mannequin and you just position it and you decide, well, this is a good configuration. And you start from here, and now you survey your joint angles to move to that final configuration. Well, it doesn’t really work very well with humanoid robotics, and in fact, a lot of humanoid robotics today are suffering from this problem, the fact that we are still controlling robots using inverse kinematics.
However, for [inaudible] robots, with few number of degrees of freedom or if you have a repeatable task, you’re repeating the same motion over and over, basically, you’ve recorded the motion and what is left is how to track that motion. So today, we’re going to discuss the basics of control. And we’re going to really start slowly with just something like we saw on the video, just natural systems, like you’re dropping a ball or you are looking at a pendulum moving. And you are trying to understand just the relationship between the potential energy applied to the system and the kinetic energy resulting from its motion.
And then we will analyze how this behavior would allow us to create something like PD control, proportional derivative control. Well, in nature we don’t have too much of I, integral action, but we will be able, also, to be able to add integral action if the error is large. And then we will apply this to controlling robots in joint space, so we can control this robot to follow a trajectory that is given in joint space. And then we will discuss how we can apply control techniques directly to the task in the way we do it human, that is, by directly applying a force, not through the inverse kinematic or the joints, but directly to controlling the end effector motion, velocity and acceleration.
So at the end, we will see that motion control is not really the only thing we need to do when we have a robot. You really need to interact with the environment. And in order to interact with the environment, you need to control the contact forces. So if you are sliding over a surface, you are moving, and at the same time, you are applying a force of contact. And that is going to be a critical technique in order to interact with the world, affect objects, assemble, move, and cooperate with different robots.
So a manipulator like this one can be controlled directly through its joint motion by simply imaging that you have some sort of springs at the joints, and if you put just springs, then this mechanism is going to oscillate if you disturb it. So what do we need to add? I’m just talking about passive mechanism. So we put the spring, and now it’s going to hold itself at some configuration. And if you disturb it, it will oscillate. So what do we do to make it more like stable?

**Student:**Put some damper?

**Instructor (Oussama Khatib)**:Put some damper. So if you place a spring and a damper at each of the joints, you will basically go to that resting point of all the springs and that will allow you to be at that configuration. Right? So to control the robot in joint space, just imagine that the resting point of the spring is changing. So little by little, you’re here, then you’re moving it there and there and there. And then you can control the joint motions. So this is typically the approach that we will have in joint space control, except the fact that we are not really dealing with the coupling, with the inertial forces created. And we will see little bit more about this.
We will see why this could work. I mean, it’s not obvious that it’s going to work. With passive devices, if you put just spring and damper, the system is passive and is going to somehow rest at some configuration. There will be deflection due to – even at a steady state, like if you let it rest. What other forces will disturb the position? So the springs will go to their rest position but they will deviate a little bit because –

**Student:**Gravity.

**Instructor (Oussama Khatib)**:Yeah, the gravity. So the gravity will create little disturbance. You need to compensate for the gravity, account for the gravity. You need also during motion account for these acceleration you are generating, that are scaled by the inertias and the masses so they produce coupling. As well as centrifugal coriolis forces. So the equation of dynamics is here. And now we need to account for that. But simply the concept of the control is just a spring, damper system, and the behavior is going to be very close to our mass spring damper, except the fact you have coupling. So if we start over and we want to control the robot directly with respect to the task.
So we want to move this end effector to some location. What can you do? Still using some passive springs and dampers. I’m going to give you one big spring and a damper and you just need to place it somewhere.

**Student:**Perhaps try a GPS position and it could go there? I don’t know.

**Instructor (Oussama Khatib)**:The GPS position is good. It will give us where the robot is, and we know where the robot is going so we know the error between the two. But I’m asking what is the concept in terms of moving – I mean, implementing a controller that will work with the task, instead of working with the joints? So I don’t want to use this. If I place all the springs at the joints, I need to know the joint displacement. I need inverse kinematics. If I want to control the hand –

**Student:**[Inaudible].

**Instructor (Oussama Khatib)**:Yes. So, exactly. Just pull it. Right? Just put the spring there. Anyway, I gave you only one spring, so you would have to just place it somewhere. All right. Okay. What is going to happen here is you are going to pull the end effector to that location, to the resting position and it will do this. And everything will fall. You don’t know where it’s going to be, but it will fall. And we will see that the concept is as simple as this – well, in six dimensions x, y. So the spring is like six-dimensional spring. Okay. So this is basically the concept of task-oriented control.
I mean, you can think about the spring as passive spring or some attractive potential energy that you are creating at the end effector with a gradient that is pushing you towards the goal. And that gradient is actually here, coming from the spring. The spring has a potential energy when it’s disturbed, and when you go to rest, you reach the minimum of that energy. And essentially, you’re applying the gradient of the potential energy. Okay. So in space, this is what is happening. As I said, we have an inverse kinematic problem, we have a task that is described in terms of x, y, z, the orientation of the end effector, alpha, beta, gamma, whatever representation you have.
You need to compute the desired joint motions. And then you have those desired motion, one desired motion, two, etc. And you look where you are, so you measure from in quarters, q1, q2, qn, you form a small error between where you want to go and where you are, and then you are reducing this error by control, independent controllers, most of the time, sent to each of the joints. So you have several controllers at each of the joints taking the joint from some value of theta to another value of theta. The problem is you have this inverse kinematic over time in the system.
Another approach that came about as early as ’69, ’70, ’71, and there is a paper by Dan Whitney in ’72 describing resolved motion rate control. So rate means we’re looking at the derivative at the velocity. And the idea is to, instead of doing the inverse kinematic, using the forward kinematic and taking its inverse. The idea is to find a small displacement, delta theta or delta q, that corresponds to your desired displacement, delta x.
So what do you think we have in our menu as models that could help there? So we would like to find a relationship between delta x, small displacement. So I’m at x, I would like to move a little bit, delta x. What would be the delta q? So what model should we use? And you don’t say it. Someone else.

**Student:**Jacobian.

**Instructor (Oussama Khatib)**:Yes, the Jacobian. Actually, the inverse of the Jacobian. So here is the Jacobian. It relates precisely delta x to delta theta. All right. If you take the inverse, you have to make sure you’re not at a singularity, otherwise you have to do special treatment of the configuration. If you are outside of the singularity and if you have six degrees of freedom, regular case, rectangular matrix, then you can take the inverse. Otherwise, you have to resort to generalize inverses or pseudoinverses. So you compute delta theta. So for a small delta x, now you have your delta theta. Knowing your theta, knowing where you are, the next configuration you want to go to is what?

**Student:**[Inaudible].

**Instructor (Oussama Khatib)**:Delta theta. So you start from your current position, x, you compute the error that is the x desired minus your current position, and then you compute your delta theta, and you add it to theta. So you keep controlling the robot to this theta plus, which is where you were plus the small displacement. And this is a vector. So here is the model. Now, the Jacobian inverse is inside your curval control loop. And you need to compute the forward kinematics, which is easier to compute, especially for you now, right. Very easy. So forward kinematics include the Jacobian. You just have to invert the Jacobian and for a small robot, you can get it almost in analytical form.
So basically, you compute a delta q and you distribute it to all the joints. And you have controllers for each of the joints to move and form this error in delta q and you move. So now, you’re continuously moving. Well, this has a lot of problems in terms of the conditioning of the Jacobian, the fact that the Jacobian has this strange thing about its metric, because the space where you are measure delta x involves linear motion and angular motion. So linear motion is measured in displacement, in centimeters or meters or inches. But it has also rotational motion, measured in degrees or radians.
And it’s all included in the Jacobian. So the metric of the Jacobian is not homogenous, and that creates problems. Also, you have the singularities, you have the redundancy, you have all of that, in addition to the fact that you have dynamics. So this works usually most of the time, but it works best if you use it to find the trajectory you want to execute. In the [inaudible] robots, often you want repeatable trajectory. And this doesn’t repeat. You will drift. So if you do this simulation, you will be able to find a trajectory, so resolve the inverse kinematic this way and then come up with a trajectory that you can execute.
Okay. Well, let’s see how we’re going to control the robot anyway. We get joint angles, we are following directly the trajectory. Whatever we do, we need to control the robot. We need to create a motor torque that is proportional somehow to the error, so we drive the joints to move toward the goal. So how does it work? By the way, how many of you have had some control classes? Okay, that’s what I thought. So we’ll start assuming you know nothing. Forget everything. Okay. So what is the simplest system we can consider? Well, I think a mass-spring system would be the simplest you can imagine.
So you have a mass resting on a surface with zero friction, nothing sliding. And you have a spring. You pull it. What’s going to happen? That you can imagine, I’m sure, everyone. What’s going to happen? From rest, you pull it a little bit and let it go.

**Student:**Oscillate.

**Instructor (Oussama Khatib)**:It will oscillate. So we are very interested in understanding this oscillation and how the oscillation is affected and by what it’s affected. So this problem could be resolved and looked at through this same equation we used to find the dynamics. We look at this mass and we find its kinetic energy. And we look at the system. It has some potential energy. Where is the potential energy?

**Student:**[Inaudible].
Instructor:

I’m sorry?

**Student:**[Inaudible].

**Instructor (Oussama Khatib)**:I cannot hear.

**Student:**The spring.

**Instructor (Oussama Khatib)**:The spring, yeah. I’m sorry. I didn’t hear you. The spring. Right. So when you’re at rest, the potential energy is equal to zero. I mean, if you let it rest alone, you’re not intervening, potential energy is equal to zero and the kinetic energy is equal to zero. The velocity is zero. The kinetic energy is ½ (mx)2. So if we disturb it and hold it, what happens to the kinetic energy? Still zero. Potential energy? Going to be positive. It will increase. Now, if we let go, the potential energy starts to decrease, and that energy is transferred to the kinetic energy. And then it keeps decreasing, keeps decreasing, we come to the minimum of the potential energy.
We will have the maximum kinetic energy. And now the velocity starts to reduce, the kinetic energy reduces, and we start building potential energy. And essentially, this oscillation is a transfer between K and V. So this is K and we can write this equation. So if you write this equation using K that we saw here, you take the derivative with respect to x-dot. It gives you m x-dot. The derivative of K with respect to x is zero. So you get the derivative of that quantity, m x-double-dot equals F. And the potential energy of the spring is ½ (kx)2, so that gives you the gradient when you take the derivative with respect to x, you get minus kx. Okay.
So the Lagrangian equation is a [inaudible] equation in this case, mass acceleration equals force, and the force is minus kx, it’s a conservative force. So you are transferring energy between minus kx and kinetic energy, which is building velocity and acceleration. For some reason it’s written twice. I don’t know why it’s written twice, but now I move this minus kx to the left-hand side of the equation and we have mass acceleration plus kx equal to zero. So there is no external forces. This kx is the gradient of potential energy, V. And this is the acceleration of your mass. Now, let’s take a look at the response of the system.
So I’m not sure if you can see it. You see this red potential energy over there? This is the potential energy of the spring. And let’s imagine this green dot that is this point mass we are going to drop. So if we drop this point mass, it’s going to fall and it will oscillate. There is no friction. It will keep oscillating forever. So this is time and we are looking at the frequency of crossing this axis. That is, we’re going from one side of x, we’re going to the negative side. And there is a frequency of crossing. So my question to you is, in relation to these two parameters, K and m, what is the affect of m on the frequency? So if your mass is heavy, heavier and heavier, what is going to happen to this frequency?
And if you’re k is smaller and smaller, what is going to happen to this frequency? So if k is very big, what will happen? If k is zero, what is going to happen? If k is zero, nothing will happen. If k is larger, the oscillation frequency. So frequency increases with k, and decreases with the mass. There is this quantity that we call the natural frequency of the system and this is the square root of k divided by m. Anyone knows why? Where is this omega coming from? Do you see it from this configuration somewhere?

**Student:**[Inaudible].

**Instructor (Oussama Khatib)**:So basically – yeah?

**Student:**[Inaudible] omega and t.

**Instructor (Oussama Khatib)**:Very good. You integrate the equation and analyze its response. If you don’t trust this result, let’s see how we can resolve and integrate this equation. So if we divide by m, we get the acceleration plus k divided by mx. Now, if you integrate this equation, you get the square root of this coefficient of x that will appear. And we usually will write this equation as omega2x. So the k divided by m is really the square of your natural frequency. And if you write this equation and do the integration of this equation, you get a semizoidal response, where omega appears as the frequency of [inaudible] over motion.
So in fact, x that comes from the integration of this equation is some constant cosine omega t plus phi. What is phi? Depends on what? I heard initial conditions. Right. So from the initial conditions of position and velocity can determine c and phi, and this is your response. And you can see that this omega is strictly the square root of k divided by m. Well, if you understand this, we need just one more step and then you understand PD control. It’s very simple. PD control, actually, is imitating the natural system to recreate a string. This k will become your stiffness.
And m is the mass. k will become your proportional gain. And in a few minutes, we will see another k that involves the damping. That also comes into the equation, but not of conservative system but dissipative system, the system that dissipates energy because of friction. And then we will have the complete equation. So if we are looking at only conservative system without any damping, this is the response. Okay. So in fact, if we just add a little bit of friction underneath the mass as it’s moving, there will be some dissipation of energy, and this dissipation would be a force opposing what?
Opposing the motion, opposing the velocity. So it’s sort of minus some coefficient times x-dot. And that friction, if we add it to the system, we have to add it on the right hand of the equation. So the Lagrangian equation is capturing the natural system on the left side. On the right side, we are putting a natural force, which is friction, but we cannot put it in this left side of the equation, because this force is not conservative, it is not a potential energy force. It cannot be integrated, so it appears on the right side of the equation. An external friction force applied by the environment on the object. And if we assume that this force is simply proportional to the velocity, it could be nonlinear.
Friction can be nonlinear, it can have colon friction, it can have stiction. If you add this force to the previous equation that we add, it appears here. This is a second-order equation, general form of the equation. My system is not any more conservative, because if you oscillate now, you’re going to lose energy, and little by little, you lose energy and you stop. So the mass acceleration plus b x-dot plus kx is the general form of a linear system of the second order. And if we take this system and analyze is, so we divide by the mass, do you see omega2 now? So we have omega2 and thank you very much, it’s finished, so we can continue.
Now what we are going to do with b divided by m? Well, when we integrate those equations, this term is going to appear in some form. So what we would like to do is to see how b is affecting this damping. So for instance, if you put a large b, very, very large b, and you start falling, you’re falling, you’re falling, well, if b is very large, are you going to cross? You will just reach that goal position without crossing. So you have sort of an over-dense system. If b is very small, you’re going to oscillate, and eventually, you will lose the energy and converge towards the minimum of the energy. So here is an oscillatory damped system with higher values of b divided by m.
We have an over damp system. And as we move from here to here, there is a special value at which we just go and reach the x axis, and this value is called the critically damped system. And remember this; we’re going to use it a lot. Because we try to imitate this behavior when we control any of the system. We will try to make it critically damped system. So we need to know for which value b divided by m reaches this value, this state. And the value of b divided by m is simply 2 omegan. So when b divided by m is equal to 2 omegan, omega is square root of k divided by m. Well, then we have a critically damp system.
And this comes just simply from the integration of the equation, this condition. So now, you can compute b. The critically damped b is equal to what? 2 omegan times m. So if you know your mass, if you know your k, then you can compute your b to be a gain for your control system. Here b is the natural damping of the environment, so the system is passive. So let’s take this 2 omegan and try to make it explicit in that first equation. So I’m going to take this equation and I’m going to write is as a function of omega and as a function of this critically damped system. So to do that, we take b divided by m, which is the value that we have right now, and compare it to the value that will give me critically damped behavior.
So b divided by m is compared to this critically damped b divided by m. So this is a sort of ratio. It’s damping ratio. And I need to replace b divided by m by something that makes 2 omegan appear, so I need to divide by this and multiply by this. You agree? So on the left I have this ratio, and we call this the natural damping ratio. And we use this symbol to represent it. What do you call this symbol? Psi? So we use psi. Psi represents the natural damping ratio. It’s b divided by m divided by 2 omegan. So for which value the natural damping ratio gives me critically damped system? Okay.
When zetan is equal to one, it means that b is simply twice the square root of km. And for this value, I will able to have a critically damp system. Okay. So far so good. Not too confused? So we introduced two notions, the natural frequency, square root of k divided by m, and the natural damping ratio, b divided by two square root of km. And now we can analyze our system and write it in this form. So the acceleration, it was m. We divided by m and we can write the equation in this way, we can write it acceleration plus 2 zeta omega velocity, plus omega square root of velocity of x is equal to zero. Now, the time response of this requires us to integrate this equation.
And if we integrate this equation, we will have this response. Because of the damping, the amplitude of the semizoidal is reduced as you move. There is a decrease, and this decreases is exponential. And this decrease depends on zeta and omega. You have the semizoidal motion, which is function of your natural frequency omega, but it’s also function of your damping ratio. You can see when zeta is equal to one, this will become zero, because sine of zero. And if it’s greater, then there is no cosine, because you will have only the exponential.
So here is the response. So you have this exponential, and you have the frequency that is now function of omega and square root of one minus zeta2, that is the period is 2 pi omegan square root of one minus zetan2. So it’s not omegan anymore. omegan was the natural frequency, but this thing that appears there is sort of a natural frequency that is affected by the damping. So we call it omega damped natural frequency. So it was omega the natural frequency, and now it is damped. All right. I think this is the last definition you need to remember.
And with this, we can do almost everything, except the nominalities we have to deal with a little later. But omega, when you have damping, is really omegan the natural frequency that appears in your spring scaled by square root of one minus zeta2, which comes from your damping b divided by the mass and the spring or the gain of your system. All right. So these are characteristics of a second-order system, and what we need to do is to just inspire our control by this, and then we will be able to recreate that behavior simply by selecting what?
If you start with the mass and now you want to create a system like this, what do you need to select?

**Student:**k?
Instructor

Select the spring, which is k, the stiffness of the spring, and you need to select?

**Student:**b.

**Instructor (Oussama Khatib)**:So by selecting b and k, you can create the second order of behavior on our mass. So if you have one joint with some inertia, to create a behavior like this, a closed loop behavior of second order with some natural frequency, some damping ratio, and some damped natural frequency, you should be able just to select b and k and find your system. So the control of a system is going to be almost the same. We are going to pick omega, we are going to pick zeta, which determine k and b. And then you will be able to control the closed loop.

**Student:**What happens when b is a function of the configuration? Does that affect how you handle that?

**Instructor (Oussama Khatib)**:Right. Well, b could be actually the most general form of b is b is a function of x and x-dot. And even higher order. And then what you get is you do not get a linear system. You get a nonlinear system. So there will be additional disturbances on the system, and you need to do two things, either to model your friction and then try to compensate for that, and that’s what we’re going to do for centrifugal forces. That’s what we’re going to do for the fact that the mass is configuration dependent. But once you model it, you can integrate the model in your control and you can compensate for those nonlinearities.
Then at the end, after compensation, you come to this form, a linearized form. So what we’re going to do, actually, later, is to go and compensate for the gravity, compensate for centrifugal coriolis forces, compensate for nonlinearities, like friction, and then reach a level where we have simply a decoupled system with m or n masses that we can control using this. Now, compensating for friction is very dangerous. It’s not easy. You cannot just go and do some estimate and compensate for the friction. You can compensate for the friction – we can try to compensate for the friction if you want. I’ll show you how dangerous it is.
Okay, here is our – what is the name of this robot? Let’s move it. Well, it has some friction. This friction it has – you see I’m moving it and, well, it has friction because it has natural friction, but if I remove this friction, now I removed the friction. Look what’s going to happen. I’m going to apply a small force. Are you all attached? All right. We saved it. So you can see if you compensated for the friction, you will have quickly oscillations and you will have instabilities. So let’s say the robot is controlled now with these springs. You have 400 – these are the value of the springs.
And you have some value for the b’s, basically in here, 40. This is joint three. So if we change this to be 40, you see I’m pulling now. It is a little bit moving. You can see joint three. If I pull on joint two, it is stiffer. Joint three is responding. I mean, if we can use this game – four is good. No, that’s too much. Let’s make it four. Now it’s easier to move. But you see the damping. It’s still over-damped. When you move it, it is not responding, so let’s make this very small. Now there is a little bit of motion if we make this zero. So now, if we start putting negative damping to compensate for the natural friction, we’re going to go unstable.
So this is small amount. How about minus nine? And let’s put a little bit higher here. Okay. And obviously, you’re going to go unstable. The real time is not real. That’s why it is a little bit weird, but it is – so don’t try this. No negative damping. Works. Positive damping is pretty good. Okay. So remember, this omega, is it bigger or smaller than omegan? So you get your omegan from square root of k divided by m, and now your omega after damping is smaller. Good. Okay. Don’t look now at your notes, please. You have the answers, but think about this. What is your damp natural frequency? We just saw the expression so don’t look at your notes. Try to compute it.
So how do you compute your damp measure of frequency? You need to compute the undamped measure of frequency. The natural frequency is what? Eight divided by 2 square root is 2, your damping ration is what? b divided by square root of kilometers, km. So km is 16 square root is four, two is eight. I’m not going to do it. So this is your omega, zeta is – it’s easy to remember b divided by 2km2. Remember that. And your omega is 1.6. So you reduce it from 2 to 1.6. So we have another video segment next time, but we will skip it now. We have a little bit more time, so I’m going to go over one degree of freedom that we are going to control exactly as we did with a passive system.
So one degree of freedom robot, we’re going to assume that the robot has just an inertia or maybe a mass, so it’s sliding. Maybe mass is better. If we take a prismatic joint, so a prismatic joint is going to involve just the mass of the moving link. And we’re going to move it with a force and we are going to create this force as a spring. And now we want to move to some location, so that would be the resting position of the spring. And then we can recreate exactly the same behavior on the robot. So here is the one link robot. It’s just simply a mass. Probably this is the simplest robot you can imagine.
It is a mass moving under this force of the motor. So the motor is going to apply a torque translated into a force, f. And you want to move it from its current position to x desired. Okay. Simple problem. So we have mass acceleration equals force. So now, your force is your motor force. And your task is to create a force that will let you move this prismatic joint from its current position to the goal position desired. So the same thing as a spring, what we’re going to do is we are going to create this spring or potential energy, whose minimum is at x desired.
So the potential energy that you’re creating is positive everywhere except at xd is equal to zero, so it’s zero at your desired position, and it means that you could have something like a quadratic potential energy with some gain, kp, which produces a gradient that is equal to what? What would be the gradient of this potential energy? f should be what? So you take partial derivative with respect to x. And that would be k times x minus x desired. So new system is simply mass acceleration plus kp(x) minus x desired. So here, we have the zero of the spring moving, changing with your desired position. That’s the only difference. And that doesn’t change anything.
That just changes the zero. So instead of talking about stiffness, we are going to talk about the gain that you are using for your error in position, so we call it position gain. And immediately, we can go to the equation and analyze what happens if I apply this controller and whether this control is going to be stable or not. We can go and do this analysis on the equation on that system, and we analyze what happens when we apply a force that is the gradient of this potential energy. So our potential energy is this. We took the gradient of the potential energy and we applied it.
Now going from this page to this page, it’s interesting, because here I was looking at just one degree of freedom. But if we do here, we can show that whatever the number of degrees of freedom, if we apply a controller like this, essentially, so this could be six degrees of freedom, 20 degrees of freedom, whatever the number of the system. If your potential energy is in this form, and if you are applying a force that is the gradient of that potential energy, then what you can do is – you see this equation here? You’re applying this force there. Well, you can move it to the left side and now you have your potential energy in this equation.
So what is happened here is that your Lagrangian equation is showing you that you have a system on the left-hand side that involves only kinetic energy and potential energy equal to zero, zero external forces. So what do you expect in terms of the stability of the system? So if you have a mechanical system under potential energy and kinetic energy with no external forces. Because all the forces are conservative, are gradient. So what we can say about this system?

**Student:**Stable.

**Instructor (Oussama Khatib)**:It is stable. So simply by selecting your controls, your motor controls, to be the gradient of potential energy, you guarantee that your system is going to be stable. So this is a very important result, because now we know that if we use this form of control, sort of proportional to the error, which is the derivative of our potential energy, then we are going to be stable. Now, stable is not sufficient, because it can be oscillatory stable. We know the response of this system is going to oscillate. So this force is not sufficient. What should we do? We should add some damping. We should add some versipity forces.
So in here, I’m going to change this zero with some damping. Very good. We’re almost there. So this force is not in the potential energy it cannot move to the left. It is going to be there. And I’m going to put an external versipity force. I’m going to put a damping force. But I need to know in which condition. What are the conditions on this force? What conditions are required in order to make the system asymptotically stable? What does it mean, asymptotically stable? You understand what it means? So this is the behavior of oscillation that are critically damped or over-damped, your system will converge toward the goal and reach that goal. This is what we are trying to achieve.
And this versipity force that we saw before was doing something to the system. Someone here said something about that force. That force was doing something to the motion. So what is the condition on Fs? That is the question.

**Student:**[Inaudible].

**Instructor (Oussama Khatib)**:It has to oppose the motion, right. So if you are moving in some direction, you should oppose that motion. So what would be the simplest way to do that? Fs should be if your motion is measured with a velocity x-dot.

**Student:**[Inaudible].

**Instructor (Oussama Khatib)**:To the velocity, right. So if you are in higher dimension, basically this could be a force that is opposing your velocity. And what you need to do to make sure of is what? In order to oppose the velocity that the dot product between the two factor is negative. So if your force that product with the velocity is negative for any non-zero velocity, you are asymptotically stable. Very simple. So pick one force that satisfies this condition, the simplest one. You just said it. So you can pick minus kv x-dot with kv positive that would satisfy this condition. So if we apply the Fs equal to this linear damping, then essentially, we take this control, the conservative part of the force, and add to it the damping part.
These two pieces represent the PD control, proportional derivative. So if you want to move to a goal position, all you need is a term that captures this error. This goal position could be far away, even, so it’s a step response. You’re stepping x to this goal position, and you’ll have damping that is trying to reduce x-dot to zero, because here you can have x-dot minus x-dot desired. But because you are not tracking a trajectory, you are just going to a goal position, you want to stop at the goal position. So it’s x-dot minus zero. This is the PD control.
Now, how we design this control, how we pick kv, depends on the similar characteristics we studied earlier with passive system and natural system. So the kp is gong to be picked so that kp divided by m, the mass of the system, gives you the omega that you wish. So when you are controlling your robot, do you wish to have a small omega or a large omega? What does omega do to the response? Small omega. So if you want to move from here to here with small omega, you – takes long, long time. So usually, you want much faster response.
If you want to move slowly not only the time response, but also the stiffness of your system, because your stiffness is depending on kp. Your disturbance rejection is depending on kp. We will analyze kp and see why we want higher kp's. We will analyze kp and see its limitations and we will see how we pick those kp's and kv's for given performance of omega and zeta on Wednesday.

[End of Audio]

Duration: 70 minutes