Skip to content

Applied-Systems-Lab/zonoLAB

 
 

Repository files navigation

Welcome to zonoLAB!

Introduction

The zonoLAB toolbox is a MATLAB-based software package for generating, manipulating, and analyzing hybrid zonotopes, a set representation that is equivalent to the union of $2^N$ constrained zonotopes (i.e. convex polytopes). Hybrid zonotopes are represented in Hybrid Constrained Generator-representation (HCG-rep), with the shorthand notation $\mathcal{Z}_h = \langle G^c,G^b,c,A^c,A^b,b\rangle\subset\mathbb{R}^n$, such that

$$\mathcal{Z}_h = \lbrace z = \left[G^c \ G^b\right] \begin{bmatrix}\xi^c \atop\xi^b \end{bmatrix} + c \ | \ \begin{bmatrix}\xi^c \atop\xi^b \end{bmatrix} \in \mathcal{B}_{\infty}^{n_{g}} \times \lbrace -1,1\rbrace^{n_{b}}, \ \left[A^c \ A^b\right] \begin{bmatrix}\xi^c \atop\xi^b \end{bmatrix} = b \rbrace, $$

where:

  • $n$ denotes the dimension of the space,
  • $n_g$ denotes the number of continuous generators forming the columns of $G^c \in \mathbb{R}^{n \times n_g}$, which are multiplied by the $n_g$ factors $\xi^c \in \mathbb{R}^{n_g}$,
  • $n_b$ denotes the number of binary generators forming the columns of $G^b \in \mathbb{R}^{n \times n_b}$, which are multiplied by the $n_b$ factors $\xi^b \in \mathbb{R}^{n_b}$,
  • $n_c$ denotes the number of linear equality constraints,
  • $c\in\mathbb{R}^n$ is the center,
  • $\mathcal{B}_{\infty}^{n_{g}}$ is the $n_g$-dimensional unit hypercube such that $\mathcal{B}_{\infty}^{n_{g}} = \lbrace x \in \mathbb{R}^{n} \ | \ || x ||_\infty \leq 1 \rbrace$,
  • $\lbrace -1,1\rbrace^{n_{b}}$ is the set of all $n_{b}$-dimensional binary vectors (i.e. vertices of $\mathcal{B}_{\infty}^{n_{b}}$),
  • $A_c \in \mathbb{R}^{n_c \times n_g}$ is the continuous factor constraint coefficient matrix,
  • $A_b \in \mathbb{R}^{n_c \times n_b}$ is the binary factor constraint coefficient matrix, and
  • $b \in \mathbb{R}^{n_c}$ is the constraint offset vector.

In this toolbox, hybrid zonotopes are represented using the class hybZono. Constrained zonotopes and zonotopes can be viewed as specific cases of hybrid zonotopes and are also represented using the classes conZono and zono, respectively. All three classes inherit properties from the abstract superclass abstractZono, which contains the properties and methods commonly used by hybZono, conZono, and zono.

Installation

The zonoLab toolbox does not require installation beyond adding the folder and subfolders to the path in MATLAB. Running zonoLab_Install will automatically add all necessary folders to your MATLAB path. Additionally, it is highly recommended that Gurobi is installed and added to your MATLAB path. Information on installing Gurobi, including details on free license for academic use, can be found on the Getting Started with Gurobi Optimizer page.

Getting Started

The following code can be used to create and plot your first hybrid zonotope.

Gc = [3 -3 1; 2 1 -2];          % Continuous generator matrix
Gb = [6 -6 2; 4 2 -4];          % Binary generator matrix
c = [0;0];                      % Center
Ac = [1 1 1];                   % Continuous constraint matrix
Ab = [1 1 1];                   % Binary constraint matrix
b = 1;                          % Constraint offset vector
Zh = hybZono(Gc,Gb,c,Ac,Ab,b);  % Creates a hybrid zonotope

figure;
plot(Zh,'b',0.1)                % Plots hybrid zonotope in transparent blue

To learn more about generating hybrid zonotopes, plotting, and set-based operations, please visit the Wiki Tutorial, Functions, and Examples pages.

License

The zonoLab toolbox is distributed under the GNU General Public License (GPL). The paper provided above must be referenced when zonoLab is used in published work. This toolbox is distributed without any warranty and, therefore, the user is responsible for assessing the correctness of the software.

Cite

Please cite the following publication if you publish work based on the zonoLAB toolbox:

For general background on hybrid zonotopes, refer to the following publication:

Additional References

More information on the hybrid zonotopes and applications can be found in the following publications:

Dissertations:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 100.0%