Component-oriented modeling of hybrid dynamic systems ... - CiteSeerX

6 downloads 0 Views 2MB Size Report
programmable visual modeling application developed at the Institute for Software ... use the component library to build the model of a coupled multi-tank system ...
Component-oriented modeling of hybrid dynamic systems using the Generic Modeling Environment Eric-J. Manders, Gautam Biswas, Nagabhushan Mahadevan and Gabor Karsai Department of Electrical Engineering and Computer Science, and The Institute for Software Integrated Systems, Vanderbilt University, Nashville, TN. E–mail: {eric.j.manders,gautam.biswas,gabor.karsai}@vanderbilt.edu

Abstract This paper presents a component oriented modeling environment for building hybrid dynamic models of physical system. The modeling environment is created using the Generic Modeling Environment (GME), a metaprogrammable visual modeling application developed at the Institute for Software Integrated Systems (ISIS). The core of the modeling language itself is a hybrid extension of the bond graph modeling language. The advantages of an object-oriented approach to physical system modeling combined with the advanced features of GME for managing model complexity are illustrated by building a library of hydraulic system components. A simulation model can be automatically generated from the physical system model using a model translator. As an example application we use the component library to build the model of a coupled multi-tank system with controlled and autonomous hybrid behaviors, and illustrate this with a simulation example.

1. Introduction The design of complex engineering systems, such as airand spacecraft, automobiles, and power plants relies increasingly on the use of system models that describe the physical system and its controller. The physical system model is inherently an abstract representation of the physical system dynamics, where the level of abstraction is guided by how the model is to be used. To manage the complexity of creating models of large systems, representation schemes are needed to help the modeler focus on the behavior at the right level of abstraction. A good modeling tool must use a compositional approach that allows the modeler to mimic the task of physically constructing a system from its parts. We begin by using simple models of the parts, and refine them as needed.

Software tools that provide a designer with a visual environment for model construction have become indispensable in many application areas. Such an application may also provide model analysis and simulation capabilities. We can identify several challenges in building state of the art modeling tools: (i) support for evolving the model over the lifetime of a system design, (ii) synthesis of software artifacts from the model, and (iii) applying systematic modeling principles to the entire design cycle, using multiple modeling formalisms and including implementation as well as realization [23]. Model Integrated Computing (MIC) is emerging as a powerful design technique to create domain specific modeling tools and software systems [14]. A MIC design tool involves three key elements: (i) a Domain Specific Modeling Language (DSML) defined using a meta-programming environment, (ii) a meta-programmable modeling environment that instantiates the DSML to create a Domain Specific Modeling Environment (DSME), a modeling environment that is tailored to the application domain, and (iii) model translators, that synthesize software systems, analysis tools, and other design artifacts whose functionality is captured by the model. The Institute for Software Integrated Systems (ISIS) has been at the forefront of the emergence of MIC. The Generic Modeling Environment (GME) [14], is an open-source meta-programmable graphical modeling application developed at ISIS, and will be used to develop a modeling environment in this paper. We describe a domain specific modeling environment for building physical system models using the GME. The physical system modeling tool is an integral part of a DSME for model-based fault adaptive control. This environment, bundled with a run-time application architecture for on-line fault detection and isolation (FDI), and fault adaptive control comprises the Fault Adaptive Computing Technology (FACT) tool set [12, 18, 25]. Parts of the GME FACT meta-model were described in [13]. In addition to support

for creating physical system models, the FACT DSML also supports (i) building dynamically reconfigurable controller models, and (ii) building system models that compose the plant and controller models. The tool set has been applied to an aircraft fuel system [12], and bio-regenerative advanced life support systems for manned space exploration [2]. The underlying physical system representation in the modeling language is based on hybrid bond graphs [22], a hybrid extension to the bond graph language for compositional modeling of energetic systems [11]. This paper focuses on using the capabilities of GME to create a library of reusable physical system component models from hybrid bond graph model fragments that can be used to compose increasingly complex physical system models. The remainder of this paper is organized as follows. Section 2 describes the physical system modeling approach and its implementation as a modeling language in GME. In section 3, we use a library of hydraulic system components to construct a model for a coupled tank system and show a simulation example. Section 4 compares our work with some of the many research efforts in this area, and section 5 summarizes the paper and outlines further work.

