Kinematics, Jacobian, Dynamics and Control - Planar RR Robot Example

Yu Chung (Paul) Lee

Department of Electrical and Computer Engineering

The University of British Columbia
The University of Hong Kong

Version 1.6, 2026

Disclaimer: These notes referenced the contents of UBC robotics course by Prof. Tim Salcudean,
ISU Tutorial on Robotic Manipulator Control by Prof. Yan-Bin Jia, and ChatGPT.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Table of contents
  1. Mass-Spring-Damper System
  2. Mass-Spring-Damper Control
  3. PID Control
  4. Planar RR Robot
  5. Forward Kinematics
  6. Kinematic Jacobian
  7. Numerical Inverse Kinematics
  8. Dynamics, Euler-Lagrange equation, Moment of Inertia
  9. Manipulator Control: PD+Gravity, Inverse Dynamics, and Feedforward
  10. Geared robot dynamic model
  11. References
Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Mass-Spring-Damper System

  • : mass of the block
  • : spring stiffness ()
  • : damping coefficient ()
  • : displacement of the block

Newton's 2nd law:

Reference: Tutorial on Robotic Manipulator Control by Prof. Yan-Bin Jia

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Source of Spring Force

Spring force comes from anything that stores mechanical energy when displaced:

  • Actual coil spring: The most obvious case.
  • Elastic deformation of materials: Beams, shafts, robot links, joints, seals, tires, belts, tendons, and even frames flex slightly and act like springs.
  • Torsional stiffness in rotating systems: For rotation, the equivalent is This happens in flexible couplings, gear trains, harmonic drives, cable drives, etc.
  • Gravity linearized around equilibrium: Near an equilibrium point, gravity can behave like an effective spring. Example: small-angle pendulum which looks like a rotational spring.
  • Compressed fluids or air: Pneumatic systems, soft actuators, and trapped fluid volumes can create restoring forces.
Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Source of Damping Force

Damping comes from anything that dissipates energy, usually into heat:

  • Viscous friction: Oil dashpots, hydraulic dampers, lubricated sliding surfaces, fluid drag with .
  • Material internal losses: Rubber, polymers, soft tissues, and metal structures under vibration lose energy internally. This is often called structural damping.
  • Dry friction approximated as damping: Real Coulomb friction is not exactly proportional to velocity, but near some operating point engineers often approximate it as viscous damping.
  • Air resistance / fluid drag: At low speeds this can be approximated as proportional to velocity.
  • Electrical damping in motors: In electromechanical systems, back-EMF and electrical resistance can create damping-like behavior.
  • Control damping: A feedback controller can intentionally create damping. Example: a PD controller adds an artificial spring term and damping term.
Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Solution of the ODE

Characteristic equation:

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Overdamped System



Results in two distinct real roots: . Solution becomes . The system has no oscillation and return to equilibrium state slowly. Friction (responsible for damping) dominates stiffness.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Uncerdamped System



Results in two complex conjugate roots: . Solution becomes , where . The system has oscillation with shrinking amplitude. Stiffness dominates damping in this case.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Critically Damped System



Results in equal real roots with . Solution becomes provides the fastest return to equilibrium without oscillation, balancing friction and stifness. This is the most desirable case in most control system.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Control of the 2-Order System


System dynamics:

Control law of the closed loop feedback system:

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Closed Loop Control System

Combining the two, with

How to choose the gains

  • Set a desired closed-loop stiffness
  • Obtain critical damping
Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Control Law Partitioning

Open loop equation (dynamics)

The control law consists of

  • a model-based portion
    where
    Idea: If is taken as the new input, the system appears to be a unit mass.
  • a servo portion
    Idea: Proceed as if the above were the open loop of a system to be controlled.


set for critical damping

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Model based PD Control Block Diagram

Proportional-derivative (PD) controller:

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Trajectory Following

The current controller maintains the block at .
How to enhance it to make the block track a prescribed trajectory?

desired trajectory:

tracking error:

Control law:

where is the error dynamics.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Block Diagram for Trajectory Following

Controller:

With consideration of desired and

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Distrubance Rejection

In the presence of a disturbance force , the error equation changes to:

Consider the simplest case of being a constant.

Set all derivatives in the error equation to zero (i.e., consider when the state stops changing):

Steady-State Error:

