encourage industries to use bond graphs as their prime modeling method. ... In 'SYMBOLS 2000', block diagram elements are in fact constructed using capsules ...
System Modeling through Bond graph Objects on SYMBOLS 2000. Amalendu Mukherjee A.K. Samantaray Dept of Mechanical Engg. Project Manager, Indian Institute of Technology, HighTech Consultants. Kharagpur, India. STEP, IIT Kharagpur, India. Internet URL http://www.symbols2000.com
Keywords: bond graph, sub-model, capsule, generic capsule
Abstract One of the major impediments in encouraging engineers in industry to use bond graphs for modeling, simulation and design is the requirement of bit by bit creation of a model. Often a modeler may lack knowledge of all energy domains and devices of which system is constituted. This apart the bit by bit synthesis may turnout to be time consuming requiring very good proficiency in bond graph modeling. The new generation of software 'SYMBOLS' called 'SYMBOLS 2000', has incorporated a facility called Encapsulation. This facility allows modeler to create and incorporate sub-system models (called capsules) in the models of plants or bigger systems. The capsule may incorporate nonlinear constitutive relation for the elements, look up tables, nonlinear geometrical relations' etc. When these capsules are incorporated in the main plant all these aspects get incorporated with suitable notational readjustments. The most important contribution of encapsulation is means to derive further capsules from existing ones using multiple inheritance, customization and complete abstraction.
1. INTRODUCTION Bond graphs[1] being a powerful modeling language have not yet received wide scale acceptance from the industry. This primarily is an impediment to the growth of bond graphs into application domain. Engineers and scientists at industry normally require reliable solutions at lowest cost and time. Any modeling and simulation software should thus be modular to the extent such that project management methods [2] such as reliability assurance, reusability, product integration etc. could be applied at any stage of the project. A typical project could be a high end defense application involving several mechanical, structural, hydraulic, electronic and control components, where each component must be individually modeled by specialists and groups from respective fields, tested, documented and represented in shop floor terms. Then the
assembly of these sub-component models into the global system model is easier and the added benefits are many including easy maintenance, ready reusability and features enhancement. The same set of principles should also be applicable to the solution level, either through simulation, control analysis or other means. The sub-model parameters should be represented modularly in the postprocessing tools/software to create an integrated modeling environment [3]. Many modeling tools and software [4] are now available for bond graph based graphical modeling using submodels stages of evolving complexity. Among these, MODELICA [5] can be considered close to achieving the above criteria through object oriented methods. However, since MODELICA language is meant for network systems, the representation of bond graphs in this language compromises the flavor and compactness of bond graph modeling. The basic ideas of exchange of energy portrayal and causation are lost in the midst of mathematical abstractions. Most of these tools advocate use of Noncausal modeling by relaxing the causality constraints, i.e., by not committing ports to an 'input' or 'output' role early. Though this generalization enables simpler models and efficient simulation of network systems, physical problems with non-linear constitutive parametric relations, which cannot be inverted or require causality specific function calls, are not easily handled. OMOLA [6] and DYMOLA [7] are two hybrid modeling software where models are described as hierarchical structures in class hierarchies. However, all these are declarative languages allowing model reuse. Though graphical iconic modeling interfaces are provided, they are far more removed from the realm of pure bond graphy. In this paper, some of the facilities included in SYMBOLS 2000 software package towards realization of these goals within bond graph modeling paradigm are presented. To support speedy model creation at industry level, the inbuilt sub-models with any bond graph modeling software should not be restricted to some basic components like capacitors and resistors. Sophisticated sub-models like hydraulic and electrical motors, pumps, structural
members, etc., to name a few, should be packaged along with any modeling software product which would encourage industries to use bond graphs as their prime modeling method. Some such models created using advanced sub-models (Capsules) available with SYMBOLS 2000 are presented at the end of this paper. Another important desired aspect of any modeling software is the facility of solution distribution. Any bond graph model should be elevated to the level of a selfrunning application in workshop specific terms such that industries and consultants using the modeling software are able to distribute the simulation, control or other solution to their clients without requiring their clients to purchase the original software. Unless these aspects of bond graph software are looked into, bond graphs are not going to come out of the closet of research laboratories and universities. With use of sub-model abstraction leading to modular workshop specific nomenclature and the free solution distribution mechanisms of SYMBOLS 2000 software package, these problems are easily addressed.
2. WHAT IS A CAPSULE ? A capsule is an object derived from a bond graph or other capsules. Each capsule contains information of its internal model, equations, external ports and mathematical relations. A properly designed capsule is self-explanatory, complete within itself, and abstract to the level of final modelers’ implementation.
Figure 1. Schematic Diagram of a sub-system and its model in the BondPad
Often particular sub-models require different graphs, equations or expressions to be used according to its implementation. For instance, the type of connections in different ports of a transistor would impose different causal patterns resulting in different system equations, which in turn require different parametric equations and variables. 'SYMBOLS 2000' uses Generic capsules, which are master sets of several capsules for each causal pattern. The software internally retrieves the appropriate capsule transparent to the modeler. In 'SYMBOLS 2000', block diagram elements are in fact constructed using capsules. Hence when user draws a block-diagram using these elements, the software brings the powerful validation tool through notion of causation used in bond graphs. Capsules are grouped according to their field of application.
3. SUB-MODEL ABSTRACTION A model in SYMBOLS 2000 may be created using combination of bond-graphic elements, block diagram elements in capsulated form or other capsules. Even models can be created purely using capsules. Sub-model capsules can be imported from the huge capsule library or can even be created by the modeler. The pre-cast capsules are not Pandora's boxes. They can be opened using the BondPad editor and customized according to modeler's need.
Modelers may personalize and organize capsules created by them to separate their capsule group from other users. Step 4The fist step towards building a capsule is identification of the component and its interaction with the external system called the host model. A capsule may be considered as an open system, when there are external inputs or outputs or both. A closed capsule does not require external I/O. Most capsules are open by nature. They require input and output ports to specify the kind of expected interactions with the host. Four glue port elements are added to existing bond graph notation to facilitate universal linking. These are namely EI (effort input), FI (flow input), EO (effort output) and FO (flow output) ports. These ports are in fact abstraction of a bond broken into two segments at the subsystem boundary and synthesized into two complimentary sources one acting on the sub-system and other on the universe. While input ports imply bond power direction towards the sub-system, the output ports are power directed away from the sub-system.
Compression of the spring (from power direction), respectively. Create a suitable iconic representation and place in the proper group. Sub-model icon can be created using the icon editor. Then the sub-model must be identified with one of the pre-defined capsule groups; in this case this can be set to the Mechanical capsules group.
Once the above mentioned steps are truly adhered to, the capsule can be used as a black box in any other model. However, the knowledgeable modeler may look into the capsule or make changes as and when necessary.
Consider an abstract sub-model for a spring-mass-damper system with possible interactions from both ends. The subsystem and its bond graph model drawn using BondPad is shown in Figure 1.
Step 1-
Step 2-
Step 3-
Identification the external glue ports with descriptive information. The glue port on the top can be termed as the Velocity of the mass point. The bottom port can be described as the Flow excitation from the base. These annotations can be given by using available port naming tool. Suitable annotation and nomenclature of input parameters. All input parameters must be described in details with added comments. Here for instance, the terms used to describe parameters are Mass, Stiff and Damp. The comments however are complete descriptions, which may contain a long statement. This guarantees that the users input parameter values using descriptive workshop nomenclature and are shielded from model intricacies. States must be explained in system specific terms. The sub-system has two associated states, namely P8 and Q4, where P stands for generalized momentum and Q for generalized displacement. Thus states may be given a nomenclature as Momentum of mass and
Figure 2. Model of Grinding Machine using Capsules The model of a system shown in the left is created using the capsule created above and other pre-cast capsules. The model in Figure 2 uses three instances of the spring-massdamper capsule. Each instance requires a capsule name prefix, which may be given as wheel, job and base.
3.1 Deriving New Capsules and Multiple Inheritance Newer capsules may be created from scratch or derived from existing ones. A capsule that uses multiple inheritance is created using several other capsules and/or multiple use of one or more capsules. For instance, the sub-model of a spring-mass-damper component where the damper is non-linear can be derived from the earlier model with suitable modifications of parameter expressions as shown below.
Figure 3. Derived Capsule
While the earlier capsule required three input parameters, the new one requires four parameters. The number of I/O ports and nomenclature of states are retained by default. The prefix 'Sys' before capsule parameters is taken from the instance name of the internal capsule. The expression for variable Damp within capsule instance Sys is overwritten to include non-linearity described in terms states within the included capsule. A capsule using multiple inheritance is shown in Figure 4. This capsule uses two instances of pre-made spring-massdamper capsule in two orientations and a lever capsule, the instances named as Left, Right and Lever, respectively. The expressions for those parameters not belonging to internal capsules is set in the expression window along with their comments. The equations derived for this capsule are shown below. They include unlinked variable expressions for all internal capsules with appropriate prefix. The underscore( _ ) leaves scope for further extensions.
Figure 4. Example of multiple inheritance in capsules
Figure 5. Expressions of derived capsule
Figure 6. Equations of the derived capsule
3.2 Linking Sub-Model Capsules Capsules implemented in a full model are linked through glue port extensions. If we look into the spring-massdamper capsule, one of the glue ports is bond number 6, that is a flow output port. When that capsule is used in the above described multiple inheritance model, that output flow port is connected to bond numbers 2 and 4 in two capsule instances namely Left and Right. The following equations are added to the model and capsule name prefixed equations as links between the two. _f2 = _Left_f6 _Left_e6 = _e2 _f4 = _Right_f6 _Right_e6 = _e4
Similarly, equations are added for the other glue ports of each capsule. Upon final reduction, substitution and differentiation (when differential causalities of storage elements appear within capsules), the total model equations become a fully reduced set of coupled differential equations.
4. GENERIC CAPSULES AND CAUSAL AUTOMATION A Generic capsule is a group of related capsules in different causal postures. When modeler implements a generic capsule in the model, according to varying needs of boundary conditions depicted as causality, the proper hidden internal capsule is loaded transparent to the user. As an example, consider a hydraulic resistor element. The R-element may be either in resistive or conductive
causality. Thus, appropriate pseudo sources may replace it. If the sub-model should be circuit like, there must be two input ports and two different possible causal patterns on these ports. The sub-models created for each of these along with the expressions for the sources used in these two capsules are shown below.
be merged to form a generic capsule provided each element capsule has equal number of external glue ports. An example of this is a beam element designed to take any boundary conditions. Model of such an element using Raleigh beam theory for normal use is shown in Figure 8.
Figure 8. One of the Raleigh Beam Element sub-model. Resistive Model
Conductive model Figure 9. A Raleigh Beam model with five elements Figure 7. Two alternately causalled sub-model capsules Resistive model SE3 = - 0.5*Rho/sqr(Cd*Ao)*fabs(_f3)*_f3 Conductive model SF3 = Cd*Ao*sqrt(2*fabs(_e3)/Rho)*sign(_e3) The variables Rho, Cd and Ao stand for fluid density, coefficient of discharge and cross-sectional area, respectively. The functions sqr, fabs, sqrt and sign are C++ math functions for square, absolute value, square root and sign (+1 or -1), respectively. The above two capsules can be described as elements of a generic capsule say termed hydraulic resistor since they satisfy the requirement of equal number of external ports. This generic capsule when used in a model automatically decides which internal element of the set matches the system requirement and links with the equations and expressions of that capsule element. The generic capsule created above does not have any associated states. Even separate capsules with different number of states, different equations and parameters can
To take all possible boundary condition combinations such as fixed, free, simply supported and others, 8 such capsules are needed and then they are merged to form a generic set. Model of a beam using 5 finite segments of this generic capsule and a fixed-simply supported end condition is shown in Figure 9. The method of generalization of sub-models to fit any desired implementation using acausal-modeling languages [5, 6, and 7] is good for linear sub-systems where variables can be algebraically manipulated at implementation and runtime stages. However, sub-systems with non-linear components, different graph structure and number of states, etc. having same number of external ports and representing the same system in different operating conditions (e.g. those with switches) are not easily manipulated with acausal modeling. The current scheme of generalization with causal modeling at the subsystem level and acausal modeling at the implementation and integration level though requires more number of hidden library capsules, is more practical. In any case, once the base template for one causal pattern of the subsystem is created, others are simply modifications.
5. CONCLUSION With evolution of capsules, which can handle model specific non-linearity and intricacies transparent to the user, expert created system sub-models can be ported across users. Since capsules are meant to be selfexplanatory, normally no accompanying document is needed on model details. Further, users can upgrade existing sub-models to incorporate specific changes. Creation of big models is simplified and project management skills [2] can be applied to break up the independent components and pre-test them before final assembly. Users not conversant with some of the energy domains may still produce accurate models using pre-cast capsules library. Some such models are presented below to demonstrate this feature. The block diagram model of a Vander pols' oscillator is shown in Figure 10. Model of a vertical cylinder with closed bottom end and a piston load considering heat transfer is shown in Figure 11. Gas type and nonlinear thermal properties and charts are taken from the in-built database.
Figure 10. A Block-Diagram model using capsules
Figure 13. Model of a Colpitts’ Oscillator using Capsules
REFERECES
Figure 11. Model of a Gas Filled Piston-Cylinder System Model of a three-phase induction motor driving an inductive and resistive load through start-delta switching network is shown in Figure12.
Figure 12. Model of a 3-Phase Induction Motor with Load A Circuit morphic model of a Colpitts' oscillator using electrical and electronics capsules is shown in Figure 13.
[1] Mukherjee, A. and R. Karmakar. 1999. Modeling and Simulation of Engineering Systems through Bondgraphs. Narosa publishing house, New Delhi. [2] Samantaray, A. K. 2000. Technical Document on SYMBOLS 2000. Internet URL: http://www.symbols2000.com/downloads/ Technical_writeup.doc [3] Samantaray, A. K. and A. Mukherjee. 2000. Users Manual of SYMBOLS 2000. HighTech Consultants, STEP, IIT, Kharagpur. [4] Cellier, F. E. Bond Graph Modeling Software Bookmarks. Internet URL : http://www.ece.arizona.edu/~cellier/bg_soft.html [5] Broenik, J. F. 1999. “Object-oriented Modeling with Bond graphs and Modelica.” In Proceedings of the ICBGM’99 (San Francisco,CA, Jan. 17-20).SCS Publication, Vol. 31, No. 1, 163-168. [6] Omola and Omsim Presentation. Internet URL : http://www.control.lth.se/~cace/omsim.html [7] Dynasim AB. Dynamic modeling laboratory (Dymola). Internet URL http://www.dynasim.se/