system variables. Each bond graph parameter has a modulated variant, indicated by prefixing the bond graph symbol with an M symbol, e.g., M R. Parameters for the modulation functions can be system variables and external signals. Hybrid bond graphs The Hybrid Bond Graph (HBG) modeling language extends bond graphs to allows discrete switching between internal modes of components that can describe both continuous and discrete behaviors of a system [22]. For this purpose, the syntax of the bond graph language is extended with a controlled junction. The controlled junction behaves as an ideal switch. The control specification for the junction is a 2-state Finite State Machine (FSM) (on and off) that implements the junction switching function. When the junction is in the off state, no energy transfer occurs across its incident bonds. Mode transitions defined by external control signals (input to the FSM) represent controlled switching, and those expressed by internal variables crossing boundary values (function value input to the FSM) define autonomous switching. The overall system mode is determined by a parallel composition of modes of the individual switched junctions. An experimental model editor/simulator that implements the HBG language is described in [21].

2. Creating a physical system modeling environment

2.2. Creating a HBG modeling language in GME

2.1. Component oriented modeling of physical systems Port based modeling: bond graphs

A Model Integrated Computing approach

Bond graphs are a graphical modeling paradigm describing physical systems in terms of bonds connecting elements through junctions. Bonds represent energy exchange pathways, and they are represented by two generic variables, effort (e) and flow (f ), whose product defines the rate of flow of energy (power) on that bond. A bond is depicted as a directed edge, where the direction is indicated with a half-arrow. Four sets of idealized constituent elements make up the generic components of a bond graph: (i) energy storage elements (capacitors (C) and inertias (I)), (ii) dissipative elements (resistors (R)), (iii) transformation elements (transformers (T F ) and gyrators (GY )), and (iv) input-output elements (sources or sinks of effort (Se) and flow (Sf )). The dynamics of physical system behavior is captured by the transfer of energy between the components via the connected bonds and two idealized connections, called the 0- or common effort (parallel) junctions, and the 1- or common flow (series) junctions. Nonlinear systems are modeled by components that have time-varying parameters, i.e., the parameter values are defined by modulation functions, whose arguments are again

GME allows a modeling language designer to create a custom modeling environment that presents the user with a visual programming framework for hierarchical, componentoriented composition of domain models [13]. Component oriented modeling extends object oriented design principles, such as inheritance and containment, to support the construction of complex models from elementary building blocks through hierarchy and object specialization. Model reuse is enhanced by creating a library of component models. A component model may be represented in multiple aspects that represent different points of view of a model. Aspects GME model aspects reflect different viewpoints of the model contents, where model elements can be shown or hidden in different aspects. This allows the modeler to focus on a specific part of the modeling task. Two aspects are defined for building physical system models. The hybrid dynamics of the model are defined in the BondGraph aspect, and the interface of the model to sensors/actuators is created in the Interface aspect. 2

Figure 1: GME screen capture showing basic component models based on the same component interface, the expanded tree view model browser is shown at right. Hierarchy

HBG primitives

To create a hierarchical component model, we require port objects to connect the components. We define an EnergyPort that enables connections across component boundaries. A SignalPort provides the same function for effort and flow signal values, and inputs to modulation functions and decision functions.

The implementation of the HBG modeling language as a GME meta-model includes the elements defined above directly as primitives, the atoms of the modeling language. Specific additions are made to represent modulated components and support controlled junctions. A modulated component is created not through specializing the component itself, but through the use of a separate object, a generic function (also an atom). The modulating function of the component is defined in the expression attribute of the function object. The function output is an input to the bond graph component, and the inputs to the function are real valued signals generated elsewhere in the model.

