LESSON

# Gravity and Payload

#### Share

#### Transcript

Here is the expression we introduced earlier for the inverse dynamics of a serial link robot manipulator expressed in matrix form. We are interested now to consider the effect of gravity. Gravity is the force that acts on the robot even if it's not moving. So we can eliminate the terms that are proportional to the joint acceleration and the joint velocity. It's just this term on the end here. The term G. This represents the gravity torque that's acting on the joints of the robot manipulator. It's the torque that counteracts gravity and stops the arm from collapsing under its own weight.

Here again we have a symbolic model of our 2 link robot. And what I'm going to do is to use the method gravload which tells me the torque that is acting on the joints of the robot. The arguments to gravload are the joint angles. I parse in a vector which contains Q1 and Q2; this symbolic joint variables. And here's the expression for gravity which is acting on the joints of the robot. And we see that the term for joint 1 is quite long where as the expression for joint 2 is a little bit shorter.

We can see that this expression contains a kinematic parameters the link lengths A1 and A2. The positions of the centres of mass C1 and C2, the masses of the two joints M1 and M2. And we can see that there are a lot of cos and sin terms in here.

So far we've talked about the forces on the robot just due to its own weight. But a useful robot also has to be able to carry a payload. Pick an object up from here and put it down over there. So clearly the last link in the chain of the robot has to hold the payload. But that propagates down the chain towards the base of the robot. Every joint in the robot has to help hold up the payload to stop it being pulled down by the force of gravity.

So what's the effect of payload? Well every joint has got a maximum possible torque. So let's imagine that we have a payload on the end of the robot and we keep increasing it's mass.

We can work out the torque that each of the Joints needs to exert in order to hold up that payload. As we increase the mass of the payload, eventually we will find that one joint will hit its torque limit it will become overloaded. And that's the maximum payload that the robot can hold.

Now we know that the gravity torque is the function of the configuration of the robot. If a robot's holding 10 kg there might be some configurations particularly where the 10 kg is close to the base of the robot where it's possible to hold that particular payload. But if the robot has got its arm fully stretched, it may not be able to hold that particular payload. So the maximum payload of the robot is a function of the torque capabilities of the motors but it is also a function of the configuration of the robot.

I am going to go back to a numerical model of our 2 link robot and I load that using the script mdl_twolink.

I'm going to now compute the gravity load on the robot's joints using the gravload method. I'm going to compute that for joint angle 0 and 0. And this is the result we get. In fact the same result we got a little bit earlier using the recursive Newton-Euler algorithm. In fact gravity load itself is based on the recursive Newton-Euler algorithm.

Let's just have a look at a configuration of our robot. We're going to plot it for joint angles 0 and 0 and this is what it looks like. Now let's imagine that we put the robot into a different configuration. Let's make the first joint angle equal to PI on 2 radians or 90 degrees. But now our robot is pointing straight upwards.

So what do we think the gravity load on the joints would be in this case? Well it's easy enough to figure out. We use the twolink object, the gravload method and we parse in the joint angles, PI on 2 and 0. And we see that the gravity load on the joints is almost equal to zero or some slight numerical error here. It's 10 to the minus 14. And this is what we expect because in this particular configuration, the joints don't need to exert any torque at all to hold the robot straight up. The robot is in fact balancing in an upright configuration. It's not stable but it doesn't require any joint torque to maintain this exact configuration.

Now we're going to look at the effect on payload. I can add a payload to my robot object very easily. Here is my robot object and I used the payload method and I'm going to add a 1 kg payload, and it's going to be placed at the coordinate 0, 0, 0 with respect to the link 2 coordinate frame.

So it's actually going to be right on the end of link 2. The robot now has a payload and now I'm going to compute the gravity load for the robot when it's in the configuration 0,0. So that's with the arm stretched out straight and horizontally.

Now we see that the torque on the joints, on joint 1 and joint 2 is increased. And that's because the robot is trying to hold a 1 kg load in this rather awkward configuration. So the robot joints are going to have to work about as hard as they can in order to keep that 1 kg from pulling the end of the robot down.

Let's look now at a complex robot model. We introduce a model for the PUMA 560 robot. And you can see that there is a new variable in our workspace called P560, it’s another serial link object which can describe a robot manipulator.

We're going to use the same gravload method for this robot. And for one of anything better I'm going to put in joint angles all equal to zero. And this is what the gravity load looks like. Now we can see what the PUMA robot looks like in that particular configuration. 0, 0, 0, 0, 0, 0. And PUMA robot with a all zero joint angle configuration looks like this. The upper arm is horizontal and the lower arm is vertical. And these are the joint torques that are required to do that.

The toolbox robot object has got a lot of capabilities and one of the things we could do is to change gravitational acceleration. And we change that to 0, 0, 9.81, which is nominal earth’s gravity, going to divide by 6 because that's what the gravity is on the moon.

Now we can see the gravity load on the robot, given that it's on the moon, it's the gravity load function. And I put in the joint angles six zeros again. And here we see what the gravity load, gravity torques on the joints of this PUMA robot would be if it was working on the moon.

We examine the gravity term and explore the effect of changing robot payload.

### Skill level

Undergraduate engineering

#### Undergraduate-level engineering

This content requires an understanding of undergraduate-level engineering; for example, dynamics, classical control theory - PID, poles, zeros, probability theory - random variables and Bayes’ rule.

#### Undergraduate-level mathematics

This content requires an understanding of undergraduate-level mathematics; for example, linear algebra - matrices, vectors, complex numbers, vector calculus and MATLAB programming.