210 likes | 391 Views
Computing Reachable Sets via Toolbox of Level Set Methods. Mo Chen mochen72@berkeley.edu Slides adapted from Michael Vitus and Jerry Ding. Toolbox of Level Set Methods. Ian Mitchell Professor at the University of British Columbia http://www.cs.ubc.ca/~mitchell/ MatLab Toolbox
E N D
Computing Reachable Sets via Toolbox of Level Set Methods Mo Chen mochen72@berkeley.edu Slides adapted from Michael Vitus and Jerry Ding
Toolbox of Level Set Methods • Ian Mitchell • Professor at the University of British Columbia • http://www.cs.ubc.ca/~mitchell/ • MatLab Toolbox • http://www.cs.ubc.ca/~mitchell/ToolboxLS/index.html • Computes the backwards reachable set starting from some final target set • Fixed spacing Cartesian grid • Up to 4 or 5 dimensions
Backwards Reachability [Mitchell, 2005]
Problem Formulation • Dynamics: • System input: • Disturbance: • Target set: • Final conditions • Level set representation: • Eg. 2D unit disk centered at the origin:
Backwards Reachable Set • Solution to a Hamilton-Jacobi PDE: where: • For theory, see lecture 8 notes • Terminal value HJ PDE • Converted to an initial value PDE by multiplying the Hamiltonian by
Toolbox Formulation • Provide 3 items • Final target set • Hamiltonian function (multiplied by -1) • An upper bound on the partials functions
Example: Double Integrator • Dynamics • Target set • Outside of the box • Coding: • Mostly setting up the environment in the toolbox
Example: Double Integrator • Start from Examples\Reachability\air3D.m
Example: Grid and Target Set • Set-up grid and target set • g.bdry: @addGhostExtrapolateusually • g.bdry: @addGhostPeriodicfor periodic dimensions
Example: Double Integrator • Target set: define own function OR use pre-existing functions such as shapeCylinder, shapeRectangleByCorners • See Section 3.3 of toolbox manual
Hamiltonian and Partial Functions • Hamiltonian:
Hamiltonian and Partial Function • Partials:
Hamiltonian and Partial Function • Set-up Hamiltonian • is written as deriv{i} • is written asgrid.xs{i}
Example: Double Integrator • Set up partials function
Additional Comments • Hamiltonian overestimated reachable set underestimated • Partials function (Pages 50-51 of Toolbox manual) • Underestimation numerical instability • Overestimation rounded corners or worst case underestimation of reachable set • Computation • The solver grids the state space • Tractable only up to 4-5 continuous states • Advanced: Can also define avoid sets • Toolbox • Coding: ~90% is setting up the environment
Useful Dynamical Form for Partial Function • Pages 50-51 of Toolbox manual • Nonlinear system, linear input • Input constraints are hyperrectangles • Analytical optimal inputs: • Partials upper bound:
Other Tools • Plotting utilities • Kernel\Helper\Visualization • visualizeLevelSet.m • spinAnimation.m • Initial condition helpers • Cylinders, hyperrectangles • Advice • Start with a small example • Look over air3D.m along with Section 2.6.1 of toolbox manual