2.3. Building a component library To illustrate the creation and use of the HBG modeling language in GME, we develop a small component library and then use the components to build a physical system model. We choose the hydraulic domain for this purpose, although many basic component models have analogs in other physical domains. An analysis on how to structure a library of physical system models is given in [27]. The authors stress the need to separate the dynamics from the model interface to maximize reusability and modularity.

A controlled junction has its switching conditions specified as a logical expression of boolean input signals to the junction object. A boolean signal is either directly input to the model, or computed internally using a decision function that takes real valued signals as input.

Basic components

At present, access to the effort and flow variables of a bond is possible only at a junction. Effort variables are available at 0-junctions, and flow variables are available at 1-junctions. This may require the introduction of additional junctions just to expose a particular variable so it can be used as a signal value elsewhere in the model.

Figure 1 shows a screen capture image of the GME with component models, and an expanded model tree-browser view that shows the inheritance relations between these models. The TwoPort model contains only two EnergyPort atoms that capture the energy flow through the com3

Switched components

ponent. Effectively it represents the interface of a class of models with a simple energy in-out relation. In the hydraulic domain, the direction of these ports define the positive direction of fluid flow. The Pipe R linear model is a subtype of the TwoPort model. It defines an idealized dissipating (resistance) element. This model adds one bond graph component and one bond-graph junction. The junction is connected to the component as a bond, and the junctions are connected to the ports through energy connections, in essence, a ’partial’ bond connection. That this model is a sub-type of a base-type can be seen by inspection in the model tree browser. The other window tabs of the browser give additional information on the sub-typing hierarchy.

To introduce the notion of a controlled junction we create a model of a linear pipe with an ideal switch, shown in Figure 3. This model represents a simple a valve with a linear resistance parameter and a because the controlled junction represents an ideal switch, the valve has instantaneous open/close behavior. The attribute field of the junction defines the control specification as a function of the Switch signal. R1 Switch

The Pipe RI linear is a sub-type of the linear pipe model, and an example of an incremental refinement of the linear pipe model to create more complex dynamics. The added inertia bond graph element represents the fluid inertia of the pipe. By changing only the model prototype, we can instantly update each instance of this component in a model. This provides the modeler with powerful capabilities to propagate a change in a component prototype through a complete system model.

In

b1

CJ1

Out

Figure 3: Basic model of a switched linear pipe (simple valve).

Component composition

Starting from basic component modeling, the next step is creating more complex components through composition. Consider a fluid tank that is part of a larger hydraulic system in more detail. Figure 4 illustrates three possible configurations for connecting a fluid tank with surrounding hydraulic components. Fluid flow through each pipe has specific interaction dynamics with the tank. Flow through the pipe at the top of the tank never has feedback from the water level Figure 2 shows a model of a controlled ideal flow source. in the tank, and is used only for filling. Flow through the This model introduces the use of SignalPort objects. We pipe in the side-wall of the tank has feedback from the tank expose a measured flow at the component interface by cononly if the water level in tank is above the pipe. The flow necting flow variable at the 1-junction to an output Signalthrough the pipe at the bottom of the tank is always coupled Port. An input SignalPort is connected to the function obto the tank level. ject. The signal represents the flow rate value that moduFigure 5 shows a basic model of a fluid tank component, lates the pump source element. The expression attribute of derived from the TwoPort model given above. The Energythe function object in this case is a simple identity function Port objects connected to the capacitance element through and the output is connected to the Sf object to create the the junction element, represent flow in and out of the tank modulated source. This model could be the basis for creatthat is coupled to the state of the capacitance, defined by the ing more complex fluid pump models. water level in the tank. In a bond graph model, when the inflow to a capacitance element is a source of flow, there is no feedback regardless of what the water level is (the ideal flow Enter your annotation source is not affected by the pressure in the tank). HowFlowMeasurement ever, when thinking about components we use the distinction to illustrate building a more complex tank model that can be reused independently of any property of the inflow Sf_mf Sf FlowRate Out j_flow into the tank. Flow in and out of the bottom of the tank does not need special consideration, but we create specialized TankPort models to describe each of the other type of Figure 2: A component model of a basic fluid pump showpipe connection. We will use an instance of the basic tank ing signal in- and output ports. model as the building block to create a tank with more sophisticated connection options. An instance of a model apThe Pipe R nonlinear model demonstrates the use of a function atom to create a modulated resistance bond graph element. Because the inputs to the function are the effort values of the bonds, and we can only access these by inserting additional junction, this non-linear model is a modified copy of the linear pipe model, rather than derived from it.

