1. Home
  2. Explore
  3. Engineering
  4. Inverse Kinematics

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Inverse Kinematics

Transcript

Good morning, welcome back. So, we will start the discussion on inverse kinematics today. In the last few classes we talked about the forward kinematics starting from the coordinate the coordinate transformation matrix and how do we go to identify the DH parameters and then using DH parameters how do we get the transformation matrix and then use it for forward kinematic analysis and we saw few examples in the last few classes and see how to use the forward kinematics for getting them position and orientation of a manipulator that can be expressed as a function of the manipulator parameters the join parameter As a function of the manipulator parameters, the joint parameters as well as the link parameters that is what we discussed. So, today

we will start the inverse kinematics problem, I briefly explain to you what is inverse kinematics problem. So, we will see the details of this problem and how that can be solved for manipulators. So, what we going to cover in this is basically the problem definition. The problem definition, so we will try to define what is the inverse kinematics problem all about and then we will see something called solvability. So it is not that necessary that always the inverse problem can be solved, so it can be solved under certain conditions only. So we will see the existence of solutions and then the problem of having multiple solutions. So some cases there will not be any solution and in some cases there will be multiple solutions. So we need to see what is that solvability. There will be multiple solutions, so we need to see what is that solvability and then we look at the solution strategies,

there are different strategies to solve this. So, we look at the closed form solutions and then algebraic or geometric solution and then we look into the I mean then there is another method called the numerical solution, we will not go into the details of numerical solution just for to tell you that that also is a method for solving inverse kinematics, but we will be talking only about the. method for solving inverse kinematics, but we will be talking only about the close form solution.

And then we go into the velocity relationship of course, that is not the inverse kinematics part. So, we look into the velocity relationship that is the relationship between the joint velocities and the tip velocities, where we discuss about the Jacobian and singularity. And finally, we will talk about the statics also. So, the force relationship under static So, the force relationship under static condition. So, that is going to be the discussion for the next few classes.

Now, we already mentioned about the inverse problem. What is the manipulator inverse problem? As you know, the manipulator tasks are normally formulated in terms of the desired position and orientation. So, as I told you, so I have an object here, I have an object here. this is an object. Now, I have a coordinate frame assigned to this object, so that I know the relative position and orientation of the object with respect to the base of the robots. Now, my interest is to see how can I use this robot to pick this object from here, I need to pick this object from here and place it somewhere here, I want to place it somewhere here. and place it somewhere here I want to place it somewhere here and I know this

position also so I can define this position where I want to reach so I have this object in this position and I want to pick up this using this robot so if I have to bring this tool to this position what should be my joint angles is the problem in inverse kinematics so that In inverse kinematics, so that is the way normally all the manipulator problems are formulated.

So, in knowing the joint angle and get where to where will it reach the forward kinematics is useful, but not in the practical scenarios like this. Here we are interested to know what should be the joint angles to reach here and similarly what should be the joint angles for the tool tip to reach here to drop this point object here. So, that is what is the requirement in the practical object here so that is what is the requirement in the practical application so that is what says that they are normally formulate in terms of the desired position and orientation so we have a desired position and orientation for the tool and we want to know how can I reach the how can we reach that position and orientation using the joints and that is that is the inverse problem that is of interest to us so we have something from here to pick and then place it somewhere else. So, how to reach this position. something from here to pick and then place it somewhere else so how to reach these positions

are the interest to us and a systematic closed form solution applicable to robots in general is not available that is this problem cannot be generalized because each robot will be having its own way of reaching that position and solving that position or getting the joint positions to corresponding to that position cannot be generalized because of Positions to corresponding to that position cannot be generalized because of the robot configurations we will see why the what the problem is later but that is the problem here it cannot be generalized and unique solutions are rare and multiple solutions exist.

So many times we will be having multiple solutions that mainly because suppose you have a point or assume that this object is here and you want to reach here this point. So, you can actually reach from here, you can actually reach from here and reach here or you can actually reach like this also. So, you can actually have a elbow up or elbow down kind of a solution. So, this kind of multiple solutions are very common in inverse and because of Okay and because of all these you have this inverse problem as a very difficult than the forward problem. So, forward problem was very generalized for any set

