.BondLib.UsersGuide.Overview.Introduction

Information

Bond graphs offer a generic domain-independent means to graphically modeling physical systems in an object-oriented fashion.

All physical systems are characterized by the fact that they observe a number of conservation principles. Prime among those is the conservation of energy. When modeling a physical system, it is important for the modeler to be aware of these conservation principles, and ensure that the models constructed adhere to them.

Yet, if the modeling formalism doesn't guarantee that the conservation principles are being observed, i.e., if it is up to the modeler to verify that his or her models adhere to them, these principles can get easily violated, because modelers (just like all other people) are constantly under time pressure, and usually won't take the time to validate their models, once they have been constructed and compile/simulate without generating error messages.

It may therefore be a good idea to embrace a modeling formalism that checks the conservation principles implicitly for the modeler. For example, if a modeler wishes to model an electrical capacitor, he or she knows that:

i = C*der(u)

Yet, this model may fail, when the capacitance C happens to be a function of time. It is better to ask oneself, what happens physically in the capacitor.

We know that the capacitor stores electrical charge, Q. The electrical charge is the integral of the current. Thus, when current flows into the capacitor, electrical charge builds up. The charge is a physical quantity having mass. It thus needs to be conserved. Thus, the charge, Q, rather than the voltage, u, is a much better choice for a state variable, since voltage doesn't need to be conserved.

The voltage across the capacitor is proportional to the charge stored in the capacitor:

u = C*Q

What happens to the energy? The power, P, flowing into the capacitor is the product of current and voltage:

P = u*i

The energy, E, stored in the capacitor is the integral of the power. It also needs to be conserved. Yet, we only need one state variable, thus energy doesn't get conserved automatically. We must ensure explicitly that this happens.

Bond graphs ensure that no energy is ever lost or (worse!) generated out of thin air in interconnections between models. They do this by explicitly modeling the power flow through a physical system.

Power, in all physical systems, can always be expressed as a product of two adjugate variables, or possibly in the most complex cases, as the sum of products of adjugate variables.

Bond graphs work with these adjugate variables as the basic modeling variables: the effort, e, and the flow, f. Power is always the product of effort and flow:

P = e*f

What these adjugate variables represent, depends on the physical nature of the model. For example in electrical systems, the effort would be the voltage, whereas the flow would be the current. In mechanical translational systems, the effort would be the force, whereas the flow would be the velocity.

A power flow is represented by a harpoon, with which the two adjugate variables are being associated. The hook of the harpoon points always to the "left" (relative to the direction, in which the harpoon points), and the effort variable is written on the side of the harpoon, whereas the flow variable is written on the opposite side:

The direction of the harpoon is the direction of positive power flow.

Evidently, since efforts and flows can represent different physical properties, no strong type checking is possible in bond graph modeling. All variables need to be declared as Real rather than Modelica.SIunits.Voltage, for example. This is a price that the modeler must be willing to pay, if he or she wishes to use bond graphs.

Sometimes, as in the case of the capacitor, it is useful to also consider the integrals of the two adjugate variables, as these are in fact natural state variables. Since bond graphs were invented by a mechanical engineer, the integral of the effort is called the generalized momentum, p, whereas the integral of the flow is called the generalized position, q, since the integral of force is a momentum, whereas the integral of velocity is a position.

The below table lists the four basic bond graph variables, e, f, p, and q, for a number of different energy domains:

The bond graph model of a non-linear capacitor would thus take the form:

where ModPassiveOnePort is one of the standard bond graph interfaces offered in the Interfaces sub-library of the bond graph library. It represents a modulated one-port, where the modulation signal (a real-valued input) is given the name s. The variables e and f don't need to be declared either, as they are already declared inside the (partial) interface model.


Generated at 2024-12-03T19:25:34Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos