Trajectory Tracking Control

35
Robotics 2 Prof. Alessandro De Luca Trajectory Tracking Control

Transcript of Trajectory Tracking Control

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!