derivatives for design and control with Jim and Simon review: - - PowerPoint PPT Presentation
derivatives for design and control with Jim and Simon review: - - PowerPoint PPT Presentation
derivatives for design and control with Jim and Simon review: serial manipulator end effector position 2 3 1 2 motor angles = 1 forward kinematics (FK) what is ? i.e., given
๐ ๐2 ๐1 ๐3
motor angles ๐พ = ๐1 โฎ ๐๐ฟ end effector position ๐ฆ โ โ2
review: serial manipulator
forward kinematics (FK)
what is ๐ ๐พ ?
i.e., given joint angles ๐พ, what is the corresponding tip position ๐?
๏ something like ๐ ๐พ = ๐ผ๐ฟ๐บ๐ฟ โฏ ๐ผ1๐บ1๐ท // some big analytic // expression with a bunch // of sin(๐๐)โs and cos(๐
๐)โs
inverse kinematics (IK)
what is ๐พโ เทฅ ๐ ?
i.e., given joint target tip position เทฅ ๐, what is an optimal choice of joint angles ๐พโ?
- ption 0: solve analytically
- ption 1: use optimization
minimize a suitable objective
- ption 1a: derivative-free optimization
requires no derivatives
- when in doubt just use CMA-ES
- ption 1b: derivative-based optimization
may require 1 derivative (gradient)โฆ gradient descent may require 2 derivatives (gradient and Hessian)โฆ Newtonโs method
- r be somewhere in the middleโฆ
Gauss-Newton, L-BFGS
- ption 2: learn it
build a large set of training data {(๐พ๐, ๐๐)} ๐=1
๐
using forward kinematics, then train a deep net using tensor flow, and evaluate the deep net at ๐พ
- ption 3: invert kinematics using the real world
- ption 1b: derivative-based optimization
Say the objective is ๐ ๐(๐) =
1 2 (๐ ๐ โ เทฅ
๐)๐(๐ ๐ โ เทฅ ๐) gradient is
๐๐ ๐๐ = ๐๐ ๐๐ ๐๐ ๐๐
// chain rule
๐๐ ๐๐ = (๐ ๐ โ เทฅ
๐) is trivial to compute and for a serial manipulator,
๐๐ ๐๐ can be computed analytically
But what if ๐ ๐ does not have an analytic expression?
For example, static equilibrium of a finite element mesh: ๐ ๐ = ๐๐ ๐ min
๐
๐น(๐, ๐) min
๐ ๐ ๐ ๐
Still want to solve optimization problems of this form:
An example: topology optimization
Modeling continuous Relation between Parameters and State
- Observation: when we set parameters ๐, we observe the state ๐ as the result of simulation.
- Although ๐ are problem variables, they are not real DOFs โ they are functions of the
parameters, i.e., ๐ = ๐(๐)
- Map from parameters to state is
๐ = simulate(๐)
- For design, we need derivatives of ๐(๐),
๐๐ ๐๐ = ๐๐ ๐๐ d๐ ๐๐
- But how to compute these derivatives,
๐๐ ๐๐ = ๐simulation ๐๐
?
- The derivative of an argmin...?
14
Differentiating the Map
- Although we can evaluate the map ๐ โ ๐(๐), this map is not available in closed-form
(i.e., analytically)
- ๐ โ ๐(๐) requires minimizing a function, i.e., solving a system of nonlinear equations.
- In general, it is impractical to compute derivatives of the minimization process.
- But even though ๐ โ ๐(๐) is not given explicitly, the gradient of the objective
๐ ๐, ๐ = ๐๐ฒE =
๐๐น ๐๐ = ๐
provides this map implicitly.
15
Differentiating the Map
- Suppose that (๐,๐) is a feasible pair, i.e., ๐(๐, ๐) = ๐. In other words, ๐ is an equilibrium
configuration for ๐.
- If we apply a parameter perturbation ฮ๐, the system will undergo displacements ฮ๐ such that
it is again in equilibrium, ๐(๐ + ฮ๐, ๐ + ฮ๐) = ๐
- Since this has to hold for arbitrary parameter variations, we have
๐๐ ๐๐ = ๐๐ ๐๐ ๐๐ ๐๐ + ๐๐ ๐๐ = ๐ // total derivative
- If the Jacobian ๐ผ
๐๐ is non-singular, we have ๐๐ ๐๐ = โ ๐๐ ๐๐ โ1 ๐๐ ๐๐
16
Sensitivity Analysis
- Used in many applications to quantify the sensitivity of a solution with respect to parameters
(๐ป =
๐๐ ๐๐ is also called the sensitivity matrix)
- Widely for shape optimization, topology optimization, control, etc.
17
- ption 1b: derivative-based optimization
Say the objective is ๐ ๐(๐) =
1 2 (๐ ๐ โ เทฅ
๐)๐(๐ ๐ โ เทฅ ๐) gradient is
๐๐ ๐๐ = ๐๐ ๐๐ ๐๐ ๐๐
// chain rule
๐๐ ๐๐ = (๐ ๐ โ เทฅ
๐) is trivial to compute and for statically stable FEM (and for many, many other systems),
๐๐ ๐๐ can be computed using sensitivity analysis
application: soft IK
say the control input ๐ are the contacted lengths of cables in a soft robot... given a target pose เทฅ
๐, what is the optimal control ๐โ?
๐ ๐(๐) = 1 2 (๐ ๐ โ เทฅ ๐)๐๐น(๐ ๐ โ เทฅ ๐)
real-world robot user-specified target pose เทฅ ๐
- ptim