File Exchange

image thumbnail

Hybrid Equations Toolbox v2.04

version 2.4.0.0 (6.14 MB) by Ricardo Sanfelice
Hybrid systems simulated in MATLAB/Simulink. Includes Simulink implementation and MATLAB code.

55 Downloads

Updated 17 May 2017

View License

The Hybrid Equation (HyEQ) Toolbox is implemented in MATLAB/Simulink for the simulation of hybrid dynamical systems. This toolbox is capable of simulating individual and interconnected hybrid systems with inputs. Examples of systems that can be simulated include a bouncing ball on a moving platform, fireflies synchronizing their flashing, and more. The Simulink implementation includes four basic blocks that define the dynamics of a hybrid system. These include a flow map, flow set, jump map, and jump set. 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. Also includes a “lite simulator” which allows for faster simulation without using Simulink.

Comments and Ratings (23)

@Zhiliang Wang, thanks for your comments. We have tried to replicate your issue in Matlab 2018a (win10 and IOS) but we didn't get those issues. Please go to the installation folder (e.g., C:\Users\userX\Documents\MATLAB\HyEQ_Toolbox_V2_04) and uninstall the toolbox by typing in the command window >>tbclean. After that, please reinstall the toolbox and DO NOT update the Simulink library by hand. Then, restart Matlab and type in the Matlab console: >> slLibraryBrowser, you must be able to see the blocks and examples of the toolbox.

Pablo Nanez

@Sahel Eskandar, thanks for sharing your experience installing the toolbox.
From the error, I can guess that you don't have permissions to write in the folder where the toolbox is trying to install, this might be because you are trying to install from the >>matlabroot, or any folder in the Matlab's >>path, please make sure that you place the source code folder away from matlabroot and the Matlab's path (e.g., Desktop)

I cannot install this toolbox on Matlab R2018b
The error is:
ERROR OCCURED
during installation
----------------------------
Error using rmdir
No directories were removed.
errorcode is 93.4
----------------------------
A critical error has occurred. Please inform the distributor
of the toolbox, where the error occured and send us the entire
screen output of the installation, the error report report
and the informations about the toolbox (distributor, name,
URL etc.). For your convenience, this information has been
recorded in:
F:\2.ProgramFiles\Matlab\InstallHyEQ_Toolbox_V2_04\install.log

Provide a brief description of what you were doing when
this problem occurred.

E-mail or FAX this information to us at:
E-mail: marwan@pik-potsdam.de
Fax: ++49 +331 288 2640

Thank you for your assistance.

I am using matlab 2018a. After installation, I can find documentation in help center, I can run example of jumping ball, however, I cannot find the four module in simulink library. The following messages are provided when updating the simulink library:
Error adding nodes to XML: HyEQ_Library_R2012a/HyEQ_(optimized):
A copy of the original file "HyEQ_Library_R2012a.slx" has been created because it was last saved in an earlier version of Simulink. To recover the original version, rename the file "HyEQ_Library_R2012a.slx.r2012a" as "HyEQ_Library_R2012a.slx".
How can I do?

Pablo Nanez

@Tushar Sharma, please follow the installation instructions in the pdf. You need to download and UNZIP the file and place the install.m file outside your matlab root. After that, go to that folder using matlab, and then type install in the command window, you should answer some questions and see how the installation process take place.

I am typing install in the command window, but nothing is happening? What do I do? Is it already there in my system?

I tried installing this in R2018a.
OS - Ubuntu 16.04

but fails with the following exception

Caught unexpected fl::except::IInternalException

Pablo Nanez

Hi @minsoo kim. Do not try to open and run install.m, just go to the command window and execute instal, e.g., >> install. The file is too big to be opened by the editor, you just need to execute it.

minsoo kim

I tried to install it (by install.m) but matlab always shows "out of memory".

Pablo Nanez

Hi @Tadashi, great question! yes, it is possible. It would be possible to craft such system in both the lite and the Simulink interfaces, but I think is more straightforward to do it in simulink. In the mean time, you can modify the example: Hybrid Equations Toolboox>>CPS examples>>Continuous Plant Example, and modify it so that the input "u" of the hybrid system "plant" is e. We will implement a more detailed example in the next release of the simulator. Thanks for the suggestion!

Tadashi

It is possible to simulate hybrid systems with measurement noise? That is,
a hybrid system with data (C,f,D,g) given by

x' = f(x+e), x+e ∈ C,
x⁺ = g(x+e), x+e ∈ D,

where e: dom e → Rⁿ is a measurement noise?

If so, could an example be included in the documentation?
Thanks! :)

Tadashi

Pablo Nanez

A new version of the simulator is available!
The main new features are:
1) Compatibility issues with matlab 2014-2017a are now solved
2) Instructions file updated
3) New examples and html files
4) Now is possible to solve DAE equations as a flow maps
5) Now flow maps and jump maps can access the hybrid time domain, e.g., f(x,t,j)

Pablo Nanez

A new version of the simulator is available!

The main new features of this new version are:

1) New zero events code in the lite HyEQ simulator
2) Instructions file updated
3) New help html files
4) Smaller installation file
5) Cyber Physical Systems CPS blocks in the simulink library (interconnected systems)
6) CPS examples
7) Problems in installation for 2014b are now solved
8) Now is possible to select which ode solver the lite HyEQsolver is going to use
9) New plot functions for pre and post 2014b plot behaviour

The main changes from 2.0 to 2.01 are:
1) Added two new plotting functions plotHarcColor and plotHarcColor3D
2) All functions have now the standard head (H1) help line (which is required to search functions such as "lookfor", e.g., >> lookfor HyEQ, or >> lookfor hybrid)
3) Functions plotC and plotD were removed (none of examples uses those functions)
4) New help environment for all functions were created (with examples inclued), e.g.,
>> help HyEQ_Toolbox_V201
>> help HyEQsolver
>> help plotflows
>> help plotHarc
>> help plotHarcColor
>> help plotHarcColor3D
>> help plotHybridArc
>> help plotjumps
>> helpwin HyEQ_Toolbox_V2_01
5) Some of the postprocessig files in the examples (simulink) were edited to include the new plotting functions.

Tadashi

what's new from version 2.00 to 2.01?

This blog contains guidelines, hints, and examples for the use (and misuse) of the Hybrid Equations (HyEQ) Toolbox

http://hybridsimulator.wordpress.com/

Pedro Casau

X.Yang

Very useful. Nice!

Booshnam

Sean

Updates

2.4.0.0

A new version of the simulator is available!
The main new features are:
1) Compatibility issues with matlab 2014-2016 are now solved
2) Instructions file updated
3) New examples and html files
4) Now is possible to solve DAE equations as a flow maps

2.4.0.0

A new version of the simulator is available!
The main new features are:
1) Compatibility issues with matlab 2014-2016 are now solved
2) Instructions file updated
3) New examples and html files
4) Now is possible to solve DAE equations as flow maps

2.3.0.0

Change log:
-new zero events in lite version
-new help files
-smaller insttallation file
-new CPS blocks
-new plotting functions, now compatible with pre and post 2014a plot behaviour
-update of the simulink library
-CPS examples

1.4.0.0

Instruction file for installation were updated.
Install problems in iMac's OS X 10.9.5 are solved.

1.3.0.0

1)Added two new plotting functions plotHarcColor and plotHarcColor3D
2)All functions have now the standard head (H1) help line
3)Functions plotC and plotD were removed
4)New help environment for all functions were created (with examples inclued)

1.2.0.0

Help files and instructions updated.

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: LibHybrid for System Identification Toolbox

InstallHyEQ_Toolbox_V2_04/