RB Cir-Notes
RB Cir-Notes
Notes1
Roberto Bochet
December 4, 2021
1
the whole document is based on [1] and [2]
Bibliography
[1] Paolo Rocco. Slides of the PoliMi course “Control of industirial robots”. https:
//rocco.faculty.polimi.it/cir/index.html. 2020.
[2] Bruno Siciliano et al. Robotica. Modellistica, pianificazione e controllo. it. 3rd ed.
College. McGraw-Hill Education, 2008. isbn: 978-88-386-6322-2.
1
Contents
1 Kinematic redundancy 6
1.1 Inverse kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.1 Jacobian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.2 Finding a generic solution . . . . . . . . . . . . . . . . . . . . 7
1.1.3 Finding a solution exploiting redundant . . . . . . . . . . . . . 8
1.1.3.1 Choosing q̇ 0 . . . . . . . . . . . . . . . . . . . . . . . 8
1.1.4 Possible issues with redundant robots . . . . . . . . . . . . . . 9
1.2 Kinematic control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2 Robot dynamics 11
2.1 Model exploiting Euler-Lagrange equation . . . . . . . . . . . . . . . 11
2.1.1 Kinetics energy . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.2 Potential energy . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.1.3 The Lagrangian . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.1.3.1 The matrix C . . . . . . . . . . . . . . . . . . . . . . 17
2.1.4 The non conservative forces . . . . . . . . . . . . . . . . . . . 17
2.1.5 Skew-symmetry of matrix Ḃ − 2C . . . . . . . . . . . . . . . 18
2.1.6 Summary model . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.1.7 Linearity in dynamic parameters . . . . . . . . . . . . . . . . 20
2.1.7.1 Parameters identification . . . . . . . . . . . . . . . . 20
2.2 Newton-Euler formulation . . . . . . . . . . . . . . . . . . . . . . . . 21
2.2.1 The recursive algorithm . . . . . . . . . . . . . . . . . . . . . 22
2.2.1.1 Optimization . . . . . . . . . . . . . . . . . . . . . . 23
2.3 Euler-Lagrange vs Newton-Euler . . . . . . . . . . . . . . . . . . . . . 23
2
2.3.1 Computation of direct dynamics . . . . . . . . . . . . . . . . . 23
2.3.2 Computation of inverse dynamics . . . . . . . . . . . . . . . . 24
3 Motion planning 25
4 Decentralized control 26
4.1 Simplified dynamic model . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2 Electrical motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.2.1 Control of the current . . . . . . . . . . . . . . . . . . . . . . 29
4.3 Rigid transmission approximation . . . . . . . . . . . . . . . . . . . . 29
4.3.1 P/PI control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3.1.1 PI speed control design . . . . . . . . . . . . . . . . 31
4.3.1.2 P position control design . . . . . . . . . . . . . . . . 31
4.3.1.3 Speed feed-forward . . . . . . . . . . . . . . . . . . . 32
4.3.1.4 Position measure only . . . . . . . . . . . . . . . . . 32
4.4 Elastic transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5 Centralized control 34
5.1 Control in joint space . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.1.1 Open loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.1.2 PD + gravity compensation . . . . . . . . . . . . . . . . . . . 35
5.1.3 Inverse dynamics control . . . . . . . . . . . . . . . . . . . . . 37
5.1.3.1 Taking into account the uncertainty . . . . . . . . . 38
5.1.3.2 Adaptive control . . . . . . . . . . . . . . . . . . . . 42
5.2 Control in operational space . . . . . . . . . . . . . . . . . . . . . . . 46
5.2.1 PD + gravity compensation . . . . . . . . . . . . . . . . . . . 46
5.2.2 Inverse dynamics control . . . . . . . . . . . . . . . . . . . . . 48
3
6.3 Natural constraints and artificial constraints . . . . . . . . . . . . . . 54
6.4 Explicit control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6.5 Implicit control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
8 Summary 66
8.1 Centralized control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.1.1 Control in joint space . . . . . . . . . . . . . . . . . . . . . . . 66
8.1.1.1 PD + gravity compensation . . . . . . . . . . . . . . 66
8.1.1.2 Inverse dynamic control . . . . . . . . . . . . . . . . 66
8.1.2 Control in operational space . . . . . . . . . . . . . . . . . . . 67
8.1.2.1 PD + gravity compensation . . . . . . . . . . . . . . 67
8.1.2.2 Inverse dynamic control . . . . . . . . . . . . . . . . 67
8.2 Control of the interaction . . . . . . . . . . . . . . . . . . . . . . . . 67
8.2.1 Impedance control . . . . . . . . . . . . . . . . . . . . . . . . 67
4
8.2.2 Admittance control . . . . . . . . . . . . . . . . . . . . . . . . 68
Index 69
5
Chapter 1
Kinematic redundancy
We let x = k(q) where x is the pose of the end effector in the task space, q the
joint configuration. The kinematic function k(·) provides the transformation from
the joint space Rn to the task space Rm .
A robot is kinematically redundant if n > m.
n.b. task space might be a subset of the operational space, so the dimension of the
second one might be less than the first, that is why the redundancy is a relative
concept
When a robot is kinematically redundant the inversion of the kinematics gives in-
finite solutions and there are internal motion that not affect the pose of the end
effector.
To solve this issue the problem is usually addressed in the speed domain.
ẋ = J (q)q̇ (1.1)
Where J (q) is the Jacobian of the robot associated to the task space.
1.1.1 Jacobian
For a redundant robot the Jacobian are a rectangular matrix with the shape of
(m × n) where n > m as we saw before.
6
dim(im(J )) = m dim(ker(J )) = n − m
with P q̇0 that does not contribute to the movement of the end effector, in fact if we
multiply the equation to J from left we get
J q̇ = J q̇ ∗ + J P q̇ 0 = J q̇ ∗ = ẋ
1
g(q̇) = q̇ T W q̇
2
W is a symmetrical weight matrix (n × n) and W > 0
we want to find the optimal solution under the constraint ẋ = W (q)q̇ so we can
use the Lagrange multiplier
1
L(q̇, λ) = q̇ T W q̇ + λT (ẋ − J q̇)
2
T T
∂L ∂L
=0 =0
∂ q̇ ∂λ
W q̇ − J T λ = 0 ẋ − J q̇ = 0
ẋ = J W −1 J T λ =⇒ λ = (J W −1 J T )−1 ẋ
and with a recombination with the first equation we get the solution
7
q̇ = W −1 J T (J W −1 J T )−1 ẋ
special case W = I =⇒ q̇ = J † ẋ
The matrix J † = J T (J J T )−1 is called right pseudo inverse matrix. With dualism,
we can define the matrix J †W = W −1 J T (J W −1 J T )−1 calling weighted pseudo
inverse matrix.
1
g ′ (q̇) = (q̇ − q̇ 0 )T (q̇ − q̇ 0 )
2
To find a solution under the constraint 1.1 close to q̇ 0 .
1
L′ (q̇, λ) = (q̇ − q̇ 0 )T (q̇ − q̇ 0 ) + λT (ẋ − J q̇)
2
∂L′
From ∂ q̇
= 0 and the constraint 1.1 we can get λ
λ = (J J T )−1 (ẋ − J q̇ 0 )
q̇ = J † ẋ + (I − J † J )q̇ 0 (1.2)
1.1.3.1 Choosing q̇ 0
Now we can choose q̇ 0 to improve the behaviour of the robot exploiting its redun-
dancy. A typical choice of q̇ 0 called projected gradient has the shape
T
∂w(q)
q̇ 0 = k0
∂q
8
• Manipulability measure to maximize the distance from singularities
q
w(q) = det(J (q)J T (q))
w(q) = min∥x(q) − o∥
x,o
• A close trajectory in the task space can be mapped as a open trajectory in the
joint space
• Trajectories with the same initial and final task positions may end with dif-
ferent joint configurations
where J aug is the augmented Jacobian. In this way the inverse kinematics prob-
lem is reduced to
q̇ = J −1
aug (q)ẋaug
9
if now consider y constant we can write
−1
J (q) ẋ
q̇ = ∂h
∂q 0
n.b. the inversion of the augmented Jacobian may introduce new singularities
called algorithmic singularities
˙ + K(x̄ − x̂)
ẋ = x̄
q̇ = J † (x̄
˙ + K(x̄ − x̂)) + I − J † (q)J (q) q̇ 0
q̇ 0
˙
x̄
I − J † (·)J (·)
x̄ ẋ q̇ 1
q
K J † (·) s
−
k(·)
x̂
10
Chapter 2
Robot dynamics
T T
d ∂L ∂L
− =ξ L=T −U
dt ∂ q̇ ∂q
where T is the kinetics energy, U is the potential energy and ξ the generalized forces
associated to the vector q.
This is the sum of the kinetics contributions of all the robot’s links, in particular Tli
is the contribution from the i-th link and Tmi from the i-th joint motor.
The contribution for the i-th link are defined as
Z
1
Tli = ṗ∗T ∗
i ṗi ρdV (2.1)
2 Vi
where ṗ∗i is the speed of a generic point of the link, and it can be expressed as
11
ṗ∗i = ṗli + ω i × r i = ṗli + S(ω i )r i (2.2)
pli is the position of the center of mass of the i-th link and r i the vector that define
the position of generic point respect the link’s center of mass.
Z
1
pli = p∗i ρdV (2.3)
mi Vi
Z
1 T
Tli = ṗli + S(ω i )r i ṗli + S(ω i )r i ρdV
2 Vi
Z
1
ṗTli ṗli + ṗTli S(ω i )r i + r Ti S T (ω i )ṗli + r Ti S T (ω i )S(ω i )r i ρdV
=
2 Vi
Z Z Z
1 1
= T
ṗ ṗ ρdV + T
ṗli S(ω i )r i ρdV + r Ti S T (ω i )S(ω i )r i ρdV
2 Vi li li Vi 2 Vi
Translation Z Z
1 1 1
ṗTli ṗli ρdV = ṗTli ṗli ρdV = mi ṗTli ṗli
2 Vi 2 Vi 2
Mutual
Z Z Z
ṗTli S(ω i )r i ρdV = ṗTli S(ω i ) r i ρdV = ṗTli S(ω i ) (p∗i − pli )ρdV = 0
Vi Vi Vi
Rotational
Z Z
1 1
r Ti S T (ω i )S(ω i )r i ρdV = ω Ti T
S (r i )S(r i )ρdV ωi
2 Vi 2 Vi
12
Z
I li = S T (r i )S(r i )ρdV
Vi
we call it inertia tensor referred to the center of mass of the i-th link expressed in
the base frame.
The inertia tensor is a symmetrical matrix 3 × 3 and its components are expressed
as
2
R 2
R R
(riy + riz )ρdV −
R 2 rix riy ρdV − R rix riz ρdV
2
I li = ∗ (rix + riz )ρdV R− 2 riy riz2 ρdV
∗ ∗ (rix + riy )ρdV
We have to note that the inertia tensor expressed in the base frame is dependent
by robot configuration, so it would be better if we can express it in the joint frame.
Exploiting the transformation of the rotation speed ω remembering that ω ii = RTi ω i
we can write an equivalent tensor expressed in the joint frame as I i = Ri I ii RTi .
So, we can write the rotation contributes of i-th joint as
Z
1 1 1
r Ti S T (ω i )S(ω i )r i ρdV = ω Ti I i ω i = ω Ti Ri I ii RTi ω i
2 Vi 2 2
Now we can finally write the contribution of the i-th joint to the kinematics energy
as
1 1
Tli = mi ṗTli ṗli + ω Ti Ri I ii RTi ω i
2 2
The velocity can easily write as
" #
(l )
ṗli J Pi
= (l ) q̇ = J (li ) q̇
ωi J Oi
n.b. J (li ) for a link i include only the contribution of the joints 1, . . . , i, so the column
i + 1, . . . , n are equal to 0
the single non-null column of J (li ) is defined as
" #
z j−1
for prismatic joint
0
" #
(l )
j Pji
(l ) =
j Oij " #
z × (p − p )
j−1 li j−1
for rotational joint
z j−1
13
1 (l )T (l ) 1 (l )T (l )
Tli = mi q̇ T J P i J P i q̇ + q̇ T J Oi Ri I ii RTi J Oi q̇
2 2
Now we can compute the sum for the kinetics energy (we consider Tmi = 0 for each
motor for simplicity, but include motors contributions is an easy task)
n n n
X 1 1 XX
T = Tli = q̇ T B(q)q̇ = q̇i q̇j bij (q)
i=1
2 2 i=1 j=1
n
X
(l )T (l ) (l )T (l )
B(q) = mi J P i J P i + J Oi Ri I ii RTi J Oi
i=1
n
X
U= Ui
i=1
The potential energy for a link is given by the gravitational force in accordig to this
formula
Z
Ui = − g T0 p∗i ρdV = −mi g T0 pi
Vi
n
X
U =− mi g T0 pi
i=1
14
L(q, q̇) = T (q, q̇) − U(q)
n
1 X
= q̇ T B(q)q̇ + mi g T0 pi
2 i=1
n n n
1 XX X
= q̇i q̇j bij (q) + mi g T0 pi (q)
2 i=1 j=1 i=1
d ∂L ∂L
− = ξi
dt ∂ q̇i ∂qi
d ∂T (q, q̇) ∂T (q, q̇) ∂U(q)
− + = ξi (2.4)
dt ∂ q̇i ∂qi ∂qi
Let us solve the three parts that compose the Lagrangian equation
n n
!
d ∂T (q, q̇) d ∂ 1 XX
= q̇j q̇k bjk (q)
dt ∂ q̇i dt ∂ q̇i 2 j=1 k=1
n
!
d X
= q̇j bij (q)
dt j=1
n n
X X dbij (q)
= q̈j bij (q) + q̇j
j=1 j=1
dt
n n n
X X X ∂bij (q)
= q̈j bij (q) + q̇j q̇k
j=1 j=1 k=1
∂qk
n n
!
∂T (q, q̇) ∂ 1 XX
= q̇j q̇k bjk (q)
∂qi ∂qi 2 j=1 k=1
n n
1 XX ∂bjk (q)
= q̇j q̇k
2 j=1 k=1 ∂qi
15
n
!
∂U(q) ∂ X
=− mj g T0 pj
∂qi ∂qi j=1
n
X ∂pj
=− mj g T0
j=1
∂qi
n
(l )
X
=− mj g T0 j Pij (q)
j=1
= gi (q)
n n n n n
X X X ∂bij (q) 1 X X ∂bjk (q)
q̈j bij (q) + q̇j q̇k − q̇j q̇k + gi (q) = ξi
j=1 j=1 k=1
∂qk 2 j=1 k=1 ∂qi
n n X
n
X X ∂bij (q) 1 ∂bjk (q)
q̈j bij (q) + q̇j q̇k − + gi (q) = ξi
j=1 j=1 k=1
∂qk 2 ∂qi
and defined
n
X n X
X n
q̈j bij (q) + q̇j q̇k hijk (q) + gi (q) = ξi
j=1 j=1 k=1
bii : inertial moment as ”seen” from the axis of the i-th joint
bij : effect of the acceleration of j-th joint on the i-th joint
hijj q̇j2 : centrifugal effect induced at i-th joint by the velocity of the j-th joint
hijk q̇j q̇k : Coriolis effect induced at i-th joint by the velocity of the joints j and k
Now, we can write the Lagrangian equations for all the joints in a matrix form as
16
2.1.3.1 The matrix C
The matrix C is not unique, and its elements must satisfy the equation
n
X n X
X n
cij q̇j = hijk q̇j q̇k
j=1 j=1 k=1
n
X n X
X n
cij q̇j = hijk q̇j q̇k
j=1 j=1 k=1
n X n
X ∂bij 1 ∂bjk
= q̇j q̇k −
j=1 k=1
∂qk 2 ∂qi
n n n n
1 XX ∂bij 1 XX ∂bik ∂bjk
= q̇j q̇k + q̇j q̇k −
2 j=1 k=1 ∂qk 2 j=1 k=1 ∂qj ∂qi
n
X
cij = cijk q̇k (2.6)
k=1
with
1 ∂bij ∂bik ∂bjk
cijk = + −
2 ∂qk ∂qj ∂qi
• joint torques τ
17
If we include all these three forces in the Equation 2.5 we get
wT N (q, q̇)w = 0
n
1X ∂bij ∂bik ∂bjk
cij = + − q̇k
2 k=1 ∂qk ∂qj ∂qi
n n
1 X ∂bij dqk 1 X ∂bik ∂bjk
= + − q̇k
2 k=1 ∂qk dt 2 k=1 ∂qj ∂qi
n
1 1 X ∂bik ∂bjk
= ḃij + − q̇k
2 2 k=1 ∂qj ∂qi
n
X ∂bik ∂bjk
nij = ḃij − 2cij = − − q̇k
k=1
∂qj ∂qi
So, we can notice that nij = −nji , then the property is demonstrated.
As direct consequence we can state
18
1d T
(q̇ B(q)q̇) = q̇ T (τ − F ν q̇ − f s (q, q̇) − g(q)) (2.9)
2 dt
we consider the left side member, and we try to solve it
1d T 1
(q̇ B(q)q̇) = q̇ T Ḃ(q)q̇ + q̇ T B(q)q̈
2 dt 2
1 T
using 2.7 = q̇ Ḃ(q)q̇ + q̇ T (τ − C(q, q̇)q̇ − F ν q̇ − f s (q, q̇) − g(q))
2
1 T
= q̇ Ḃ(q) − 2C(q, q̇) q̇ + q̇ T (τ − F ν q̇ − f s (q, q̇) − g(q))
2
1 T
= q̇ N (q, q̇)q̇ + q̇ T (τ − F ν q̇ − f s (q, q̇) − g(q))
2
We can notice that this equation coincides with the Equation 2.9 only if the Equa-
tion 2.8 is satisfied. In conclusion, we can state that Equation 2.8 is satisfied for
each matrix C because it is a direct consequence of the principle of energy con-
servation of the system.
1. Compute B(q)
(l ) (l )
1.1. Compute the matrices J P i , J Oi
1.2. Compute B(q) as
n
X
(l )T (l ) (l )T (l )
B(q) = mi J P i J P i + J Oi Ri I ii RTi J Oi
i=1
19
2.2. Compute the C(q, q̇) element by element as
n
X
cij = cijk q̇k
k=1
n
X
β TTi − β TUi π i
L=
i=1
where π is the vector get by the concatenation of π i and Y (q, q̇, q̈) is a matrix
called regression matrix.
20
τ̄ 1 Ȳ 1
τ̄ = ... , Ȳ = ...
τ̄ m Ȳ m
we can write
τ̄ = Ȳ π
this equation due to noise measures does not admit solution for π which it can be
estimated with the linear least squares method1 as
−1
T T †
π̂ = Ȳ Ȳ Ȳ τ̄ = Ȳ τ̄
The trajectories used to generate τ̄ and Ȳ must be enough rich (good conditioning
T
of matrix Ȳ Ȳ ): they need to involve all components in the dynamic model.
f i − f i+1 + mi g 0 = mi p̈Ci
µi + f i × r i−1,Ci − µi+1 − f i+1 × r i,Ci = I i ω̇i + ωi × I i ωi
Prismatic
1
https://en.wikipedia.org/wiki/Linear_least_squares
21
• generalized forces
τ i = f Ti z i−1 + Fvi d˙i + fsi
• velocities
ω i = ω i−1
ṗi = ṗi−1 + d˙i z i−1 + ω i × r i−1,i
• accelerations
ω̇ i = ω̇ i−1
p̈i = p̈i−1 + d¨i z i−1 + 2d˙i ω i × z i−1 + ω̇ i × r i−1,i + ω i × (ω i × r i−1,i )
Rotational
• generalized forces
τ i = µTi z i−1 + Fvi θ̇i + fsi
• velocities
• accelerations
The terms Fvi and fsi that appear in the generalized forces are respectively the
coefficient of viscous friction, and the function that characterize the static friction.
For both the joints types the acceleration of the center of mass is given by
Forward recursion from the base to the end effector, we propagate the velocities
and accelerations. The initial condition is given by ω o , p̈0 −g 0 , ω̇ 0 , then the elements
ω i , ω̇ i , p̈i , p̈Ci are calculated recursively until the end effector.
22
Backward recursion from the end effector to the base, we propagate the forces
and moments. The initial condition is given by f n+1 = f e , µn+1 = µe , the elements
f i and µi are calculated recursively until the base as
f i = f i+1 + mi p¨Ci
µi = −f i × (r i−1,i + r i,Ci ) + µi+1 + f i+1 × r i,Ci + I i ω̇ i + ω i × I i ω i
2.2.1.1 Optimization
Note that the entities r i−1,i , r i,Ci and I i being referred in the base frame are functions
of the robot’s pose, so they are not constant, so to improve the efficient of the
algorithm is a good idea refer them to the link frame so as to make them constant.
WARNING Missing examples
• The returned formula is in a form in which the physical terms are separated
(inertia matrix, Coriolis, centrifugal and gravitational). All these elements are
useful to design a controller.
• It lends itself to the introduction into the model of more complex effects (like
joint or link deformation).
Newton-Euler formulation
23
where
Also exploiting Newton-Euler formulation we can easily find the matrix B(q)
and the vector n(q, q̇) to solve the problem:
Given the implementation of the Newton-Euler script τ = N E(q, q̇, q̈), set q̈ = 0
and use the current values of q and q̇ the computed τ is exactly the searched vector
n(q, q̇).
Then we set g 0 = 0 into the script and q̇ = 0 in order to eliminate gravitation,
Coriolis, centrifugal and friction effects. With n interaction of the algorith we can
compute the matrix B(q) column by column imposing q̈i = 1 and q̈j = 0, i ̸= j.
So we can use always the Equation 2.10 with the computed parameters.
24
Chapter 3
Motion planning
25
Chapter 4
Decentralized control
Once a desired robot trajectory is designed, the next step is to guarantee that the
real trajectory as close as possible to it. Practically we have to design a control
strategy in order to q d (t) ≈ q(t).
The main way adopted in the control of industrial robot is the independent joint
control approach; it is a decentralized control approach where each joint is con-
trolled independently of each other.
WARNING Missing evaluation of control performance
In this model τ , q, q̇, q̈ are referred to the joints, but in a real system we cannot act
directly on the joints variables, instead we have to consider that we can act only
on the motors that are bound to the joints via a transmission. So we introduce a
dynamics model for a generic rigid transmission and joint motor
where
26
Jmi : moment of inertial of the motor
Dmi : friction viscous coefficient of the motor
τlmi : load torque on the axis of the motor
τli : load torque on the axis of the joint
ni : transmission reduction rate between motor and joint
to simplify we considered just the effect related to its spinning around its own axis
and a rigid transmission.
Let us introduce the square matrix N = diag{ni } so we can write
qm = N q τ lm = N −1 τ
Before we consider the entire model seen from the motor point of view, we observe
that the matrix B(q) can be seen as the sum of two contributes, the first of average
inertia and the other of the residual as function of the pose q
B(q) = B̄ + ∆B(q)
J m q̈ m + D m q̇ m = τ m − τ lm
−1
J m q̈ m + D m q̇ m + N (B(q)q̈ + C(q, q̇)q̇ + g(q)) = τ m
J m q̈ m + D m q̇ m + N −1 B(q)N −1 q̈ m +
N −1 C(q, q̇)N −1 q̇ m + N −1 g(q) = τ m
J m q̈ m + D m q̇ m + N −1 B̄ + ∆B(q) N −1 q̈ m +
J m + B̄ r q̈ m + D m q̇ m + d = τ m
27
where
We got a dynamics model where the motor torques τ m are the input, and the vector
d is a non-linear function that we can treat as noise, you can see it in the Figure 4.1.
n.b. the bigger are the reduction ratios ni , the less relevant the noise d is.
So, the decentralized control approach treat each joint as a SISO linear model subject
to a noise. The control loop for each joint is independent of each others.
This method heavily relies on the assumption that the reduction ratios ni values
are large (generally true for industrial robotics manipulators), to can ignore the
nonlinear contribution d in the controller design.
N −1 g(q)
N −1 C(q, q̇)N −1
N −1 ∆B(q)N −1
d
τm − −1 q̈ m 1
q̇ m 1
qm
J m + B̄ r s s
−
Dm
28
V (t) = Ri(t) + Li̇(t) + E(t)
E(t) = K q̇m (t)
τm (t) = Ki(t) = Jm q̈m (t)
E
V − i τm 1
q̇m qm
1 1
sL+R K Jm s s
E
ī − i τm 1
q̇m qm
1 1
Ri (s) sL+R K Jm s s
−
29
Jm q̈m + dm q̇m = τm − τlm
Jl q̈l = nτlm − τl
qm = nql
The first and the second equation can be merged exploiting the third equation
Jl τl
Jm + 2 q̈m + dm q̇m = τm −
n n
1 1/dm
Gv (s) = Jl
= Jm +Jl /n2
dm + Jm + n2
s 1+ dm
s
dm is an uncertain small parameter, since dm give a real stable pole we can consider
the most conservative situation in which dm = 0, so we get
1
Gv (s) =
Jm + nJ2l s
τl
1/n
τm − q̇m 1
qm
Gv (s) s
n.b. in Figure 4.5 the current loop is omitted because, as we said before, the current
loop has a much higher bandwidth than the speed loop, so we can assume τ̄m = τm .
30
τl
1/n
q̄m τm − q̇m 1
qm
RP (s) RP I (s) Gv (s) s
− −
As we stated the P/PI design is done with cascade approach, so as first step we can
design the speed loop.
kpv
ωcv =
Jm + nJ2l
and to guarantee that the ωcv desired coincide with the effective one we have to put
the zero in low frequency respect it
1
tiv ≈
(0.1 ÷ 0.3)ωcv
With this regulator we get a close loop function for the speed loop
1
Fv (s) ≈ 1
1+ ωcv
s
We can now design the RP (s) controller taking in account the speed closed loop
designed above.
1
RP (s) = kpp =⇒ Lp (s) = kpp
s 1 + ω1cv s
31
The overall closed loop on the position guarantee null static error and a bandwidth
of ωcp .
A possible improvement of the P/PI scheme is the speed feed-forward scheme Fig-
ure 4.6. The block kf f s improves the speed of the response of the position control.
The kf f coefficient is chosen between 0 and 1.
τl
kf f s
1/n
q̄m τm − q̇m 1
qm
RP (s) RP I (s) Gv (s) s
− −
Figure 4.6: Control scheme P/PI with a rigid transmission and speed feed-forward
If only available the position measure but not the speed, it can be derived with a
process of differentiation on the position. The control scheme became as Figure 4.7
that are equivalent to Figure 4.8 where all the controller block are substituted with
a single PID on position loop.
τl
s
1/n
q̄m τm − q̇m 1
qm
RP (s) RP I (s) Gv (s) s
−
−
s
32
τl
1/n
q̄m τm − q̇m 1
qm
RP ID (s) Gv (s) s
−
The Gv (s) now is composed of one real pole, two complex poles and two complex
zeros; in particular we can find the parameter ωz of the complex zeros as
s
kel
ωz =
Jl /n2
and a reasonable choice for the speed closed loop bandwidth is ωcv ≈ 0.7ωz
33
Chapter 5
Centralized control
n.b. as we saw in section 4.1 for a decentralized control we stated that a high
reduction ratios in transmissions between motors and joints is a fundamental re-
quirement because this reduces the magnitude of the noise d, if this decoupling effect
is not guaranteed we must use the centralized approach.
The centralized control approach allows us to develop several control schemes
both in the joint space that in the operational one.
34
d̂ = N −1 ∆B(q̄)N −1 ¨q̄ m + N −1 C(q̄, q̄)N
˙ −1 ˙
q̄ m + N −1 g(q̄)
N −1 g(q)
d̂ d
q̄ m Decentralized τm − −1 q̈ m 1
q̇ m 1
qm
J m + B̄ r s s
controller
− −
Dm
q̃(t) = q̄ − q(t)
1 1
V (q̃, q̇) = q̇ T B(q)q̇ + q̃ T K P q̃
2 2
with K P > 0 and symmetrical.
35
1
V̇ (q̇, q̃) = q̇ T B(q)q̈ + q̇ T Ḃ(q)q̇ − q̇ T K P q̃
2
1
using 4.1 = q̇ T (τ − C(q, q̇)q̇ − g(q)) + q̇ T Ḃ(q)q̇ − q̇ T K P q̃
2
1 T
= q̇ Ḃ(q) − 2C(q, q̇) q̇ + q̇ T (τ − g(q) − K P q̃)
2
as we saw in subsection 2.1.5 the first term is equal to zero
= q̇ T (τ − g(q) − K P q̃)
τ = g(q) + K P q̃ − K D q̇ (5.1)
the function V̇ (q̇, q̃) is semi-definite negative, but not definite negative (see the
possible state q̇ = 0, q̃ ∈ R), so we have to study furthermore the asymptotically
stability of the equilibrium q̇ = 0. We consider the dynamic system from Equa-
tion 4.1 at the equilibrium q̇ = 0 with the control law from Equation 5.1
and we get
K P q̃ = 0 =⇒ q̃ = 0
then for the Krasowski - La Salle Lemma we can state that the system with
the control law from Equation 5.1 is globally asyntotically stable with the unique
equilibrium in q = q̄. This result is valid only if gravity contribution g(q) is perfectly
compensated from the designed control law.
You can see the implemented control system in the Figure 5.2.
n.b. with this kind of regulator we do not have control on the time history with
which the error q̃(t) goes to zero, so this way is not practicable if we want track a
trajectory
36
KD
− q̇
q̄ τ
KP Robot q
−
g(·)
with
If B(q) is full rank for each configuration of the manipulator we can define the
control law called inverse dynamics
so, if the system knowledge is perfect, this law impose the dynamics q̈ = y; from
the extern the overall system appears as a double integrator.
Now we can design a control law for the function y, a valid choice can be a decou-
pled PD controller
¨q̃ + K D q̃˙ + K P q̃ = 0
then, the error q̃ is characterized by a second order dynamics that can be arbitrarily
assigned by suitable choice of the parameters of the diagonal matrices K P and K I .
This allows us to use this technique to track an assigned trajectory.
37
You can see the implementation of this control in Figure 5.3.
n.b. this technique requires perfect knowledge of the dynamic model, which might be
difficult in practice
¨q̄
q̇
q̄˙ q̃˙ y τ
KD B(·) Robot
− q
q̄ q̃
KP
− n(·, ·)
As we saw in above the inverse dynamics control required perfect knowledge of the
dynamics model of the robot, this is unrealistic in real robots, so we have to take
into account the model uncertainty.
Let us consider a more realist control law
still under the assumption that B(q) is invertible, for q̈ we can write
q̈ = y − η
where
η = I − B −1 B̂ y − B −1 ñ(q, q̇)
38
If we adopt the same control law we saw before in Equation 5.3, the error dynamic
become
¨q̃ + K D q̃˙ + K P q̃ = η
q̃ T
ξ = ˙T
q̃
ξ̇ = Hξ + D (¨q̄ − y + η)
with
0 I 0
H= ∈ R2n×2n , D= ∈ R2n×n
0 0 I
Before we go any further, we need to characterize the uncertainty with three as-
sumptions
• ∥I − B −1 B̂∥ ≤ α < 1 ∀q
A matrix B is definite positive and it is lower and upper bound, so the following
equation is always valid
0 < Bm ≤ ∥B −1 ∥ ≤ BM < ∞
39
that always satisfy the assumption
BM − Bm
∥I − B −1 B̂∥ ≤ <1
BM + Bm
n.b. B̂ = B =⇒ α = 0
y = K P q̃ + K I q̃˙ + ¨q̄ + w
ξ̇ = Hξ + D η − K P q̃ − K I q̃˙ − w
= H̃ξ + D (η − w)
defining K = K P K D with
0 I
H̃ = (H − DK) =
−K P K D
V (ξ) = ξ T Qξ > 0, ∀ξ ÷ 0
T
V̇ = ξ̇ Qξ + ξ T Qξ̇
T
= (ξ T H̃ + (η − w)T D T )Qξ + ξ T Q(H̃ξ + D (η − w))
T
= ξ T H̃ Q + QH̃ ξ + (η − w)T D T Qξ + ξ T QD (η − w)
40
transposing the second element because it is a scalar
T
= ξ T H̃ Q + QH̃ ξ + 2ξ T QD (η − w)
T
set z = D T Qξ and H̃ Q + QH̃ = −P
= −ξ T P ξ + 2z T (η − w)
n.b. because all eigenvalues of H̃ are negative for any P positive definite symmetrical
matrix also the solution Q is a positive definite symmetrical matrix
Let us analyze the derivative Lyapunov function, the first element −ξ T P ξ is always
negative, so we need to analyze the second term. If ξ ∈ ker(D T Q), then z = 0, so
the system is asymptotically stable, in the other case we have to define a control
function w that make the second term negative. From
z
w=ρ
∥z∥
we get
zTz
T T z
z (η − w) = z η − ρ = zTη − ρ ≤ ∥z∥∥η∥ − ρ∥z∥ = ∥z∥(∥η∥ − ρ)
∥z∥ ∥z∥
so, if ρ > ∥η∥ the globally asymptotically stability for the system is guaranteed.
Looking for define a function ρ exploiting the assumptions
so
1
ρ≥ (αQM + α∥K∥∥ξ∥ + BM Φ(∥ξ∥))
1−α
under the assumption that Φ(∥ξ∥) has the form α0 + α1 ∥ξ∥ + α2 ∥ξ∥2 we can chose
with
αQM + α0 BM α∥K∥ + α1 BM α2 BM
β0 ≥ , β1 ≥ , β2 ≥
1−α 1−α 1−α
41
this control law guarantees a globally asymptotically stability of the system.
So the overall control law is composed by three terms
• K P q̃ + K D q̃˙ + ¨q̄
stabilizes the nominal dynamic system in the error
• w = ρ(∥ξ∥) ∥z∥
z
z z
ρ(∥ξ∥) ∥z∥
DT Q
¨q̄
w
q̇
q̄˙ q̃˙ y τ
KD B̂(·) Robot
− q
q̄ q̃
KP
− n̂(·, ·)
42
where π is a suitable constant vector of uncertain dynamic parameters.
Let us consider the control law
where
σ = q̇ r − q̇ = q̃˙ + Λq̃
So let us check the stability of this system using the Lyapunov function
1 1
V (σ, q̃) = σ T B(q)σ + q̃ T M q̃
2 2
M is (as always) a positive definite matrix, so the derivative is
1
V̇ = σ T B(q)σ̇ + σ T Ḃ(q)σ + q̃ T M q̃˙
2
using B(q)σ̇ from Equation 5.4
1
= σ T (−C(q, q̇) − K D ) σ + σ T Ḃ(q)σ + q̃ T M q̃˙
2
1
= −σ T K D σ + σ T Ḃ(q) − 2C(q, q̇) σ + q̃ T M q̃˙
2
remembering the property of the matrix Ḃ(q) − 2C(q, q̇) seen in subsection 2.1.5
= −σ T K D σ + q̃ T M q̃˙
= −(q̃˙ + Λq̃)T K D (q̃˙ + Λq̃) + q̃ T M q̃˙
= −q̃˙ T K D q̃˙ − q̃ T ΛK D Λq̃ − 2q̃ T ΛK D q̃˙ + q̃ T M q̃˙
43
choosing M = 2ΛK D
V̇ is negative define thus the system is globally asymptotically stable with the equi-
librium q̃ = 0, q̃˙ = 0
Now let us consider a control law where the parameters are estimated and exploiting
the formulation with the parametric vector we saw above
where B̃, C̃, g̃ are the residual error given by the estimate of the model parameters,
and thus the Y (q, q̇, q̇ r , q̈ r )π̃ can be seen as the model residual error.
So consider a modified version of the Lyapunov function saw before
1 1
V (σ, q̃, π̃) = σ T B(q)σ + q̃ T ΛK D q̃ + π̃ T K π π̃
2 2
where M is already substituted and K π is a positive define matrix
1
V̇ = σ T B(q)σ̇ + σ T Ḃ(q)σ + 2q̃ T ΛK D q̃˙ + π̃ T K π π̃
˙
2
using B(q)σ̇ from uncertain dynamics model
1
= σ T (−C(q, q̇) − K D ) σ − σ T Y (q, q̇, q̇ r , q̈ r )π̃ + σ T Ḃ(q)σ
2
+ 2q̃ T ΛK D q̃˙ + π̃ T K π π̃
˙
1
= −σ T K D σ + σ T Ḃ(q) − 2C(q, q̇) σ − σ T Y (q, q̇, q̇ r , q̈ r )π̃
2
+ 2q̃ T ΛK D q̃˙ + π̃ T K π π̃
˙
= −σ T K D σ − σ T Y (q, q̇, q̇ r , q̈ r )π̃ + 2q̃ T ΛK D q̃˙ + π̃ T K π π̃
˙
= −σ T K D σ + 2q̃ T ΛK D q̃˙ + π̃ T (K π π̃
˙ − Y T (q, q̇, q̇ r , q̈ r )σ)
44
using σ
˙ = K −1 Y T (q, q̇, q̇ r , q̈ r )σ = π̃
if we update the parameters’ estimate as π̂ ˙
π
V̇ < 0 thus, the system is globally asymptotically stable with the equilibrium q̃ =
0, q̃˙ = 0
So, in summary the overall control law (which you can see in the Figure 5.5) is
described by the system
• K D (q̃˙ + Λq̃)
has the behaviour of a PD acting on the tracking error
• K −1 T ˙
π Y (q, q̇, q̇ r , q̈ r )(q̃ + Λq̃)
update the estimate of parameters in according to a gradient technique. The
matrix K π defines the speed of the convergence of the estimate to its asymp-
totic value.
n.b. asymptotically we will not get π̂ → π, but only Y (q, q̇, q̇ r , q̈ r )(π̂ − π) → 0
In conclusion the adaptive control offers worse performance than the robust
control in presence of model errors, but this first guarantees a more regular control
action than the robust control, which are characterized by potentially dangerous
high frequency switching.
45
¨q̄ ¨q̃ r
q̄˙ q̃˙
Λ
q̇
− q̇ r σ ˙
π̂ π̂ τ
1
K −1
π Y
T
s Y Robot
−
q̄ q̃ q
Λ
−
KD
x̃ = x̄ − x
1 1
V (x̃, q̇) = q̇ T B(q)q̇ + x̃T K P x̃
2 2
with K P symmetric positive definite matrix
1 ˙ T K P x̃
V̇ = q̇ T B(q)q̈ + q̇ T Ḃ(q)q̇ + x̃
2
˙ = ẋ = −J A (q)q̇
exploiting the analytic Jacobian we have x̃
1
= q̇ T B(q)q̈ + q̇ T Ḃ(q)q̇ − q̇ T J TA (q)K P x̃
2
46
replacing Bq̈ with the Equation 4.1
1
= q̇ T (τ − C(q, q̇)q̇ − g(q)) + q̇ T Ḃ(q)q̇ − q̇ T J TA (q)K P x̃
2
1 T
= q̇ Ḃ(q) − 2C(q, q̇) q̇ + q̇ T τ − g(q) − J TA (q)K P x̃
2
with the property we saw in subsection 2.1.5 we can eliminate the first term
= q̇ T τ − g(q) − J TA (q)K P x̃
we can state V̇ ≤ 0 (V̇ = 0 for q̇ = 0, ∀x̃ ∈ R) so let us check the system trajectory.
The dynamics model (Equation 4.1) with the control law become
J TA (q)K P x̃ = 0
so, if the Jacobian is full rank the only solution is x̃ = 0, thus the system is globally
asymptotically stable with the equilibrium x̄ = x. You can see the corresponding
scheme in Figure 5.6
KD J A (·)
ẋ
− q̇
x̄ x̃ τ
KP JT
A (·) Robot
− q
g(·)
k(·)
x̂
47
5.2.2 Inverse dynamics control
To tracking a trajectory the PD + gravity compesation is not usable (it is
˙ = 0), so we have to implement a different control system, in
constrained by x̄
particular we can adapt the inverse dynamics control designed to the control in
the joints space saw in subsection 5.1.3.
As we saw if we impose the control law in Equation 5.2 we get that q̈ = y, so we
have to design a new input y in such a way to allow the trackinf of the trajectory
x̄(t). A way to do this is notice that
d d
ẍ = ẋ = (J A (q)q̇) = J A (q)q̈ + J̇ A (q, q̇)q̇
dt dt
so we can invert the function and get
−1
q̈ = J A (q) ẍ − J̇ A (q, q̇)q̇
Let us find the error dynamics beginning from the dynamic model subject the above
control law
B(q)q̈ + n(q, q̇) = B(q)J −1 ¨ ˙
x̄ + K D x̃ + K P x̃ − J̇ A (q, q̇)q̇ + n(q, q̇)
A (q)
B(q)q̈ = B(q)J −1
A (q) ¨
x̄ + K D
˙
x̃ + K P x̃ − J̇ A (q, q̇)q̇
˙ + K P x̃ − J̇ A (q, q̇)q̇ − J A (q)q̈
¨ + K D x̃
0 = x̄
substitute q̈
˙ + K P x̃ − J̇ A (q, q̇)q̇ − ẍ − J̇ A (q, q̇)q̇
¨ + K D x̃
0 = x̄
˙ + K P x̃ − ẍ
¨ + K D x̃
0 = x̄
¨ = x̄
recognize x̃ ¨ − ẍ
¨ + K D x̃
0 = x̃ ˙ + K P x̃
48
So the dynamics of the error in the operative space is characterized by a second order
function with K P , K D arbitrarly assigned. You can see the schema in Figure 5.7.
¨
x̄
q̇
˙
x̄ ˙
x̃ y τ
KD J −1
A (·) B(·) Robot
− − q
x̄ x̃
KP
n(·, ·)
−
J̇ A (·, ·)
˙
x̂
J A (·)
x̂
k(·)
49
Chapter 6
In this chapter we will analyze how the robot interact with the environment, and
we will develop techniques to perform this task based on the control of the forces
acting on the robot (generally on the end effector).
This kind of study is essential for the robots will interact with humans (collaborative
robots).
50
6.1 Forces in statics
Let us start from the study of the robots’ statics subjected to forces (and moments)
acting on the end-effector. We will use the principle of the virtual works. For the
torques joints we find the contribution as
dWτ = τ T dq
dWγ = f T dpe + µT ω e dt
with f and µ are respectively the resulting force and moment act on the end effector.
Exploiting the geometrical Jacobian we can write dWγ as a function of q
The elementary movement and the virtual movement coincide, so we can write
δWτ = τ T δq
δWγ = γ T J (q)δq
τ = J T (q)γ
n.b. the static relation shows a duality with the robot kinetics that can be written in
the form v e = J (q)q̇ (kineto-static duality)
n.b. if γ ∈ ker(J T ), then it does not require any joint torque to balance γ
51
Let us consider a 1 dof mass (M ) on which acting two forces (u, f ) (where a is the
mass’ acceleration)
Ma = u + f
u = −kd v − Ke p
where we indicted with v, p respectively the mass’ speed and position. So the system
become
M a + kd v + K e p = f
So we defined a relation between the force and the position (and its derivation) in
a mass-spring-damper system; we will call this relation mechanical impedance.
if we substitute it we get
q̈ = y − B −1 (q)J T (q)γ
now, assume for y the control law we saw for the inverse dynamic control in operative
space (Equation 5.5), for the closed loop we get
q̈ = J −1
A (q)
¨ ˙
x̄ + K D x̃ + K P x̃ − J̇ A (q, q̇)q̇ − B −1 (q)J T (q)γ
˙ + K P x̃ − J A (q)B −1 (q)J T (q)γ
¨ + K D x̃
J A (q)q̈ + J̇ A (q, q̇)q̇ = x̄
52
recognizing J A q̈ + J̇ A (q, q̇)q̇ = ẍ
˙ + K P x̃ − J A (q)B −1 (q)J T (q)γ
¨ + K D x̃
ẍ = x̄
¨ + K D x̃
x̃ ˙ + K P x̃ = J A (q)B −1 (q)J T (q)γ
¨ + K D x̃
x̃ ˙ + K P x̃ = B −1
A (q)γ A
we get an impedance relation, which is coupled and only partially assignable. But
if we have also the forces’ measurement we can change the control laws to exploit
them
¨ + D d x̃
M d x̃ ˙ + K d x̃ = γ A
• it requires complete access to the robot, the control law is design directly on
joints torques
53
6.2.2 Admittance control
Defining the admittance filter function (the inverse of the impedance)
1
H(s) =
Md s2 + Dd s + K d
we can make the control system in Figure 6.1. In which
1
x̄ − x ≈ f
Md s2 + D d s + K d ext
H(s)
f ext
x̄ High gain x
motion Robot
− controller
54
locity ωl of the pipe in the hole (where l is vector unit in the direction of the pipe
longitudinal axis)
It is evident that the artificial and natural constraints are complementary, and they
suggest the control approach where the desire functions are defined only for the
artificial constraints, while the state subject to the natural constraints are free
to evolve.
So we can define the useful diagonal matrix Σ (6 × 6) with only zeros or ones as
elements called selection matrix.
The Σ matrix is defined to weight the error on the reference for controlled forces
the element (i,i) of the matrix is 1 for the others 0.
An approximate scheme of the control based on this approach can see in Figure 6.2, it
is called hybrid force/position control and it is characterized by a high flexibility.
It is possible identify some inconsistencies can appear due to nominal model used:
The first two are automatically filtered by the select matrix, the third can be miti-
gated by real time estimation process.
Σ
γ̂
γ̄ Force
Σ
control
τ
˙
x̄ Motion
I −Σ
control
I −Σ
˙
x̂
55
6.4 Explicit control
Consider a 1dof system with a mass m subject to 2 forces f, u subjected to the
relation (where x is the position of the mass)
w + u = mẍ
−kx + u = mẍ
1
x(s) = u(s)
ms2 +k
so if we evaluated the reaction force on the other side f of the spring we can get the
relation
k
f (s) = u(s)
ms2 +k
an equivalent block diagram can be seen in the Figure 6.3
−
u 1 x f
ms2 k
k
m ωn2
Gf (s) = k
=
s2 + m s2 + ωn2
p
highlighting it presents 2 imaginary poles in ±i k/m and for k → ∞ then Gf (s) →
1
So we can close a loop around the force to regulate it (Figure 6.4)
a good choice for Rf (s) is a pure integrator
Kif
Rf (s) =
s
so we can directly assign ωcf changing Kif ≈ ωcf if ωcf < ωn ; with this choice the
resonant frequency ωn is out of the system bandwidth.
56
−
f¯ u 1 x f
Rf (s) ms2 k
−
−
x̄ u x f
R(s) G(s) k
−
f (s) kR(s)G(s)
=
x̄(s) 1 + kG(s) + R(s)G(s)
f (s)
which for infinitely contact stiffness (k → ∞) become x̄(s)
= R(s) and f ≈ u
x̄ u f
R(s) ≈1
now, let us try to close a loop on the force with another controller. In particular,
we can design a regulator composed by two action, one to compensate the position
regulator influence (C(s)), and another one to impose the desired dynamics to f
(Rf (s)), you can see this system in Figure 6.7.
Under the hypothesis that the position regulator is a PID
1 kD s2 + kP s + kI
R(s) = kP + kI + kD s =
s s
we can design the compensator as
1
C(s) =
kD s2 + kP s + kI
57
f¯ x̄ u f
Rf (s) C(s) R(s) ≈1
−
1
Lf (s) = Rf (s)C(s)R(s) = Rf (s)
s
f¯ 1
f
Rf (s) s
−
1
Rf (s) = kPf + kIf
s
so finally the open loop function become
skPf + kIf
Lf (s) =
s2
the ωcf can be set as ωcf ≈ kPf
58
Chapter 7
7.1 Camera
A camera performs a 2D projection of a 3D space, this projection involves an in-
formation loss. To determinate coordinates of a 3D point from the 2D projection
additional information are needed.
λ λ
x= X y= Y (7.1)
Z Z
Where λ is the focal length(in pixel) of the camera.
n.b. the above relations is valid only if 3D space and projection space share the same
reference frame
7.1.2 Calibration
Before using the camera its need to be calibrated; we need to find two kinds of
parameters
• Intrinsic parameters
The parameters that characterize the camera as the focal length, and some
kind of aberration in the lens that have to be considered in computer vision
59
task. All these parameters are fixed for the camera, and it is not necessary to
recalculate when the task changes.
• Extrinsic parameters
All the other parameters used to map the 3D point into the projective space,
like camera’s orientation and position respect the global reference frame. If
the camera is moved the extrinsic parameters have to be recalculated.
7.1.3.1 Eye-to-hand
The camera is fixed to the global reference frame, pointed toward the task space.
• Advantages
– The movements of the robot does not affect the camera field of view
– The geometric relation between projective space and the 3D space does
not change
• Disadvantages
– The movements of the robot may occlude the camera field of view
7.1.3.2 Eye-in-hand
• Advantages
• Disadvantages
– The geometric relation between projective space and the 3D space changed
with the robot movements
– The camera field of view continuously change even for small movements
60
7.2 Control
The main control schemes based on computer vision are given by the combination
of two measure methods and two actuation approaches.
From the camera images a partial 3D representation of the task space is recreated
exploiting technics of computer vision. Algorithms to estimate the pose are com-
putably intense and sensitive to errors in camera calibration.
The visual information are used at high level of the control; the speed control is not
based on visual data and only the position control exploiting the visual measure-
ments. The camera can work at low framerate without compromising the overall
performance of the position control system. Generally, in industrial application is
the only way to go because the only accessible control variable on the robot is the
position set point.
The visual information are used also at the low level control; so, the access to the
actuators input of the robots is necessary to exploiting the visual control to achieve
61
x̄d Cartesian Axis
Actuators Robot
controller controller
−
Image
Pose
feature
x̂ estimator ξ video
extraction
ξ̄ d Image
Axis
space Actuators Robot
controller
− controller
Image
feature
ξ extraction video
P w = Ow w c
c (t) + Rc (t)P (t)
differentiating in time
x̄d Cartesian
Actuators Robot
controller
−
Image
Pose
feature
x̂ estimator ξ video
extraction
62
ξ̄ d Image
space Actuators Robot
− controller
Image
feature
ξ extraction video
w w c
0 = Ȯ c + Ṙc P c + Rw
c Ṗ
c
and find the solution for Ṗ
c c c
Ṗ = −Ȯ c − Ṙc P c
c c
Ṗ = −Ȯ c − ω cc × P c
we can write
Ẋ = Y ωz − Zωy − Ȯx
Ẏ = Zωx − Xωz − Ȯy
Ż = Xωy − Y ωx − Ȯz
x
Ẋ = Zωz − Zωy − Ȯx
λ
y
Ẏ = Zωx − Zωz − Ȯy
λ
x y
Ż = Zωy − Zωx − Ȯz
λ λ
63
Differentiating in time projective coordinate from Equation 7.1
dX ẊZ − X Ż
ẋ = λ =λ
dt Z Z2
dY Ẏ Z − Y Ż
ẏ = λ =λ
dt Z Z2
now we can finally write the relation between motion of the camera to the motion
of the image’s features
c
ẋ Ȯ c
= L(λ, x, y, Z)
ẏ ω cc
where
" 2 2
#
xy
− Zλ 0 x
Z λ
− λ +x
λ
y
L(λ, x, y, Z) = y λ +y 2
2
0 − Zλ Z λ
− xy
λ
−x
we can see that the rotation part does not depend on depth Z.
Due to the shape of it, we can state that exist an associated null space with dimension
of 4, so there are four types of camera movement that not produce any change of
the feature in the projective image.
where T cw (q) is the coordinate transformation between world and camera frame, and
J (q) is the robot geometrical Jacobian. So, we can write
64
ẋ
= L(λ, x, y, Z)T cw (q)J (q)q̇ = J I (λ, x, y, Z, q)q̇
ẏ
65
Chapter 8
Summary
Control law
τ = g(q) + K P q̃ − K D q̇
Lyapunov’s function
1 1
V (q̃, q̇) = q̇ T B(q)q̇ + q̃ T K P q̃
2 2
Closed loop
B(q)q̈ + C(q, q̇)q̇ = K P q̃ − K D q̇
Block diagram in Figure 5.2
Control law
Open loop
q̈ = y
Closed loop
¨q̃ + K D q̃˙ + K P q̃ = 0
Block diagram in Figure 5.3
66
8.1.2 Control in operational space
8.1.2.1 PD + gravity compensation
Control law
τ = g(q) + J TA (q)K P x̃ − J TA (q)K D J A (q)q̇
Lyapunov’s function
1 1
V (x̃, q̇) = q̇ T B(q)q̇ + x̃T K P x̃
2 2
Closed loop
B(q)q̈ + C(q, q̇)q̇ = J TA (q)K P x̃ − J TA (q)K D J A (q)q̇
Block diagram in Figure 5.6
Control law
τ = B(q)y + n(q, q̇)
y = J −1
A (q) ¨
x̄ + K D
˙
x̃ + K P x̃ − J̇ A (q, q̇)q̇
Open loop
q̈ = y
Closed loop
¨ + K D x̃
x̃ ˙ + K P x̃ = 0
Block diagram in Figure 5.7
Closed loop
¨ + D d x̃
M d x̃ ˙ + K d x̃ = γ A
67
8.2.2 Admittance control
Dynamics
1
x̄ − x ≈ f
Md s2 + D d s + K d ext
Block diagram in Figure 6.1
68
Index
69