# Robot Geometry

**Taught by: Dr. Carl Crane**

**Taken: FS 2015**

**Text: Kinematic Analysis of Robot Manipulators**

*by: C. Crane and J. Duffy*

## Table of Contents

- Coordinate Systems
- Homogeneous Coordinates
- Coordinate Transformations
- Links
- Joints
- Kinematic Chains
- Forward Analysis
- Reverse Analysis
- Mobility
- Planar Representation
- Equivalent Spherical Mechanisms
- Group One Solution Process
- Group Two Solution Process

## Coordinate Systems

- A single coordinate system (A) defined by and
- is the origin of the A coordinate system
- are all unit vectors and are dimensionless because they represent direction not length
- In the B represents what coordinate system the values are being given for and the A represents that the vector is the unit vector in the x direction in the A coordinate system
- = Vector in coordinate system A pointing from the point to the point
- = Point as seen from coordinate system A
- =

## Homogeneous Coordinates

- Four coordinates to define a vector (X, Y, Z, w)
- X =
- Y =
- Z =

- Advantage of using homogeneous coordinates is that as w goes to zero the vectors point to infinity therefore there are unique vectors that point to infinity

## Coordinate Transformation

- Used to determine the position of a point from one coordinate system to another
- Ex. point 1 may be defined in coordinate system B and it is desired to know the location of point 1 in coordinate system A

- To completely define the location and orientation from one coordinate system to another 6 values are needed (6 degrees of freedom)
- Can use the vector pointing from the origin of one system to another to provide the translation information (Provides 3 of the 6 values)
- Can use Euler angles to provide orientation information where each angle accounts for a rotation around one of the primary axis (Provides the remaining 3 of the 6 values. This method is not going to be utilized in this class)
- Orientation information can also be provided by the following three unit vectors:
- Each vector provides three values for a total of nine values, however, they are constrained by having their magnitudes equal to one due to being unit vectors and all three are perpendicular to each other so their dot products equal zero

- The three unit vectors along with the vector pointing from the origin of one system to the origin of the other will be used in the class to completely define the position and orientation of one coordinate system to another (, )

## Rotation Matrix and Example

- Consider two coordinate systems A and B and point 1 where are given values and you need to find the location of point 1 defined in the A coordinate system ()
- Breaking into its component gives
- The vector from the origin of the B system to the point 1 can be defined in the A coordinate system as follows: or
- Vector can then be defined as =

- If we then define where is the 3x3 rotation matrix from system B to system A we can further simplify the previous result to
- To reverse the direction of a rotation matrix simply take the transpose of the original matrix ()

- This is saying that

## Transformation Matrix

- Coordinate system transformations with rotation matrices can be further simpified by using homogenous coordinates and defining a transformation matrix as

- The coordinate transformation can then be re-written from to
- It is desired to reverse the direction of a transformation matrix (from to )

- Start with the given transformation matrix we have knowledge of and
- For the new matrix we will need and
- It is known from the properties of rotation matrices as shown above that the rotation matrix in the reverse transforming direction is the transpose of the original rotation matrix

- =
- The general equation for transforming a point (1) from coordinate system A to B is
- Taking the above equation and using it to find coordinate system B's origin as seen from the A system gives the following equation where

- Now solving for the desired gives or
- Now the unknowns are in terms of the known values and the new transformation matrix can be written in the form shown above

## Rotation Around a General Vector Passing Through the Origin

- The rotation matrix for a rotation, , around a general vector, , passing through the origin is:

- Where , and

## Formula Derivation

- It is desired to find the rotation matrix from coordinate system A to coordinate system B after a rotation about a generic vector
- To begin consider a coordinate system C whose z-axis is along the vector (the location of the x and y vectors will be arbitrary)
- The rotation matrix from C to A can then be defined as
- Now consider coordinate system D which is obtained by rotating coordinate system C about its z-axis by degrees
- The rotation matrix from D to C would then be defined as
- Taking note that coordinate system B will have the same relation to coordinate system D as coordinate system C has to coordinate system A, the relation exists
- The desired rotation matrix can now be found by a series of matrix multiplications:

- Unfortunately we do not have values for or and because we chose the x and y axes for coordinate system C arbitrarily and so we will need to find a way to cancel them out of the resultant matrix
- In order to simplify the terms in the rotation matrix we will use the geometric meanings of the rotation matrix with matrix
- First each row in a rotation matrix represents a unit vector and so the dot product of one of the rows with itself equals one (using matrix )

