# How to decide links length of manipulator?

I'm working on pick and place robotic arm with 4 dof. I'm using MATLAB for inverse kinematics. But, I want to know how to decide links length. Say, I have four point in space upto where my robotic arm should reach i.e at upper most point, lower most point, extreme right point and extreme left point.I want theory or any approach so that I can calculate link length using these points.

Thanks.

Edit: Add picture of robotic arm.

• Are you able to provide a a joint diagram (Something like this) of what your robotic arm looks like? Jan 14, 2017 at 0:24
• @AustinTronics Thanks for your time. As you asked me to send joint diagram so I edited my question accordingly. Please see it. Looking for your help. Thanks Jan 15, 2017 at 16:44
• I did a similar simulation using SolidWorks: youtube.com/watch?v=crJXUlzJ918 Feb 19, 2018 at 20:00

There may not be a direct way, however, you can derive the forward kinematics to give you more insight in how the links are operating with respect to one another. I have worked out the forward kinematics below:

For this particular serial linkage robot, I locked joints 3 and 4 to stay at 0 degrees since this will maximize reach as far as possible (obtained by observation).

On the bottom right are the X, Y and Z equations. Just stick a point in 3D space that your wanting to reach in the X, Y, and Z variables.

Lets call (L2 + L3 + L4) = a

This will give you:

X = a*c1*c2

Y = a*s1*c2

Z = a*s2

Lets say I wanted to know what the cumulative link length should be if I wanted to reach point (300, 300, 300):

300 = a*c1*c2

300 = a*s1*c2

300 = a*s2

Because there are 3 equations and 3 unknowns, we could try systems of equations, after which I obtain:

Theta1 = 45

Theta2 = 35.2644

a = 519.615

Which means you can play around with link lengths L2, L3, and L4, but they must combine to equal 519.615.

Note: Because we are dealing with something as nonlinear as sines and cosines, there may be more solutions to the equation than what I provided.

Overall, messing around with the end equation I provided by selecting various points in 3D space you want to reach or selecting angles of interest for theta 1 and theta 2 is the best way I can think of to determine link lengths.

Another thought could be to use the equations I provided to create an ellipsoid/sphere that touches your farthest points you can reach based on your link lengths; don't know quite how I would go about doing that of the top of my head though.

• Thanks for your reply. I'm looking into this problem with your suggested approach. But, I have few queries like what is the meaning of e1or e3 which you used in forming transformation matrix. second thing is that, you missed 'l1' length in your DH parameters. I used standard method to calculate DH table and I think you used modified one. But, I got slight different x, y and z expression from your x, y and z expression. I got (th1+th2+th3) expression in my x and y values. It will be helpful if you post your full transformation matrix so that I can recheck my calculations. Thanks. Jan 18, 2017 at 9:49
• e1 and e3 are basis vectors representing x and z axes. check out a tutorial I made to understand my notion better. I did not miss L1, and as far as I know, I'm not using a modified DH approach; that doesn't mean we cant get separate answers. DH was made in part to reduce the variables it takes to describe transformations so naturally I made my base frame at joint 1 (in pic) therefore eliminating L1, among other things, in my equation. You can get the full transformation by multiplying all rot and trans matrices together. Jan 18, 2017 at 16:36
• Correction: I made my base frame at joint 2 (in pic) therefore eliminating L1, not joint 1. Jan 19, 2017 at 18:50
• But L1 is necessary to go in z direction i.e to attain height. Acc. to me Z = L1 + (other exp.). Also, I think in your equation X should be equal to L2*C1*C2 + L3*C1*C23 + L4*C1(C2*C34-S2*S34). There should be bracket in third term. I'm new to this, So I may be wrong also. One more thing, I saw your videos (thanks for that very informative) and find out that rotation matrix about x axis in your videos is equal to rotation matrix about z axis in other study material. Why so? Jan 20, 2017 at 4:26
• Good catch, I missed the brackets on the X and Y equations; I updated the picture accordingly. However, this doesn't change the equations after setting theta 3 and 4 to 0. As for L1, "Z = L1 + (other exp.)" would be necessary if I made the base frame (coordinate 0 in picture) on the ground at joint 1. However this isnt the case since I decided my base frame goes on joint 2, taking L1 completely out of the equ. Im not quite sure why your reference material flipped x and z rotations, I have only seen it referenced the way I showed. Here's a wiki Jan 20, 2017 at 5:47

I don't think there is a theoretically best set of link lengths for a set of end-effector poses. Since inverse kinematics is typically only concerned with the ability or not of achieving the target pose. So if you find a set that can achieve all 4 poses, then IK doesn't help much more.

Best means optimizing some metric. My answer to this question lists a number of metrics you can use to evaluate a given arm configuration and compare it to another. For example: distance from joint limits, manipulability measure, and condition number. I'd also add the total power required from all your actuators (assuming your payloads and the weight of the arm are non-negligible). My answer in this other question describes some ways to do that.

So pick some link lengths and do some calculations, see how they compare, then repeat. One word of caution though, some of these metrics can't really be directly compared across arms with different parameters.

I agree with Ben that there is no established algorithm which you follow and get the link lengths.

Fomrulating an optimization problem and then solving it is one of the viable solutions, as Ben suggested.

A bit more simplistic is just to rely on kinematic capablities, Joint positioning will be always a tradoff between positioning resolution of the end-effector and maximum velocity. The closer the joints are to the end-effector (and to eachother) the more postitioning resolution will the robot have. The further they are (and closer to the base) the faster it will be.

If you take a look at a 6 dof industrial robot like this, you can see that the wrist joints are as close as possible to the endeffector, increasing positioning resolution. These are used to "compensate" for fine motions the first 3 axes cannot make. The first two axes are as close as possible to the base to give velocity.

I am aware that this effect is included in Bens answer, if you optimize for manipulability and load you will get the same effect, however, before formulating and solving a complex optimisation problem a bit of a trial and error experimetns may be helpful.