4

b1

In

Sf

j_In

Out

j_out

(a) Tank FillPort model.

XferPipe_Press

Figure 4: A fluid tank with connecting ports where the flow through each port has different dynamics.

Tank_Press VirtualPressureDiff b3

XferDecision

XferSwitch b2

C1

b1

b1

Pressure

In In

In

Out

(a) Ideal tank model.

Sf

j_In

j_out

Out

Press Out

(b) Tank XferPort model. Tank_C_linear

Figure 6: Component models for the fill and transfer connections for a tank.

(b) Instance icon.

Figure 5: A basic storage tank component model and an icon of that model as it appears when instantiated in another component model.

Tank with port objects fillport, transferport storage

XferPipe_Pressure In

XferP In

Out

Tank_ Out

InTop FillPort

pears as an icon, shown in Figure 5b, that hides the component details, but exposes the component signal and energy ports. Figure 6 shows the models for a FillPort and a XferPort (transfer). A FillPort decouples the effort value of the incoming bond from the outgoing bond, thereby breaking the feedback loop. The XferPort model is a sub-type derived from the FillPort. The model has two input SignalPorts, the actual pressure of the tank, and the pressure corresponding to the height of the transfer pipe. The pressure difference is computed using a decision function, which in turn is used to control the XferSwitch junction that either couples or decouples the flow through the XferPort from the pressure in the tank. When decoupled, the behavior is identical to that of the FillPort. The flow through each of these models is directed to denote a positive inflow into the tank. A variation on the XferPort model defines the component also for positive flow out of the tank. Now we can compose a complex tank object using an instance of the storage tank component and instances of the connection port components to get a custom tank model with specific in- and outflow pipe connections. Figure 7 shows a configuration of a tank model with one of each of the port objects. The tank store is an instance of the component model shown in Figure 5. The port corresponding to a pipe at the bottom of the tank does not need a special component. To create the model of the actual transfer pipe between tanks we observe that this pipe has multiple continuous modes based on whether or not the water level on each of

Pressure

XferPort OutTopXfer In

Press Out

Store OutBottomXfer

Figure 7: Example configuration of a fluid tank and two different interface ports.

the connected tanks is above or below the pipe inlet. Figure 8 shows a model that realizes this behavior. To facilitate understanding this model we also show the inequality relations (as text framed with a shadowbox) for the decision functions that are part of the function attributes. All controlled junctions have switching conditions that directly track the boolean value of the decision function at their input. Effectively, the component calculates the flow rate through the pipe based on the pressure difference over the pipe, and the resistance, and then creates that flow rate using a modulated flow source component. The SenullL and SenullR are zero effort sources. These are needed to make sure that the junction where the flow is calculated is not left ’dangling’ if there is no actual source of effort on either side of the pipe. All decision signals that are input to the controlled junctions are generated inside the component. This implementation of an autonomous pipe is slightly more verbose than a flat hybrid bond graph model of two coupled tanks would be, but increases the modularity of the model considerably. To add a valve to this pipe we can directly fol5

df_null_L = j_Enbl_L==0

df_L = j_Enbl_L>0

Figure 8: Autonomous transfer pipe (shadowed text boxes reflect the value of the decision function attribute). low the approach used above to create the basic linear valve. FlowRa

2.4. Creating a component with sensor and actuator I/O

Out

SimpleFlowSource

In

Press Out

In

Tank_C_linear

In

Flow Out

Pipe_R_linear