robots configuration we can have a general solution and therefore, we are not able to we are able to get a generalized solution. But in the case of inverse this is not possible because of various reason which we will see see later and unique solutions are not there. So, all these actually leads to inverse problem as a complex one compared to the forward problem ok. So, now if you want to solve this inverse problem, so we can look at what is happening in the forward relationship. So, we have this arm matrix which we discussed in the forward tool in base coordinate frame as a function of joint variable q. So, now when

we do a forward kinematics for q is the joint variable here. So, q are the q the set of joint variable then we can actually represent the position p. So, this position vector p and its orientation or the end of this tool frame can be represented using this rotation matrix and the position vector r q and p q rotation vector. RQ and PQ rotation matrix and the position vector can be used to represent this. Now what is this P? P is basically the position of this point, position of this point P and represented in terms of PX, PY and PZ. So, we represent it as PX, PY, PZ and then we have a relationship PX is something, PX, PY is something this is what we get in the P x P y is something this is what we get in the forward relationship

and this will be a function of the Q. So, we know that it is a function of Q depending on the type of robot it may be a function of Q 1 to Q n and this also is a function of Q 1 to Q n. Similarly R also we have this as a vector I mean 3 by 3 matrix. So, you have the normal So, you have the normal approach in sliding vectors. So, you can call it as nx, ny, nz like that and each one also we saw that this also is a function of joint variables. So, nx is equal to function of joint variables, ny is a function of joint variables like that.

So, we have these equations available with us. Now, the question is how can we actually How can we actually use px suppose we know px how can I find q1 q2 q3. So, we have to start from the forward relationship and then solve this relation to find out the q. So, that is the requirement in inverse kinematics. So, given the desired position p and orientation r of the tool find values for the joint variables q which satisfy the arm equation. So, now if suppose this p is given to you now you want this p to be reached here. You say that this is the P which I want to reach and I have an orientation like this. If this is known, if this P and this RQ is known, how can I find this Q corresponding to this P and R? That

is the inverse problem. So, given a desired position P and orientation R for the tool, find values for the joint variables Q which satisfy the arm equation. So, this is the which satisfy the arm equation. So, this is the inverse kinematics problem ok. So, if I had to represent this relationship between the direct and inverse kinematics, you can see that if you have the joint space parameters Q, if you know this Q 1 to Q n that is we call the joint space, joint parameter or joint variables. Now, we use the direct kinematics or the forward kinematics to get the.

tool configuration space R n which actually is the P and R that is the position vector and the rotation matrix can be obtained. So, for any value of Q you will be able to get the position and orientation using the forward kinematics we call it as the tool configuration space. Now if you apply this inverse kinematics to this suppose you have you know P and R then You know P and R then you apply inverse kinematics and you get the joint space variables. So, use this tool configuration space information using inverse kinematics then get the joint space is the inverse problem. So, you can see that if we want to solve the inverse kinematics we need to have a direct kinematics relationship because that direct kinematics relationship is the one which is used to solve the inverse kinematics problem or we need

to know the forward relationship of the manipulator to solve the inverse kinematics and the arm matrix should be known to us ok. So, now look at the solubility of this relationship. So, as we know if P and R are known then we can use some method to solve for Q. So, that is the inverse requirement. Now, see how the P and R are represented. Suppose, we have this relationship for the arm matrix, it says that px, py, pz and nx, ny, nz, sx, xy, the normal sliding and approach vectors, normal sliding and approach vector and the position vector is the one which is given to us. Because we assume that we know this or this is known to us and we want to solve for the joint variables joint variables which corresponds to that one.

Now, in the case of normal case of forward kinematics, how is it represented? This px, py, pz will be represented like this. For example, I taken one robot configuration and for that robot, we will see that px is equal to this one and py is equal to this one and pz is equal to this one. So, we can see that there can be three relationship, three equations can be written for that particular manipulator can be written for that particular manipulator, we have a relationship at P X is equal to C 1 multiplied by something, P Y is S 1 multiplied by something and P Z is 215 minus something okay, so that is the three equation that you can have. Now similarly, we can write A X is equal to minus C 1 S 2 3 4, A Y is equal to minus S 1 S 2 3 4, A Z is equal to minus C 2 3 4, so like this we will see that we can actually get.

So, like this we will see that we can actually get 9 equations from here and 3 equations from here. So, we have totally 9 plus 3 12 equations from this matrix relationship. So, our matrix is given. So, for P x is equal to this P y is equal to this like this we have 9 plus 3 12 equations. And using this 9 plus 3 12 equations, we need to find the join variable. 12 equations we need to find the join variables q1 to qn. So, you have q1 to qn to be found out because if px is given suppose I have px is equal to 170 and py is equal to 50 and pz is equal to 50. Now, I have to write 170 is equal to this 50 is equal to this and 50 is equal to this and solve it to

