Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in...

36
| | 151-0851-00 V lecture: CAB G11 Tuesday 10:15 – 12:00, every week exercise: HG E1.2 Wednesday 8:15 – 10:00, according to schedule (about every 2nd week) Marco Hutter, Roland Siegwart, and Thomas Stastny 24.10.2017 Robot Dynamics - Dynamics 2 1 Lecture «Robot Dynamics»: Dynamics and Control

Transcript of Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in...

Page 1: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

151-0851-00 Vlecture: CAB G11 Tuesday 10:15 – 12:00, every weekexercise: HG E1.2 Wednesday 8:15 – 10:00, according to schedule (about every 2nd week)

Marco Hutter, Roland Siegwart, and Thomas Stastny

24.10.2017Robot Dynamics - Dynamics 2 1

Lecture «Robot Dynamics»: Dynamics and Control

Page 2: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 2

19.09.2017 Intro and Outline Course Introduction; Recapitulation Position, Linear Velocity26.09.2017 Kinematics 1 Rotation and Angular Velocity; Rigid Body Formulation, Transformation 26.09.2017 Exercise 1a Kinematics Modeling the ABB

arm

03.10.2017 Kinematics 2 Kinematics of Systems of Bodies; Jacobians 03.10.2017 Exercise 1b Differential Kinematics of the ABB arm

10.10.2017 Kinematics 3 Kinematic Control Methods: Inverse Differential Kinematics, Inverse Kinematics; Rotation Error; Multi-task Control

10.10.2017 Exercise 1c Kinematic Control of the ABB Arm

17.10.2017 Dynamics L1 Multi-body Dynamics 17.10.2017 Exercise 2a Dynamic Modeling of the ABB Arm

24.10.2017 Dynamics L2 Floating Base Dynamics 24.10.201731.10.2017 Dynamics L3 Dynamic Model Based Control Methods 31.10.2017 Exercise 2b Dynamic Control Methods

Applied to the ABB arm

07.11.2017 Legged Robot Dynamic Modeling of Legged Robots & Control 07.11.2017 Exercise 3 Legged robot14.11.2017 Case Studies 1 Legged Robotics Case Study 14.11.201721.11.2017 Rotorcraft Dynamic Modeling of Rotorcraft & Control 21.11.2017 Exercise 4 Modeling and Control of

Multicopter28.11.2017 Case Studies 2 Rotor Craft Case Study 28.11.201705.12.2017 Fixed-wing Dynamic Modeling of Fixed-wing & Control 05.12.2017 Exercise 5 Fixed-wing Control and

Simulation12.12.2017 Case Studies 3 Fixed-wing Case Study (Solar-powered UAVs - AtlantikSolar, Vertical

Take-off and Landing UAVs – Wingtra)19.12.2017 Summery and Outlook Summery; Wrap-up; Exam

Page 3: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II

Introduction to floating base systems

Today: How can we use this information in order to control the robot

31.10.2016Robot Dynamics - Dynamics 3 3

Recapitulation

, T Tc c M q q b q q g Sq τ J F

Generalized coordinates Mass matrix

, Centrifugal and Coriolis forces

Gravity forces Generalized

Selection matrix/JaExternal forces

fo

Contact Ja

cobiac

nr es

c

c

qM q

b q q

g qτ

FJ

S

cobian

Page 4: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 4

Position vs. Torque Controlled Robot Arms

Page 5: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 5

Setup of a Robot Arm

Actuator(Motor + Gear)

Robot Dynamics

ActuatorControl

( , )U I τ , ,q q q

System Control

Page 6: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Position feedback loop on joint level Classical, position controlled robots don’t care about dynamics High-gain PID guarantees good joint level tracking Disturbances (load, etc) are compensated by PID => interaction force can only be controlled with compliant surface

31.10.2016Robot Dynamics - Dynamics 3 6

Classical Position Control of a Robot Arm

Actuator(Motor + Gear)

Robot Dynamics

ActuatorControl

( , )U I τ

Position Sensor

, ,q q q ,q q

Robot

High gainPID

Page 7: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Actuator(Motor + Gear)

Robot Dynamics

ActuatorControl

( , )U I τ

Position Sensor

Torque Sensor

, ,q q q ,q q

τ

Integrate force-feedback Active regulation of system dynamics Model-based load compensation Interaction force control

31.10.2016Robot Dynamics - Dynamics 3 7

Joint Torque Control of a Robot Arm

Page 8: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Modern robots have force sensors Dynamic control Interaction control Safety for collaboration

31.10.2016Robot Dynamics - Dynamics 3 8

Setup of Modern Robot Arms

Page 9: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 9

FRANKA – an example of a force controllable robot arm

Page 10: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Special force controllable actuators Dynamic motion Safe interaction

31.10.2016Robot Dynamics - Dynamics 3 10

ANYpulatorAn example for a robot that can interact

spring linkmotor gear

position force

Series Elastic Actuator

Page 11: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Torque as function of position and velocity error

Closed loop behavior

Static offset due to gravity

Impedance control and gravity compensation

31.10.2016Robot Dynamics - Dynamics 3 11

Joint Impedance Control

Estimated gravity term

Page 12: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Compensate for system dynamics

In case of no modeling errors, the desired dynamics can be perfectly prescribed

PD-control law

Every joint behaves like a decoupled mass-spring-damper with unitary mass

31.10.2016Robot Dynamics - Dynamics 3 12

Inverse Dynamics Control

Page 13: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Motion in joint space is often hard to describe => use task space

A single task can be written as

In complex machines, we want to fulfill multiple tasks (As introduced already for velocity control)

Same priority, multi-task inversion

Hierarchical

31.10.2016Robot Dynamics - Dynamics 3 13

Inverse Dynamics Control with Multiple Tasks

