 Karni, working as an assistant professor in Department of Mechanical Engineering at Vulture Institute of Technology, Solapur. In today's session, I will be dealing with you the inverse kinematics of a robot. So, at the end of this session, the students will be able to understand and visualize the inverse kinematics of 2R that we call as jointed arm configuration. So, what is inverse kinematics is that the inverse kinematics problem consists of determination of joint variables corresponding to given end effectors orientation and position. What we are given is in forward kinematics, what we can find is the end effector position and orientation. What we are given is joint angles. All the joint angles are given in forward kinematics. In inverse kinematics, it is a completely opposite term. What we are given is the end effector position and orientation that is the end effector configuration is given. What we are required to find out is the joint angles. The joint angles that is theta 1 and theta 2 that we are required to find out. So, this is a completely opposite problem as compared to the forward kinematics, but this is a more complex problem. Why? Because the algebraic equations that are to be solved while doing the inverse kinematics, they are in general non-linear. And thus, it is always not possible to find a closed form solution. So, every time a solution may not exist. Sometimes multiple solutions may exist, more than one solution may exist. Sometimes infinite solution may exist. In some cases, there might be no admissible or feasible solution. So, these are some problems that may be encountered while solving the inverse kinematics problem. So, this is the 2 R manipulator that we are accustomed to. The link lengths a 1 and a 2, they are prescribed. The end effector position that is x comma y that is also given E of x comma y. So, this distance is y and this distance is x. So, this is already given. What we are required to find out is the angles joint angles theta 1 and theta 2. So, these 2 angles we are required to find out in an inverse kinematics problem of 2 R manipulator. So, how we are going to deal with it? So, from forward kinematics of 2 link planar jointed arm configuration, we have this data that is x the end effector position x that is a 1 c 1 that is a 1 cos theta 1 plus a 2 cos theta 1 plus theta 2 and y that is a 1 s 1 plus a 2 sin theta 1 plus theta 2. If you square and add both these equations, if you add both these equations, so x square plus y square, if you square and add the left hand sides x square plus y square and on the right hand side this term square a 1 c 1 plus a 2 c 1 to whole bracket square plus a 1 s 1 plus a 2 s 1 to whole bracket square. By using a plus b bracket square formula, so this is first term square, this is second term square, this is 2 into first term into second term. Similarly, the second term square first term square plus second term square plus 2 into first term into second term. These are the two brackets expanded. Next, if you take a common of this term that is a 1 square plus c a 1 square c 1 square and a 1 square s 1 square. So, the common term is a 1 square that is taken as common in the bracket c 1 square plus s 1 square it is written here. Similarly, in this term and this term a 2 square s 1 to square and a 2 square c 1 to square a 2 square can be taken as common c 1 to square plus s 1 to square. Similarly, in the last term 2 a 1 a 2 can be taken as common c 1 c 1 2 plus s 1 s 1 2. This is the term that is in the bracket. So, on the left hand side x square plus y square can be taken here a 1 square into cos square theta plus sin square theta. We all know that it is equal to 1. So, a 1 square into 1 it is 1 plus a 2 square again cos square theta plus sin square theta it is 1. So, it can be written as a 2 square plus 2 a 1 a 2. Now, here what happens is c 1 into c 1 2 plus s 1 into s 1 2. So, these are cos a cos b plus sin a sin b. So, these are the this is the formula of cos a minus b. So, a term is this and b term is this. So, a minus b will come as 1 plus 2 minus 1. So, this is the first term cos a and this is the second term b. So, what will remain is only c 2 that I have written here. So, 2 a 1 a 2 c 2. Now, only c 2 we will take on one side and rest terms we will transfer it to other side. So, c 2 will become x square plus y square minus a 1 square minus a 2 square divided by 2 a 1 a 2. This is the formula we get during the solution. Now, theta 2 that can be written as plus or minus cos inverse of x square plus y square minus a 1 square minus a 2 square divided by 2 a 1 a 2. This is the solution that we get of theta 2. Next, we do some general construction that is we extend this link up to point b. We draw a perpendicular from the end effector from e to this link and we know that this angle is theta 1 and this angle is theta 2. Afterwards, what we do is we represent this angle as beta and this angle as gamma. Now, theta 1 can be considered as gamma minus beta. So, we are interested to find out gamma and beta. Now, in triangle a e b, in triangle o e b tan beta. So, tan beta, we consider as triangle o e b. So, tan beta can be considered as opposite upon adjacent. So, tan beta is e b upon o e. So, e b can be considered as a 2 sin theta 2. So, e b can be considered as a 2 sin theta 2 that is this point and o b can be considered as a 1 that is this plus this. So, a 1 plus a 2 cos theta 2. So, o b can be considered as a 1 plus a 2 cos theta 2 that I have written here. Now, beta can be written as tan inverse of a 2 sin theta 2 upon a 1 plus a 2 cos theta 2 that is the solution of this problem. Similarly, in triangle o e c, I will just take back here, in triangle o e c the bigger triangle o e c, in triangle o e c the tan gamma can be written as y upon x tan gamma can be written as y upon x. So, gamma we can write as tan inverse of y upon x. Now, as theta 1 is gamma minus beta, we can write as tan inverse of y by x minus tan inverse of a 2 sin theta 2 upon a 1 plus a 2 cos theta 2. So, this is the formula of theta 1. So, if we take one problem which has a 1 as 400 mm, a 2 as 500 mm, x as 500 mm and y as 600 mm, x and y are the end effector position and we are required to find out the solution. So, as we know theta 2 is plus or minus cos inverse of x square plus y square minus a 1 square minus a 2 square. So, substituting the value of x as 0.5 meter, y as 0.6 meter, a 1 as 0.4 meter and a 2 as 0.5 meter, we get theta 2 as plus or minus 60 degree. Similarly, if we take theta 2 as plus 60 degree and substituting the equation of tan inverse of y by x minus tan inverse of a 2 sin theta 2 upon a 1 plus a 2 cos theta 2, we will get theta 1 as 16.53 degree. If we take theta 2 as minus 60 degree, we will get again substitute theta 2 as minus 60 degree in equation theta 1. We get theta 1 as 83.86 degree. Now, if we solve this problem using robo analyzer software, I will directly go to inverse kinematics and change it to 2 r planar and link lengths I will set as 0.4 and 0.5 and the end effector position as 0.5 and 0.6 and just click on inverse kinematics, you will get the same answer as we have got in the analytical method. So, theta 2 is plus 60, minus 60, theta 1 for plus 60 is 16 and theta 1 for minus 60 is 83.86. So, this is the solution that we have got. So, thank you.