find out what will be the values of theta 1 theta 2 etc which What will be the values of theta 1, theta 2 etcetera which satisfy this condition. So, that is the way how we need to look at this. So, we have 9 plus 3, 12 equations and n unknowns n may be 6 or 5 or whatever it is. So, we will see that there are 12 equations and you have n unknowns to solve. So, things seems to be simple because you have 12 equations simple because you have 12 equations and you have only n unknown this n will be normally 6 or 5 or whatever it is. So, that seems to be a easy problem to solve. But if you look at closely this one you will see that ok there are 12 equations and n unknowns and equal to 6 for a

6 axis robots. But if you look at closely this, these 3 equations you can say PX, PY, PZ they are independent because you can actually place the robot. p y, p z they are independent because you can actually place the robot in the position the end effector can be placed anywhere in the x y z plane within the work space so that it can be independent so p x, p y, p z there is no relationship directly as long as where you want to place it you can place. So you can actually get these three equations are independent they have three independent equations here but this nine equations they are not independent.

The reason is that this actually represents three vectors. The reason is that this actually represents 3 vectors, so this actually represents the normal vector, sliding vector and approach vector and they are orthogonal and of course they are independent vectors. But these 3 out of this nx, ny, nz they are not independent ok, there is a relationship between nx, ny and nz to satisfy this condition of the vector ok. So, nx square plus ny square plus nz square is equal to 1. similarly Sx square plus Sy square plus Nz square is equal to 1 and Ax square plus Ay square plus Nz square is equal to 1. So, that is the unit vector the three orthogonal directions. So, these three equations that you are seeing here these three equations are not really independent and similarly these three equations are not independent

these three are not independent. So, effectively we have only one equation from here which is independent. Effectively we have only one equation from here which is independent and this is only one equation from here and this one equation here. So, we can have only 3 independent equations from the rotation part. This rotation matrix gives you 3 independent equations though we have 9 equations since they are not independent what we can see is only 3 independent equations. So these 3 independent equations from this part and then 3 independent equations from This part and then 3 independent equation from the positioning part give you totally 6 equations.

So, you can actually get 6 independent equations from the arm matrix. So, using the arm matrix you will be able to get 6 independent equations to solve for the n variables. So, we have 6 equations now we have n variables. So, if the n is equal to 6 or less than 6, we can solve the problem. But when n is equal to 7, you would not be able to solve because you have only 6 equations and 7 unknowns cannot be solved. So, you need to choose one of this you have to select and then you have to get other 6. So, that actually leads to multiple solutions depending on the values of the first assumption. So, effectively we have only 3 independent equations and 3, 6 independent

equations and n unknowns and non -linear they are non -linear equations and then difficult to solve. So, 6 independent equations and n unknowns and non -linear equations. So, we need to solve them in order to get find out the joint variables, but they are not that easy to solve because they are non -linear equations and when n is more than 6, again you will have difficulty. So, that is the difficulty with the inverse kinematics or that actually tells you the solvability aspect of the inverse problem. We have 6 independent equations and n unknowns and the relationships what you are seeing here are the non -linear equations and not that easy to solve. Now, we have to see how

So, first thing we look at this is there a solution existing or not. So, we know that there are 6 equations and 6 unknowns suppose it is 6 n is equal to 6. So, we have 6 equations and 6 unknowns. So, we can actually solve the equation that is possible but whether there is a solution existing or not if there is a solution existing then only we can solve then only we can solve it. So, if we have to solve using the 6 equation first thing we need to ensure is that yes there is a solution existing for it and therefore start solving it and how do we ensure that there is a solution existing? So, we look at this a manipulatory solvable if all the sets of joint variables can be found corresponding to a given end effector location. So, a location is given to you and if you can find all the And if you can find all the joint angles

corresponding to that location then we call it as a solvable one that means you need to get all the sets of joint variables which can actually reach to that position and orientation. So, then if we can find it then we call it as a solvable. Now there are few conditions under which we can say this is possible ok. So, not all positions All positions are solvable and there are some position which cannot be sold also. So, first we look at what is the necessary condition to have a solution that is if you want to have a solution what is the minimum condition to be satisfied, what is the necessary condition to be satisfied. The first point is that suppose you have a robot like this suppose this is the robot and I