- This rule should simplify all of the terms along the diagonal of rotation matrix to the form or
- The second geometric meaning of the rotation matrix that is going to be utilized is that all of the rows in the matrix represent vectors that are orthogonal to one another and therefore their dot product will equal zero

- The last geometric meaning of the rotation matrix that we are going to use is that the columns of the matrix represent vectors chosen using the right hand rule and therefore the cross product of the first two columns equals the third column

- Using the second two rules the formula for the rest of rotation matrix can be simplified to the general form shown at the beginning of this section

## Common Rotations

- Rotation around the x-axis:
- Rotation around the y-axis:
- Rotation around the z-axis:

## Find Vector and Rotation Angle from the Rotation Matrix

- For the rotation matrix about a general vector passing through the origin, using the notation
- Adding all of the elements in the diagonal gives where vector is a unit vector ()

- To find the values of the vector m use the equation of the form for and

- This simplifies to
- Example
- Exception is

## Links

- Links are rigid bodies that maintain orientation between two axes
- The two axes (, ) contain a unique perpendicular between them () where is defined as the link length
- If and intersect, then the link length is zero
- The length is positive if chosen in such that it points from to

- The angle from to using the right hand rule with one's thumb on is defined as , where is called the twist angle
- It is common to replace all of the links in a system with their equivalent kinematic link
- Kinematic link is represented by drawing just the / axes and the link length

- Two special link cases are spherical links and planar links
- In spherical links intersects and
- In planar links is parallel with and

## Standard Link Coordinate Systems

- The standard link coordinate system for link ij has its origin at the intersection of and , it's x-axis along the vector and it's z-axis along the vector

- The y-axis is determined using the right hand rule
- Figure taken from lecture powerpoint

## Joints

- There are two main values that define a joint: the joint offset distance () and the joint angle ()
- The joint offset distance is the unique perpendicular between and
- The joint offset distance has no sense of direction and is therefore simply a scalar value not a vector

- The joint angle is defined by the right hand rule with thumb on and sweeping from to
- All joint pictures were taken from the lecture powerpoint

## Revolute Joint, R

- Revolute joints only allow rotation between the links (1 degree of freedom)
- Joint offset distance is fixed and joint angle is variable

## Prismatic Joint, P

- Prismatic joints only allow translation between the links (1 degree of freedom)
- Joint offset distance is variable and joint angle is fixed

## Cylindrical Joint, C

- Cylindrical joints allow translation and rotation between joints (2 degrees of freedom)
- Joint offset distance is variable and joint angle is variable

## Screw Joint, H

- Screw joints allow translation and rotation (1 degrees of freedom bc the two variables are not independent)
- Both the joint offset distance and joint angle are variable but they are not independent of one another

## Plane Joint, E

- Plane joints allow 2 degrees of translation and one degree of rotation (3 degrees of freedom)
- To make plane joints easier to analyze they are simplified to two prismatic joints and a revolute joint

## Hook Joint, T

- Hook joints allow rotation around two axes (2 degrees of freedom)
- A simplified view of hook joints is that it's a combination of two revolute joints
- For a hook joint and

## Spherical Joint, S

- A spherical joint allows rotation about all three axes (3 degrees of freedom)
- For analysis purposes spherical joints are replaced by three revolute joints
- With spherical joints the , and intersect resulting in

## Kinematic Chains

- When labeling a kinematic chain of links start by defining the vectors and then the vectors
- Next you can define all of the twist angles and joint angles

## Standard Fixed Coordinate System

- The standard fixed coordinate system is used to define the location and orientation of the first link relative to the ground which in turn defines the rest of the links
- The origin of the standard fixed coordinate system is at the intersection of and
- The z-axis of the standard fixed coordinate system () points along and the directions of the x and y axes are chosen at will as long as the system remains right handed ortho-normal
- The angle from to is labeled instead of

## Forward Analysis

- The objective of forward analysis is to find the position and orientation of the end effector in the fixed standard coordinate system of a kinematic chain given the link lengths, twist angles, joint offset distances and joint angles

- Where and are and , and are and and is the joint offset distance
- The location and orientation of the last link as viewed from the fixed reference frame can then be found by the series of matrix multiplications:

