Motion planning applications of Satisfiability Modulo Convex Optimization Yasser Shoukry (1) and Paulo Tabuada (2) (1) Department of Electrical and Computer Engineering, UMD (2) Electrical and Computer Engineering Department, UCLA
Scalability in Correct-by-Construction Synthesis 2
Correct-by-Construction Synthesis Given: Robot dynamics (linear) Input and state constraints Initial state LTL specifications: Safety: e.g., always avoid obstacles Liveness: e.g., infinitely often visit some goal locations Chronological ordering of events: e.g., visit multiple goal locations in a particular order Objective: Generate a trajectory that satisfy the specifications Later, Jessy will explain how to use several trajectory to synthesize complete policies. * W 1 3
Abstraction Based Techniques Discrete Continuous P. Tabuada and G. J. Pappas, Linear time logic control of discrete-time linear systems, TAC 2006. 1 2 17 3 x (t+1) = Ax (t) + Bu (t) y (t) = Cx (t) M. Kloetzer and C. Belta, Temporal Logic Planning and Control of Robotic Swarms by Hierarchical Abstractions, TAC 2007. 9 X 10 G. E. Fainekos, A. Girard, H. Kress- Gazit, and G. J. Pappas, Temporal logic motion planning for dynamic robots, Automatica 2009. 1 2 17 9 13 101 2 17 92 17 3 10 3 Scales poorly as the number 2 93 10 of continuous 1 17 states increases 9 10 4
Satisfiability Modulo Convex Optimization SAT Solvers: one of the central tools in computer science to reason about discrete dynamics. Convex Optimization: one of the centric tools in electrical engineering to reason about continuous dynamics. CPS = Discrete Dynamics + Continuous Dynamics? Boolean Constraints SAT Solvers SMT Solvers SAT + Convex Mixed Integer Programming Convex Optimization Convex Constraints 5
Motivating Example: Obstacle Avoidance ' ::= b 0 start ^ b L goal ^ b j i! ^ mx i=1 b j i _ i 0 2 (i) (Initial partition) (Goal partition) b j+1 i 0 8j 2 {0,...,L 1}, i 2 {1,...,m} (Adjacency constraints) =1 8j 2 {0,...,L 1} ^ x j+1 = Ax j + Bu j 8j 2 {0,...,L 1} (Robot dynamics) ^ku j kappleu 8j 2 {0,...,L 1} ^ x 0 = x (Input constraints) (Initial state) ^ b j i! xj 2 P i 8j 2 {0,...,L 1} (Region constraints) 11 12 13 10 9 5 1 2 1 7 4 3 6 2 9 8 21 17 14 30 29 26 15 22 24 27 28 25 23 20 16 17 3 10 19 18 6
Motivating Example: Obstacle Avoidance ' ::= b 0 start ^ b L goal ^ b j i! ^ mx i=1 b j i _ i 0 2 (i) (Initial partition) (Goal partition) b j+1 i 0 8j 2 {0,...,L 1}, i 2 {1,...,m} (Adjacency constraints) =1 8j 2 {0,...,L 1} ^ x j+1 = Ax j + Bu j 8j 2 {0,...,L 1} (Robot dynamics) ^ku j kappleu 8j 2 {0,...,L 1} ^ x 0 = x (Input constraints) (Initial state) ^ b j i! xj 2 P i 8j 2 {0,...,L 1} (Region constraints) n 8 >< >: 8 >< >: (b) g(x) apple 0 0 (b) _ g 0 (x) apple 0 7
Motivating Example: Obstacle Avoidance >: Definition: Monotone formula ::= {clause ^} clause SMC Formula clause ::= ({literal _} literal) pb predicate literal ::= bool var bool var >? conv constraint conv constraint conv constraint ::= equation inequality equation ::= affine function = 0 inequality ::= convex function relation 0 relation ::= < apple >< >: 8 >< (b) g(x) apple 0 Y. Shoukry, P. Nuzzo, A. Sangiovanni-Vincentelli, S. A. Seshia, G. J. Pappas, and P. Tabuada, SMC: Satisfiability Modulo Convex Optimization, HSCC 2017 8 n 0 (b) _ g 0 (x) apple 0 8
Applications: Controller Synthesis Obstacle Avoidance LTL Motion Planning Multi-robot Motion Planning :: = initial partition ^ goal partition ^ adjacency partition ^ robot dynamics ^ input constraints ^ initial state ^ region constraints :: = LTL BMC encoding ^ adjacency partition ^ robot dynamics ^ input constraints ^ initial state ^ region constraints :: = LTL BMC encoding ^ adjacency partition ^ robot dynamics ^ input constraints ^ initial state ^ region constraints ^ x robot 1 x robot 2 > _ x robot 2 _ y robot 1 _ y robot 2 x robot 1 > y robot 2 > y robot 1 > 9
Satisfiability Modulo Convex Optimization W 1 Complexity = #Iterations (Time (b) {z } small + Time g(x)apple0 ) {z } polynomial _ * (g 1 (x) apple 0) ^ 1(b) (g 2 (x) apple 0) ^ 2(b) The satisfiability of the monotone SMC formula can always be cast as a feasibility problem for a finite disjunction of convex constraints. _... _ (g k (x) apple 0) ^ k(b) Monotone SMC Formula Reduce the number of iterations? 10
Satisfiability Modulo Convex Optimization W 1 Complexity = #Iterations (Time (b) {z } small + Time g(x)apple0 ) {z } polynomial _ * (g 1 (x) apple 0) ^ 1(b) (g 2 (x) apple 0) ^ 2(b) _... _ (g k (x) apple 0) ^ k(b) Monotone SMC Formula Key idea: counterexample guided search 11
How to find Satisfiable Models To enhance the performance, we need to generate compact UNSAT certificates. trivial-ce = _ cert = a 1 _ a 2 _ a 3 cert = a 1 _ a 2 cert = a 1 j2supp(a) a j 12
Summary of UNSAT certificates UNSAT Certificate Minimal Complexity (number of convex problems) _ * W 1 (g 1 (x) apple 0) ^ 1(b) (g 2 (x) apple 0) ^ 2(b) _... _ (g k (x) apple 0) ^ k(b) Monotone SMC Formula Trivial No Constant Irreducible Infeasible Set Yes Exponential Sum of Slacks Yes* Linear Minimum Prefix Yes* Constant * under reasonable technical assumptions Complexity = #Iterations (Time (b) {z } small + Time g(x)apple0 ) {z } polynomial 13
Scalability Results 10000 x Increase the number of Boolean constraints #Boolean variables = 4800 #Real variables = 100 Execution time (s) 10 3 10 2 10 1 10 0 10 1 10 2 10 3 1E3 5E3 10E3 15E3 20E3 25E3 30E3 35E3 40E3 45E3 50E3 55E3 60E3 65E3 70E3 75E3 80E3 85E3 90E3 95E3 100E3 105E3 110E3 115E3 120E3 125E3 130E3 Number of Boolean constraints SATEX (SSF) CPLEX (1 core) CPLEX (4 cores) Z3 10000 x 10 2 http://yshoukry.bitbucket.io/satex Increase the number of Real variables #Boolean variables = 4800 #Boolean constraints = 7000 Execution time (s) 10 1 10 0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 Number of real variables SATEX (SSF) CPLEX (1 core) CPLEX (4 cores) Z3 14
Application (1): Single Robot Motion Planning 10 3 Execution time (s) 10 2 10 1 10 0 4 6 8 10 12 14 16 18 20 Number of continuous states SatEX Syclop RRT (OMPL) Syclop EST (OMPL) dreal ::= } 1 ^ } 2 ^ obstacle Y. Shoukry, P. Nuzzo, I. Saha, A. Sangiovanni-Vincentelli, S. A. Seshia, G. J. Pappas, and P. Tabuada, Scalable Lazy SMT-Based Motion Planning, CDC 2016
Application (2): Multi-Robot Motion Planning obstacles ^} at least one robot patrols the middle corridor ^ } 1st robot visits charging station #1 ^ } 2st robot visits his charging station #2 ^ 1.5m seperation ^ velocity apple 2.5m/s ^ acceleration apple 1m/s 2 Y. Shoukry, P. Nuzzo, A. Balkan, I. Saha, A. Sangiovanni-Vincentelli, S. A. Seshia, G. J. Pappas, and P. Tabuada, Linear Temporal Logic Motion Planning for Teams of Underactuated Robots Using Satisfiability Modulo Convex Programming, CDC 2017
Summary Cyber Physical Systems = Discrete Dynamics + Continuous Dynamics W 1 SMC splits the reasoning between two domains * SMC = SAT Solver + Convex Optimization Boolean Satisfiability Convex Optimization Generic tool to reason about combinations of discrete and convex constraints Scales favorably compared with other tools. http://yshoukry.bitbucket.io/satex 17