will say its workspace is something like I will say it is work space is something like this ok I am just roughly mentioning ok this is the work space that the robot is now as a programmer I may not be knowing that what is the work space it can reach or what is the all the points I may not be knowing suppose I give a position here maybe it may be possible to solve but if I have say that ok I want to reach this position then it is definitely not possible to reach this position. want to reach this position then it is definitely not possible to reach this position because it is beyond the work space of the manipulator. So, the necessary condition to have a solution is that it should be within the work space that is without that condition you cannot never can never solve the problem. So, first condition is that the tool point within the work space. So, the tool point what you have want to solve should be

within the work space that is the first condition. Now, we know that if I want to reach this position I will be able to reach this position and if I want to get a particular orientation also. So, I need to have a orientation decide orientation at decide position then I know that there should be 3 degree of freedom for positioning and I need to have another 3 degree of freedom for orienting that means I can get any orientation and any position and within the workspace you. I can get any orientation and any position and within the workspace using this 3 plus 3 degree of freedom that is 6 degree of freedom. Suppose I have only 5 degree of freedom suppose I do I do not have I mean I have only 5 degree of freedom then it is clear that I would not be

able to reach the orientation needed I can use the first 3 degree of freedom to reach the position but then I have only now left with only 2 degree of freedom out of 5 3 used for positioning. So, I have only 2 degree of freedom for orientation. out of 5, 3 used for positioning. So, I have only 2 degree of freedom for orientation. That means I would not be able to get all the orientations, I can control 2 orientation and the third one will be depending on the 2. So, I cannot really say all the 3 orientations I want and then only have only 5 degrees of freedom, it is not possible, then you would not be able to solve. So, that is the condition if n is greater than overall 6 to have any arbitrary orientation. So, if I had to have any arbitrary orientation of the tool, I need to have minimum 6 degrees of freedom or more than 6 degrees of freedom. I need to have minimum 6 degrees of freedom or more than 6 degrees of freedom, so if n is equal to 6 or more then I can have all the arbitrary orientation and if I have only 5 degrees

of freedom then I say that I need to get all the orientations it is not possible that means I would not be able to solve for any arbitrary orientation if there is a there is only 5 degrees of freedom or number of degrees of freedom is less than the less than 6. So, that is the second condition. necessary condition to have the solution. So, first condition is that the tool point should be within the workspace, the second condition is that n should be 6 if I want all the orientations achieved.

Now another condition is that the tool orientation is such that none of the joint limitations are violated. So, all the physical all the robots will be having some physical limitations All the robots will be having some physical limitations in joint movement. So, whether your wrist will be having roll, pitch and yaw axis and each one will be having some joint limits okay. So, maybe roll can have all the 360 degree but pitch and yaw cannot have 360 degree rotation because of the physical limitation. Now if your orientation says the orientation what you want actually can be achieved if Actually can be achieved if the joint limitations are violated or we will be getting a solution but if you say that the joint has limits then you would not be able to get the or the desired orientation. So, we need to ensure that the tool orientation is such that none of the joint limitations are violated. So, in these three conditions these

three necessary conditions to be satisfied if you want to get a solution or you to have a to make the manipulator solvable. that is the necessary condition. So, there are two kinds of solutions. So, if you know that this necessary condition is satisfied, then we can actually solve for this. We can solve for the solutions. And the two methods of solutions are one is known as closed form solution and the other one is numerical solution. So, closed form solution is that you can use the algebraic expression or the analytical expression that you already developed. using a forward kinematics. So, you can use these analytical expressions and solve for it that is basically known as the closed form solution. So, the analytical method can be used to

get a solution then we call it as a closed form solution. So, analytical method can be either this equations or you can have a geometrical method also. So, two methods are there either you directly solve this algebraic equations or you go for a Either you directly solve this algebraic equations or you go for a geometrical approach and then find out the possible joint angles which will provide the position and orientation. So, that is the closed form solution and the other one is known as the numerical solution where you do an iterative search and then find out the solution. So, you start with some value for each joint angle and then search all other joint angles which will actually lead to the decide. all other joint angles which will actually lead to the desired position and orientation. And if you do a search and at some point you will find that how this meets

