35
Robotics 2 Prof. Alessandro De Luca Trajectory Tracking Control

Trajectory Tracking Control

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Trajectory Tracking Control

Robotics 2

Prof. Alessandro De Luca

Trajectory Tracking Control

Page 2: Trajectory Tracking Control

Inverse dynamics controlgiven the robot dynamic model

and a twice-differentiable desired trajectory for 𝑡 ∈ [0, 𝑇]

applying the feedforward torque in nominal conditions

yields exact reproduction of the desired motion, provided that 𝑞(0) = 𝑞,(0), �̇�(0) = �̇�,(0) (initial matched state)

𝑐 𝑞, �̇� + 𝑔 𝑞 + friction model

Robotics 2 2

𝑀 𝑞 �̈� + 𝑛 𝑞, �̇� = 𝑢

𝑞, 𝑡 → �̇�, 𝑡 , �̈�,(𝑡)

𝑢, = 𝑀 𝑞, �̈�, + 𝑛(𝑞,, �̇�,)

Page 3: Trajectory Tracking Control

In practice ...

n initial state is “not matched” to the desired trajectory 𝑞,(𝑡)n disturbances on the actuators, truncation errors on data, …n inaccurate knowledge of robot dynamic parameters (link

masses, inertias, center of mass positions)n unknown value of the carried payloadn presence of unmodeled dynamics (complex friction

phenomena, transmission elasticity, …)

a number of differences from the nominal condition

Robotics 2 3

Page 4: Trajectory Tracking Control

Introducing feedback

with 6𝑀, 7𝑛 estimates of terms(or coefficients) in the dynamic model

note: 7𝑢, can be computed off line [e.g., by 8𝑁𝐸;(𝑞,, �̇�,, �̈�,)]

feedback is introduced to make the control scheme more robust

different possible implementations depending on amount of computational load share

§ OFF LINE ( open loop) § ON LINE ( closed loop)

two-step control design:1. compensation (feedforward) or cancellation (feedback) of nonlinearities2. synthesis of a linear control law stabilizing the trajectory error to zero

Robotics 2 4

7𝑢, = 6𝑀 𝑞, �̈�, + 7𝑛(𝑞,, �̇�,)

Page 5: Trajectory Tracking Control

A series of trajectory controllers1. inverse dynamics compensation (FFW) + PD

2. inverse dynamics compensation (FFW) + variable PD

3. feedback linearization (FBL) + [PD+FFW] = “COMPUTED TORQUE”

4. feedback linearization (FBL) + [PID+FFW]

more robust to uncertainties, but also more complex to implement in real time

typically, only localstabilization oftrajectory error

𝑒(𝑡) = 𝑞,(𝑡) − 𝑞(𝑡)

Robotics 2 5

𝑢 = 7𝑢, + 𝐾? 𝑞, − 𝑞 + 𝐾@(�̇�, − �̇�)

𝑢 = 7𝑢, + 6𝑀 𝑞, 𝐾? 𝑞, − 𝑞 + 𝐾@(�̇�, − �̇�)

𝑢 = 6𝑀 𝑞 �̈�, + 𝐾? 𝑞, − 𝑞 + 𝐾@(�̇�, − �̇�) + 7𝑛(𝑞, �̇�)

𝑢 = 6𝑀 𝑞 �̈�, + 𝐾? 𝑞, − 𝑞 + 𝐾@ �̇�, − �̇� + 𝐾A B 𝑞, − 𝑞 𝑑𝑡 + 7𝑛(𝑞, �̇�)

Page 6: Trajectory Tracking Control

+

_

𝑢ROBOT (or its DYNAMIC MODEL)

Feedback linearization control

symmetric andpositive definitematrices 𝐾?, 𝐾@

Robotics 2 6

�̇��̈� 𝑞𝑀DE(𝑞)

+

+

𝑎 6𝑀(𝑞)

7𝑛(𝑞, �̇�)

𝑛(𝑞, �̇�)

𝐾@𝐾?

+

_

�̈�, + 𝐾@�̇�,+ 𝐾?𝑞,

in nominalconditions

( 6𝑀 = 𝑀, 7𝑛 = 𝑛) nonlinear robot dynamics nonlinear control law

