Robotics 2
Control in Cartesian Space
(or in Task Space)
Prof. Alessandro De Luca
Regulation of robot Cartesian pose
n “PD +” type control for regulation problems
n proportional to the Cartesian pose error 𝑒! = 𝑦" − 𝑦, with
derivative (velocity) term + cancellation of gravity in joint space
n robot dimension of spaces
n 𝑀 𝑞 𝑞̈ + 𝑐 𝑞, 𝑞̇ + 𝑔 𝑞 = 𝜏
dynamics joint = 𝑛
n 𝑦 = 𝑘 𝑞 ⟶ 𝑦̇ = 𝐽 𝑞 𝑞̇
kinematics Cartesian = 𝑚 ≤ 𝑛
n goal: asymptotic stabilization of robot end-effector pose
𝑦 = 𝑦! , 𝑞̇ = 𝑞̇ ! = 0 ⟶ 𝑦̇ ! = 0
if 𝑚 = 𝑛, then 𝑞̇ = 0 ⇔ 𝑦̇ = 0 up to singularities
if 𝑚 < 𝑛, then the goal is not uniquely associated to a complete
robot state: 𝑛 − 𝑚 joint coordinates are missing …
here 𝑦 = 𝑦! = 𝑝! , 𝜙! = 𝑘! 𝑞 , with 𝑚 ≤ 6 ⟷ end-effector Cartesian space
results equally apply to any 𝑦 = 𝑘 𝑞 and generic 𝑚 ⟷ task space control
Robotics 2 2
A first regulation law
(∗) 𝜏 = 𝐽" 𝑞 𝐾# 𝑦! − 𝑦 − 𝐾$ 𝑞̇ + 𝑔(𝑞) 𝐾" , 𝐾# > 0
(symmetric)
Theorem
the control law (∗) will let the robot state converge asymptotically
to the set 𝐴 = {𝑞̇ = 0, 𝑞: 𝐾# 𝑦! − 𝑘 𝑞 ∈ 𝒩 𝐽" 𝑞 )
⊇ {𝑞̇ = 0, 𝑞: 𝑘 𝑞 = 𝑦! }
Proof
from 𝑒! = 𝑦" − 𝑦 (task/Cartesian error) and an associated
Lyapunov-like candidate function
𝐴
𝑉 = %& 𝑞̇ ( 𝑀 𝑞 𝑞̇ + %& 𝑒)( 𝐾" 𝑒)
𝑉=0
with 𝑉 = 0 ⟺ (𝑞, 𝑞) ̇ ∈ {𝑞̇ = 0, 𝑞: 𝑘 𝑞 = 𝑦$ } ⊆ 𝐴
Robotics 2 3
Proof (cont)
# #
differentiating 𝑉 = $ 𝑞̇ & 𝑀 𝑞 𝑞̇ + $ 𝑒!& 𝐾' 𝑒! ≥ 0
𝑒̇! = −𝑦̇
𝑉̇ = 𝑞̇ " 𝑀 𝑞̈ + %& 𝑀̇ 𝑞̇ − 𝑒(" 𝐾# 𝑦̇ 𝑐 𝑞, 𝑞̇ = 𝑁(𝑞, 𝑞)
̇ 𝑞̇
with any factorization
= 𝑞̇ " 𝜏 − 𝑁 𝑞̇ − 𝑔 + * 𝑀̇ 𝑞̇ − 𝑒(" 𝐾# 𝑦̇
+
= 𝑞̇ " 𝐽" 𝐾# 𝑒( − 𝐾$ 𝑞̇ + 𝑔 − 𝑔 − 𝑒(" 𝐾# 𝐽𝑞̇
= −𝑞̇ " 𝐾$ 𝑞̇ ≤ 0
with 𝑉̇ = 0 ⟺ 𝑞̇ = 0
in these conditions, the closed-loop equations become
𝑀 𝑞 𝑞̈ + 𝑔 𝑞 = 𝐽& 𝑞 𝐾' 𝑒! + 𝑔(𝑞) 𝑞̈ = 𝑀 (# (𝑞)𝐽& 𝑞 𝐾' 𝑒!
𝑞̈ = 0 ⟺ 𝐾' 𝑒! ∈ 𝒩 𝐽& (𝑞)
by applying LaSalle theorem, the thesis follows
Robotics 2 4
Corollary
for a given initial state (𝑞 0 , 𝑞(0)
̇ ), if the robot does not
encounter any singularity of 𝐽𝑇(𝑞) (configurations where
𝜌 𝐽" < 𝑚 ≤ 𝑛) during its motion, then there is asymptotic
stabilization to one single state (when 𝑚 = 𝑛) or to a set of
states (when 𝑚 < 𝑛) such that
𝑒! = 0, 𝑞̇ = 0
note: singular configurations 𝑞 of 𝐽𝑇(𝑞) coincide with those of 𝐽(𝑞)
Robotics 2 5
A possible variant for regulation
“all Cartesian” PD control + gravity cancellation in joint space
𝐾' , 𝐾* > 0
(∗∗) 𝜏 = 𝐽" 𝑞 𝐾# 𝑦! − 𝑦 − 𝐾$ 𝑦̇ + 𝑔(𝑞)
(symmetric)
mechanical
interpretation 𝐾#
𝐾$
𝐾# (∗∗)
𝑦𝑑 𝑦𝑑
(∗) 𝐾$
𝐽𝑇 transforms the “virtual” elastic, for (∗), or visco-elastic, for (∗∗),
force/torque acting on the end-effector into control torques at the joints
Robotics 2 6
Feedback linearization in task space
robot 𝑀 𝑞 𝑞̈ + 𝑐 𝑞, 𝑞̇ + 𝑔 𝑞 = 𝜏
e.g., end-effector
output 𝑦 = 𝑘(𝑞) position/orientation
assume 𝑚 = 𝑛
algorithm differentiate the output(s) as many times as needed
up to the appearance of (at least one of) the input torque(s),
then verify if it is possible to solve for the input = “inversion”
(uniform) 𝑦=𝑘 𝑞
“relative degree’’ = 2 from dynamic model
for all outputs 𝑦̇ = 𝐽 𝑞 𝑞̇
𝑦̈ = 𝐽 𝑞 𝑞̈ + 𝐽 ̇ 𝑞 𝑞̇
= 𝐽 𝑞 𝑀 (# 𝑞 𝜏 − 𝑐 𝑞, 𝑞̇ − 𝑔 𝑞 + 𝐽 ̇ 𝑞 𝑞̇
Theorem
for a non-redundant robot, it is possible to exactly linearize and
decouple the dynamic behavior at the task level if and only if
det 𝐽(𝑞) ≠ 0
Robotics 2 7
Feedback linearization in task space
(in the right coordinates!)
control law 𝜏 = 𝑀 𝑞 𝐽(# 𝑞 𝑎 + 𝑐 𝑞, 𝑞̇ + 𝑔 𝑞 − 𝑀 𝑞 𝐽(# 𝑞 𝐽 ̇ 𝑞 𝑞̇
= 𝛼 𝑞, 𝑞̇ + 𝛽 𝑞 𝑎
𝑦̈ = 𝐽 𝑞 𝑀 (# 𝑞 𝜏 − 𝑐 𝑞, 𝑞̇ − 𝑔 𝑞 + 𝐽 ̇ 𝑞 𝑞̇ = 𝑎
𝑚 chains of double integrators (in task space)
𝑦, 𝑦̇ are the so-called “linearizing” coordinates
closed-loop equations (in joint space)
̇ ̇ +𝑐+𝑔
𝑀 (# ∗ 𝑀 𝑞̈ + 𝑐 + 𝑔 = 𝑀 J 𝐽(# 𝑎 − 𝐽𝑞
𝑞̈ = 𝐽(# 𝑞 𝑎 − 𝐽(# 𝑞 𝐽 ̇ 𝑞 𝑞̇
purely kinematic equations in 𝑞, 𝑞̇
(still nonlinear and coupled!)
Robotics 2 8
Physical interpretation
𝑦 = 𝑝 ∈ ℝ9 𝑎=
1
𝐹
𝑧, 𝑞 3 , 𝜏3 𝐹 𝑧, 𝑚
in static conditions and 𝐹 𝑎𝑧
with gravity balanced
𝑀(𝑞) 𝑝̈ 𝑝̈ ! 𝐹 > 0 𝑝" (𝑡)
𝑚 𝑎𝑦
𝑞 2 , 𝜏2 𝜏 = 𝛼 𝑞, 𝑞̇
𝑎𝑥
𝑞 1 , 𝜏1 +𝛽 𝑞 𝑎 𝑝̈
𝑦, 𝑦,
articulated robot unitary (or arbitrary) mass
𝑥, inertia depends on 𝑞 and is 𝑥, same constant behavior
variable in different Cartesian directions in all Cartesian directions
when a force 𝐹 is applied at the robot end-effector
§ the uncontrolled end-effector will accelerate with 𝑝̈ in a different direction
on the other hand, for the robot under Cartesian FBL
§ a mass 𝑚 accelerates always in the same direction of the applied force 𝐹
Robotics 2 9
Alternative derivation
in purely task/Cartesian terms
the previous exact linearizing and decoupling law can be rewritten
in task/Cartesian terms using a control force/torque (wrench) 𝐹
𝜏 = 𝑀 𝑞 𝐽(# 𝑞 𝑎 + 𝑐 𝑞, 𝑞̇ − 𝑀 𝑞 𝐽(# 𝑞 𝐽 ̇ 𝑞 𝑞̇ + 𝑔 𝑞
joint torque 𝜏 is moved to the task space as 𝐹 = 𝐽(& (𝑞)𝜏 (for 𝑚 = 𝑛)
𝐹 = 𝐽"# 𝑀𝐽"$ 𝑎 task inertia = 𝐽𝑀 (# 𝐽& (# = 𝑀!
̇ ̇
+ 𝐽"# 𝑐 − 𝑀𝐽"$ 𝐽𝑞 task Coriolis/centrifugal terms
+ 𝐽"# 𝑔 task gravity
= 𝑀% 𝑎 + 𝑐% + 𝑔%
this is the feedback linearization law
applied to the task/Cartesian
𝑀( 𝑞 𝑦̈ + 𝑐( 𝑞, 𝑞̇ + 𝑔( 𝑞 = 𝐹
dynamic model of the robot
𝑦̈ = 𝑎
Robotics 2 10
Remarks -1
n the design of a task trajectory control is completed by stabilizing
the tracking error in the 𝑚 independent chains of double
integrators, i.e., by setting
scalar gains
𝑎< = 𝑦̈ !< + 𝐾$< 𝑦̇ !< − 𝑦̇ < + 𝐾#< 𝑦!< − 𝑦< 𝐾𝑃𝑖 > 0, 𝐾#- > 0
𝑖 = 1, … , 𝑚
n the transient behavior of the task error along a desired trajectory
is exponentially stable (with arbitrary eigenvalues assigned by
choosing the diagonal gains of 𝐾𝑃, 𝐾$ )
n for 𝑦𝑑 = constant (regulation task), the control law becomes
̇ 𝑞̇
𝜏 = 𝑀 𝑞 𝐽.% 𝑞 𝐾" 𝑒) − 𝐾# 𝐽 𝑞 𝑞̇ + 𝑐 𝑞, 𝑞̇ + 𝑔 𝑞 − 𝑀(𝑞)𝐽.% (𝑞)𝐽(𝑞)
computationally heavier than a control law designed directly for
regulation, such as laws (∗) or (∗∗), but retaining the property of
an exponentially stable transient error in the task space
Robotics 2 11
Remarks -2
n the Cartesian/task pose (and velocity) is either directly measured
by external sensors (e.g., cameras eye-to-hand/eye-in-hand) or
computed through the direct (and differential) robot kinematics
- -
=
𝑇>
𝑦
>
𝑦
𝑘(𝑞) 𝑘(𝑞)
Robotics 2 12
Remarks -3
n in redundant robots (𝑚 < 𝑛), by replacing 𝑀𝐽?% = 𝐽𝑀 ?% ?% in
the control law with some (weighted) pseudoinverse 𝐽𝑀 ?% # @,
one still obtains input-output (I-O) decoupling and linearization,
but not an exact linearization of the whole state dynamics
n there is an additional internal dynamics left of dimension 𝑛 − 𝑚
n its stability should be enforced (by some “null-space” torque 𝜏2 )
ROBOT (or its DYNAMIC MODEL) with TASK output
𝑎 𝜏 + 𝑞̈ 𝑞̇ 𝑞 𝑦 𝑎 𝑦̇ 𝑦
"#
𝑀 (𝑞) 𝑘(𝑞)
+ _
𝑛(𝑞, 𝑞)
̇
internal nonlinear
𝑛 − 𝑚 dimensional
nonlinear I-O
𝑞 ∈ ℝ* dynamics
in terms of (𝑞, 𝑞)
̇
FBL control 𝑦 ∈ ℝ+
𝑛−𝑚 >0
Robotics 2 13
More on the redundant case …
n suppose 𝑚 < 𝑛, but still with a Jacobian 𝐽 of full rank 𝑚
n let the control law (with null-space torque term 𝜏H ) be defined as
𝜏 = 𝐽 𝑞 𝑀 ?% (𝑞) #
@
̇ 𝑞̇ + 𝐽 𝑞 𝑀 ?% 𝑞 𝑐 𝑞, 𝑞̇ + 𝑔 𝑞
𝑎 − 𝐽(𝑞)
#
+ 𝐼− 𝐽 𝑞 𝑀 ?% 𝑞 @
𝐽 𝑞 𝑀 ?% (𝑞) 𝜏H
where 𝐽𝑀 ?% #
@ = 𝑊 ?% 𝑀 ?% 𝐽 " 𝐽𝑀 ?% 𝑊 ?% 𝑀 ?% 𝐽 " ?%
n three standard choices for 𝑊 > 0
𝑊=𝐼 ⟹ 𝐽𝑀 ?% # = 𝑀 ?% 𝐽" 𝐽𝑀 ?& 𝐽" ?% each associated
control torque
# optimizes a
𝑊 = 𝑀 ?% ⟹ 𝐽𝑀 ?% I /* = 𝐽 " 𝐽𝑀 ?% 𝐽 " ?%
different criterion
(see slides on
𝑊 = 𝑀 ?& ⟹ 𝐽𝑀 ?% #I/+ = 𝑀 𝐽" 𝐽 𝐽" ?% = 𝑀 #
𝐽 redundant robots!)
n all give the same 𝑦̈ = 𝑎 , with 𝜏H available for null-space control
Robotics 2 14
Conclusions
n most control laws presented in joint space (i.e., driven
by a joint error) can be translated with relative ease to
the Cartesian space, e.g.
n regulation with constant gravity compensation
n adaptive regulation
n adaptive control for trajectory tracking
n the main issues are related to
n kinematic singularities, both for the Jacobian transpose and
the Jacobian inverse control laws: suitable modifications are
needed to obtain singularity robustness
n kinematic redundancy (𝑚 < 𝑛): use of a stabilizing null-space
torque control is needed for the extra 𝑛 − 𝑚 generalized
coordinates (locally, 𝑛 − 𝑚 joint variables)
Robotics 2 15