the requirement. So that is the numerical methods which is an iterative and time consuming methods. So, whenever the closed form solution is not possible we have to go for time consuming method of numerical solution. Similarly, when you have large number of degrees of freedom you have freedom you have multiple solutions then also you may have to go for a numerical solutions to get a most feasible solution. So, how do we know whether there is a closed form solution existing or not that is the second question. So, the first question was that okay whether it can be solved or not now if it can be solved which method to be used whether we go for a closed form solution or a numerical solution and to get this closed And, to get this closed form solution we call there is a sufficiency condition we say

that there is a sufficiency condition to get a closed form solution. So, any manipulator can be solved for its inverse using closed form methods if it satisfy the conditions given here that is known as a sufficiency condition. The sufficiency condition says that if three adjacent joint axis are intersecting or three adjacent joint axis are intersecting or 3 adjacent joint axis are parallel to one another then we will be able to solve the inverse kinematics using the closed form methods.

And if this condition is not satisfied then you would not be able to solve it using a closed form method you need to go for a a numerical methods that is the situation or that is the condition let us say sufficiency condition. situation so that is the condition that say sufficiency condition where you can solve this using closed form methods. And what does it says suppose you have this axis like this you have one axis here one axis here and one axis joint here and all the joint axis are parallel then all the adjacent joint axis ok so all the adjacent joint axis are the three adjacent joint axis are parallel then you can. These are the three adjacent joint axis are parallel then you can have a closed form solution. Otherwise if the three adjacent joint axis suppose you have one axis here and then one

axis like this and one axis at this point which actually again intersect the these three. Suppose you have one axis and another axis here which actually like this then these three axis are intersecting if the three adjacent joint axis are intersecting then you will If the three adjacent joint axis are intersecting then you will be having a closed form solution. So this is the necessary sufficiency condition to get a closed form solution. So whenever you get a manipulator to be solved for inverse kinematics first thing you need to check is whether the closed form solution existing or not. If the closed form solution is not existing then you would not be able to solve it using algebraic or geometric method you numerical method only and from where this condition comes that you can actually see later when we try to solve. So, probably if you remember the

forward kinematic relationship if there are three adjacent joint axis you might have seen that it actually comes like theta 2 plus theta 3 plus theta 4 format or we write it as theta 2, 3, 4. So, that is the form it was coming in the arm matrix or the arm. So, that is the form it was coming in the arm matrix or the arm equation and that is the reason why we need to have this kind of parallel axis so that you will be getting it in the this format. So, it can actually be solved if they are not this way then you will be getting 2, 3 and then theta 4 as another one then you have to solve for 2, 3 and 4 separately that actually leads to problem in the solution. So, this will be more clear when we try to solve the equations but the relationship comes But the relationship comes from this, this condition comes from that

relationship developed or that actually happens in the forward kinematics. Similar is the case with the intersection also intersecting the joint axis okay. So these are the necessary and sufficiency condition for getting the solution. So necessary condition for existence of solution and sufficiency condition for existence of closed form solution okay. And as I mentioned there will be multiple solutions so when it is a redundant robots so when you have n is equal to 7 or more then we call it as a redundant robots because what you need in space is 6 degrees of freedom and if you have more 7 degrees of freedom or 8 degrees of freedom controllable degrees of freedom then it becomes a redundant robot. of freedom or 8 degrees

of freedom controllable degrees of freedom then it becomes a redundant robot. So, whenever the robot is redundant then you have multiple solutions because you can only 6 only you can solve. So, 7, 8 and all you need to make assumptions and then for each value of theta 7 or theta 8 you have to find for theta 1 to theta 6. So, that actually leads to large number of multiple solutions. And another one is the elbow up and elbow down solution which I already mentioned. So, you have an elbow up solution like this. So, you can actually reach this position from here or you can actually reach the position from here and this is the elbow up or elbow down solution that also leads to multiple solutions.

So, always there is no unique solution you will be most of the time you will be having multiple solution for the inverse problem. The inverse problem that talks about the basic requirements for the system to be solvable. Now as I told you in the closed form solution algebraic and geometric approach is there. So the algebraic approach is obtain the equations from the matrix so the 12 equation that we already mentioned so obtain the matrix equations the scalar equation from the matrix and then try to solve them that is the algebraic approach. and then try to solve them that is the algebraic approach okay and in this so at this geometric approach we will not be discussing because geometric approach normally more of a graphical approach so you know the position and orientation to be reached and you know the