To eliminate the error, add an integral term to the control law.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
PID Control

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
PID Tuning Heuristic Method

Ziegler–Nichols method: is increased from zero to ultimate gain with stable output and consistent oscillations. and the oscillation period are then used to set the PID gains.

Control Type
P – – – –
PI – –
PD – –
classic PID
Pessen Integral Rule
some overshoot
no overshoot
Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
General State-Space Model

For a general Linear Time Invariant (LTI) model (possibly multi-input, multi-output):

where:
: the state variables
: the state inputs
: the outputs
: state matrix (controls the latent state)
: control matrix
: output matrix
: command matrix


Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
State-Space Model of Mass-Damper-Spring System

The second-order differential equation:

can be written in the standard state-space form:

Typical output choices are:

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Stability Analysis: Root Locus Method

Root Locus Key Concepts
The root locus plot indicates how the closed loop poles of a system vary with a system parameter (typically a gain, K).

We can choose a value of 's' on this locus that will give us good results. The shape of the locus can also give us information on design of a more complex (lead/lag, PID controller).

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Planar RR Robot Overview

The standard derivation for a planar double pendulum, treated as a 2-link revolute manipulator (2R robot). Assume:

  • link lengths:
  • joint angles:
  • is measured from the inertial -axis
  • is the relative angle between link 1 and link 2

So the absolute orientation of link 2 is

(Zixin Huang, 2025)

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Geometry and Coordinate Frames

Let the base be at the origin.

  • Joint 1 is at
  • Joint 2 is at the end of link 1
  • The end-effector (tip of link 2) is the tip of the double pendulum

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Forward kinematics by geometry

Position of joint 2

The position of joint 2 (the end of the first link) is:

Position of the end-effector

The second link contributes a vector of length oriented at angle . Therefore,

So the forward kinematics are and the end-effector orientation is

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Homogeneous transformations

For a planar 2R manipulator, the homogeneous transform of each link can be written as

From the last column, the end-effector position is again

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Velocity kinematics

The end-effector velocity is obtained by differentiating and .

Differentiate

Differentiate

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Jacobian derivation

By definition,

where the Jacobian is

Compute the partial derivatives:

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Jacobian derivation

Jacobian matrix:

Using the shorthand notation,

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Full planar task Jacobian ()

If you also want the end-effector orientation (), then

So the planar geometric Jacobian becomes

Thus,

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Jacobian Columns Interpretation

Each Jacobian column tells you how the end-effector moves if only one joint moves.

First column - Effect of

This makes sense because rotating joint 1 moves both links.

Second column - Effect of

Only moves the second link relative to the first.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Singularities

The determinant of the position Jacobian is

So the manipulator is singular when

These are the configurations where the two links are collinear:

  • fully stretched
  • fully folded back

At those configurations, the end-effector loses one instantaneous direction of motion.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Jacobian from the cross-product formula

For a revolute joint in planar motion, the linear velocity contribution is

where , and is the joint position.

  • Joint 1 position:
  • Joint 2 position:
  • End-effector:

So the translational Jacobian is exactly the same as above.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Jacobians for link centers of mass

These are useful for dynamics.
Let the COM distances from each joint be and .

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Summary: RR Jacobian

For the standard planar double pendulum / RR robot arm,

End-Effector Position

and End-Effector Position

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
DH-parameter derivation in robotics notation

Using the standard DH convention

the homogeneous transform is

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
DH-parameter derivation in robotics notation

For a planar 2R manipulator:

So the DH table is

1
2

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
DH-parameter Link transforms

Because and ,

So the end-effector pose is

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Jacobian in strict geometric robotics notation

For revolute joints, the geometric Jacobian columns are

where is the origin of frame and is the joint axis.

For this planar arm:

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Jacobian in strict geometric robotics notation

Thus the full 6D geometric Jacobian is

The reduced planar Jacobian for is

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Numerical Inverse Kinematics

Inverse Kinematics problems: given a desired end-effector pose (in the operational space), we want to find the joint values such that . Here, is the forward kinematics. source

Defining operational space error between the desired and the current end-effector pose :

time derivative of the above operational space error

This is called error dynamics, as it shows ODE of end-effector pose error over time . Here, can be viewed as the control input. From a control perspective, we want to design a control law