linear anddecoupled

system

𝑀 𝑞 �̈� + 𝑛 𝑞, �̇� = 𝑢 = 𝑀 𝑞 𝑎 + 𝑛 𝑞, �̇� �̈� = 𝑎

global asymptoticstabilization of tracking error

𝑎 = �̈�, + 𝐾@ �̇�, − �̇� + 𝐾? 𝑞, − 𝑞

Page 7: Trajectory Tracking Control

Interpretation in the linear domain

𝐾@𝐾?

+

under feedback linearization control, the robot has a dynamic behavior that isinvariant, linear and decoupled in its whole workspace (∀(𝑞, �̇�))

> 0, diagonal

each joint coordinate 𝑞I evolves independently from the others, forced by 𝑎I

𝑎 = �̈� 𝑞

error transients 𝑒I = 𝑞,I − 𝑞I → 0 exponentially, prescribed by 𝐾?I, 𝐾@I choicelinearity

decoupling

a unitary mass (𝑚 = 1) in the joint space !!

Robotics 2 7

�̈�, + 𝐾@�̇�, + 𝐾?𝑞,�̇�

�̈� + 𝐾@�̇� + 𝐾?𝑒 = 0 ⟺ �̈�I +𝐾@I ̇𝑒I + 𝐾?I𝑒I = 0

_

Page 8: Trajectory Tracking Control

𝐾@𝐾?

+ 𝑎 = �̈� 𝑞

Robotics 2 8

�̈�, + 𝐾@�̇�, + 𝐾?𝑞,�̇�

Addition of an integral term: PIDwhiteboard…

_

+

+𝐾A

+_

𝑞, 𝑒

> 0,diagonal

�̈� = 𝑎 = �̈�, + 𝐾@ �̇�, − �̇� + 𝐾? 𝑞, − 𝑞 + 𝐾A B 𝑞, − 𝑞 𝑑𝜏

�̈�I + 𝐾@I�̇�I + 𝐾?I𝑒I + 𝐾?I B 𝑒I𝑑𝜏 = 0⇒(2)

𝑒 = 𝑞, − 𝑞

𝑒I = 𝑞,I − 𝑞I (𝑖 = 1, . . , 𝑁)⇒(1)

𝑠R + 𝐾@I𝑠 + 𝐾?I + 𝐾AI1𝑠 𝑒I 𝑠 = 0ℒ[𝑒I 𝑡 ]⇒(3)

𝑠T + 𝐾@I𝑠R + 𝐾?I𝑠 + 𝐾AI 𝑒I 𝑠 = 0𝑠 × ⇒(4)

1 𝐾?I𝐾@I 𝐾AI

𝐾AI(𝐾@I𝐾?I − 𝐾AI)/𝐾@I

3210

⇒(5)

exponentialstability

conditions by Routh criterion

⇒(6)

⇒ 𝐾?I > 0,𝐾@I > 0,0 < 𝐾AI < 𝐾?I𝐾@I

Page 9: Trajectory Tracking Control

feedbacklinearization robot

𝑞, 𝑡 , �̇�, 𝑡 ,�̈�, 𝑡 𝑞

�̇�

n desired joint trajectory can be generated from Cartesian data