To allow a component to be connected to a controller we explicitly model the input/output interface of that component. As mentioned in the introduction, the FACT DSML also includes system models, that allow for composition of controller models with the physical system models. While the details of this composition are beyond the scope of this paper, we discuss the interface of the physical system component next. A component model can include PlantInput and PlantOutput ports that are visible only in the plant interface aspect. Internal to the component, these ports are connected to signal ports of the contained component instances. These ports represent ideal actuators and sensors, respectively. Transducer dynamics should be modeled as part of the system dynamics. Figure 9 illustrates the use of these ports in a simple model where we have added sensor dynamics components for illustration as well. The use of references in GME allows us to compose models without needing to pass connections to PlantInput/Output ports through each level of the hierarchy in order to make them available at the top level model. Details of the use of references are discussed in [12].

FlowRa

Out

P_SensorDynamics

Press

In

Out

F_SensorDynamics

In

Out

FlowRate

P_Tank SimpleFlowSource

Tank_C_linear

P_SensorDynamics

Flow

In

Out

F_pump Pipe_R_linear

F_SensorDynamics

Figure 9: Simple component assembly with sensor dynamics models, and interface ports in the bondgraph (top) and interface aspects.

representation suitable for quantitative analysis or simulation, the physical model must be translated into a computational model. To generate an efficient computational representation, assignment of causality is required. Causal information can be assigned to a bondgraph through the Sequential Causality Assignment Procedure (SCAP) [11]. A causal bond graph model can be translated to a block diagram model of a continuous time system in a straightforward manner. For a hybrid bond graph, a junction state transition may result in a change in causality at that junction, and this change can in turn propagate through the model. A GME model translator generates a block diagram R R model in the MATLAB /Simulink [19] environment. This block diagram encodes the dynamically changeable

2.5. Generating the simulation model Bond graphs are a non-causal modeling language. Each component contributes a constituent relation to the overall system of equations that describes the physical system dynamics. This lets the modeler can focus on the energy exchange between components. However, to create a model 6

Source1

transitions and also takes the system through autonomous transitions. Figure 12 illustrates the simulation scenario. In the initial state the tanks are empty, with all valves closed. We start by filling tanks 1 and 3 at a constant rate from both flow sources. Triggered by a threshold crossing, water is transferred from tank 3 to tank 2. Because of the orientation of the energy ports in the pipe model, the flow rate measurement has a negative value. After enabling the autonomous transfer pipe, an autonomous transition results in flow from tank 1 to tank 2. Tank 2 is then drained. Next both transfer pipe valves are opened, tank 3 starts filling until water passes through the autonomous transfer pipe from tank 2 to tank 1. The control sequence completes after a threshold crossing on the level in tank 1.

Source2 Tank 1

Tank 3

Tank 2

T12TopXfer

T1Drain

T2Drain

T23BottomXfer

T3Drain

Figure 10: Diagram of a Three-tank assembly.

PTank1

causal assignment for all bonds. An implementation of SCAP is embedded in the simulation model. During simulation, all junction states are tracked and a change in a junction state triggers a causality assignment update. The update effectively restructures some of the data flow paths in the block diagram model.

5

0

0

5

10

15

20

0

5

10

15

20

0

5

10

15

20

0

5

10

15

20

0

5

10

15

20

0

5

10

15

20

PTank2

5

0

3. Example: coupled tanks

PTank3

10 5 0

FT23BottomXfer

FT12TopXfer

Using the components introduced above we now build a model of a coupled fluid tank system. Figure 10 shows a diagram of the configuration we will model, The system has three connected tanks, where each tank has a slightly different connection arrangement to the rest of the system. We assume that all the flow resistances are linear, and that flows through pipes are positive in the direction indicated in the figure.

2 0 -2

2 0 -2

FDrain2

3 2 1 0

time (s)

InFlow1

1

3.1. Model

0

InFlow2

Figure 11 shows the model. The component model for the tanks is constructed by applying the compositional approach outlined above. We point out that because each tank model has a drain valve, it is also possible to create a more complex tank model that would integrate a drain valve. The transfer pipe between tanks 1 and 2 is an instance of a subtype of the Autonomous Transfer Pipe model introduced above, with an added controlled switch and flow measurement. The controlled switch implies that we include a controlled valve in the autonomous pipe. The pipe height is captured in the model as a real valued constant signal that is input to the tanks that are connected by the pipe. Note that the pipe model itself does not use this constant. The transfer pipe between tanks 2 and 3 is a simple switched linear pipe, also with an added flow measurement. This model is also used for each of the drain pipes.

0

5

10

15

20

0

5

10

15

20

5

10

15

20

1

0

valves

VT23BottomXfer

VT12TopXfer

1 VT2Drain

0

0

time (s)

Figure 12: Simulation example of the three-tank system model.

4. Related Work The design of effective tools for building integrated models of physical systems and their controllers, across all aspects of the design and implementation is receiving a lot of attention both in academic research and from industrial tool

3.2. Simulation To generate a simulation scenario, we created a small conR R that includes controlled troller in MATLAB /Stateflow 7

ThreeTank_Autonomous_ECBS Paradigm: FACT Project: HybridMultiTank

FlowRa

Model: Component

Aspect: BondGraph

Time: Tue Nov 15 06:12:25 PM

Out

FlowRa Switch In

FlowSource1

Flow Out

Out

FlowSource2

T12TopXfer T12TopXfer_Level XferPi InTop

Pressu OutTop OutBot

Tank1

XferPo XferAu

Press XferBo

XferBo

Tank2

Pressu InFill XferBo

Tank3 Switch In

Flow Out

T23BottomXfer Switch In

Flow Out

T1Drain

Switch In

Flow Out

T2Drain

Switch In

Flow Out

T3Drain

Enter your annotation

Figure 11: ThreeTankAssembly model in the bondgraph aspect. used to build block diagram models. Here too, the user is aided by a large component library and the ability to build hierarchical models.

vendors. Recent work has attempted to capture more precisely the requirements for a comprehensive modeling approach that captures all aspects of system design, and supports model reuse, and supports the user in managing the otherwise overwhelming complexity of the modeling task. Tool vendors create integrated tools that couple a model editing environment with a simulation engine, and possible optional packages for component libraries. There is no standard for model exchange, although mutual export/import capabilities may be supported. This in part may be responsible for tool adoption being coupled to geography, industry segments, or requirements imposed by large scale, multiinstitutional research efforts. The overview below includes those most relevant to the discussion in this paper, but is by no means complete. A current and extensive overview can be found in [3]. Modelica [20] is an object oriented language for modeling physical systems and controllers. The Modelica specification was created out of a collaboration between many institutions in a multi-national effort. Dymola, (Dynasim, Sweden [10]) is a commercial modeling tool for Modelica that provides both analysis and simulation support. Its simulation environment can handle large sets of Ordinary Differential Equations (ODE) and Differential Algebraic Equations (DAE), and includes symbolic manipulation routines to produce compact models. Component libraries exist, both commercial and open source, for a variety of physical domains. Modelica has been used to create bond graph modeling environments [8, 6, 5]. A bond graph library for use with Dymola is described in [9], although support for controlled/switched junctions is not yet included. 20-sim (Controllabs, The Netherlands [7]), is a commercial application for modeling, analysis and simulation of physical system models that supports bond graphs as the core physical system model representation, but can also be

