Jacobian computation

This notebook illustrates computation of the Jacobian through velocity iteration and direct differentiation of the forward kinematics of a simple 2-link manipulator. This notebook assumes that the definitions in "velocity_kinematics_defs.nb" have already been evaluated.

Short hand display function

Nice[m_] := m // MatrixForm  //  
          TraditionalForm;
TF :=  TraditionalForm;

DH parameters (two-link planar manipulator)

DH  =  {{0, 0, 0, θ1, 0}, {0, L1,  0,  θ2, 
            0},  {0,  L2,  0,  0, 0}}; 
DH  // TF

Velocity recursion summary

\(TraditionalForm\`\(\(\^0\)\(ω\_\(\(\ \)\(3\)\)\)\)\)

ω[DH, 0, 3]  //  Nice

\(TraditionalForm\`\(\(\^0\)\(v\_\(\(\ \)\(3\)\)\)\)\)

v[DH, 0, 3]  // Simplify //  Nice

Jacobian computation

From velocity recursion

j1  =  
        Jacobian1[DH, 0, 3]  // Simplify;
j1  //  TF

From differentiation of forward kinematics

j2  =  Jacobian2[DH, 0, 3]; 
j2  //   TF

Are they the same?

j1  //  TF

j2b  =  j2  //  Simplify;
j2b  //  TF

j1  ==  j2b

Step-by-step derivation of Jacobian from forward kinematics

Homogeneous transform

T03  =  
        T[DH,  0,  3]  //  FullSimplify;
T03  //  TF

Position vector from homogeneous transform

P03  =  PFromT[T03]; 
P03  // Nice

Differentiation of position vector ( 3x2 linear velocity submatrix of Jacobian)

vj2  =  
        Outer[D,  
          P03,  {θ1,  θ2}]; 
vj2  //  TF

Rotation matrix from homogeneous transform

R03  =  RFromT[T03]; 
R03  //  TF

S(Ω) = \(TraditionalForm\`\(\(\ \)\(\(R\& . \) R\^T\)\)\)(3x3 angular velocity, skew-symmetric matrix)

SΩ  =  
        Dt[R03,  t] . Transpose[R03]; 
SΩ  //  TF

S(Ω) = \(TraditionalForm\`\(\(\ \)\(\(R\& . \) R\^T\)\)\)(simplified)

SΩ  =  
        SΩ  //  FullSimplify; 
SΩ  //  TF

Corresponding angular acceleration vector

Ω  =  {SΩ[[3, 2]],  
          SΩ[[1, 3]],  
          SΩ[[2, 1]]};
Ω  //  Nice

3x2 angular velocity submatrix of Jacobian

ωj2  =  
        Transpose[Coefficient[Ω,  
                Dt[#,  
                  t]] &  /@  {θ1,  θ2}];
ωj2  //  TF

Put linear and angular velocity Jacobian together

j2b  =  Join[vj2,  ωj2]; 
j2b  //  TF

Compare to previous result

j1  //  TF