## General Link to Link Transformation Matrix Derivation

## Reverse Analysis

- The objective of reverse analysis is to find all of the variable joint parameters that will position the robot such that its tool has the desired position and orientation as viewed from the fixed reference frame

Iterative Technique

- For a standard 6 link robot with all revolute joints, the transformation matrix relating the fixed coordinate system to the last link can be found by the series of matrix multiplications:

- Each transformation matrix corresponds to a specific variable joint angle ()
- The iterative technique consists of making a guess as to the variable joint angles then using forward analysis to find a matrix then that matrix is compared with the desired matrix

- Based on the comparison the guesses for the variable joint angles are adjusted and the process is repeated
- This process can be optimized using an objective function
- The iterative technique is not a very direct process for doing analysis and so this will not be the prefered technique for the class

Hypothetical Link Technique

- This technique consists of adding a hypothetical link to the kinematic chain that connects the last link (link 6) to the ground to make the chain a closed loop resulting in only 1 degree of freedom for the chain
- For the new hypothetical link 7 we will need values for and which we will be free to choose

- Convenient to choose and because then
- This set up leaves three angles and three distances that need to be solved: , , , , and
- All vectors mentioned in the following process are unit vectors
- The first step in solving for the unknowns is using the definition of dot product with vectors and to find

- Keeping in mind that and are unit vectors therefore thier magnitudes are one
- If is close to 0 or 180 degrees then a different set of steps from the ones that are about to be presented will need to be followed
- The next step is to determine the vector and this can be accomplished by taking the cross product of the and vectors and then dividing by the magnitude of that cross product to ensure that the vector is unit length

- Now using the properties of dot products and cross products and can be determined where

- Both dot product and cross product definitions are needed because individually and give two different answers but when compared together only one answer emerges
- Now that the three unknown angles and the direction of vector has been obtained the three unknown distances need to be found: , and
- To find these distances we will use the vector loop equation for the following closed loop:

- Technically this is a series of 3 equations with 3 unknowns and therefore can be solved as is, however, this class includes a derivation of an equation for each unknown
- To begin the derivation for an expression for we take the cross product of each term in the preceding equation with vector

- Note that the vector crossed with itself is zero and so the last term goes away
- Also note that is equivalent to by definition of how we set up the vectors
- Now take the dot product of each remaining term of the expression with the vector

- First take note that when the dot product of the vector is taken with itself it equals one and so all vectors in that term drop out
- Next take note that the cross product between and produces a result vector perpendicular to those two vectors and so when the dot product of that result vector and is taken the result is zero and so the last term drops out of the above expression
- The final expression is then only in terms of known values and can be rearranged to solve for

- The same process is followed to find the other two unknown lengths and the resulting expression are as follows

Special Case 1: and are Parallel

- As mentioned above, problems are encountered when is very close to either 0 or 180 degrees
- The first step to solving special case one is to set equal to zero ()
- The vector loop equation from above therefore simplifies to the following expression

- Now take the dot product of each term in the vector loop equation with vector

- The vectors and are perpendicular and so their dot product is zero and therefore the middle term goes away
- The dot product of vector with itself is one and so the vectors drop out of the last term in the expression
- Simplifying the above expression for the length gives the following expression

- Now we rearrange the vector loop equation so that the terms are all on one side

- From the expression the length can be found by recognizing that it represents the magnitude of the left hand side of the equation

- If then problems arise and the process has to move to special case 2
- Using the same expression above where the terms are isolated, the unit vector can be found by dividing the left hand side of the equation by length

- Now the same series of sin and cos equations as the normal case can be used to find the remaining angles and

Special Case 2: and are Parallel and

- If and are Parallel and then we set and
- This makes
- The remaining value to find is the angle which is found using sin and cos as it was for the normal case and special case one

- The hypothetical link technique including the special cases can be summarized in the following flow chart taken from the lecture slides

## Mobility

- Mobility is the determination of the degrees of freedom of the system
- For unconnected non-fixed bodies the mobility of the system is
- For unconnected bodies with one fixed to ground the mobility of the system is
- For a system of bodies with one fixed to the ground and the rest connected by joints the mobility of the system can be represented by
- This equation does not hold for all cases but in general should be appliciable