n real-time computation by Newton-Euler algo: 𝑢YZ[ = 8𝑁𝐸𝛼(𝑞, �̇�, 𝑎)n simulation of feedback linearization control

Remarks

𝑞,(𝑡)

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

true parameters 𝜋

estimated parameters 7𝜋

�̈�, 𝑡 , �̇�, 0 , 𝑝,(0)

�̇�,(𝑡)�̈�,(𝑡)

�̇�,(0) 𝑞,(0) 𝑞, 0 = 𝑓DE 𝑝, 0�̇�, 0 = 𝐽DE 𝑞, 0 �̇�, 0�̈�, 𝑡 = 𝐽DE 𝑞, �̈�, 𝑡 − ̇𝐽(𝑞,)�̇�,

Page 10: Trajectory Tracking Control

Further commentsn choice of the diagonal elements of 𝐾𝑃, 𝐾@ (and 𝐾𝐼)

n for shaping the error transients, with an eye to motor saturations...

n parametric identificationn to be done in advance, using the property of linearity in the dynamic

coefficients of the robot dynamic modeln 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, ...

critically damped transient𝑒(𝑡) = 𝑞,(𝑡) − 𝑞(𝑡)

𝑡

𝑒(0)

Robotics 2 10

Page 11: Trajectory Tracking Control

Another example of feedback linearization designn dynamic model of robots with elastic joints

n 𝑞 = link positionn 𝜃 = motor position (after reduction gears)n 𝐵h = diagonal matrix (> 0) of inertia of the (balanced) motorsn 𝐾 = diagonal matrix (> 0) of (finite) stiffness of the joints

n is there a control law that achieves exact linearization via feedback?

2𝑁 generalizedcoordinates (𝑞, 𝜃)

YES and it yieldslinear and decoupled system:𝑁 chains of 4 integrators(to be stabilized by linear

control design)

Robotics 2 11

(1)(2)

4𝑁 statevariables

𝑥 = (𝑞, 𝜃, �̇�, �̇�)

𝑀 𝑞 �̈� + 𝑐 𝑞, �̇� + 𝑔 𝑞 + 𝐾 𝑞 − 𝜃 = 0𝐵h�̈� + 𝐾 𝜃 − 𝑞 = 𝑢

𝑢 = 𝛼 𝑞, 𝜃, �̇�, �̇� + 𝛽 𝑞, 𝜃, �̇�, �̇� 𝑎

Hint: differentiate (1) w.r.t. time until motor acceleration �̈� appears; substitute this from (2); choose 𝑢 so as to cancel all nonlinearities …

𝑑l𝑞I𝑑𝑡l

= 𝑎I, 𝑖 = 1, . . , 𝑁

Page 12: Trajectory Tracking Control

Alternative global trajectory controller

n global asymptotic stability of 𝑒, �̇� = (0,0) (trajectory tracking)n proven by Lyapunov+Barbalat+LaSallen does not produce a complete cancellation of nonlinearities

n the �̇� and �̈� that appear linearly in the model are evaluated on the desired trajectory

n does not induce a linear and decoupled behavior of the trajectory error 𝑒 𝑡 = 𝑞,(𝑡) − 𝑞(𝑡) in the closed-loop system

n lends itself more easily to an adaptive versionn cannot be computed directly by the standard NE algorithm...

symmetric andpositive definite matrices

SPECIAL factorization such that�̇� − 2𝑆 is skew-symmetric

Robotics 2 12

𝑢 = 𝑀 𝑞 �̈�, + 𝑆 𝑞, �̇� �̇�, + 𝑔 𝑞 + 𝐹o�̇�, + 𝐾?𝑒 + 𝐾@�̇�

Page 13: Trajectory Tracking Control

Analysis of asymptotic stabilityof the trajectory error - 1

n Lyapunov candidate and its time derivative

robot dynamics (including friction)control law

n the closed-loop system equations yield

n substituting and using the skew-symmetric property

Robotics 2 13

𝑀 𝑞 �̈� + 𝑆 𝑞, �̇� �̇� + 𝑔 𝑞 + 𝐹o�̇� = 𝑢𝑢 = 𝑀 𝑞 �̈�, + 𝑆 𝑞, �̇� �̇�, + 𝑔 𝑞 + 𝐹o�̇�, + 𝐾?𝑒 + 𝐾@�̇�

𝑉 =12 �̇�

q𝑀 𝑞 �̇� +12 𝑒

q𝐾?𝑒 ≥ 0 �̇� =12 �̇�

q�̇� 𝑞 �̇� + �̇�q𝑀 𝑞 �̈� + 𝑒q𝐾?�̇�

𝑀 𝑞 �̈� = −𝑆 𝑞, �̇� �̇� − 𝐾@ + 𝐹o �̇� − 𝐾?𝑒

�̇� = −�̇�q 𝐾@ + 𝐹o �̇� ≤ 0 �̇� = 0 ⇔ �̇� = 0n since the system is time-varying (due to 𝑞,(𝑡)), direct application

of LaSalle theorem is NOT allowed ⇒ use Barbalat lemma…

error state 𝑥

𝑞 = 𝑞, 𝑡 − 𝑒, �̇� = �̇�, 𝑡 − �̇� 𝑉 = 𝑉 𝑒, ̇𝑒, 𝑡 = 𝑉(𝑥, 𝑡)⇒

⇒ go toslide 10 in

block 8

Page 14: Trajectory Tracking Control

Analysis of asymptotic stabilityof the trajectory error - 2

n since i) 𝑉 is lower bounded and ii) �̇� ≤ 0, we can check condition iii) in order to apply Barbalat lemma