link length and other orientation other parameters so you try to geometrically construct the manipulator position and orientation to see what position or in position Later position and orientation to see what position or position of this joints will actually reach the required position and then find out the joint angles corresponding to that. So we will not be going to that part we will be looking only at the algebraic approach. So here we do this by getting the scalar equations from the matrix form. So as I mentioned there will be 12 equations so we can actually write down 12 equations using the matrix that is the arm matrix. Now, these two dual equations always in the I mean

there are non -linear equations and it consists of rectometric identity parameters and therefore, we need to use some tricks to solve them. So, they cannot be solved easily there are lot of difficulties in solving this dual equations. So, we use some trigonometric identities. So, we use some trigonometric identities to combine two equations first square them and then add them and then eliminate certain variables. So, there are different tricks to be used for example you have something like A cos theta plus B sin theta and then so you can A1 B1 like this and then probably you can actually when you add them cos square theta plus sin square theta will come and then you will be able to eliminate some of these parameters Eliminate some of these parameters that is what actually

says such as first square them and add them and eliminate certain variables. So, the trigonometric identities are like sin square theta plus cos square theta is equal to 1. So, such trigonometric identities can be used and we can actually get them by combining equations. So, you square them add and you will get this and then you can eliminate some of the variables that is the trick one which we can use. And then the trick to be used is that you use the substitute. And then the trick to be used is that you use the substitution. So, you can substitute for this trigonometric variables with some other and then convert them into polynomials. So, the trigonometric equations can be converted to a polynomial and then solve the polynomial that is another way to solve it. So, for example, you substitute u is equal to tan theta by 2, then cos theta can be written as 1 minus u square by 1 plus u square and sin theta can

be written as. 1 minus u square by 1 plus u square and sin theta can be written as 2 u by 1 plus u square and then whenever the cos theta sin theta is coming you substitute these parameters and these values and then convert that into a polynomial equation and then solve the polynomial and then get the theta. So, finally we need to get the theta that is the trick too and then another trick to be used is that find out expression for both sin and cos of a joint angle theta. That find out expression for both sine and cos of joint angle theta, so you write sine theta you find out what is sine theta, suppose you want to sine theta 1 is equal to k and then you find out cos theta 1, so cos theta 1 you try to write it as square root of 1 minus k square, so that will be cos theta 1, so you have sine theta 1 and cos theta 1 and then use a function

called a tan 2 to get the theta value. So, a tan 2 cos sin theta cos theta. So, we write it as a function called a tan 2 function normal r tan is not used but instead we say a tan 2 function and that can actually give you a unique expression for theta. So, when you use the normal r tan so theta can actually be anywhere here but then when you use r tan it will not clearly tell in which quadrant it lies because r tan value will be. It will not clearly tell in which quadrant it lies, because arc tan value will be same but the quadrant will not be specified. But if you use an arc tan 2 function, A tan 2 function, you will be able to clearly tell which quadrant it lies. So, you will be able to get the theta value uniquely defined using arc tan 2 function. I will explain this when we consider the examples of how to use the arc tan

2 function, what is the importance of arc tan 2 function in solving these equations. So, to solve this equation we need to use some of this trigonometric identities or trigonometric tricks which actually helps us to simplify the equations and then solve them without much of difficulty. So, that is about the method or the way to solve the thing the inverse problem. So, let us take a very simple example of a a 2 degree of freedom planar. The simple example of a 2 degree of freedom planar manipulator ok. So, this planar manipulator is given with link length L1 and a link length L2 will say and this one is assume that this one is theta 1 and this one is theta 2

and as I mentioned the first thing to in order to solve the for the inverse kinematics you need to have the forward kinematics relationship kinematics relationship and that will give you the matrix. So, we will do the same process we assign the coordinate frame x0, y0, x1, y1, x2, y2, etcetera and then see how to get the forward kinematics. So, now we need to get this forward relationship, so I can take this as px, px1 and okay this is for, so the px is actually this one. ok this is for so the p x is actually this one so this is the p x and then this is the p y ok so this being a simple 2 degree of freedom planar manipulator will be able to write this p x and

p y very easily so p x can be written as l 1 cos theta 1 plus l 2 cos theta 1 2 similarly p y can be written as l 1 s 1 plus l 2 can be written as L1 S1 plus L2 S12. Now, we need to solve for theta 1 and theta 2. So, we need to find out for any value of px and py how can you get theta 1 and theta 2. So, that is the position part. So, we are looking only the positioning part here just to give the feel of how do we solve it. So, theta 1 and theta 2 is to be solved. So, here is equation 1 and this is equation 2. is to be solved. So, here is equation 1 and this is equation 2.

