Trajectory Tracking Control: Robotics 2
Trajectory Tracking Control: Robotics 2
𝑢, = 𝑀 𝑞, 𝑞̈ , + 𝑛(𝑞, , 𝑞̇ , )
yields exact reproduction of the desired motion, provided
that 𝑞(0) = 𝑞, (0), 𝑞(0)
̇ = 𝑞̇ , (0) (initial matched state)
Robotics 2 2
In practice ...
Robotics 2 3
Introducing feedback
Robotics 2 4
A series of trajectory controllers
1. inverse dynamics compensation (FFW) + PD typically, only local
stabilization of
𝑢 = 𝑢7 , + 𝐾? 𝑞, − 𝑞 + 𝐾@ (𝑞̇ , − 𝑞)
̇ trajectory error
𝑒(𝑡) = 𝑞, (𝑡) − 𝑞(𝑡)
2. inverse dynamics compensation (FFW) + variable PD
6 𝑞, 𝐾? 𝑞, − 𝑞 + 𝐾@ (𝑞̇ , − 𝑞)
𝑢 = 𝑢7 , + 𝑀 ̇
3. feedback linearization (FBL) + [PD+FFW] = “COMPUTED TORQUE”
6 𝑞 𝑞̈ , + 𝐾? 𝑞, − 𝑞 + 𝐾@ (𝑞̇ , − 𝑞)
𝑢=𝑀 ̇ + 𝑛(𝑞,
7 𝑞) ̇
4. feedback linearization (FBL) + [PID+FFW]
6 𝑞
𝑢=𝑀 𝑞̈ , + 𝐾? 𝑞, − 𝑞 + 𝐾@ 𝑞̇ , − 𝑞̇ + 𝐾A B 𝑞, − 𝑞 𝑑𝑡 + 𝑛(𝑞,
7 𝑞) ̇
more robust to uncertainties, but also more complex to implement in real time
Robotics 2 5
Feedback linearization control
ROBOT (or its DYNAMIC MODEL)
𝑞̈ , + 𝐾@ 𝑞̇ , + 𝑎 6 + 𝑢 + 𝑞̈ 𝑞̇ 𝑞
+ 𝐾? 𝑞, 𝑀(𝑞) 𝑀 DE (𝑞)
_ + _
𝑛(𝑞, 𝑞)
̇
symmetric and
positive definite
𝑛(𝑞,
7 𝑞) ̇
matrices 𝐾? , 𝐾@
𝐾@
𝐾?
in nominal
conditions 𝑀 𝑞 𝑞̈ + 𝑛 𝑞, 𝑞̇ = 𝑢 = 𝑀 𝑞 𝑎 + 𝑛 𝑞, 𝑞̇ 𝑞̈ = 𝑎
6 = 𝑀, 𝑛7 = 𝑛)
(𝑀 linear and
nonlinear robot dynamics nonlinear control law decoupled
global asymptotic system
𝑎 = 𝑞̈ , + 𝐾@ 𝑞̇ , − 𝑞̇ + 𝐾? 𝑞, − 𝑞
stabilization
Robotics 2 6
Interpretation in the linear domain
+ 𝑎 = 𝑞̈ 𝑞̇ 𝑞
𝑞̈ , + 𝐾@ 𝑞̇ , + 𝐾? 𝑞,
_
> 0, diagonal 𝐾@
𝐾?
under feedback linearization control, the robot has a dynamic behavior that is
invariant, linear and decoupled in its whole workspace (∀(𝑞, 𝑞)
̇ )
a unitary mass (𝑚 = 1) in the joint space !!
linearity
error transients 𝑒I = 𝑞,I − 𝑞I → 0 exponentially, prescribed by 𝐾?I , 𝐾@I choice
decoupling
each joint coordinate 𝑞I evolves independently from the others, forced by 𝑎I
𝑒̈ + 𝐾@ 𝑒̇ + 𝐾? 𝑒 = 0 ⟺ 𝑒̈I +𝐾@I 𝑒İ + 𝐾?I 𝑒I = 0
Robotics 2 7
Addition of an integral term: PID
whiteboard…
𝑞̈ , + 𝐾@ 𝑞̇ , + 𝐾? 𝑞,
𝑞, + 𝑒 +
+ 𝑎 = 𝑞̈ 𝑞̇ 𝑞
_
𝐾A _
+
𝑞̈ = 𝑎 = 𝑞̈ , + 𝐾@ 𝑞̇ , − 𝑞̇ + 𝐾? 𝑞, − 𝑞 + 𝐾A B 𝑞, − 𝑞 𝑑𝜏 𝑒 = 𝑞, − 𝑞
⇒ 𝑒I = 𝑞,I − 𝑞I (𝑖 = 1, . . , 𝑁) ⇒ 𝑒̈I + 𝐾@I 𝑒̇I + 𝐾?I 𝑒I + 𝐾?I B 𝑒I 𝑑𝜏 = 0
(1) (2)
1 ⇒(6)
ℒ[𝑒I 𝑡 ] ⇒ 𝑠 R + 𝐾@I 𝑠 + 𝐾?I + 𝐾AI 𝑒I 𝑠 = 0 3 1 𝐾?I
(3) 𝑠 exponential
2 𝐾@I 𝐾AI stability
T R ⇒
𝑠× ⇒ 𝑠 + 𝐾@I 𝑠 + 𝐾?I 𝑠 + 𝐾AI 𝑒I 𝑠 = 0 1 (𝐾 𝐾
@I ?I − 𝐾AI )/𝐾@I conditions by
(4) (5)
0 𝐾AI Routh criterion
Robotics 2 8
Remarks
n desired joint trajectory can be generated from Cartesian data
𝑝̈, 𝑡 , 𝑝̇, 0 , 𝑝, (0)
𝑞̇ , (0) 𝑞, (0) 𝑞, 0 = 𝑓 DE 𝑝, 0
𝑞̇ , (𝑡) 𝑞̇ , 0 = 𝐽DE 𝑞, 0 𝑝̇, 0
𝑞̈ , (𝑡) 𝑞, (𝑡) ̇ , )𝑞̇ ,
𝑞̈ , 𝑡 = 𝐽DE 𝑞, 𝑝̈, 𝑡 − 𝐽(𝑞
n 8 𝛼 (𝑞, 𝑞,̇ 𝑎)
real-time computation by Newton-Euler algo: 𝑢YZ[ = 𝑁𝐸
n simulation of feedback linearization control
true parameters 𝜋
𝑞, 𝑡 , 𝑞̇ , 𝑡 ,
𝑞̈ , 𝑡 feedback 𝑞
robot
linearization 𝑞̇
estimated parameters 𝜋7
Hint: there is no use in simulating this control law in ideal case (𝜋7 = 𝜋 ); robot behavior
will be identical to the linear and decoupled case of stabilized double integrators!!
Robotics 2 9
Further comments
n choice of the diagonal elements of 𝐾𝑃, 𝐾@ (and 𝐾𝐼 )
n for shaping the error transients, with an eye to motor saturations...
𝑒(𝑡) = 𝑞, (𝑡) − 𝑞(𝑡) 𝑒(0)
critically damped transient
𝑡
n parametric identification
n to be done in advance, using the property of linearity in the dynamic
coefficients of the robot dynamic model
n choice of the sampling time of a digital implementation
n compromise between computational time and tracking accuracy,
typically 𝑇c = 0.5 ÷ 10 ms
n exact linearization by (state) feedback is a general technique
of nonlinear control theory
n can be used for robots with elastic joints, wheeled mobile robots, ...
n non-robotics applications: satellites, induction motors, helicopters, ...
Robotics 2 10
Another example of feedback linearization design
n dynamic model of robots with elastic joints
n 𝑞 = link position 2𝑁 generalized
n 𝜃 = motor position (after reduction gears) coordinates (𝑞, 𝜃)
n 𝐵h = diagonal matrix (> 0) of inertia of the (balanced) motors
n 𝐾 = diagonal matrix (> 0) of (finite) stiffness of the joints
4𝑁 state 𝑀 𝑞 𝑞̈ + 𝑐 𝑞, 𝑞̇ + 𝑔 𝑞 + 𝐾 𝑞 − 𝜃 = 0 (1)
variables
̇
𝑥 = (𝑞, 𝜃, 𝑞,̇ 𝜃) 𝐵h 𝜃̈ + 𝐾 𝜃 − 𝑞 = 𝑢 (2)
n is there a control law that achieves exact linearization via feedback?
𝑢 = 𝛼 𝑞, 𝜃, 𝑞,̇ 𝜃̇ + 𝛽 𝑞, 𝜃, 𝑞,̇ 𝜃̇ 𝑎
𝑑l 𝑞I linear and decoupled system:
YES and it yields l = 𝑎I , 𝑖 = 1, . . , 𝑁 𝑁 chains of 4 integrators
𝑑𝑡 (to be stabilized by linear
control design)
Hint: differentiate (1) w.r.t. time until motor acceleration 𝜃̈ appears;
substitute this from (2); choose 𝑢 so as to cancel all nonlinearities …
Robotics 2 11
Alternative global trajectory controller
𝑢 = 𝑀 𝑞 𝑞̈ , + 𝑆 𝑞, 𝑞̇ 𝑞̇ , + 𝑔 𝑞 + 𝐹o 𝑞̇ , + 𝐾? 𝑒 + 𝐾@ 𝑒̇
error state 𝑥
Robotics 2 13
Analysis of asymptotic stability
of the trajectory error - 2
n since i) 𝑉 is lower bounded and ii) 𝑉̇ ≤ 0, we can check condition iii)
in order to apply Barbalat lemma
𝑉̈ = −2𝑒̇ q (𝐾@ + 𝐹o )𝑒̈ ... is this bounded?
Robotics 2 14
Analysis of asymptotic stability
of the trajectory error – end of proof
𝑉̇ = 0 ⇔ 𝑒̇ = 0
n the closed-loop dynamics in this situation is
𝑀 𝑞 𝑒̈ = −𝐾? 𝑒
Robotics 2 15
Regulation as a special case
n what happens to the control laws designed for trajectory
tracking when 𝑞𝑑 is constant? are there simplifications?
n feedback linearization
𝑢 = 𝑀 𝑞 𝐾? 𝑞, − 𝑞 − 𝐾@ 𝑞̇ + 𝑐 𝑞, 𝑞̇ + 𝑔(𝑞)
n no special simplifications
n however, this is a solution to the regulation problem with
exponential stability (and decoupled transients at each joint!)
n alternative global controller
𝑢 = 𝐾? (𝑞, − 𝑞) − 𝐾@ 𝑞̇ + 𝑔 𝑞
n we recover the PD + gravity cancellation control law!!
Robotics 2 16
Trajectory execution without a model
n is it possible to accurately reproduce a desired smooth joint-
space reference trajectory with reduced or no information on
the robot dynamic model?
n this is feasible in case of repetitive motion tasks over a finite
interval of time
n trials are performed iteratively, storing the trajectory error
information of the current execution [𝑘-th iteration] and
processing it off line before the next trial [(𝑘 + 1)-iteration] starts
n the robot should be reinitialized in the same initial position at the
beginning of each trial
n the control law is made of a non-model based part (typically, a
decentralized PD law) + a time-varying feedforward which is
updated at every trial
n this scheme is called iterative trajectory learning
Robotics 2 17
Scheme of iterative trajectory learning
n control design can be illustrated on a SISO linear system
in the Laplace domain
“plug-in” signal:
𝑣E (𝑡) ≡ 0 at
first (𝑘 = 1) iteration
𝑪(𝒔) 𝑷(𝒔)
𝑦 𝑠 = 𝑃 𝑠 𝑢 𝑠 = 𝑃 𝑠 𝑣 𝑠 + 𝑢… 𝑠
=𝑃 𝑠 𝑣 𝑠 +𝑃 𝑠 𝐶 𝑠 𝑒 𝑠
= 𝑃 𝑠 𝑣 𝑠 + 𝑃 𝑠 𝐶 𝑠 𝑦, 𝑠 − 𝑦(𝑠)
𝑪(𝒔) 𝑷(𝒔) ⇒ (1 + 𝑃 𝑠 𝐶 𝑠 ) 𝑦 𝑠 =
= 𝑃 𝑠 𝑣 𝑠 + 𝑃 𝑠 𝐶 𝑠 𝑦, 𝑠
𝑃 𝑠 𝐶 𝑠 𝑃 𝑠
⇒ 𝑦 𝑠 = 𝑦, 𝑠 + 𝑣 𝑠 = 𝑊 𝑠 𝑦, 𝑠 + 𝑊ˆ 𝑠 𝑣(𝑠)
1+𝑃 𝑠 𝐶 𝑠 1+𝑃 𝑠 𝐶 𝑠
§ feedback control law at iteration 𝑘
𝑢„… 𝑠 = 𝐶 𝑠 𝑦, 𝑠 − 𝑦„ 𝑠 = 𝐶 𝑠 𝑦, 𝑠 − 𝑃 𝑠 𝐶(𝑠) 𝑣„ 𝑠 + 𝑢„… 𝑠
𝐶 𝑠 𝑃 𝑠 𝐶 𝑠
⇒ …
𝑢„ 𝑠 = 𝑦 𝑠 − 𝑣 𝑠 = 𝑊c 𝑠 𝑦, 𝑠 − 𝑊 𝑠 𝑣„ 𝑠
1+𝑃 𝑠 𝐶 𝑠 , 1+𝑃 𝑠 𝐶 𝑠 „
§ error at iteration 𝑘
𝑒„ 𝑠 = 𝑦, 𝑠 − 𝑦„ 𝑠 = 𝑦, 𝑠 − 𝑊 𝑠 𝑦, 𝑠 + 𝑊ˆ 𝑠 𝑣„ 𝑠 = 1 − 𝑊 𝑠 𝑦, 𝑠 − 𝑊ˆ 𝑠 𝑣„ 𝑠
Robotics 2
𝑊‰ (𝑠) = 1/(1 + 𝑃 𝑠 𝐶 𝑠 ) 19
Learning update law
n the update of the feedforward term is designed as
with 𝛼 and 𝛽 suitable filters
𝑣„‹E 𝑠 = 𝛼(𝑠)𝑢„… 𝑠 + 𝛽(𝑠)𝑣„ 𝑠
(also non-causal, of the FIR type)
recursive expression 𝛼 𝑠 𝐶 𝑠
𝑣„‹E 𝑠 = 𝑦, 𝑠 + (𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 )𝑣„ (𝑠)
of feedforward term 1+𝑃 𝑠 𝐶 𝑠
recursive expression 1−𝛽 𝑠
𝑒 𝑠 = 𝑦, 𝑠 + 𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 𝑒„ (𝑠)
of error 𝑒 = 𝑦, − 𝑦 „‹E 1+𝑃 𝑠 𝐶 𝑠
Robotics 2 20
Proof of recursive updates
whiteboard…
Robotics 2 23
Application to robots
n for 𝑁-dof robots modeled as
𝐵h + 𝑀(𝑞) 𝑞̈ + 𝐹o + 𝑆(𝑞, 𝑞)
̇ 𝑞̇ + 𝑔 𝑞 = 𝑢
we choose as (initial = pre-learning) control law
𝑢 = 𝑢… = 𝐾? 𝑞, − 𝑞 + 𝐾@ 𝑞̇ , − 𝑞̇ + 𝑔7 𝑞
and design the learning filters (at each joint) using
the linear approximation
𝑞I (𝑠) 𝐾@I 𝑠 + 𝐾?I
𝑊I 𝑠 = = 𝑖 = 1, ⋯ , 𝑁
𝑞,I (𝑠) 𝐵“h 𝑠 + 𝐹“oI + 𝐾@I 𝑠 + 𝐾?I
R
high level of
dry friction
Harmonic Drives
transmissions
with ratio 160:1 desired velocity/position for both joints
joint 3
feedforward 𝑣𝑘 for 𝑘 = 3, 6, 12 (zero at 𝑘 = 1)