Motion Planning for LTL Specifications: A Satisfiability Modulo Convex Optimization Approach Yasser Shoukry UC Berkeley, UCLA, and UPenn Joint work with Pierluigi Nuzzo (UC Berkeley), Indranil Saha (IIT Kanpur), Alberto Sangiovanni-Vincentelli (UC Berkeley), Sanjit A. Seshia (UC Berkeley), George Pappas (UPenn), and Paulo Tabuada (UCLA) Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 1 / 12
Motion Planning Problem Given: Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 2 / 12
Motion Planning Problem Given: Robot Dynamics (with input constraints): x t+1 = Ax t + Bu t, x 0 = x, u t u t N Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 2 / 12
Motion Planning Problem Given: Robot Dynamics (with input constraints): x t+1 = Ax t + Bu t, x 0 = x, u t u t N Workspace W: W 1 * Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 2 / 12
Motion Planning Problem Given: Robot Dynamics (with input constraints): x t+1 = Ax t + Bu t, x 0 = x, u t u t N Workspace W: all obstacles are assumed to be unions of polyhedra. W 1 * Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 2 / 12
Motion Planning Problem Given: Robot Dynamics (with input constraints): x t+1 = Ax t + Bu t, x 0 = x, u t u t N Workspace W: all obstacles are assumed to be unions of polyhedra. Atomic propositions Π = {π 1,..., π m}: defined over the free-workspace. W 1 * Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 2 / 12
Motion Planning Problem Given: Robot Dynamics (with input constraints): x t+1 = Ax t + Bu t, x 0 = x, u t u t N Workspace W: all obstacles are assumed to be unions of polyhedra. Atomic propositions Π = {π 1,..., π m}: defined over the free-workspace. LTL Specification Φ: W 1 * Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 2 / 12
Motion Planning Problem Given: Robot Dynamics (with input constraints): x t+1 = Ax t + Bu t, x 0 = x, u t u t N Workspace W: all obstacles are assumed to be unions of polyhedra. Atomic propositions Π = {π 1,..., π m}: defined over the free-workspace. LTL Specification Φ: for simplicity, I will focus on reach-avoid problems: π 1 π 0. W 1 * Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 2 / 12
Motion Planning Problem Given: Robot Dynamics (with input constraints): x t+1 = Ax t + Bu t, x 0 = x, u t u t N Workspace W: all obstacles are assumed to be unions of polyhedra. Atomic propositions Π = {π 1,..., π m}: defined over the free-workspace. LTL Specification Φ: for simplicity, I will focus on reach-avoid problems: π 1 π 0. Objective: W 1 * Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 2 / 12
Motion Planning Problem Given: Robot Dynamics (with input constraints): x t+1 = Ax t + Bu t, x 0 = x, u t u t N Workspace W: all obstacles are assumed to be unions of polyhedra. Atomic propositions Π = {π 1,..., π m}: defined over the free-workspace. LTL Specification Φ: for simplicity, I will focus on reach-avoid problems: π 1 π 0. Objective: Generate the input sequence u 0, u 1,..., u L such that the trajectory of the robot satisfies Φ. W 1 * Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 2 / 12
Solver Architecture [0/3] Step 0: Compute coarse, obstacle-based, discretization of the free space. W 1 * Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 3 / 12
Solver Architecture [0/3] Step 0: Compute coarse, obstacle-based, discretization of the free space. W 1 * 11 12 13 10 9 5 7 14 28 29 26 15 24 27 25 30 19 1 2 4 3 6 8 21 22 23 20 16 17 18 Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 3 / 12
Solver Architecture [0/3] Step 0: Compute coarse, obstacle-based, discretization of the free space. Avoid discrete state-space explosion (no abstraction of continuous dynamics, no grid-based abstractions). * W 1 11 12 13 10 9 5 7 14 28 29 26 15 24 27 25 30 19 1 2 4 3 6 8 21 22 23 20 16 17 18 Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 3 / 12
Solver Architecture [0/3] Step 0: Compute coarse, obstacle-based, discretization of the free space. Avoid discrete state-space explosion (no abstraction of continuous dynamics, no grid-based abstractions). * W 1 π 2 π 3 11 12 13 10 9 5 7 14 28 29 26 15 24 27 25 30 19 start π 1 π 9 π 17 π 10 1 2 4 3 6 8 21 22 23 20 16 17 18 Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 3 / 12
Solver Architecture [1/3] Step 1: For a given horizon L, use a SAT solver to find a candidate high-level path (Bounded Model Checking) that satisfies the LTL specification. 11 12 13 10 9 5 1 2 7 4 3 6 8 21 14 28 29 26 15 22 24 27 25 23 20 30 16 17 19 18 SAT-solver (Bounded Model Checking) L, φltl π2 π3 π1 π17 π9 π10 CON-PLAN Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 4 / 12
Solver Architecture [1/3] Step 1: For a given horizon L, use a SAT solver to find a candidate high-level path (Bounded Model Checking) that satisfies the LTL specification. Increase the horizon L until such high-level path is found. 11 12 13 10 9 5 1 2 7 4 3 6 8 21 14 28 29 26 15 22 24 27 25 23 20 30 16 17 19 18 SAT-solver (Bounded Model Checking) L, φltl π2 π3 π1 π17 π9 π10 CON-PLAN Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 4 / 12
Solver Architecture [1/3] Step 1: For a given horizon L, use a SAT solver to find a candidate high-level path (Bounded Model Checking) that satisfies the LTL specification. Increase the horizon L until such high-level path is found. 11 12 13 10 9 5 1 2 * 7 4 6 8 21 14 28 29 26 15 22 24 23 20 30 16 27 3 17 25 19 18 SAT-solver (Bounded Model Checking) ρ = π1, π17..., π28 L, φltl π2 π3 π1 π17 π9 π10 CON-PLAN Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 4 / 12
Solver Architecture [2/3] Step 2: Check whether the high-level trajectory ρ is feasible (satisfies the robot initial state, dynamics, and input constraints). 11 12 13 10 9 5 1 2 * 7 4 6 8 21 14 28 29 26 15 22 24 23 20 30 16 27 3 17 25 19 18 (A, B, x, u) SAT-solver (Bounded Model Checking) ρ = π1, π17..., π28 CON-PLAN.CHECK u0, u1,..., ul 1 L, φltl π2 π3 π1 π17 π9 π10 CON-PLAN Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 5 / 12
Solver Architecture [2/3] Step 2: Check whether the high-level trajectory ρ is feasible (satisfies the robot initial state, dynamics, and input constraints). Can be casted as an optimization problem. Problem (CON-PLAN.CHECK) min 1 i = 0,..., L (initial condition) x 0 = x, (dynamics constraints) x i+1 = Ax i + Bu i (input constraints) u i u, (plan constraints) x i ρ i (A, B, x, u) SAT-solver (Bounded Model Checking) ρ = π1, π17..., π28 CON-PLAN.CHECK u0, u1,..., ul 1 L, φltl π2 π3 π1 π17 π9 π10 CON-PLAN Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 5 / 12
Solver Architecture [2/3] Step 2: Check whether the high-level trajectory ρ is feasible (satisfies the robot initial state, dynamics, and input constraints). Can be casted as a convex optimization problem (Linear Program). Problem (CON-PLAN.CHECK) min 1 i = 0,..., L (initial condition) x 0 = x, (dynamics constraints) x i+1 = Ax i + Bu i (input constraints) u i u, (plan constraints) x i ρ i (A, B, x, u) SAT-solver (Bounded Model Checking) ρ = π1, π17..., π28 CON-PLAN.CHECK u0, u1,..., ul 1 L, φltl π2 π3 π1 π17 π9 π10 CON-PLAN Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 5 / 12
Solver Architecture [3/3] Step 3: Generate counter example. L φ triv-ce := ρ i, i=0 11 12 13 10 9 5 1 2 * 7 4 6 8 21 14 28 29 26 15 22 24 23 20 30 16 27 3 17 25 19 18 (A, B, x, u) SAT-solver (Bounded Model Checking) ρ = π1, π17..., π28 CON-PLAN.CHECK u0, u1,..., ul 1 L, φltl π2 π3 π1 π17 π9 π10 φcert CON-PLAN.CERTIFICATE CON-PLAN Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 6 / 12
Solver Architecture [3/3] Step 3: Generate counter example. L φ triv-ce := ρ i, i=0 Repeat. 11 12 13 10 9 5 1 2 * 7 4 6 8 21 14 28 29 26 15 22 24 23 20 30 16 27 3 17 25 19 18 (A, B, x, u) SAT-solver (Bounded Model Checking) ρ = π1, π17..., π28 CON-PLAN.CHECK u0, u1,..., ul 1 L, φltl π2 π3 π1 π17 π9 π10 φcert CON-PLAN.CERTIFICATE CON-PLAN Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 6 / 12
Solver Architecture [3/3] Step 3: Generate counter example. L φ triv-ce := ρ i, i=0 Repeat. 10 9 11 12 13 5 7 1 2 6 8 * 22 4 21 3 14 15 29 24 27 25 28 30 26 23 20 16 17 19 18 (A, B, x, u) SAT-solver (Bounded Model Checking) ρ = π1, π17..., π28 CON-PLAN.CHECK u0, u1,..., ul 1 L, φltl π2 π3 π1 π17 π9 π10 φcert CON-PLAN.CERTIFICATE CON-PLAN Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 6 / 12
Succinct Counter-example Generation Detecting the earliest possible occurrence of an infeasible transition between two regions rules out a broader class of assignments to Boolean variables. Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 7 / 12
Succinct Counter-example Generation Detecting the earliest possible occurrence of an infeasible transition between two regions rules out a broader class of assignments to Boolean variables. Example 1: φ counter-example := ρ 0 ρ 1 ρ 2 ρ 3 ρ 0 ρ 1 = 1 ρ 1 = 0 ρ 2 = 1 ρ 2 = 0 ρ 2 = 1 ρ 2 = 0 ρ 3 = 1 (1, 1, 1); ρ 3 = 0 (1, 1, 0) ρ 3 = 1 (1, 0, 1) ρ 3 = 0 (1, 0, 0) ρ 3 = 1 (0, 1, 1) ρ 3 = 0 (0, 1, 0) ρ 3 = 1 (0, 0, 1) ρ 3 = 0 (0, 0, 0) Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 7 / 12
Succinct Counter-example Generation Detecting the earliest possible occurrence of an infeasible transition between two regions rules out a broader class of assignments to Boolean variables. Example 1: φ counter-example := ρ 0 ρ 1 ρ 2 ρ 3 Example 2: φ counter-example := ρ 0 ρ 1 ρ 0 ρ 1 = 1 ρ 1 = 0 ρ 2 = 1 ρ 2 = 0 ρ 2 = 1 ρ 2 = 0 ρ 3 = 1 (1, 1, 1) ρ 3 = 0 (1, 1, 0) ρ 3 = 1 (1, 0, 1) ρ 3 = 0 (1, 0, 0) ρ 3 = 1 (0, 1, 1) ρ 3 = 0 (0, 1, 0) ρ 3 = 1 (0, 0, 1) ρ 3 = 0 (0, 0, 0) Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 7 / 12
Succinct Counterexample Generation Searching for succinct counterexample can be performed by checking the feasibility of prefixes of ρ. Leads to solving multiple optimization problems. 11 12 13 24 10 14 28 9 7 29 26 5 15 30 27 25 19 1 2 * 8 6 22 4 21 23 20 16 3 17 18 Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 8 / 12
Succinct Counterexample Generation Searching for succinct counterexample can be performed by checking the feasibility of prefixes of ρ. Leads to solving multiple optimization problems. 11 12 13 24 10 14 28 9 7 29 26 5 15 30 27 25 19 1 2 * 8 6 22 4 21 23 20 16 3 17 18 Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 8 / 12
Succinct Counterexample Generation Searching for succinct counterexample can be performed by checking the feasibility of prefixes of ρ. Leads to solving multiple optimization problems. 11 12 13 24 10 14 28 9 7 29 26 5 15 30 27 25 19 1 2 * 8 6 22 4 21 23 20 16 3 17 18 Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 8 / 12
Succinct Counterexample Generation Searching for succinct counterexample can be performed by checking the feasibility of prefixes of ρ. Leads to solving multiple optimization problems. 11 12 13 24 10 14 28 9 7 29 26 5 15 30 27 25 19 1 2 * 8 6 22 4 21 23 20 16 3 17 18 Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 8 / 12
Succinct Counterexample Generation Searching for succinct counterexample can be performed by checking the feasibility of prefixes of ρ. Leads to solving multiple optimization problems. 11 12 13 24 10 14 28 9 7 29 26 5 15 30 27 25 19 1 2 * 8 6 22 4 21 23 20 16 3 17 18 Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 8 / 12
Succinct Counterexample Generation Searching for succinct counterexample can be performed by checking the feasibility of prefixes of ρ. Leads to solving multiple optimization problems. 11 12 13 24 10 14 28 9 7 29 26 5 15 30 27 25 19 1 2 * 8 6 22 4 21 23 20 16 3 17 18 Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 8 / 12
Succinct Counterexample Generation Searching for succinct counterexample can be performed by checking the feasibility of prefixes of ρ. Leads to solving multiple optimization problems. 11 12 13 24 10 14 28 9 7 29 26 5 15 30 27 25 19 1 2 * 8 6 22 4 21 23 20 16 3 17 18 Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 8 / 12
Succinct Counterexample Generation Key insight: we can check feasibility of high-level plans and generate the shortest counter example by solving a single linear program. (A, B, x, u) Convex Optimization SAT-solver (Bounded Model Checking) ρ = π1, π17..., π28 min u0,...,u L R m v 0,...,v L R m s0 u,...,su L R s0 v,...,sv L R x 1,...,x L+1 R n L i=0 su i + s v i L, φltl π1 π2 π9 π17 π3 π10 φcert x0 = x, subject to hx W(xi) ρ W i, i = 1,..., L + 1 xi+1 = Axi + Bui + B vi i = 0,..., L ui u + si u, i = 0,..., L vi si v, i = 0,..., L 0 ( si u, 0 si v i = 0,..., L i 1 ) s ɛ k=0 su k + sk v si u + si v i = 1,..., L u0, u1,..., ul 1 Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 9 / 12
Succinct Counterexample Generation Key insight: we can check feasibility of high-level plans and generate the shortest counter example by solving a single linear program. Satisfiability modulo convex-optimization approach. (A, B, x, u) Convex Optimization SAT-solver (Bounded Model Checking) ρ = π1, π17..., π28 min u0,...,u L R m v 0,...,v L R m s0 u,...,su L R s0 v,...,sv L R x 1,...,x L+1 R n L i=0 su i + s v i L, φltl π1 π2 π9 π17 π3 π10 φcert x0 = x, subject to hx W(xi) ρ W i, i = 1,..., L + 1 xi+1 = Axi + Bui + B vi i = 0,..., L ui u + si u, i = 0,..., L vi si v, i = 0,..., L 0 ( si u, 0 si v i = 0,..., L i 1 ) s ɛ k=0 su k + sk v si u + si v i = 1,..., L u0, u1,..., ul 1 Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 9 / 12
Case Study 1: Dubin s Vehicle Robot dynamics (Dubin car): ẋ = v cos θ ẏ = v sin θ θ = ω Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 10 / 12
Case Study 1: Dubin s Vehicle Robot dynamics (Dubin car): ẋ = v cos θ ẏ = v sin θ θ = ω Dynamics can be transformed into a linear chain of integrators using dynamic feedback linearization. Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 10 / 12
Case Study 1: Dubin s Vehicle Robot dynamics (Dubin car): ẋ = v cos θ ẏ = v sin θ θ = ω Dynamics can be transformed into a linear chain of integrators using dynamic feedback linearization. Workspace: 30m 30m maze-like workspace. We increase number of passages from 1 to 4. 30 30 20 20 y [m] y [m] 10 10 0 0 10 20 30 x [m] 0 0 10 20 30 x [m] Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 10 / 12
Case Study 1: Dubin s Vehicle Robot dynamics (Dubin car): ẋ = v cos θ ẏ = v sin θ θ = ω Dynamics can be transformed into a linear chain of integrators using dynamic feedback linearization. Workspace: 30m 30m maze-like workspace. We increase number of passages from 1 to 4. We compare execution-time against (1) standard RRT and (2) LTL OPT tool (mixed-integer linear program). Number SMT-Based Motion Planner [s] RRT LTL of Discrete DIS-PLAN CON-PLAN [s] OPT passages abstraction [s] 1 1.9975 0.1360 0.2542 10.4381 > 7200 2 7.1461 1.1290 0.9294 122.3017 time out 3 19.3267 3.6495 1.0053 423.6957 time out 4 43.0985 4.0913 1.9204 1002.4193 time out Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 10 / 12
Case Study 2: Scalability Results Maze-like workspace with increasing number of passages. We increase the number of states n (randomly generate the matrices A and B). Take average across 10 runs. 10 2 Execution time (s) 10 1 10 0 5 10 15 20 25 30 35 40 45 50 Number of states n 1-passage maze 2-passage maze 3-passage maze 4-passage maze Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 11 / 12
Final Remarks What is still missing? Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 12 / 12
Final Remarks What is still missing? We need to compare with other methods like RRT and PRM. Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 12 / 12
Final Remarks What is still missing? We need to compare with other methods like RRT and PRM. We need to compare against existing benchmarks. Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 12 / 12
Final Remarks What is still missing? We need to compare with other methods like RRT and PRM. We need to compare against existing benchmarks. SAT + Convex optimization? = tools: Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 12 / 12
Final Remarks What is still missing? We need to compare with other methods like RRT and PRM. We need to compare against existing benchmarks. SAT + Convex optimization? = tools: Probabilistic CTL (PCTL) verification of Markov Decision Processes. Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 12 / 12
Final Remarks What is still missing? We need to compare with other methods like RRT and PRM. We need to compare against existing benchmarks. SAT + Convex optimization? = tools: Probabilistic CTL (PCTL) verification of Markov Decision Processes. Security: secure state estimation. Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 12 / 12
Final Remarks What is still missing? We need to compare with other methods like RRT and PRM. We need to compare against existing benchmarks. SAT + Convex optimization? = tools: Probabilistic CTL (PCTL) verification of Markov Decision Processes. Security: secure state estimation. Sensor Networks: localization. Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 12 / 12
Final Remarks What is still missing? We need to compare with other methods like RRT and PRM. We need to compare against existing benchmarks. SAT + Convex optimization? = tools: Probabilistic CTL (PCTL) verification of Markov Decision Processes. Security: secure state estimation. Sensor Networks: localization. Motion planning (this work). Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 12 / 12
Final Remarks What is still missing? We need to compare with other methods like RRT and PRM. We need to compare against existing benchmarks. SAT + Convex optimization? = tools: Probabilistic CTL (PCTL) verification of Markov Decision Processes. Security: secure state estimation. Sensor Networks: localization. Motion planning (this work). We are currently developing a comprehensive theory of Satisfiability Modulo Convex Optimization. Yasser Shoukry ExCAPE PI Meeting 2016 May 9, 2016 12 / 12