File Exchange

image thumbnail

Bond graph add-on block library BG V.2.1

version (2.77 MB) by Gert-Helge Geitner
Customizable add-on library with a small number of blocks for graphical programming of Bond Graph models using standard Simulink and editor.


Updated 08 Jan 2020

View License

Why Bondgraphs?
The energy domain independently Bond Graph is an excellent power flow diagram for process models [see DOI:10.1109/epe.2005.219609]. Detailed introductions to the Bond Graph method may be found here for instance:

Realization using Simulink:
Replace each half arrow connection by one visible connection drawn by the standard editor, presenting optionally a flow or an effort connection. The implementation of the conjugated back connection for the complementary power variable effort or flow will be done automatically via software background. In addition the blocks are defined switchable, e.g. regarding causality or block function in order to reduce the number of library blocks. Library version 2.1 consists of 9 blocks only which realize the whole necessary functionality. These blocks may be used by means of drag & drop technique and have to be configured menu-driven as usual for Simulink. See homepage
of this Bond Graph library for more info including 10 pdf files for documentation, 4 lists of examples or on-line list with icon, function/mask and parameter.

Typical examples for combined functionalities are the energy storage block (choice of I or C type) or the node block (choice of 0 or 1 type). Environment connections to standard Simulink blocks ensure S/D and AB blocks, i.e. controllers may only drive a Bond Graph by means of source blocks and a measurement of Bond Graph power variables may only be done by use of AB blocks. All blocks are able to operate with scalar or vectorial bond connections optionally. The user may set constant parameters directly via block mask or work with variable parameters by defining an additional parameter input if allowable for the considered element like as for TF or GY. Alternatively the definition of a second file filename_P.m causes the allocation of determined or calculated numerical values to symbolic defined parameters for the Bond Graph blocks. The block masks offer different additional adjustments as for instance number of inputs and outputs as well as operation mode for node blocks or initial values as well as additional momentum, displacement or power output for energy storage blocks. Each block provides a protection of its functionality, i.e. in this case a first mask access step only allows the change of the parameter value. Operation mode modifications must be unlocked in a second step afterwards.

Nodes and measurements:
Since one power variable of the power variable pairs at any node block has been defined to be constant there are two different icons per node type necessary. The appearance forms of the icon and the underlying equations are documented. Any effort or flow variables of a Bond Graph may be measured by means of an so-called AB block which realizes the activated bond functionality whereas momentum, displacement or power are immediately disposal at each storage element.

Simulink add-on library BG V.2.1 offers a tool for the graphical programming of power flow diagrams in terms of Bond Graphs. Nine blocks ensure all essential modes via menu input. That way e.g. causality changes, nonlinearities, initial values, vectorial operation, power outputs or protection of settings are ensured. Examples describe different usage as for process modelling, control loops (example ElaWe_GM_ZuReg) or energy efficiency based on integration (example GM_EE). The tool, all examples and a short documentation are included. See at homepage given above for more info.

Extract from the lists with examples:
- belt conveyor, clutch for HEV, subway traction drive, gimbal
- lift magnet, dynamic vibration absorber, lift a load, double pendulum
- double-fed asynchronous machine, synchronous machine (power conserving Park transformation)
- chaos generator (Chuas circuit), Twin-T band-stop filter, boost converter, buck converter

Hints for modelling (cp. also ORCID or ResearchGate):
For use of this add-on library with recent MATLAB/Simulink versions use Simulink container technique. Updated version will be available later.
Hints for modelling chain structure systems:
DOI: 10.1080/03081079.2019.1668383 (Generalized Bond Graph modelling) or:
Hints for modelling electrical machines:
DOI: 10.1109/IECON.2019.8927632 (Synchronous Reluctance Machine)
DOI: 10.1109/IECON.2016.7794063 (Generalised power flow model)
DOI: 10.1109/IECON.2016.7793471 (HB- and PM-type Vernier machines)
INSPEC Accession Number 10939726 (Standard electric machines)
Hints for modelling compound epicyclic gears (planetary gears):
DOI: 10.1109/cecnet.2011.5769012 (three-speed gears)
DOI: 10.1016/j.mechmachtheory.2017.05.007 (four-speed gears)
Hints for teaching power flow modelling:

Cite As

Gert-Helge Geitner (2020). Bond graph add-on block library BG V.2.1 (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (10)

How can I check a circuit with a 10V source, 0.01H inductor, and 5-ohm resistor in series? I need to show that the results given by the scope block are correct.

Moh Mahd


i have use this tool it is easy but i have a problem dealing with it,
i applay (three phase inverter) example with this libraray after i finish i used the model advisor to get any warning or errors to be fixed before runing then during runing the file won't compile and matlab will hang ,please help

You don't need to install this software. All you need to do is add the folder to your working directory. To set the working directory you just have to hit the "brows for folder" button near the working directory. Then select the folder BidV21 in the BG21 folder. I love the software. I just can't read it because it is not in English.

peter mani

Eduardo F. del Peloso

BG V.2.0 is an excellent, almost perfect tool for dynamic systems modelling via Bond Graphs. Without it, it is still possible to simulate Bond Graphs using Simulink, but it is way much more difficult!

Shang-Ren Tseng

How do I set the path of BG V.2.0 for Matlab7.1?

moataz haron

I could not install BG V.2.0 although I have matlab7
how I must make.

Qarab Raza

Good simulation tool

awad orban


update of description including links, extract from list of modeling examples and add of hints for modeling

Bug fix regarding TF in vector / matrix mode – last(s) elements zero.

Reactivated links within block help; two new examples: sinusoidal source voltage, R resp. L, diode, RC load; "description" contains a link to the homepage now

Bug fix regarding Fields (mixed causality); bug fix regarding Nodes (loopthroughing); enhancements regarding GY / TF (unified parameter input / transpose operation); new examples gimbal + traction drive (POG parallel) – two versions each + reference

Node block enhancement: Special case "alternative power variable input" offers a checkbox "Bidirectional negative sign for first CPP". So far a trick was used - now checkbox is available. Please compare example "BandStopFilter" (Node_0D) in circuits

Enhancements: SD (vector input), ICS (power variable: initial values), contents.m: ver.m fitted, documentation; 3 new examples: cascaded electric circuit, switched cascaded electric circuit, spring cable cylinder; asynchronous machine: 3 compact BGs

New example: band-stop filter; enhanced documentation: special case of a node connection.

New examples: buck and boost converter models; including Power Oriented Graph (POG) in parallel as well as dimension m=1 and m=3 [see chopper models: 3 and 4 resp. boost converter models: 4 and 5];Clutch model for hybrid electric vehicles;Contents.m

New example (29th example): two variants of Chua's Circuit (chaos generator with F-source resp. E-source);
Enhancement of TF-element for use as switch;

Enabling of differential causality;
Two examples including differential causality (pendulum, double pendulum);

Examples: 16 / inclusive of variants a total of 52;
Scalar and vectorial models of three-phase machines with and without power conserving transformation as well as two-reaction theory;
Some minor enhancements;
Minor upgrading of the documentation;

Three more examples: three-phase induction machine (ASM) with Clarke (ab) and Park (dq) coordinates, doubly-fed induction machine (DASM) with Park (dq) coordinates; each with scalar and vectorial Bond Graph.

Extended documentation

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