# HyEQ: A Hybrid Systems Simulation Toolbox for Matlab/Simulink

A hybrid system is a dynamical system with continuous and discrete dynamics. Several mathematical models for hybrid systems have appeared in literature. In these files, we consider the framework for hybrid systems, where a hybrid system is defined by a set $C$ called the flow set, a function $f$ called the flow map, a set $D$ called the jump set, a function $g$ called the jump map, and a set $O$ called the state space.  A hybrid system with state $x \in O$ is given by

$\dot{x} = f(x,u)$    $(x,u) \in C$

$x^+ = g (x,u)$   $(x,u) \in D$

The Hybrid EQuations (HyEQ) Toolbox includes five basic blocks that define the dynamics of a hybrid system. These include the flow map, flow set, jump map, jump set, and state space. The flows and jumps of the system are computed by the integrator system which is comprised of blocks that compute the continuous dynamics of the hybrid system, trigger jumps, update the state of the system and simulation time at jumps, and stop the simulation. Files are included that plot the solutions of simulations including the corresponding hybrid arcs. See the documentation file for more details and examples of already simulated hybrid systems.

Requirements:

Matlab/Simulink Code and Instructions available at Matlab Central. Current version (v2.0):

http://www.mathworks.com/matlabcentral/fileexchange/41372-hybrid-equations-toolbox-v2-0

Main reference:

Sanfelice, R. G., Copp, D. A. & Nanez, P., A Toolbox for Simulation of Hybrid Systems in Matlab/Simulink: Hybrid Equations (HyEQ) Toolbox.Proceedings of Hybrid Systems: Computation and Control Conference, 101–106, 2013. (PREPRINT)

Help for posting examples:

A sample of the code used to post examples in this blog can be found here: SimulatorCodeExample.  This code corresponds to the tank control example posted above.