which depends on all current information , such that, when plug the controller to the error dynamics, we have as . At convergence, the resulting is the IK solution!

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Jacobian Inverse (Newton-Raphson) Method

We set

as

Here is a positive definite (usually diagonal) matrix, and is any reference joint velocity that makes the robot move aways from the singularity. is the pseudo-inverse of Jacobian. For non-singular robot arm configurations, .

To verify if the above controller can solve IK, we next examine if the error dynamics converges to 0. Submitting the above controllers into the error dynamics, we have

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Jacobian Inverse (Newton-Raphson) Method

The block scheme for the above IK algorithm is shown below (non-redundant robot arm),
where means the forward kinematics.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Euler-Lagrangian dynamics

Below is the full derivation for a planar RR robot.

  • : angle of link 1 measured from the inertial -axis
  • : relative angle of link 2 with respect to link 1
  • absolute angle of link 2 is
  • link lengths:
  • COM distances from each joint:
  • masses:
  • planar link inertias about each COM:
  • gravity acts in the negative -direction, so potential is
Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Euler-Lagrange of mass-spring system

To obtain the Euler-Lagrange Approach to Manipulator Dynamics for Serial Mechanisms. First, consider the analogy of some familiar linear order systems:

Mass-spring system:

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Lagrangian dynamics

Euler-Lagrange Approach to Manipulator Dynamics for Serial Mechanisms


(Asaji Sato, 2007)

Now we derive the dynamics using

COM positions

For link 1 COM:

For link 2 COM:

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Lagrangian dynamics - COM velocities

For link 2:

and after simplification,

Expanding,

Angular velocities:

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Kinetic Energy

Substitute the velocity expressions:

It is convenient to define

Then

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Potential Energy

With upward,

So

Hence

Therefore

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Euler-Lagrange Equations

First equation

Differentiate:

Also,

So the first joint equation is

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Euler-Lagrange Equations

Second equation

Differentiate:

Also,

So

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Standard dynamic model of a robotic manipulator

We can represent in the manuipulator form

In compact notation

A valid Coriolis matrix is

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Standard dynamic model of a robotic manipulator

with

The gravity matrix is

directly in physical parameters, the Fully expanded mass matrix:

where means the moment of inertia of link about its own COM.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Moment of Inertia Examples

Moment of inertia is defined with respect to a specific rotation axis. The moment of inertia of a point mass with respect to an axis is defined as the product of the mass times the distance from the axis squared. source

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Superposition of Moments of Inertia

The moment of inertia of a composite object can be obtained by superpositon of the moments of its constituent parts. The Parallel axis theorem is an important part of this process. For example, a spherical ball on the end of a rod: source:

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
E-L Derivation for Planar RR (point mass case)

Euler-Lagrange Approach to Manipulator Dynamics for Serial Mechanisms

To simplify our calculation, for geared serial link robotic arm, we can assume mass is concentrated at the joint (joint motor). We then have a massless rods and endpoint point mass model:

  • link 1 mass is concentrated at the end of link 1; link 2 mass is concentrated at the end of link 2, so
  • and since each link mass is treated as a point mass, all the mass is concentrated at one point, its inertia about an axis through itself is .
Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
E-L Derivation for Planar RR (point mass case)

Mass is at the end of link 1; Mass is at the end of link 2:

Differentiate and :

We have velocity of each joint:

Expanding:

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
E-L Derivation for Planar RR (point mass case)

Because the masses are point masses, there is only translational kinetic energy:

Substitute the expressions above:

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Manipulator Control

Assume the usual dynamic robot model (we will ignore environment forces unless otherwise noted):

We have our state representing the joint status and ,
and it is essentially a function of the state and control .

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
PD + Gravity Set-Point Control

Simple controller, instead of canceling all non-linearities, it only compensates gravity and adds a PD term. Controller for PD control with gravity set point follows:

with and are positive definite matrices.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
PD + Gravity Set-Point Control

To obtain the closed-loop dynamics under PD + gravity setpoint, substitute control into dynamics

or in terms of error for regulation ( , constant ), known as gravity compensation

up to sign convention depending on whether you define or . The key point is (a) gravity is removed, and (b) inertia and Coriolis coupling remain. So the system is not exactly linearized.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Computed-Torque Joint Position Control

