Author: Zengjie Zhang ([email protected])
The simulation study benchmark to support the following publication,
Zhang, Zengjie, and Sofie Haesaert. "Modularized control synthesis for complex signal temporal logic specifications." In 2023 62nd IEEE Conference on Decision and Control (CDC), pp. 7856-7861. IEEE, 2023.
Signal temporal logic (STL) is widely used to specify requirements for robot systems, due to its advantage in specifying real-valued signals with finite timing bounds. System control with STL specifications renders a synthesis problem that can be solved by mixed integer linear/convex programming (MILP/MICP). Based on this a closedloop controller can be developed using model predictive control (MPC). However, solving a MILP/MICP problem is computationally expensive and time-consuming, especially for complex STL formulas with long timing intervals since the computational load grows drastically as the number of the integer variables increases (exponentially in the worst case). Thus, computational complexity has become a bottleneck of the control synthesis of complex STL specifications, especially those with time-variant specifications and fixed-order constraints.
Another direction of reducing the complexity is to decompose a long and complex STL formula into several shorter and simpler subformulas and solve them sequentially. Consider a warehouse example as illustrated in Fig. 1, where a mobile robot is required to perform a monitoring task in a rectangular space SAFETY sized
- Starting from position
$(0,5)$ , the robot should frequently visit TARGET every$5$ steps or fewer until$k=40$ . - From
$k=15$ to$k=45$ , once the robot leaves HOME, it should get back to HOME within$5$ time steps. - After
$k = 20$ and before$k = 45$ , it should stay in CHANGER continuously for at least$3$ time steps to charge. - The robot should always stay in the SAFETY region.
Directly solving this synthesis problem for the entire time horizon
Figure 1. A warehouse example.
Figure 2. The trajectories of the warehouse robots in different stages.
Operating system
- Windows (compatible in general, succeed on 11)
- Linux (compatible in general, succeed on 20.04)
- MacOS (compatible in general, succeed on 13.4.1)
Python Environment
- Python
3.11
- Required Packages:
numpy
,treelib
,matplotlib
.
Required Libraries
gurobipy
solver (license required, see How to Get a Gurobi License)stlpy
toolbox (see Documentation or GitHub repository)
-
Install conda following this instruction;
-
Open the conda shell, and create an independent project environment;
conda create --name modustl python=3.11
- In the same shell, activate the created environment
conda activate modustl
- In the same shell, within the
modustl
environment, install the dependencies one by one
conda install -c anaconda numpy
conda install -c conda-forge treelib
conda install -c conda-forge matplotlib
- In the same shell, within the
modustl
environment, install the libraries
python -m pip install gurobipy
pip install stlpy
- Last but not least, activate the
gurobi
license (See How To). Note that this project is compatible withgurobi
Released version11.0.1
. Keep yourgurobi
updated in case of incompatibility.
- Run the main script
main.py
; - Plotted figures automatically saved in the root folder.
This project is with a BSD-3 license, refer to LICENSE
for details.