Simulink, (The MathWorks, Inc. [19]), provides a block diagram modeling language that supports modeling of both continuous time and discrete time systems. The component library is extensive, but the designer is wholly responsible for managing the construction of models that have both continuous and discrete time behavior. A Simulink toolbox, SimMechanics [26] supports non-causal modeling of multi-body mechanical systems. Translating SimMechanics model to an executable simulation model is handled internally. Simulink has also been used to create toolboxes for basic bond graph modeling (see references in [3]). HyVisual is a Hybrid System Visual Modeler created using the Ptolemy II embedded systems modeling and simulation package (University of California, Berkeley) [1]. Continuous time models are created using a block diagram representation, and hybrid system models are models are represented as compositions of finite state machine models with continuous time models, with precisely defined operational semantics. The use of component oriented modeling of physical systems is investigated in [17]. As in Simulink, these models will be causal models. The AtoM 3 meta-modeling tool (McGill University) [15] is a graphical meta-modeling environment that uses entity-relationship diagrams as the meta-modeling language. Like GME it is intended to create domain specific modeling environments. A conventional bond graph modeling language created with AtoM 3 is described in [24]. A model translator generates a Modelica model representation that is built using the Modelica bond graph library, that can then be simulated using an application such as Dymola. 8

5. Conclusions

References [1] S. S. Bhattacharyya, E. Cheong, J. Davis II, M. Goel, C. Hylands, B. Kienhuis, E. Lee, J. Liu, X. Liu, L. Muliadi, S. Neuendorffer, J. Reekie, N. Smyth, J. Tsay, and B. Vogel. Heterogeneous concurrent modeling and design in java. Technical Report UCB/ERL M02/23, University of California, Berkeley, CA, Aug. 2002. [2] G. Biswas, E.-J. Manders, J. Ramirez, N. Mahadevan, and S. Abdelwahed. Online model-based diagnosis to support autonomous operation of an advanced life support system. Habitation: An International Journal for Human Support Research, 10(1):21–38, Jan. 2004. [3] W. Borutzky. Bond Graphs – A methodology for modeling multi-disiplinary systems. SCS – society for modeling and simulation international, Erlangen, Germany, 2004. [4] W. Borutzky. Exchange and reuse of bond graph models based on xml. In J. J. Granda and F. Cellier, editors, International Conference on Bond Graph Modeling and Simulation, volume 37 of Simulation Series, pages 129–136. SCS Publishing, 2005. [5] W. Borutzky, B. Barnard, and J. Thomac. Describing bond graph models of hydraulic components in Modelica. Mathematics and Computers in Simulation, 53(4– 6):381387, 2000. [6] J. F. Broenink. Bond-graph modeling in Modelica. In Simulation in Industry, pages 481–492, 1997. [7] J. F. Broenink. 20-sim software for hierarchical bond-graph block-diagram models. Simulation Practice and Theory 7, 7(5–6):481–492, 1999. [8] F. Cellier and R. McBride. Object-oriented modeling with bond graphs and modelica. In Intl. Conf. Bond Graph Modeling and Simulation, Orlando, FL, Jan. 2003. [9] F. Cellier and A. Nebot. The modelica bond graph library. In Proc. 4th International Modelica Conference, pages 57–65, Hamburg, Germany, 2005. [10] Dynasim AB, Lund, Sweden. Dymola - User’s Manual, Version 5.0, 2002. [11] D. C. Karnopp, D. L. Margolis, and R. C. Rosenberg. Systems Dynamics: Modeling and Simulation of Mechatronic Systems. John Wiley & Sons, Inc., New York, third edition, 2000. [12] G. Karsai, G. Biswas, T. Pasternak, S. Narasimhan, G. Peceli, G. Simon, and T. Kovacshazy. Towards faultadaptive control of complex dynamical systems. In T. Samad and G. Balas, editors, Software-Enabled Control – Information Technology for Dynamical Systems, chapter 17, pages 347–368. Wiley-IEEE press, Piscataway, NJ, 2003. [13] G. Karsai, M. Maroti, A. Ledeczi, and J. Sztipanovits. Composition and cloning in modeling and meta modeling. IEEE Trans. Control Syst. Technology, 12(2):263–277, 2004. [14] G. Karsai, J. Sztipanovits, A. Ledeczi, and T. Bapty. Modelintegrated development of embedded software. Proc IEEE, 91(1):145–164, 2003. [15] S. Lacoste-Julien, H. Vangheluwe, J. de Lara, and P. Mosterman. Meta-modelling hybrid formalisms. In IEEE International Symposium on Computer-Aided Control System Design, pages 65–70, Taipei, Taiwan, Sept. 2004. IEEE Computer Society Press.

