next up previous
Next: The Hybrid Aspects Up: Software Structure Previous: The HyBrSim Components

Class Attributes

Each component has a number of ports to connect with other components and a constituent equation that may involve a state, x, and parameter, p (see Fig. 4).

The input values to a component are stored in its port(s). The output value on each of its ports is stored in the input slot of the connected component port. For example, the output of the Rcomponent in Fig. 4 is stored by the corresponding port of the 0 component. The power direction of a port determines the sign of its input and output values. Each connection between two components connects a pair of ports and these store the effort and flow values associated with the bond defined by the connection. The connection has a type attribute, that determines whether it is a power bond, active bond, or signal connection.


  
Figure 4: Properties for simulation.
\begin{figure}\center\mbox{\psfig{figure=props.eps,width=2.25in} }
\end{figure}

The hierarchical structuring allows for a systematic implementation of the components. Apart from graphical characteristics, such as the component bounding box and their paint method, the abstract superclass BGComponent has a state variable, x, an initial value x0, a parameter p, and specifies a maximum number of ports for a component. The state variable is superfluous for the BGJunction and R classes, but required for handling modulation of BGActive and BGTransformer elements, i.e., modulation introduces a delay of one integration step.

Each of the bond graph component classes may redefine the number of associated ports. Currently BGStore components are only 1-port, but they could be extended to include two ports [Karnopp, Margolis, & Rosenberg1990]. Furthermore, BGComponent contains a number of abstract methods for simulation:

Because of the similarity of a number of methods (propagateCausality, order, exeEqOrder) for sets of components, the abstract methods may be implemented at higher levels in the hierarchy.


next up previous
Next: The Hybrid Aspects Up: Software Structure Previous: The HyBrSim Components
Pieter J. Mosterman ER
1998-11-13