Page 14: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Joint-space dynamics

Torque to force mapping

Kinematic relation

Substitute acceleration

31.10.2016Robot Dynamics - Dynamics 3 14

Task Space Dynamics

{I}

{E}

eFew

End-effector dynamics

Inertia-ellipsoid

Page 15: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Determine a desired end-effector acceleration

Determine the corresponding joint torque

31.10.2016Robot Dynamics - Dynamics 3 15

End-effector Motion Control

{I}

{E}

eFew

e twTrajectory control R R RE χ χNote: a rotational error can be related

to differenced in representation by

Page 16: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 16

Robots in InteractionThere is a long history in robots controlling motion and interaction

Page 17: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Extend end-effector dynamics in contact with contact force

Introduce selection matrices to separate motion force directions

31.10.2016Robot Dynamics - Dynamics 3 17

Operational Space ControlGeneralized framework to control motion and force

{I}

eFew

cFc F

Page 18: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Given: Find , s.t. the end-effector accelerates with exerts the contact force

31.10.2016Robot Dynamics - Dynamics 3 18

Operational Space Control2-link example

, 0T

e des yar

, 0 Tcontact des cFF

1

2 P

O

, 0c

contact des

F

F

,

0e des

ya

r

x

y

l

l

Page 19: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Selection matrix in local frame

Rotation between contact force and world frame

31.10.2016Robot Dynamics - Dynamics 3 20

How to Find a Selection Matrix

1: it can move0: it can apply a force

Page 20: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Selection matrix in local frame

Rotation between contact force and world frame

31.10.2016Robot Dynamics - Dynamics 3 21

How to Find a Selection Matrix

Page 21: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Assume friction less contact surface

31.10.2016Robot Dynamics - Dynamics 3 22

Sliding a Prismatic Object Along a Surface

1 0 00 1 00 0 0

Mp

Σ

0 0 00 0 00 0 1

Fp

Σ

0 0 00 0 00 0 1

Mr

Σ

1 0 00 1 00 0 0

Fr

Σ

MpΣ MrΣ

FpΣFrΣ

Page 22: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Find the selection matrix (in local frame)

31.10.2016Robot Dynamics - Dynamics 3 23

Inserting a Cylindrical Peg in a Hole

0 0 00 0 00 0 1

Mp

Σ0 0 00 0 00 0 1

Mr

Σ

1 0 00 1 00 0 0

Fp

Σ1 0 00 1 00 0 0

Fr

Σ

MpΣ MrΣ

FpΣFrΣ

Page 23: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 24

Inverse Dynamics of Floating Base Systems

Page 24: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Equation of motion (1) Cannot directly be used for control due to the occurrence of contact forces

Contact constraint

Contact force Back-substitute in (1),

replace and use support null-space projection

Support consistent dynamics

Inverse-dynamics

Multiple solutions

31.10.2016Robot Dynamics - Dynamics 3 25

Recapitulation: Support Consistent Dynamics

s s J q J q

Page 25: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 26

Some Examples of Using Internal Forces

Page 26: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Floating base system with 12 actuated joint and 6 base coordinates (18DoF)

31.10.2016Robot Dynamics - Dynamics 3 27

Recapitulation: Quadrupedal Robot with Point Feet

Total constraints

Internal constraints

Uncontrollable DoFs

0

0

6

3

0

3

6

1

1

9

3

0

12

6

0

Page 27: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 28

Internal Forces extreme example

Page 28: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 29

Page 29: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 30

Least Square Optimizationsome notes on quadratic optimization

Ax b 0 2min x

Ax bx = A b 2min x

1 1 2 2 A x b A x 1 2

11 2,

2 2

min

x x

xA A b

x 1

1 22

x= A A b

x1

2 2

min

xx

1 1 A x b 0

2 2 A x b 01 1

2 2

A bx =

A b

1 1

2 2 2

min

x

A bx

A b 2min x

2 2 2min x

A x b

Equal priority

Hierarchy1 1 2

min x

A x b 1 1 1 0 x A b A xN

2 2 2 1 1 1 0 2 A x b A A b A x b 0N

0 2 1 2 2 1 1 x A A b A A bN 1 1 1. .s t c A x b

Page 30: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 31

Least Square OptimizationApplication to Inverse Dynamics

Mq b g τ*

e e e J q J q w

*,2

mine e

q τ

M I b gqJ 0 Jq wτ

qM I b g 0

τ

*e e

qJ 0 Jq w

τ

*

,2

min e e

q τ

qJ 0 Jq w

τ

. .s t

qM I b g 0

τ

Single task

Priority

Page 31: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

We search for a solution that fulfills the equation of motion

Motion tasks:

Force tasks:

Torque min:

31.10.2016Robot Dynamics - Dynamics 3 32

Operational Space Control as Quadratic ProgramA general problem

2min τ

Page 32: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

QPs need different priority!! Exploit Null-space of tasks with higher priority Every step = quadratic problem with constraints Use iterative null-space projection (formula in script)

31.10.2016Robot Dynamics - Dynamics 3 33

Solving a Set of QPs

Page 33: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 34

Behavior as Multiple Tasks

Page 34: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

No dynamic effects

Add virtual external forces to pull/support the robot Static equilibrium of forces and moments From principle of virtual work it follows directly that

31.10.2016Robot Dynamics - Dynamics 3 35

Quasi-static: Virtual Model Control Pratt 2001

Page 35: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

||

Application of this technique for locomotion control of legged robots

31.10.2016Robot Dynamics - Dynamics 3 36

Next Time

Page 36: Lecture«Robot Dynamics»: Dynamics andControl · We learned how to get the equation of motion in joint space Newton-Euler Projected Newton-Euler Lagrange II Introduction to floating

|| 31.10.2016Robot Dynamics - Dynamics 3 37