Now, how do we solve for theta 1 and theta 2 because we have only these 2 equation l1 c1 and l1 l2 c12 l1 s1 plus l2 s12. So, what we do we will try to see some of the we will try to use some of the tricks to solve this. So, one of the tricks is basically to square and add these 2 equations. So, if I write down as p x square plus p i square. plus pi square. So, if I square and add them then I will be able to write this as like this px square plus py square is equal to l1 square plus l2 square plus 2 l1 l2 c2 because l1 c1 square and l2 c2 l1 l1 s1 square will actually become l1 square and similarly get l2 square plus 2 l1 l2 c2 and we can get c2 as px square plus py square minus l1 square.

by L1 square, L2 square to L1 L2. So, we have solved for C2. So, once we have C2, we can find out theta 2, we need to find theta 2. So, instead of using directly cos inverse, we do not use a cos inverse to get theta 2, because that will not tell you in which quadrant the theta lies, because at the 4 quadrants we want to clearly get which quadrant theta is lying and therefore, what we do we will try to find out S 2 from here. So, S 2 can be obtained as square plus or minus square root of 1 minus C 2 square that is the way how you can get the S 2 and once we have S 2 and C 2 then we get theta 2 as a tan 2.

S 2 C 2. So, this is the way how we can get theta 2 and why we are going doing this because as I mentioned the function A tan 2 A tan 2 denotes a 4 quadrant version of arc tan function ok. It allows us to recover angles over the entire range of minus pi to pi. So, it will clearly tell between pi and minus pi what is the value ok. and how is it doing this a tan 2 function so if suppose it a tan 2 x y so if you take a tan 2 x comma y so it will look at the values of x and y and then decide which coordinate lies so if x and y are 0 then it is indefinite x is greater than 0 y is equal to 0 then a tan 2 is 0 then x greater than less than to

0 then eta n 2 is 0 then x greater than less than 0 sorry yeah less than 0 and y is 0 then eta n 2 is pi and if y is less than 0 then minus pi eta n 2 is 0 it lies between 0 and minus pi if y greater than 0 then it is between pi and 0 and pi so this way it clearly tells you which quadrant it lies between 0 and minus pi or minus pi and 0 and pi or 0 and minus pi. So, this way you will be able to get.

the theta clearly defined within this 4 quadrants. So, that is why we go for a tan 2 function instead of going for a cos inverse or a sin inverse or simple a tan function. So, this is the way how we need to get theta 2. So, we will get theta 2 using the a tan 2 function. So, S 2 is plus or minus square So, s2 is plus or minus square root of 1 minus c2 square and theta 2 is a tan 2 s2 c2 and now we can see because there will be two values for s2 you can get two values for s2 so one is for plus and one is minus now you will be getting two values for theta 2 also you will get theta 2 for one value of s2 and theta 2 for another value of s2. Now if both the values are actually lying within the joint limits of the manipulator then you have to take both the values as

a solution. join limits of the manipulator then you have to take both the values as a solution and if one is outside the join limit then you can eliminate and then proceed to select the find the next join angle. But if both are in the join limits somehow both happens to be in the join limit that shows that there can be 2 ways theta 1 value and theta 2 in this case and you have to use both the values for solving the next join angle. So, you will be getting multiples. both the values for solving the next joint angle. So, you will be getting multiple solution that way. So, that is how do you get, who you get the theta 2. Now you need to solve for theta 1. So, you have to substitute for this P x value P x L 1 C 1 plus L 2 C 1 2 that relationship and then solve it for the joint angle next joint angle, ok. So, we will

take a more complex one and then go to the. solution, okay this one I just wanted to tell you how do you use the the tricks to solve for the joint angles. So, we will see look at the solving for theta 1 and other joint, I mean if you have more joint angles how do you solve. So, we will take more complex problems and then try to solve it, okay. So, this is the the 3 degree of freedom case. So, we assume that there is another joint here which actually So, we assume that there is another joint here it is actually projecting out in this manipulator is projecting out from the plane and with the distance d3 and then you have this other joints 1, 2 here joint 1, joint 2 and you have another joint ok. So, here since it is

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent