trajectory tracking control

Post on 15-Apr-2022

10 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Robotics 2

Prof. Alessandro De Luca

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

๐‘€ ๐‘ž ๏ฟฝฬˆ๏ฟฝ + ๐‘› ๐‘ž, ๏ฟฝฬ‡๏ฟฝ = ๐‘ข

๐‘ž, ๐‘ก โ†’ ๏ฟฝฬ‡๏ฟฝ, ๐‘ก , ๏ฟฝฬˆ๏ฟฝ,(๐‘ก)

๐‘ข, = ๐‘€ ๐‘ž, ๏ฟฝฬˆ๏ฟฝ, + ๐‘›(๐‘ž,, ๏ฟฝฬ‡๏ฟฝ,)

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

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๐‘›(๐‘ž,, ๏ฟฝฬ‡๏ฟฝ,)

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๐‘›(๐‘ž, ๏ฟฝฬ‡๏ฟฝ)

+

_

๐‘ข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

๐‘Ž = ๏ฟฝฬˆ๏ฟฝ, + ๐พ@ ๏ฟฝฬ‡๏ฟฝ, โˆ’ ๏ฟฝฬ‡๏ฟฝ + ๐พ? ๐‘ž, โˆ’ ๐‘ž

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

_

๐พ@๐พ?

+ ๐‘Ž = ๏ฟฝฬˆ๏ฟฝ ๐‘ž

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

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 ๐‘ž, ๏ฟฝฬˆ๏ฟฝ, ๐‘ก โˆ’ ฬ‡๐ฝ(๐‘ž,)๏ฟฝฬ‡๏ฟฝ,

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

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, . . , ๐‘

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๏ฟฝฬ‡๏ฟฝ, + ๐พ?๐‘’ + ๐พ@๏ฟฝฬ‡๏ฟฝ

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

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

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)

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

๐‘ข = ๐พ?(๐‘ž, โˆ’ ๐‘ž) โˆ’ ๐พ@๏ฟฝฬ‡๏ฟฝ + ๐‘” ๐‘ž

๐‘ข = ๐‘€ ๐‘ž ๐พ? ๐‘ž, โˆ’ ๐‘ž โˆ’ ๐พ@๏ฟฝฬ‡๏ฟฝ + ๐‘ ๐‘ž, ๏ฟฝฬ‡๏ฟฝ + ๐‘”(๐‘ž)

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

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

๐‘ท(๐’”)๐‘ช(๐’”)

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 + ๐‘ƒ ๐‘  ๐ถ ๐‘  )

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 โˆ’ ๐›ฝ ๐‘  + ๐›ผ ๐‘  ๐‘Š ๐‘ 

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 + ๐‘ƒ ๐‘  ๐ถ ๐‘ ๐‘ฆ, ๐‘  + (๐›ฝ ๐‘  โˆ’ ๐›ผ ๐‘  ๐‘Š ๐‘  ) ๐‘ฃ๏ฟฝ(๐‘ )

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 โˆ’ ๐›ฝ ๐‘  + ๐›ผ ๐‘  ๐‘Š ๐‘ โ‡’

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

๐‘ฃ{(๐‘ ) =๐‘ฆ,(๐‘ )๐‘ƒ(๐‘ )

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,โ‹ฏ ,๐‘

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

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

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

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 ๐œ€๏ฟฝ๐‘Ž = ๐‘ข๏ฟฝ + ๐œ€๏ฟฝ= ๏ฟฝฬˆ๏ฟฝ,,๏ฟฝ + ๐พ?(๐‘ž,,๏ฟฝ โˆ’ ๐‘ž๏ฟฝ) + ๐พ@(๏ฟฝฬ‡๏ฟฝ,,๏ฟฝ โˆ’ ๏ฟฝฬ‡๏ฟฝ๏ฟฝ) + ๐œ€๏ฟฝ

On-line learning scheme

Robotics 2 29

FeedbackLinearization

Gaussian ProcessRegression

Data Set CollectionProcedure

Linear Controlfor Tracking

๐‘ž,(๐‘ก)+

+

๐œYZ[,๏ฟฝ๐‘ข๏ฟฝ

๐œ€๏ฟฝ

๐‘ž๏ฟฝ, ๏ฟฝฬ‡๏ฟฝ๏ฟฝ

๐‘ž๏ฟฝ, ๏ฟฝฬ‡๏ฟฝ๏ฟฝ๐‘ข๏ฟฝ

๐‘‹๏ฟฝ, ๐‘Œ๏ฟฝ

๐‘Ž๏ฟฝ

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

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!

Simulation results

Robotics 2 32

video(sloweddown)

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

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

Experimental results

Robotics 2 35

video

convergence in 2 iterations!

top related