Robotics 2 14

n from i) + ii), 𝑉 is bounded ⇒ 𝑒 and �̇� are boundedn assume that the desired trajectory has bounded velocity �̇�,

⇒ �̇� isbounded

then also �̈� will be bounded (in norm) since

... is this bounded? �̈� = −2�̇�q(𝐾@ + 𝐹o)�̈�

n using the following two properties of dynamic model terms0 < 𝑚 ≤ 𝑀DE(𝑞) ≤ 𝑀 < ∞ 𝑆(𝑞, �̇�) ≤ 𝛼v �̇�

bounded bounded boundedboundedin norm by 𝑀

boundedin norm by 𝛼v �̇� bounded

�̈� = −𝑀DE(𝑞) 𝑆 𝑞, �̇� �̇� + 𝐾?𝑒 + (𝐾@ + 𝐹o)�̇�

⇒ limz→{

�̇� 𝑡 = 0

Page 15: Trajectory Tracking Control

Analysis of asymptotic stabilityof the trajectory error – end of proof

n we can now conclude by proceeding as in LaSalle theorem

Robotics 2 15

n the closed-loop dynamics in this situation is�̇� = 0 ⇔ �̇� = 0

𝑀 𝑞 �̈� = −𝐾?𝑒

is the largestinvariant set in �̇� = 0

(global) asymptotic trackingwill be achieved

⟹ �̈� = 0 ⇔ 𝑒 = 0 (𝑒, �̇�) = (0, 0)

Page 16: Trajectory Tracking Control

Regulation as a special casen what happens to the control laws designed for trajectory

tracking when 𝑞𝑑 is constant? are there simplifications?n feedback linearization

n no special simplificationsn 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

𝑢 = 𝐾?(𝑞, − 𝑞) − 𝐾@�̇� + 𝑔 𝑞

𝑢 = 𝑀 𝑞 𝐾? 𝑞, − 𝑞 − 𝐾@�̇� + 𝑐 𝑞, �̇� + 𝑔(𝑞)

Page 17: Trajectory Tracking Control

Trajectory execution without a modeln 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 timen 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 learningRobotics 2 17

Page 18: Trajectory Tracking Control

Scheme of iterative trajectory learningn control design can be illustrated on a SISO linear system

in the Laplace domain

Robotics 2 18

𝑷(𝒔)𝑪(𝒔)

closed-loop system without learning(𝐶(𝑠) is, e.g., a PD control law) 𝑊 𝑠 =

𝑦(𝑠)𝑦,(𝑠)

=𝑃 𝑠 𝐶(𝑠)

1 + 𝑃 𝑠 𝐶(𝑠)

control law at iteration 𝑘𝑢� 𝑠 = 𝑢�� 𝑠 + 𝑣� 𝑠 = 𝐶 𝑠 𝑒� 𝑠 + 𝑣� 𝑠

system output at iteration 𝑘𝑦� 𝑠 = 𝑊 𝑠 𝑦, 𝑠 +𝑃(𝑠)

1 + 𝑃 𝑠 𝐶(𝑠)𝑣� 𝑠

“plug-in” signal:𝑣E(𝑡) ≡ 0 at

first (𝑘 = 1) iteration

Page 19: Trajectory Tracking Control

𝑷(𝒔)𝑪(𝒔)

n algebraic manipulations on block diagram signals in the Laplace domain: 𝑥 𝑠 = ℒ 𝑥(𝑡) , 𝑥 = 𝑦,, 𝑦, 𝑢�, 𝑣, 𝑒 ⇒ 𝑦,, 𝑦�, 𝑢�� , 𝑣�, 𝑒� , with transfer functions

Robotics 2 19

Background math on feedback loopswhiteboard…

𝑦 𝑠 = 𝑃 𝑠 𝑢 𝑠 = 𝑃 𝑠 𝑣 𝑠 + 𝑢� 𝑠= 𝑃 𝑠 𝑣 𝑠 + 𝑃 𝑠 𝐶 𝑠 𝑒 𝑠= 𝑃 𝑠 𝑣 𝑠 + 𝑃 𝑠 𝐶 𝑠 𝑦, 𝑠 − 𝑦(𝑠)

§ feedback control law at iteration 𝑘

§ error at iteration 𝑘

𝑢�� 𝑠 = 𝐶 𝑠 𝑦, 𝑠 − 𝑦� 𝑠 = 𝐶 𝑠 𝑦, 𝑠 − 𝑃 𝑠 𝐶(𝑠) 𝑣� 𝑠 + 𝑢�� 𝑠

(1 + 𝑃 𝑠 𝐶 𝑠 ) 𝑦 𝑠 == 𝑃 𝑠 𝑣 𝑠 + 𝑃 𝑠 𝐶 𝑠 𝑦, 𝑠

𝑦 𝑠 =𝑃 𝑠 𝐶 𝑠

1 + 𝑃 𝑠 𝐶 𝑠 𝑦, 𝑠 +𝑃 𝑠

1 + 𝑃 𝑠 𝐶 𝑠 𝑣 𝑠 = 𝑊 𝑠 𝑦, 𝑠 +𝑊� 𝑠 𝑣(𝑠)⇒

𝑢�� 𝑠 =𝐶 𝑠

1 + 𝑃 𝑠 𝐶 𝑠 𝑦, 𝑠 −𝑃 𝑠 𝐶 𝑠

1 + 𝑃 𝑠 𝐶 𝑠 𝑣� 𝑠 = 𝑊c 𝑠 𝑦, 𝑠 −𝑊 𝑠 𝑣� 𝑠⇒

𝑒� 𝑠 = 𝑦, 𝑠 − 𝑦� 𝑠 = 𝑦, 𝑠 − 𝑊 𝑠 𝑦, 𝑠 +𝑊� 𝑠 𝑣� 𝑠 = 1 −𝑊 𝑠 𝑦, 𝑠 −𝑊� 𝑠 𝑣� 𝑠

𝑊�(𝑠) = 1/(1 + 𝑃 𝑠 𝐶 𝑠 )

Page 20: Trajectory Tracking Control

Learning update lawn the update of the feedforward term is designed as

Robotics 2 20

with 𝛼 and 𝛽 suitable filters(also non-causal, of the FIR type) 𝑣��E 𝑠 = 𝛼(𝑠)𝑢�� 𝑠 + 𝛽(𝑠)𝑣� 𝑠

n if a contraction condition can be enforced

then convergence is obtained for 𝑘 → ∞(for all 𝑠 = 𝑗𝜔 frequencies such that ...) 𝛽 𝑠 − 𝛼 𝑠 𝑊(𝑠) < 1

recursive expressionof feedforward term 𝑣��E 𝑠 =

𝛼 𝑠 𝐶 𝑠1 + 𝑃 𝑠 𝐶 𝑠

𝑦, 𝑠 + (𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 )𝑣�(𝑠)

recursive expressionof error 𝑒 = 𝑦, − 𝑦

𝑒��E 𝑠 =1 − 𝛽 𝑠

1 + 𝑃 𝑠 𝐶 𝑠𝑦, 𝑠 + 𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 𝑒�(𝑠)

𝑣{ 𝑠 =𝑦, 𝑠𝑃(𝑠)

𝛼 𝑠 𝑊 𝑠1 − 𝛽 𝑠 + 𝛼 𝑠 𝑊 𝑠 𝑒{ 𝑠 =

𝑦, 𝑠1 + 𝑃 𝑠 𝐶(𝑠)

1 − 𝛽 𝑠1 − 𝛽 𝑠 + 𝛼 𝑠 𝑊 𝑠

Page 21: Trajectory Tracking Control

Robotics 2 21

𝑣��E 𝑠 = 𝛼 𝑠 𝑢�� 𝑠 + 𝛽 𝑠 𝑣� 𝑠 = 𝛼 𝑠 𝐶 𝑠 𝑒� 𝑠 + 𝛽 𝑠 𝑣� 𝑠

𝑦��E 𝑠 = 𝑃 𝑠 𝑣��E 𝑠 + 𝑢��E� 𝑠 = 𝑃 𝑠 𝛼 𝑠 𝑢�� 𝑠 + 𝛽 𝑠 𝑣� 𝑠 + 𝑢��E� 𝑠

Proof of recursive updateswhiteboard…

§ recursive expression for the error 𝑒�

§ recursive expression for the feedworward 𝑣�

𝑒� 𝑠 = 𝑦, 𝑠 − 𝑦� 𝑠 = 𝑦, 𝑠 − 𝑃(𝑠)(𝑣� 𝑠 + 𝑢�� 𝑠 )

𝑣� 𝑠 =1

𝑃 𝑠𝑦, 𝑠 − 𝑒� 𝑠 − 𝑢�� 𝑠⇒

𝑒��E 𝑠 = 𝑦, 𝑠 − 𝑦��E 𝑠

= (1 − 𝛽 𝑠 ) 𝑦, 𝑠 − 𝛼 𝑠 − 𝛽 𝑠 𝑃 𝑠 𝐶 𝑠 − 𝛽 𝑠 𝑒� 𝑠 − 𝑃 𝑠 𝐶(𝑠)𝑒��E 𝑠

𝑒��E 𝑠 =1 − 𝛽 𝑠

1 + 𝑃 𝑠 𝐶 𝑠𝑦, 𝑠 + 𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 𝑒�(𝑠)⇒

= 𝑃 𝑠 𝛼 𝑠 𝐶 𝑠 𝑒� 𝑠 + 𝛽 𝑠1

𝑃(𝑠) 𝑦, 𝑠 − 𝑒� 𝑠 − 𝛽 𝑠 𝐶 𝑠 𝑒� 𝑠 + 𝐶 𝑠 𝑒��E(𝑠)

= 𝛼 𝑠 𝐶 𝑠 𝑊�(𝑠)𝑦, 𝑠 −𝑊� 𝑠 𝑣� 𝑠 + 𝛽 𝑠 𝑣� 𝑠

=𝛼 𝑠 𝐶 𝑠

1 + 𝑃 𝑠 𝐶 𝑠𝑦, 𝑠 + (𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 ) 𝑣�(𝑠)

Page 22: Trajectory Tracking Control

Robotics 2 22

𝑣��E 𝑠 =𝛼 𝑠 𝐶 𝑠

1 + 𝑃 𝑠 𝐶 𝑠 𝑦, 𝑠 + (𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 ) 𝑣�(𝑠)

Proof of convergencewhiteboard…

from recursive expressions

𝑒��E 𝑠 =1 − 𝛽 𝑠

1 + 𝑃 𝑠 𝐶 𝑠 𝑦, 𝑠 + 𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 𝑒�(𝑠)

compute variations from 𝑘 to 𝑘 + 1 (repetitive term in trajectory 𝑦, vanishes!)∆𝑣��E 𝑠 = 𝑣��E 𝑠 − 𝑣� 𝑠 = (𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 ) ∆𝑣�(𝑠)

∆𝑒��E 𝑠 = 𝑒��E 𝑠 − 𝑒� 𝑠 = 𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 ∆𝑒�(𝑠)

by contraction mapping condition 𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 < 1 ⇒ 𝑣� → 𝑣{, 𝑒� → 𝑒{𝑣{ 𝑠 =

𝛼 𝑠 𝐶 𝑠1 + 𝑃 𝑠 𝐶 𝑠

𝑦, 𝑠 + (𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 ) 𝑣{(𝑠)

𝑒{ 𝑠 =1 − 𝛽 𝑠

1 + 𝑃 𝑠 𝐶 𝑠 𝑦, 𝑠 + 𝛽 𝑠 − 𝛼 𝑠 𝑊 𝑠 𝑒{(𝑠)

𝑣{ 𝑠 =𝑦, 𝑠𝑃(𝑠)

𝛼 𝑠 𝑊 𝑠1 − 𝛽 𝑠 + 𝛼 𝑠 𝑊 𝑠

𝑒{ 𝑠 =𝑦, 𝑠

1 + 𝑃 𝑠 𝐶(𝑠)1 − 𝛽 𝑠

1 − 𝛽 𝑠 + 𝛼 𝑠 𝑊 𝑠⇒ 𝑣{ 𝑠 =𝑦, 𝑠𝑃(𝑠)

𝛼 𝑠 𝑊 𝑠1 − 𝛽 𝑠 + 𝛼 𝑠 𝑊 𝑠

𝑒{ 𝑠 =𝑦, 𝑠

1 + 𝑃 𝑠 𝐶(𝑠)1 − 𝛽 𝑠

1 − 𝛽 𝑠 + 𝛼 𝑠 𝑊 𝑠⇒

Page 23: Trajectory Tracking Control

Comments on convergencen if the choice 𝛽 = 1 allows to satisfy the contraction condition, then

convergence to zero tracking error is obtained

and the inverse dynamics command has been learned

Robotics 2 23

n in particular, for α 𝑠 = 1/𝑊(𝑠) convergence would be in 1 iteration only!

n the use of filter β(𝑠) ≠ 1 allows to obtain convergence (but with residual tracking error) even in presence of unmodeled high-frequency dynamics

n the two filters can be designed from very poor information on system dynamics, using classic tools (e.g., Nyquist plots)

𝑒{(𝑠) = 0

𝑣{(𝑠) =𝑦,(𝑠)𝑃(𝑠)

Page 24: Trajectory Tracking Control

Application to robotsn for 𝑁-dof robots modeled as

we choose as (initial = pre-learning) control law

and design the learning filters (at each joint) using the linear approximation

Robotics 2 24

n initialization of feedforward uses the best estimates

or simply 𝑣E = 0 (in the worst case) at first trial 𝑘 = 1

𝐵h + 𝑀(𝑞) �̈� + 𝐹o + 𝑆(𝑞, �̇�) �̇� + 𝑔 𝑞 = 𝑢

𝑢 = 𝑢� = 𝐾? 𝑞, − 𝑞 + 𝐾@ �̇�, − �̇� + 7𝑔 𝑞

𝑊I 𝑠 =𝑞I(𝑠)𝑞,I(𝑠)

=𝐾@I𝑠 + 𝐾?I

�𝐵hI𝑠R + �𝐹oI + 𝐾@I 𝑠 + 𝐾?I

𝑣E = �𝐵h + 6𝑀(𝑞,) �̈�, + �𝐹o + �𝑆(𝑞,, �̇�,) �̇�, + 7𝑔 𝑞,

𝑖 = 1,⋯ ,𝑁

Page 25: Trajectory Tracking Control

Experimental set-upn joints 2 and 3 of 6R MIMO CRF robot prototype @DIS

Robotics 2 25

50o/s160o

desired velocity/position for both joints

≈ 90% gravity balanced

through springs

Harmonic Drivestransmissions

with ratio 160:1

resolvers andtachometers

DC motors withcurrent amplifiers

DSP 𝑇𝑐 = 400µsD/A = 12 bit

R/D = 16 bit/2𝜋A/D = 11 bit/(rad/s)

high level ofdry friction

De Luca, Paesano, Ulivi: IEEE Trans Ind Elect, 1992

Page 26: Trajectory Tracking Control

Experimental results

Robotics 2 26

error for 𝑘 = 1, 3, 6, 12

feedforward 𝑣𝑘 for 𝑘 = 3, 6, 12 (zero at 𝑘 = 1)join

t 2 joint 3

feedback 𝑢�� for 𝑘 = 1, 3, 6, 12

Page 27: Trajectory Tracking Control

On-line learning control

Robotics 2 27

n re-visitation of the learning idea so as to acquire the missing dynamic information in model-based trajectory control

n on-line learning approachn the robot improves tracking performance already while executing the task

in feedback mode

n uses only position measurements from encodersn no need of joint torque sensors

n machine learning techniques used forn data collection and organizationn regressor construction for estimating model perturbations

n fast convergencen starting with a reasonably good robot model

n extension to underactuated robots or with flexible components

Page 28: Trajectory Tracking Control

Control with approximate FBL

Robotics 2 28

n dynamic model, its nominal part and (unstructured) uncertainty

𝑀 𝑞 �̈� + 𝑛 𝑞, �̇� = 𝜏 𝑀 = 6𝑀 + ∆𝑀 𝑛 = 7𝑛 + ∆𝑛

𝜏YZ[ = 6𝑀 𝑞 𝑎 + 7𝑛 𝑞, �̇�n model-based (approximate) feedback linearization

n resulting closed-loop dynamics with perturbation

�̈� = 𝑎 + 𝛿(𝑞, �̇�, 𝑎)n control law for tracking 𝑞, 𝑡 is completed by using (at 𝑡 = 𝑡�) a

linear design (PD with feedforward) and a learning regressor 𝜀�𝑎 = 𝑢� + 𝜀�= �̈�,,� + 𝐾?(𝑞,,� − 𝑞�) + 𝐾@(�̇�,,� − �̇��) + 𝜀�

Page 29: Trajectory Tracking Control

On-line learning scheme

Robotics 2 29

FeedbackLinearization

Gaussian ProcessRegression

Data Set CollectionProcedure

Linear Controlfor Tracking

𝑞,(𝑡)+

+

𝜏YZ[,�𝑢�

𝜀�

𝑞�, �̇��

𝑞�, �̇��𝑢�

𝑋�, 𝑌�

𝑎�

Page 30: Trajectory Tracking Control

On-line regressor

Robotics 2 30

n Gaussian Process (GP) regression to estimate the perturbation 𝛿n from input-output observations that are noisy, with 𝜔 ~𝒩 0, 𝛴� , the

generated data points at the 𝑘-th control step are

n assuming the ensemble of 𝑛, observations has a jointly Gaussian distribution

n the predictive distribution that approximates 𝛿 �𝑋 for a generic query �𝑋 is

𝑋� = (𝑞�, �̇��, 𝑢�) 𝑌� = �̈�� − 𝑢�

𝑌E:� DE𝑌� 

~ 𝒩 0,𝐾 𝑘𝑘q 𝜅(𝑋� , 𝑋� )

𝜀( �𝑋) ~ 𝒩 𝜇( �𝑋), 𝜎R( �𝑋)with

𝜇 �𝑋 = 𝑘q �𝑋 𝐾 + 𝛴� DE𝑌

𝜎R �𝑋 = 𝜅 �𝑋, �𝑋 − 𝑘q �𝑋 𝐾 + 𝛴� DE𝑘( �𝑋)

⇒ 𝜀� = 𝜀(𝑋�)

a Kernel to be chosen

Page 31: Trajectory Tracking Control

Simulation results

Robotics 2 31

§ Kuka LWR iiwa, 7-dof robot§ model perturbations: dynamic parameters with ± 20% variation,

uncompensated joint friction§ 7 separate GPs (one for each joint), each with 21 inputs at every 𝑡 = 𝑡�§ sinusoidal trajectories for each joint

norm of the joint errors

positioncomponents

in theCartesian

space

… at the first and only iteration!

Page 32: Trajectory Tracking Control

Simulation results

Robotics 2 32

video(sloweddown)

Page 33: Trajectory Tracking Control

Extension to underactuated robots

Robotics 2 33

𝑀¥¥(𝑞) 𝑀¥¦(𝑞)𝑀¥¦q (𝑞) 𝑀¦¦(𝑞)

�̈�¥�̈�¦

+𝑛¥ 𝑞, �̇�𝑛¦ 𝑞, �̇�

= 𝜏0

uk akqd(t)

§ planner optimizes motion of passive joints (at every iteration)§ controller for active joints with partial feedback linearization§ two regressors (on/off-line) for learning the required acceleration

corrections for active and passive joints

Page 34: Trajectory Tracking Control

Experiments on the Pendubot

Robotics 2 34

§ Pendubot, 2-dof robot with passive second joint§ swing-up maneuvers from down-down to a new equilibrium state

⇒ up-up

⇒ down-up

Page 35: Trajectory Tracking Control

Experimental results

Robotics 2 35

video

convergence in 2 iterations!