dynamic controllers - georgia institute of · pdf file · 2014-11-06dynamic...

44
Dynamic Controllers

Upload: dangphuc

Post on 09-Mar-2018

217 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Dynamic Controllers

Page 2: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the
Page 3: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

xi

∆x

xi+1

Newtonian lawsgravity

.

.

.

degrees of freedom

ground contact forces

Simulation

equations of motion

Page 4: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Simulation + Controlxi

∆x

xi+1

Newtonian lawsgravity

ground contact forcesinternal forces

.

.

.

actuators

Page 5: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

An Uncontrolled System

dynamic simulator

collision handling

contact force

next state

current state

Page 6: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

A Controlled System

dynamic simulator

dynamic controller

collision handling

contact force

joint torque

next state

current stateControl Forward Simulation

Page 7: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Feedback vs Feedforward

• Feedback control takes account of the current state to adjust the output. !

• Feedforward control applies a pre-defined signal without responding to the current state of the system.

Page 8: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

General Controllers

Page 9: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

PD Servo• Use proportional-derivative (PD) controllers to

compute joint torques.!

• Each joint is actuated by a PD servo to track a desired pose or trajectory

⌧ = �kp(x� x)� kdx

Page 10: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Gain and Dampinghigh gain high damping

⌧ = �kp(x� x)� kdx ⌧ = �kp(x� x)� kdx

Page 11: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Problems with PD Servos• Gain and damping coefficients are difficult to

determine for complex articulated systems.!

• High-gain feedback controllers are less stable.!

• Precision and stability are often in conflict.

Page 12: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Track a Trajectory• Can track a sequence of poses by varying the

target pose over time.!

• Tuning coefficients is even harder when tracking a time sequence.⌧

n = �kp(xn � x

n)� kdxn

x

n

t

Page 13: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Tracking Mocap

Motion Capture-Driven Simulations That Hit and React by Zordan and Hodgins

Page 14: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Gravity Compensation• PD control never achieves the desired joint value

under gravity.!

• Adjust the target position to compensate the effect of gravity.

⌧ = �kp(x� x)� kdx

gravity compensated targettarget = desired pose

Page 15: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Stable PD⌧

n = �kp(xn � x

n)� kdxn

n = �kp(xn+1 � x

n+1)� kdxn+1

x

n+1 = x

n +�tx

n

x

n+1 = x

n +�tx

n

n = �kp(xn +�tx

n � x

n+1)� kd(xn +�tx

n)

Instead of tracking current pose

track next pose

Page 16: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Stable PD

Page 17: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Stable PD

Page 18: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Feedforward Control

• Feedforward controller executes motor control in an open-loop manner.!

• Inverse dynamics on the input trajectory is computed during motor learning.!

• Explains stereotyped and stylized patterns in movements; consistent with internal model theory.

Page 19: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Internal Model

Feedforward control, based on an internal model of the motor system and memory of object properties, is used to specify motor commands in advance of the movement.

Page 20: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Low-Impedance Control• Combine feedforward torques and low-gain

feedback controllers.!

• Feedback control is still necessary to deal with small deviations from desired trajectory.!

• Feedforward torques deal with the latency in the dynamic system.!

• Explains well-trained motion exhibits low joint stiffness.

Page 21: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the
Page 22: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Jacobian Transpose Control

• How much torque does each joint need to exert in order to result in force f at point p?!

• Use Jacobian matrix to map the force in the Cartesian space to joint torques.

desired force: f

point of application: p

⌧ = J(q,p)T f

Page 23: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Generalized Force• The virtual displacement of ri can be written in

terms of generalized coordinates!

!

!

• The virtual work of force Fi acting on ri is

δri =∂ri

∂q1

δq1 +∂ri

∂q2

δq2 + . . . +∂ri

∂qn

δqn

Fiδri = Fi

!

j

∂ri

∂qj

δqj

Page 24: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Functional Controllers

Page 25: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Construct a Complex Controller

• Build on top of basic control mechanisms to control more complex behaviors. !

• Organize basic controllers in a hierarchical structure. !

• Use a finite state machine to switch between different controllers.

Page 26: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

State Machine Controller

• State machine!

• Control action!

• PD servos

Page 27: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

State Machine Controller

• State machine!

• Control action!

• PD servos

Page 28: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

State Machine Controller

• State machine!

• Control action!

• PD servos

Page 29: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

State Machine Controller

Page 30: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Standing Balance

• For static balance, projection of the mass point must be within the support polygon.!

• Use hip strategy or ankle strategy to maintain balance.

applied at ankle or hip

⌧ = �kp(c� c)� kdc

Page 31: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

DEMO

• Balance App in DART

Page 32: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Optimal Torques

• Formulate an optimization to solve for motion and torque (sometimes contact force as well).!

• Use equations of motion as constraints to ensure physical realism.!

• Objective function could be defined by task goals, energy expenditure, or aesthetics preferences.

Page 33: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Challenges in Optimization

• Can’t handle contacts.!

• Constraint is highly nonlinear in q.!

• Domain is high dimensional.

minq,⌧

E(q, ⌧ )

subject to M(q)¨q+C(q, ˙q) +G(q) = ⌧

Page 34: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Contact Constraints• Maintain balance using sustained frictional

contacts with the environment.!

• The character pushes against the environment and uses the resulting force to control its motion.

fi 2 Ki

minq,⌧ ,f

E(q, ⌧ , f)

subject to M(q)¨q+C(q, ˙q) +G(q) = ⌧ + JT f

Page 35: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Contact Constraints

Page 36: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Momentum Constraints• Control changes in linear and angular momenta

to regulate the center of mass and center of pressure simultaneously.

Page 37: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Momentum Constraints

Page 38: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

• Use a simplified model to explain complex dynamic balance.!

• An inverted pendulum is a mass point attached to a massless rod.!

• Dynamic equation of the simple model:!

!

• Compute the torque required at the pivot point to maintain a balanced position.

Balanced Locomotion

✓ =g

lsin ✓ +

ml2

Page 39: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

SIMBICON

• Simple finite state machine!

• Torso and swing hip control!

• Balance feedback

Page 40: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Simple State Machine

• Each state consists of a pose representing target angles.!

• All independent joints are controlled by PD servos.!

• Transitions between states occur after fixed duration of time or foot contact events.

Page 41: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Torso and Swing-hip Control

• Both torso and swing-hip have target angles expressed in world coordinates.!

• The stance-hip torque is left as a free variable:

�A = ��torso � �B

Page 42: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Balance Feedback• Swing-hip target angle is

continuously modified based on the center of mass!

!

!

• This allows the character to change the future point of support

Page 43: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

DEMO

• SIMBICON demos

Page 44: Dynamic Controllers - Georgia Institute of · PDF file · 2014-11-06Dynamic Controllers. x i ∆x x i+1 Newtonian laws gravity... ... • For static balance, ... • This allows the

Low-dimensional Control

• Plan joint torques by optimizing a low-dimensional physical model!

• To generate the plan, full-body dynamics are approximated by a set of closed-form equations-of-motion