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 called the *flow set*, a function called the *flow map*, a set called the *jump set*, a function called the *jump map*, and a set called the *state space*. A hybrid system with state is given by

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 R2010a (or newer), Simulink, C-compiler

**Download:**

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.