Hybrid Toolbox for MATLAB

The Hybrid Toolbox is a MATLAB/Simulink toolbox for modeling, simulating, and verifying hybrid dynamical systems, for designing and simulating model predictive controllers for hybrid systems subject to constraints, and for generating linear and hybrid MPC control laws in piecewise affine form that can be directly embedded as C-code in real-time applications.

Presentation download
(and related

The main features of the toolbox are:

Hybrid systems modelling, simulation, and analysis

Mixed logical dynamical (MLD) systems are handled as MATLAB objects, obtained from HYSDEL models.

MLD objects can be automatically converted into piecewise affine (PWA) objects.

MLD and PWA objects can be simulated in MATLAB or in Simulink.

Safety properties can be verified through reachability analysis.


Model predictive control design

Model predictive controllers based on on-line optimization (MILP / MIQP) can be designed for hybrid systems.

Quadratic and infinity norms are supported.


Explicit MPC control design

Explicit MPC controllers in piecewise affine form can be designed via offline optimization (multiparametric programming) for linear systems w/ constraints and for hybrid systems.


C-code generation

Explicit controllers can be easily exported as C-code for direct implementation and rapid prototyping, by either simply running Real-Time Workshop or by embedding the generated C code in the application.


Simulink library

Blocks are provided for: controllers based on on-line optimization, explicit piecewise linear controllers, MLD and PWA models.


Solver support

The Hybrid Toolbox supports several solvers for linear, quadratic, and mixed-integer optimization.

List of supported solvers:

Code/Manual Download (Version 1.4.4 - May 28, 2021)

Note: The code can be downloaded only for non-commercial use at universities, governmental entities, or academic non-profit institutions. An academic non-profit institution is defined by its mission: research in the public domain and education. A non-profit organization that performs research as a service under contract to a commercial entity does not belong to the category of non-commercial users. Commercial users interested in obtaining the code should contact the author Alberto Bemporad.

Citations to the toolbox manual are appreciated:

   author = {A. Bemporad},
   title = {{Hybrid Toolbox - User's Guide}},
   year = {2004},

Toolbox download: Please choose your platform below:


Hybrid Toolbox (Windows) [Win64 users: please read]


Hybrid Toolbox (MacOS)


Hybrid Toolbox (Linux)


Hybrid Toolbox (SunOS)

>>> Download request #9300 received on May 7, 2021 <<<

Author: Alberto Bemporad

Note: The Model Predictive Control Toolbox for MATLAB should be installed to use the Hybrid Toolbox. For simulation of hybrid MPC controllers based on mixed-integer optimization, IBM CPLEX or GUROBI is highly recommended.

You are visitor number

Acknowledgements: the Scientific Research Laboratory of Ford Motor Company (Dearborn, MI) is acknowledged for continuous support. The European Commission is also acknowledged for supporting several theoretical developments through EU project "CC" (IST-2001-33520).




(C) 2003-2021 by A. Bemporad