To determine the control inputs to track this desired trajectory based on measurements of the joint positions and velocities, we might transform the problem into one of determining another input w to the control input u. It is also known as inverse dynamics control.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Computed-Torque Joint Position Control

One limitation of the PD Control with Gravity Compensation is that the controller can only follow a stationary desired , not good at tracking a fast-changing desired joint. source

Inverse dynamics control is to address the above limitation. The idea of inverse dynamics control is to find a controller that can make the robot arm behave like a mass-spring-damper system. Controller for inverse dynamics control follows,

with the damping ratio and the natural frequency for joint .

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Feedforward Position Control

If the nominal desired trajectory is known ahead of time, a path planner can be used to determine the nominal control inputs. State feedback control corrections only need to be made for deviations from the nominal trajectory.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Feedforward Position Control

The control of such feedforward + PD position feedback controller:

Substitute into the true dynamics:

Rearranging,

This is not perfectly linear in the error, because the true and desired dynamics are evaluated at different states. But if and , the mismatch terms are small, and the PD terms pull the trajectory back.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Feedforward Position Control

What if I use only the feedforward part? It should match the exact torque required?

That is,

This is usually not robust in practice because:

  • model mismatch
  • unknown friction
  • disturbances
  • initial condition error
  • numerical tracking error

Even tiny mismatch can cause drift. So pure feedforward alone is rarely enough.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Feedforward + PD vs Inverse Dynamics Control

Feedforward + PD

Computed torque

Difference:

  • feedforward + PD uses desired-state model terms
  • computed torque uses actual-state model terms

Computed torque gives exact cancellation in the ideal model case.
Feedforward + PD feedback apply the torque that should be needed for the desired motion, and correct the error by feedback loops to yield a faster tracking.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Why Dynamics Matters?

Latest research from Robotics and AI Institute (Boston Dynamics spin off)
AthenaZero : A Bimanual Robot for Dynamic Manipulation Video
"AthenaZero’s low-inertia design requires control approaches that differ from those used with traditional manipulators. The system’s dynamical behavior requires careful attention to torque control and trajectory acceleration components for feedforward dynamics that go well beyond kinematic planning or feedforward position control." ... "As the actuator’s reflected inertia, a key ingredient of the effective mass, scales by the square of the gear ratio, we kept these values low, using 5:1 in most joints. We also made use of efficient planetary gearsets (97% or better)."

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Why Dynamics (Sometimes) Doesn't Matters?

Considering this geared robot dynamic model

The relationship between motor input angle , motor torque and joint output angle , joint output torque

Considering back emf , friction in the bearing , reflected motor dynamics

Applied motor torque

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Geared robot dynamic model

where is the motor rotor inertia and acceleration,
is the mechanical damping, is the electrical damping.
Substituting back ,

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Geared robot dynamic model

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Geared robot dynamic model

Subsituting joint torque

In highly geared case, is large and is relatively small, it reduces to

This behaves similar to a mass-damper system
PD controller is often sufficient to control.

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026
Reference

[1] UBC EECE589 - Introduction to Robotics by Prof. Tim Salcudean. course website
[2] Tutorial on Robotic Manipulator Control by Prof. Tan-Bin Jia, Iowa State University notes
[3] ASU MAE 547 - Modeling and Control of Robotics (MAE 547) from Irislab
[4] hyperphysics - moment of Intrtia link
[5] MIT865.24 Tutorial on Model free control link

Paul Lee Tutorial on Robotics and Control Version 1.6, 2026

![width:500px](figures/Double-compound-pendulum-dimensioned.svg)

![width:500px](figures/Double-compound-pendulum-dimensioned.svg)

![width:500px](figures/Double-compound-pendulum-dimensioned.svg)

$$ v = J\dot{q} \qquad \dot{v} = \dot{J}\dot{q} + J\ddot{q} \quad \Longrightarrow \quad \ddot{q} = J^{-1} (\dot{v} - \dot{J} \dot{q}) $$ $$ N J_m J^{-1} (\dot{v} - \dot{J} \dot{q}) + N B_m \dot{q} = u_m $$ $$ N J_m J^{-1} \dot{v} - (N J_m \dot{J} \dot{q} + N B_m) \dot{q} = u_m $$

<div class="colwrap"> <div class="left"> </div> <div class="right inverted"> </div> </div>