In this paper we have outlined how GME has been used to create a component oriented physical system modeling environment for hybrid systems using the hybrid bond graph approach. We have used the GME concepts of containment hierarchy and module interaction through ports to illustrate the composition of increasingly complex physical system component models. Through the use of sub-types we can bring incremental model refinement and the construction of increasingly detailed physical system dynamics to a library of component models. A comparison with the leading physical system modeling tools indicates that GME is well suited to build a comprehensive physical system modeling environment. While the existing tools include powerful model libraries, the current modeling environment can be used to build up such libraries in an efficient manner. Through the use of model translators we can create analysis and simulation tools that take advantage of the state of the art in existing simulation and numerical analysis tools. Ongoing work focuses on exploiting more advanced capabilities of GME in this modeling language. The GME constraint manager can be used to help the modeler in building valid models by enforcing constraints written by the DSML author [16]. For example, in the tank system model, the drain valves have an unconnected output port, This is currently allowed, but would ideally generate a warning message. In addition, we aim to generalize the generation of the simulation model from the physical system model such that alternative simulation tools can be used. To facilitate model exchange between different (hybrid) bond graph modeling tools we are creating an export facility to the (experimental) XML based bond graph modeling exchange language [4], and at the same time extending that representation to include controlled junctions. At this time, it is not possible to provide visual feedback to the modeler about causality assignment, or possible problems in causality assignment. This, as well as the visualization of additional information derived from model analysis can be implemented through the GME plug-in architecture.

Acknowledgments This work was supported in part through grants from the NASA-ALS program (Contract number: NCC 9-159) and The Boeing Company. This work benefitted from contributions by John Ramirez, Sriram Narasimhan, and Tivadar Szemethy. 9

[16] A. Ledeczi, A. Bakay, M. M. P. Volgyesi, G. Nordstrom, J. Sprinkle, and G. Karsai. Composing domain-specific design environments. IEEE Computer, pages 44–51, Nov. 2001. [17] J. Liu and E. Lee. A component-based approach to modeling and simulating mixed signal and hybrid systems. ACM Transactions on Modeling and Computer Simulation, 12(4):343–68, 2002. [18] E.-J. Manders, G. Biswas, J. Ramirez, N. Mahadevan, J. Wu, and S. Abdelwahed. A model-integrated computing toolsuite for fault adaptive control. In Working Papers Fifteenth Intl. Workshop Principles Diagnosis, Carcassonne, France, June 2004. [19] Matlab/simulink. The Mathworks, Inc, Nattick, MA. [20] Modelica Association. Modelica - A Unified Object Oriented Language for Physical System Modeling, Language Specification, Version 2.2, 2005. [21] P. Mosterman. Hybrsim - a modeling and simulation environment for hybrid bond graphs. Journal of Systems and Control Engineering - Part I, 216, 1:35–46, 2002. [22] P. J. Mosterman and G. Biswas. A theory of discontinuities in physical system models. J Franklin Institute, 335B(3):401–439, 1998. [23] P. J. Mosterman, J. Sztipanovits, and S. Engell. Computer automated multi-paradigm modeling in control systems technology. IEEE Transactions on Control System Technology, 12(2):223–235, 2004. [24] S. Sen and H. Vangheluwe. Meta-modeling and model transformation for bond graphs. [25] G. Simon, G. Karsai, G. Biswas, S. Abdelwahed, N. Mahadevan, T. Szemethy, G. Peceli, and T. Kovacshazy. Modelbased fault adaptive control of complex dynamic systems. In Proc. 20th IEEE Instrum. Meas Technol Conf., Vail, CO, May 2003. [26] Using simmechanics. The Mathworks, Inc. [27] J. Top, A. Breunese, J. Broenink, and J. Akkermans. Structure and use of a library for physical systems models. In Proc. Intl. Conf Bond Graph Modeling Simulation, Jan. 1995.

10

Suggest Documents