- For a closed loop system the number of bodies is equivalent to the number of joints () and the mobility expression simplifies to
- For an open loop robot there is one fewer joint than the number of bodies () and the mobility expression simplifies to

## Planar Representation

- For convinence a 2D representation of a kinematic chain can be used instead of the 3D model
- When creating the planar representation simple lines will represent each link and each joint will be denoted with its shorthand letter
- In addition the grounded link can be denoted using the standard ground notation and the input and output angles of the system can be marked

## Equivalent Spherical Mechanisms

- The equivalent spherical mechanism of a closed loop spatial mechanism will hold all twist angles constant and the and vectors will remain parallel to their equivalents in the spatial mechanism, however translations will not be accounted for
- The result is that any relations for the and angles found in the spherical mechanism will also be valid in the closed loop spatial mechanism

- The vector is perpendicular to the plane formed by vectors and
- The angle between the plane containing vectors and and the plane containing and is

Create Equivalent Spherical Mechanism

- The first step to creating an equivalent spherical mechanism from a closed loop spatial mechanism is to take all of the vectors and give them the same origin point
- Now simply draw links lying on a sphere centered at the origin to hold the twist angles ('s) constant and connect them using revolute joints irregardless of what the joint was on the original closed loop spatial mechanism

- Prismatic joints become a revolute joint with a fixed joint angle

Spherical Mechanism Groups

- The mobility of the spatial closed loop mechanism is 1 by definition and there are different categories of spherical mechanisms depending on what is their resultant mobility
- The mobility of spherical mechanisms can be defined as
- Spherical mechanism groups are defined by their mobility

- Ex. Group 1 spherical mechanisms have
- Only goes up to group 4 because you end up with limitations on the ability to create a closed loop spatial mechanism with a mobility of one
- The spherical mechanism gets more difficult to solve for higher mobility in the mechanism (larger group number)

- The goal of the analysis now is to find all of the and vectors in the first coordinate system

Find

- The first vector is already defined based on how we defined the standard coordinate systems

Find

- To find the direction of vector in the first coordinate system we will use the rotation matrix that can be pulled from the transformation matrix derived in the forward analysis section

- Using the rotation matrix the vector can be found in the first coordinate system by the following expression

Find

- To find the orientation of the vector in the first coordinate system we can use the expression

- Note however that should give the same result vector as with the indices increased by one
- When that vector is multiplied by matrix the following vector is the result

Single Subscript Notation

- As can be imagined the result of the further vectors will become increasingly complicated and so a short hand notation has been developed to simplify the expressions

- For single subscript notation three different terms are created (, , ) and will have different meanings based on their subscript and whether or not they have a bar

- For , the single subscript notation will involve and and the order of the angles depends on whether or not the , , terms have overbars

- For no bar will be placed next to the terms (the right side terms) and the angle will fill in the remaining terms

- Notice is the first term encountered in the figure when traveling in the no bar direction
- With bar will be placed next to the terms (the right side terms) and the angle will fill in the remaining terms

- Notice is the first term encountered in the figure when traveling in the bar direction
- The subscript in single subscript notation indicates which theta is included in its terms

Rewrite

- With the formation of single subscript notation notice that the vector can be rewritten as the following

Find

- The dirction of the vector in the first coordinate system can be found by the multiplication of the series of rotation matrices

- Note that by similarity the expression for in the second coordinate system is the same as the expression for in the first coordinate system with subscripts increased by one

- When is multiplied by the rotation matrix to transition to the first coordinate system the following expression emerges

Multi-Subscript Notation

- Just like before a new notation is going to be introduced in order to make keeping track of the multitude of terms easier
- The general form for multiple notation is presented below

- In the above expressions the subscript a represents all but the last of the subscripts for that variable and b represents the last subscript

- Ex. a = 43, b = 2
- Ex. 2. a = 234, b = 5
- The subscript means that the subscript will be and what ever the next number will be in the order of the subscripts whether that be ascending or descending

- Ex.
- Ex. 2.
- For double subscript notation the order means the , , terms will not have bars and the order means that they will have bars, where

Rewrite

- The term can be simplified with the newly defined multisubscript notation to the following

Find , and

- Now that multi-subscript notation has been developed it is simple to represent the rest of the vectors in the first coordinate system

Find

- The vector is already defined by how we set up the standard coordinate systems

Find

- To find the orientation of the in the first coordinate system we will use a the rotation matrix

- We can now find the desired vector in the first coordinate system

Find

- For the next a vector we can begin by noticing that rotating the vector to the second coordinate system will have the same result as the last vector with all of the subscripts increased by one

- Now the rotation matrix will be used to find the orientation of the vector in the first coordinate system just like in the pervious case

Double Subscript Notation for Terms

- Looking at the result vector one would notice a similarity between it and the short hand notation used for the vectors, however, there are now thetas in the place of the alphas and vice versa and so we will now define a new set of notation
- We will begin with the definitions for the new notation

- Where does not have to be smaller than , it just represents the order of the subscripts
- The subscripts now represent the alpha contained by the notation instead of the theta like the previous notation

Rewrite

- Using the newly defined notation the vector can be rewritten

Rewrite Through

- Rather than go through the process of defining the rest of the vectors individually we note that they all follow the format of the above vector and simply add a subscript for each successive vector

Spherical Mechanism Equation Toolkit

- The next thing to do is to find expressions for each of the and vectors for different spherical mechanism configurations. The process starts by looking at a spherical triangle and adds a link for analysis until a spherical heptagon is reached.
- For each configuration the vectors are rotated into different coordinate systems and these representations are equated with the vectors found previously to create a "toolbox" of equations to use when solving problems.

- Note that each of these equations will be different for each spherical mechanism configuration (spherical quadralateral tools spherical hexagon tools)

Example results

- For a spherical triangle

- This process results in lots of equations and for brevity sake they will not be listed here. If needing the equations they are listed out in full in the appendix of the textbook

Solve

- Problems of this form develop when attempting to solve group 1 spherical mechanisms
- Two different methods were discussed in class where one is the "better" method

Tan-Half Angle Method

- This method begins using the tangent half angle trig identity

- Substituting these values into the original problem results in the following expression

- After multiplying through by and regrouping by the x terms the following quadratic equation emerges

- The quadratic formula can now be used to solve for x which can in turn be used to solve for
- Potential problem points for this solution process are as follows:

- The term under the radical can be negative leading to non-real solutions

- This is a symptom of not having a feasible link configuration and not necessarily a problem with the solution method itself
- There could be a divide by zero error if

- This is an issue with the solution method and not the mechanism itself

Trig Solution Method

- The second solution approach involves a few trig identities in its derivation
- The first step in the process is to divide each term in the equation by the root of

- Now we note that the sum of the first two coefficients squared is equivalent to one due to the fact that it is adding together the components of the denominator

- The next step is to turn the above fractions into sine and cosine by keeping in mind the following trig identity

- We can therefore rewrite the fractions as follows

- These definitions are used to determine the value of angle
- Using these new terms the original equation can be rewritten as follows

- Note that the angle has not much of a physical meaning but is just a term used in the solution process
- By moving the non-trig term to the other side of the equation the remaining trig terms form the difference between two angles identity

- Now arccosine can be used to determine what the difference in the two angles are

- If the link lengths are unfeasible then this is the step that will encounter problems as the argument in will not be between -1 and 1
- This will provide an A case and a B case and the corresponding values can be found by the following

- This is considered the better solution approach as it only encounters problems for infeasible link lengths rather than also having a problem inherent to the solution approach

Spherical Pentagon Example

- For the example the following values are given

- The goal to solve for the following angles

- Any of the desired angles can be the first found angle and in this example we will start with finding
- When looking in the spherical equation "toolkit", the following expression is found that can be used to solve for

- The only unknown value in the above expression is the desired
- Only a single cosine expression was found for meaning that there will be A case and B case possibilities
- With found the remaining values will be easy to obtain
- To find the remaining unknown angles we can use the "buddy" equations or the and terms with the same subscripts as the left hand side term in the expression finding the original theta
- To find the following two equations will be used which will lead to only one result for the input numbers thereby not increasing the number of solution "cases"

- This will lead to A case and B case values for
- The same "buddy" equations can be used to find when the left hand side subscripts are reversed

- This will lead to A case and B case values for

## Group One Solution Process

## Group Two Solution Process

Form System of Two Equations

Projection of Vector Loop Equation

Self-Scalar Product of Vector Loop Equation

Secondary Cosine Laws

Dual Numbers

Dual Angles

Solve

Sylvester's Method

Bezout's Method