Generalizing Linear Graphs and Bond Graph Models with Hetero-functional Graphs for System-of-Systems Engineering Applications
Ehsanoddin Ghorbanichemazkati Amro M. Farid










Generalizing Linear Graphs and Bond Graph Models with Hetero-functional Graphs for System-of-Systems Engineering Applications
    Ehsanoddin Ghorbanichemazkati, Amro M. Farid
E. Ghorbanichemazkati is a doctoral research assistant with the Department of Systems and Enterprises at the Stevens Insititute of Technology, Hoboken NJ 07030
A.M. Farid is the Alexander Crombie Humphreys Chair Professor of Economics in Engineering in Department of Systems and Enterprises at the Stevens Insititute of Technology, Hoboken NJ 07030.  He is also the Principal Systems Scientist at CSIRO Smart Energy (Newcastle, Australia) and a Visiting Scientist at MIT Mechanical Engineering Cambridge, MA.

    March 28 2024
==============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================





§ ABSTRACT 
In the 20th century, individual technology products like the generator, telephone, and automobile were connected to form many of the large-scale, complex, infrastructure networks we know today: the power grid, the communication infrastructure, and the transportation system. Progressively, these networked systems began interacting, forming what is now known as systems-of-systems. Because the component systems in the system-of-systems differ, modeling and analysis techniques with primitives applicable across multiple domains or disciplines are needed. For example, linear graphs and bond graphs have been used extensively in the electrical engineering, mechanical engineering, and mechatronic fields to design and analyze a wide variety of engineering systems. In contrast, hetero-functional graph theory (HFGT) has emerged to study many complex engineering systems and systems-of-systems (e.g. electric power, potable water, wastewater, natural gas, oil, coal, multi-modal transportation, mass-customized production, and personalized healthcare delivery systems).  This paper seeks to relate hetero-functional graphs to linear graphs and bond graphs and demonstrate that the former is a generalization of the latter two.  The contribution is relayed in three stages.  First, the three modeling techniques are compared conceptually.  Next, these techniques are contrasted on six example systems: (a) an electrical system, (b) a translational mechanical system, (c) a rotational mechanical system, (d) a fluidic system, (e) a thermal system, and (f) a multi-energy (electro-mechanical) system.  Finally, this paper proves mathematically that hetero-functional graphs are a formal generalization of both linear graphs and bond graphs.




§ INTRODUCTION

In the 20th century, individual technology products like the generator, telephone, and automobile were connected to form many of the large-scale, complex, infrastructure networks we know today: the power grid, the communication infrastructure, and the transportation system<cit.>. Over time, these networked systems began to develop interactions between themselves in what is now called systems-of-systems<cit.>. The “smart grid”<cit.>, the energy-water nexus<cit.>, the electrification of transport<cit.>, are all good examples where one network system has fused with another to form a new and much more capable system.  This trend is only set to continue. The energy-water-food nexus<cit.> fuses three such systems and the recent interest in smart cities<cit.> provides a platform upon which to integrate all of these efforts. 

Because the component systems in the system-of-systems are unlike each other, there is a need to use modeling and analysis techniques that have modeling primitives that can be applied across multiple domains or disciplines.  For example, linear graphs<cit.> and bond graphs<cit.> have been used extensively in the electrical engineering, mechanical engineering, and mechatronic fields to design and analyze a wide variety of engineering systems.  They use modeling primitives such as generalized resistors, capacitors, inductors, transformers, and gyrators to address mechanical, electrical, fluidic, and thermal systems. Unfortunately, the application of linear graphs and bond graphs are limited to systems where system elements are connected via flows of power (of various types).

In contrast, hetero-functional graph theory (HFGT)<cit.> has emerged to study many complex engineering systems and systems-of-systems.  More specifically, HFGT provides a means of algorithmically translating SysML models<cit.> into hetero-functional graphs and/or Petri Nets<cit.> where they can be structurally analyzed<cit.>, dynamically simulated<cit.>, and ultimately optimized<cit.>.  HFGT has been applied to numerous application domains including electric power, potable water, wastewater, natural gas, oil, coal, multi-modal transportation, mass-customized production, and personalized healthcare delivery systems.  In so doing, HFGT has demonstrated its ability to model the supply, demand, transportation, storage, transformation, assembly, and disassembly of multiple operands in distinct locations over time<cit.>.  These multiple operands include matter, energy, information, money, and living organisms<cit.> and not just energy as in the case of linear graphs and bond graphs.  



 §.§ Original Contribution

Consequently, this paper seeks to relate hetero-functional graphs to linear graphs and bond graphs and demonstrate that the former is a generalization of the latter two.  The contribution is relayed in three stages.  First, the three modeling techniques are compared conceptually.  Next, the three modeling techniques are contrasted on six example systems: (a) an electrical system, (b) a translational mechanical system, (c) a rotational mechanical system, (d) a fluidic system, (e) a thermal system, and (f) a multi-energy (electro-mechanical) system.  Finally, this paper proves mathematically that hetero-functional graphs are a formal generalization of both linear graphs and bond graphs.  

To facilitate the discussion, several assumptions and limitations are made.  


  * As the majority of the literature for all three modeling approaches concerns lumped parameter models, this paper restricts its scope to such systems.  

  * So as to facilitate the discussion, all physical systems will be modeled with “power-variables"<cit.> – pairs of physical variables whose product equals a quantity of power. 

  * Linear graphs and bond graphs are assumed to describe the flows of power of various types:  translational mechanical, rotational mechanical, electrical, fluidic, and thermal.  This has been the typical application of linear graphs and bond graphs in the literature.  

  * Without loss of generality, and for simplicity of discussion, this paper restricts its discussion to linear constitutive laws.  Non-linear constitutive laws can be readily integrated into bond graphs and hetero-functional graphs.  

  * Without loss of generality, and also for simplicity of discussion, this paper restricts itself to the following types of elements (as understood in bond graphs):  


  * Effort sources/sinks, 

  * Flow sources/sinks, 

  * Generalized resistors, 

  * Generalized capacitors, 

  * Generalized inductors, 

  * Generalized transformers, and

  * Generalized gyrators.

While other types of elements have been introduced in bond graphs <cit.>, their exclusion does not detract from the original contribution presented here and can be re-introduced straightforwardly.  



 §.§ Paper Outline

The remainder of the paper proceeds as follows.  Sec. <ref> provides an overview of linear graphs, bond graphs, and hetero-functional graph techniques.  Sec. <ref> then introduces six illustrative examples that serve as the basis for comparison.  Sections <ref>, <ref>, and <ref> then demonstrate the linear graph, bond graph, and hetero-functional graph methodologies on each of these six systems.  Sec. <ref> then proves mathematically that hetero-functional graphs are a formal generalization of both linear graphs and bond graphs.  Sec. <ref> brings the paper to a conclusion.  


§ OVERVIEW OF LINEAR GRAPH, BOND GRAPH, AND HETERO-FUNCTIONAL GRAPH TECHNIQUES


In order to begin to relate hetero-functional graphs to linear graphs and bond graphs, all three approaches must be briefly described at a conceptual level.    Interestingly, linear graphs share more common features with bond graphs and hetero-functional graphs than the other two with each other.  Consequently, Sections <ref>, <ref> and <ref> describe linear graphs, bond graphs, and hetero-functional in that order to facilitate discussion. Figure <ref> serves to guide the discussion for the remainder of the section. 
   





 §.§ Linear Graphs


As shown in Fig. <ref>, linear graphs are a type of graphical model that shows the interconnectedness of lumped parameter elements depicted as arcs<cit.> that transform and transport the flow of power.  It is important to recognize that when defining the linear graph's lumped parameter elements, the system modeler is implicitly choosing either a Lagrangian or an Eulerian view<cit.> of the system.  Each of these power flows in the linear graph's arcs is associated with a pair of variables; one “across" variable and another “through" variable.  Fig. <ref> shows the across and through variables for each of the five energy domains.  Furthermore, as shown in Fig. <ref>, each of the arcs in a linear graph can be classified into one of several different types. These arcs connect with each other at nodes that are associated with points in space that have distinct across-variable values measured relative to a well-chosen absolute reference frame.  Once a linear graph has been constructed it is then translated into a “normal tree" so as to eliminate redundant variables<cit.>. From there, three sets of simultaneous differential and algebraic equations are derived to form a mathematical model of the system.  


  * Continuity laws: For each node in the normal tree, a continuity law (e.g. Newton's 1st Law, Kirchhoff's Current law) is derived that describes the conservation of the relevant through variables.  

  * Constitutive laws: For each arc in the normal tree, a constitutive law (e.g. Newton's 2nd Law, Ohm's Law) is derived that describes the relationship between across and through variables in the lumped parameter element.  

  * Compatibility law: For each arc in the normal tree, a compatibility law is derived to relate the across variable of the lumped parameter element to the across variables of the linear graph's nodes. 
 In most cases, the compatibility laws can be entirely omitted if the simultaneous equations are expressed exclusively in terms of the (absolute) across variables at each of the nodes.  

The three sets of simultaneous equations that constitute the mathematical model can then be algebraically simplified into a state space model of the form:  

    Ẋ= AX + BU + EU̇
    
    y = CX + DU + FU̇

where X is the system state vector, U are the system inputs, y are the system outputs, and A,B,C,D,E and F are constant parameter coefficient matrices of appropriate size.  The size of the system state vector is determined by the number of independent energy storage elements (as determined from the normal tree)<cit.>.  The size of the system input vector is determined from the number of source/sink elements, and the size of the output vector is left to the modeler's discretion.  Finally, the state space model is simulated in the time domain by numerical integration.    










 §.§ Bond Graphs


Bond graph models are derived in a similar manner; although with several key differences.  As shown in Fig. <ref>, bond graphs are a type of graphical model that shows the interconnectedness of lumped parameter elements depicted as labeled nodes <cit.> transform and transport power.  Each of these power flows is associated with a pair of variables; one “effort" variable and another “flow" variable.  Fig. <ref> shows the effort and flow variables for each of the five energy domains.  Importantly, when the system model adopts a Lagrangian view, the effort and flow variables map to through and across variables respectively.  In contrast, when the system model adopts an Eulerian view, the effort and flow variables map to across and through variables respectively.  Furthermore, as shown in Fig. <ref>, each of the elements in the bond graph can be classified into one of several different types.  In addition to these bond graph elements, the bond graph also includes “0-Junctions" and “1-Junctions".  0-Junctions, or flow junctions, conserve the sum of all flow variables and have a common associated effort variable.  Meanwhile, 1-Junctions, or effort junctions, conserve the sum of all effort variables and have a common associated flow variable.  Finally, the 0-Junctions and the 1-Junctions are connected to the bond graph elements with arcs (i.e. power bonds) that describe a flow of power between elements and junctions.  Once the bond graph has been constructed, three sets of simultaneous differential-algebraic equations are derived to form a mathematical model of the system.  


  * 0-Junction Laws: For each 0-Junction, the flow conversation law is derived.  For systems with a Lagrangian view, these 0-Junction laws are compatibility laws.  For systems with an Eulerian view, these 0-junction laws are continuity laws (e.g. Kirchhoff's current law).  

  * 1-Junction Laws: For each 1-Junction, the effort conservation law is derived.  For systems with a Lagrangian view, these 1-Junction laws are continuity laws (e.g. Newton's 1st law).  For systems with an Eulerian view, these 1-junction laws are compatibility laws (e.g. Kirchhoff's voltage law).  

  * Constitutive laws: For each element in the bond graph, a constitutive law (e.g. Newton's 2nd Law, Ohm's Law) is derived that describes the relationship between effort and flow variables in the lumped parameter element.  

As with linear graphs, the three sets of simultaneous equations that constitute the mathematical model can then be algebraically simplified into a state space model shown in Eq. <ref> and <ref>.  



 §.§ Hetero-functional Graphs

As shown in Fig. <ref>, hetero-functional graphs are also a type of graphical models that show the interconnectedness of lumped parameter elements.  Unlike the relatively specific graphical ontologies used in linear graphs and bond graphs, Hetero-functional graph theory stems from the universal structure of human language with subjects and predicates and the latter made up of verbs and objects<cit.>  It includes set of system resources R as subjects, a set of system processes P as predicates, and a set of operands L as their constituent objects.  

An asset or object l_i ∈ L that is operated on or consumed during the execution of a process.


An activity p ∈ P that transforms or transports a predefined set of input operands into a predefined set of outputs. 


An asset or object r_v ∈ R that facilitates the execution of a process.  

As shown in Fig. <ref>, these operands, processes, and resources are organized in an engineering system meta-architecture stated in the Systems Modeling Language (SysML)<cit.>.  


Importantly, the system resources R=M ∪ B ∪ H are classified into transformation resources M, independent buffers B, and transportation resources H.  Additionally, the set of “buffers" B_S=M ∪ B is introduced to support the discussion.  Equally important, the system processes P = P_μ∪ P_η̅ are classified into transformation processes P_μ and refined transportation processes P_η.  The latter arises from the simultaneous execution of one transportation process and one holding process.  Finally, hetero-functional graph theory emphasizes that resources are capable of one or more system processes to produce a set of “capabilities"<cit.>.

A resource r_v ∈ R is a buffer b_s ∈ B_S iff it is capable of storing or transforming one or more operands at a unique location in space.  


An action e_wv∈ E_S (in the SysML sense) defined by a system process p_w ∈ P being executed by a resource r_v ∈ R.  It constitutes a subject + verb + operand sentence of the form: “Resource r_v does process p_w".  

The highly generic and abstract nature of these definitions has allowed HFGT to be applied to numerous application domains including electric power, potable water, wastewater, natural gas, oil, coal, multi-modal transportation, mass-customized production, and personalized healthcare delivery systems.  For a more in-depth description of HFGT, readers are directed to past works<cit.>. 

Fig. <ref> also serves to relate the hetero-functional graph theory definitions to the ontological elements found in linear graphs and bond graphs.  


  * First, linear graphs and bond graphs are concerned with physical flows, and more specifically the flows of force, torque, electrical current, fluids, and heat.  Consequently, Fig. <ref> shows these objects as types of operands.

  * Second, linear graphs and bond graphs implicitly define a set of physical points at which there are distinct values of across-value attributes measured in absolute terms relative to a well-chosen reference frame.  Again, Fig. <ref> summarizes the different types of physical points by the type of across variable.  Consequently, Fig. <ref> shows these as types of independent buffers.  

  * Third, linear graphs and bond graphs are composed of physical sources.  Because the across variables at physical points are types of independent buffers (in HFGT), across-variable and through-variable sources are adopted into the taxonomy (rather than effort and flow sources).  Because these physical sources inject power across the system boundary as system processes, and all system processes that inject operands across the system boundary are transformation processes<cit.>, then Fig. <ref> shows these physical sources as transformation resources.  Furthermore, because they are transformation resources, they are also buffers and inherently have an absolute across variable associated with physical points.  

  * Fourth, linear graphs and bond graphs are composed of the physical elements shown in Fig. <ref>.  Each of these is associated with a through-variable attribute and an across-variable attribute defined relative to the across variables of the physical points (as independent buffers).  They are further classified as generalized resistors, capacitors, inductors, transformers, and gyrators (as defined in bond graphs).  They dissipate power, store potential energy in an effort variable, store energy in a flow variable, transform power, and gyrate power respectively.  (For brevity, the storage of energy in a flow variable will be referred to as storing kinetic energy; although this is a strained analogy in the electrical domain).  As each of these system processes is a flow of power between two physical points, Fig. <ref> shows all of these physical elements as transportation resources.  

Finally, it is important to recognize that linear graphs and bond graphs are limited to physical sources and physical elements with only a single associated capability.  In contrast, HFGT is able to address engineering systems with resources that have an arbitrary number of processes.  In this regard, and as shown in Fig. <ref>, HFGT is more ontologically rich than both linear graphs and bond graphs.  


Returning to Fig. <ref>, the engineering system meta-architecture stated in SysML must be instantiated and ultimately transformed into the associated Petri net model(s). To that end, the positive and negative hetero-functional incidence tensors (HFIT) are introduced to describe the flow of operands through buffers and capabilities.  

The negative hetero-functional incidence tensor M_ρ^- ∈{0,1}^|L|× |B_S| × | E_S|  is a third-order tensor whose element M_ρ^-(i,y,ψ)=1 when the system capability ϵ_ψ∈ E_S pulls operand l_i ∈ L from buffer b_s_y∈ B_S.
 


The positive hetero-functional incidence tensor M_ρ^+ ∈{0,1}^|L|× |B_S| × | E_S|  is a third-order tensor whose element M_ρ^+(i,y,ψ)=1 when the system capability ϵ_ψ∈ E_S injects operand l_i ∈ L into buffer b_s_y∈ B_S.

These incidence tensors are straightforwardly “matricized" to form 2^nd Order Hetero-functional Incidence Matrices M = M^+ - M^- with dimensions |L||B_S|× | E|. Consequently, the supply, demand, transportation, storage, transformation, assembly, and disassembly of multiple operands in distinct locations over time can be described by an Engineering System Net and its associated State Transition Function<cit.>.


An elementary Petri net N = {S,  E_S, M, W, Q}, where

    
  * S is the set of places with size: |L||B_S|,
    
  * E_S is the set of transitions with size: | E|,
    
  * M is the set of arcs, with the associated incidence matrices: M = M^+ - M^-,
    
  * W is the set of weights on the arcs, as captured in the incidence matrices,
    
  * Q=[Q_B; Q_E] is the marking vector for both the set of places and the set of transitions. 




The  state transition function of the engineering system net Φ() is:

    Q[k+1]=Φ(Q[k],U^-[k], U^+[k])   ∀ k ∈{1, …, K}

where k is the discrete time index, K is the simulation horizon, Q=[Q_B; Q_ E], Q_B has size |L||B_S| × 1, Q_ E has size | E_S|× 1, the input firing vector U^-[k] has size | E_S|× 1, and the output firing vector U^+[k] has size | E_S|× 1.  

    Q_B[k+1]   =Q_B[k]+M^+U^+[k]Δ T-M^-U^-[k]Δ T 
    
    Q_ E[k+1]   =Q_ E[k]-U^+[k]Δ T +U^-[k]Δ T

where Δ T is the duration of the simulation time step.  


Here, it is important to recognize that the engineering system net state transition function is an explicit restatement of the continuity laws in linear graphs.  Similarly, the engineering system net describes the 0-Junction laws in bond graphs that use an Eulerian view and describes the 1-Junction laws in bond graphs that use a Lagrangian view.  For this reason, the relationship between hetero-functional graphs and linear graphs is more straightforward than between hetero-functional graphs and bond graphs.  

In addition to the engineering system net, in HFGT, each operand can have its own state and evolution.  This behavior is described by an Operand Net and its associated State Transition Function for each operand.  
 Given operand l_i, an elementary Petri net N_l_i= {S_l_i,  E_l_i, M_l_i, W_l_i, Q_l_i} where 


  * S_l_i is the set of places describing the operand's state.  

  * E_l_i is the set of transitions describing the evolution of the operand's state.

  * M_l_i⊆ (S_l_i× E_l_i) ∪ ( E_l_i× S_l_i) is the set of arcs, with the associated incidence matrices: M_l_i = M^+_l_i - M^-_l_i  ∀ l_i ∈ L.  

  * W_l_i : M_l_i is the set of weights on the arcs, as captured in the incidence matrices M^+_l_i,M^-_l_i  ∀ l_i ∈ L.  

  * Q_l_i= [Q_Sl_i; Q_ El_i] is the marking vector for both the set of places and the set of transitions. 





The  state transition function of each operand net Φ_l_i() is:

    Q_l_i[k+1]=Φ_l_i(Q_l_i[k],U_l_i^-[k], U_l_i^+[k])   ∀ k ∈{1, …, K}   i ∈{1, …, L}

where Q_l_i=[Q_Sl_i; Q_ E l_i], Q_Sl_i has size |S_l_i| × 1, Q_ E l_i has size | E_l_i| × 1, the input firing vector U_l_i^-[k] has size | E_l_i|× 1, and the output firing vector U^+[k] has size | E_l_i|× 1.  


    Q_Sl_i[k+1]   =Q_Sl_i[k]+M_l_i^+U_l_i^+[k]Δ T - M_l_i^-U_l_i^-[k]Δ T 
    
    Q_ E l_i[k+1]   =Q_ E l_i[k]-U_l_i^+[k]Δ T +U_l_i^-[k]Δ T



Here, it is important to recognize that although HFGT introduces operand nets and their respective state transition functions, linear graphs and bond graphs do not have a counterpart modeling concept.  This is because when power flows as an operand, regardless of whether it is mechanical, electrical, fluidic, or thermal power, it does not change state and therefore does not require an operand net.  In contrast, other application domains, most notably production systems<cit.> and healthcare systems<cit.> respectively have products and patients as operands with often very complex operand state evolution.  

Returning to Fig. <ref>, HFGT describes the behavior of an engineering system using the Hetero-Functional Network Minimum Cost Flow (HFNMCF) problem<cit.>.  Whereas linear graphs and bond graphs models insist on the state space form in Eq. <ref>-<ref>, HFGT similarly insists on the HFNMCF mathematical program.  It optimizes the time-dependent flow and storage of multiple operands (or commodities) between buffers, allows for their transformation from one operand to another, and tracks the state of these operands.  In this regard, it is a very flexible optimization problem that applies to a wide variety of complex engineering systems.  For the purposes of this paper, the HFNMCF is a type of discrete-time-dependent, time-invariant, convex optimization program<cit.>.




    minimize  Z    = ∑_k=1^K-1 f_k(x[k],y[k]) 
    s.t.  A_CPX    = B_CP
    E_CP≤ D(X)    ≤E_CP
    
    g(X,Y)    = 0 
    
    h(Y)    ≤ 0


where 


  * Z is a convex objective function separable in k.

  * k is the discrete time index. 

  * K is the simulation horizon.

  * f_k() is a set of discrete-time-dependent convex functions.

  * X=[x[1]; …; x[K]]  is the vector of primary decision variables at time k.

    x[k] = [ Q_B ; Q_ E ; Q_SL ; Q_ EL ; U^- ; U^+ ; U^-_L ; U^+_L ][k]   ∀ k ∈{1, …, K}


  * Y=[y[1]; …; y[K]]  is the vector of auxiliary decision variables at time k.  The need for auxiliary decision variables depends on the presence and nature of the device models g(X,Y)=0 in Eq. <ref> and h(Y)≤ 0 in Eq. <ref>.  

  * A_CP is the linear equality constraint coefficient matrix.

  * B_CP is the linear equality constraint intercept vector.

  * D_CP is the linear inequality constraint coefficient matrix.

  * E_CP is the linear inequality constraint intercept vector.  

  * g(X,Y) and h(Y) is a set of device model functions whose presence and nature depend on the specific problem application.  


Despite the terse description of the HFNMCF problem presented above, it has immediate relationships to linear graphs and bond graphs.  


  * The through variables in a linear graph appear amongst the primary decision variables X.  

  * The across variables in a linear graph appear amongst the auxiliary variables Y.

  * Because HFGT assumes that the across variables are stated in absolute terms, the compatibility laws in a linear graph are not required in the HFNMCF.  

  * The continuity relations in a linear graph appear amongst the linear equality constraints in Eq. <ref>

  * The constitutive relations in a linear graph appear amongst the device model constraints in Eq. <ref>.  

The relationships between the HFNMCF problem and bond graphs can be similarly deduced via the HFGT-to-linear graph relationships stated above.  With the above understanding, Equations <ref>-<ref> are elaborated below.  





  §.§.§ Objective Function

With respect to the objective function in Eq.  <ref>, Z is a convex objective function separable in discrete time steps k.  For the remainder of this work, the discrete-time-dependent functions f_k are assumed to be time-invariant quadratic functions.  Matrix F_QP and vector f_QP in Equation <ref> allow quadratic and linear costs to be incurred from the place and transition markings in both the engineering system net and operand nets. 

    Z    = ∑_k=1^K-1 x^T[k] F_QP x[k] + f_QP^T x[k]



  * F_QP is a positive semi-definite, diagonal, quadratic coefficient matrix.

  * f_QP is a linear coefficient matrix.







  §.§.§ Equality Constraints


Matrix A_QP and vector B_QP in Equation <ref> are constructed by concatenating constraints Equations  <ref>-<ref>.  


    -Q_B[k+1]+Q_B[k]+M^+U^+[k]Δ T - M^-U^-[k]Δ T=   0       ∀ k ∈{1, …, K}
    
    -Q_ E[k+1]+Q_ E[k]-U^+[k]Δ T + U^-[k]Δ T=   0       ∀ k ∈{1, …, K}
    
     - U_ψ^+[k+k_dψ]+ U_ψ^-[k] =    0       ∀ k∈{1, …, K}  ψ∈{1, …,  E_S}
    -Q_Sl_i[k+1]+Q_Sl_i[k]+M_l_i^+U_l_i^+[k]Δ T - M_l_i^-U_l_i^-[k]Δ T=   0       ∀ k ∈{1, …, K}   i ∈{1, …, |L|}
    
    -Q_ El_i[k+1]+Q_ El_i[k]-U_l_i^+[k]Δ T + U_l_i^-[k]Δ T=   0       ∀ k ∈{1, …, K}   i ∈{1, …, |L|}
    
    - U_xl_i^+[k+k_dxl_i]+ U_xl_i^-[k] =    0       ∀ k∈{1, …, K},  ∀ x∈{1, …, | E_l_i}|,   l_i ∈{1, …, |L|}
    
    U^+_L[k] - Λ^+ U^+[k] =   0       ∀ k ∈{1, …, K}
    
    U^-_L[k] - Λ^- U^-[k] =   0       ∀ k ∈{1, …, K}
    [ D_Up    0;    0 D_Un ][ U^+; U^- ][k] =   [ C_Up; C_Un ][k]       ∀ k ∈{1, …, K}
    [ E_Lp    0;    0 E_Ln ][ U^+_l_i; U^-_l_i ][k] =   [ F_Lpi; F_Lni ][k]       ∀ k ∈{1, …, K}   i ∈{1, …, |L|}
    [ Q_B ; Q_ E ; Q_SL ][1] =   [ C_B1 ; C_ E1 ; C_SL1 ]
    [ Q_B ; Q_ E ; Q_SL ; U^- ; U_L^- ][K+1] =      [ C_BK ; C_ EK ; C_SLK ; 0 ; 0 ]




  * Equations <ref> and <ref> describe the state transition function of an engineering system net (Defn <ref> & <ref>).

  * Equation <ref> is the engineering system net transition duration constraint where the end of the ψ^th transition occurs k_dψ time steps after its beginning. 

  * Equations <ref> and <ref> describe the state transition function of each operand net N_l_i (Defn. <ref> & <ref>) associated with each operand l_i ∈ L.  

  * Equation <ref> is the operand net transition duration constraint where the end of the x^th transition occurs k_dx_l_i time steps after its beginning. 

  * Equations <ref> and <ref> are synchronization constraints that couple the input and output firing vectors of the engineering system net to the input and output firing vectors of the operand nets respectively. U_L^- and U_L^+ are the vertical concatenations of the input and output firing vectors U_l_i^- and U_l_i^+ respectively.

    U_L^-[k]   =[U^-_l_1; …; U^-_l_|L|][k] 
    
    U_L^+[k]   =[U^+_l_1; …; U^+_l_|L|][k]



  * Equations <ref> and <ref> are boundary conditions.  Eq. <ref> is a boundary condition constraint that allows some of the engineering system net firing vectors decision variables to be set to an exogenous constant.  Eq. <ref> is a boundary condition constraint that allows some of the operand net firing vector decision variables to be set to an exogenous constant.  

  * Equations <ref> and <ref> are the initial and final conditions of the engineering system net and the operand nets where Q_SL is the vertical concatenation of the place marking vectors of the operand nets Q_Sl_i.

    Q_SL^-[k]   =[Q^-_Sl_1; …; U^-_Sl_|L|][k] 
    
    U_SL^+[k]   =[U^+_Sl_1; …; U^+_Sl_|L|][k]







  §.§.§ Inequality Constraints

 D_QP() and vector E_QP in Equation <ref> place capacity constraints on the vector of decision variables at each time step x[k] = [ Q_B ; Q_ E ; Q_SL ; Q_ EL ; U^- ; U^+ ; U^-_L ; U^+_L ][k]   ∀ k ∈{1, …, K}. This flexible formulation allows capacity constraints on the place and transition markings in both the engineering system net and operand nets.  





  §.§.§ Device Model Constraints

As mentioned above, g(X,Y) and h(Y) are a set of device model functions whose presence and nature depend on the specific problem application.  They can not be further elaborated until the application domain and its associated capabilities are identified.  





§ ILLUSTRATIVE EXAMPLES

The overview of linear graphs, bond graphs, and hetero-functional graphs in the previous section, provides a strong foundation for comparison.  In order to concretely describe the relationship between linear graphs, bond graphs, and hetero-functional graphs, this section introduces several illustrative examples for further discussion.  As these graph-based methodologies have been applied to electrical, translational mechanical, rotational mechanical, fluidic, thermal, and multi-energy domains, one example system for each of these domains is provided. Figure <ref> summarizes each of these systems graphically.  






  * Figure <ref>a is an electrical system composed of an ideal voltage source V_s, three resistors R_1, R_2, and R_3, two inductors L_1 and L_2, and one capacitor C_1.

  * Figure <ref>b is a translational mechanical system composed of an ideal force source F_s(t), two translational dampers B_1 and B_2, two translational springs K_1 and K_2, two masses m_1 and m_2. V_m_1 and V_m_2 indicate the sign convention of positive velocity.

  * Figure <ref>c is a rotational mechanical system composed of a rotating disk J, a torsional spring K, a torsional damper b, and a torque source τ_s(t). The angular velocity ω_J indicates the sign convention of positive angular velocity.

  * Figure <ref>d is a fluidic system composed of two tanks C_1 and C_2, a pipe with inductance I and resistance R_1 and a valve with resistance R_2, and a volumetric flow rate source V̇_f. The pressure measurement points are P_C_1 and P_C_2.

  * Figure <ref>e is a thermal system composed of a “House" and an “ice box" which are considering as thermal capacitors C_h and C_i respectively. Also the “House Insulation" and “Ice box insulation " are considered as thermal resistors, R_h and R_i respectively. The system also includes a “Heater" as a heat flow source Q̇_s.  

  * Figure <ref>f is an electro-mechanical system composed of an ideal voltage source V_s, a resistor R, an inductor L, a torsional damper B, and a rotating disk J. The angular velocity ω_J indicates the sign convention of positive angular velocity of the disk.






§ LINEAR GRAPHS BY EXAMPLE


Building upon the illustrative examples described in the previous section, this section demonstrates the linear graph methodology by example.  To recall from Fig. <ref> and the overview provided in Sec. <ref>, the linear graph methodology consists of four essential steps:


  * Construct the linear graph from the identified system elements.

  * Translate the linear graph into its corresponding normal tree.  

  * State the continuity, constitutive, and compatibility laws of the system.

  * Simplify these laws into a single state-space model.  

This section follows each of these four steps for the six illustrative examples identified in Fig. <ref>.  



 §.§ Electrical System

First, the electrical circuit diagram in Fig. <ref>a is transformed into the linear graph shown in Fig. <ref>. Based on Fig. <ref>, the through-variable in electrical systems is current i, and the across-variable is voltage V. Furthermore Fig. <ref> shows that resistors, capacitors, and inductors are categorized as D-type, A-type, and T-type elements respectively. Consequently, the voltage source in Fig. <ref>a becomes the across-variable source in Fig. <ref>.

Second, the linear graph shown in Fig. <ref> is translated into its associated normal tree in Fig. <ref>. To recall, in the linear graph methodology, a normal tree is a “spanning tree" <cit.> that includes the following elements in order of priority:  


  * all the system graph nodes,

  * all across variable sources,

  * as many A-Type elements as possible,

  * in the case of existing transformers or gyrators, include one branch of each transformer and both or neither branch of each gyrator,

  * as many D-Type elements as possible,

  * as many T-Type elements as possible, and

  * as many through variable sources as possible,

without creating any loops in the graph.
<cit.>. For the electrical system in Fig. <ref>, the V_s, C_1, R_1, and R_2 elements are included following the above prioritization, and consequently the R_3, L_1, and L_2 elements are removed. Importantly, the A-Type elements in the normal tree, and T-Type elements hidden from the normal tree, define the state variables in the system:  V_C_1 for the capacitor, and i_L_1 and i_L_2 for the two inductors.  



Third, the normal tree facilitates the statement of the electrical system's constitutive, continuity, and compatibility laws. The constitutive laws of the system are: 

    dV_C_1/dt   = 1/C_1 i_C_1, 
    
    V_R_1   = i_R_1 R_1, 
    di_L_1/dt   = 1/L_1 V_L_1, 
    
    V_R_2   = i_R_2 R_2, 
    di_L_2/dt   = 1/L_2 V_L_2, 
    
    i_R_3   = 1/R_3 V_R_3.

Additionally, the continuity laws are:

    i_C_1   = i_L_1 - i_R_2 - i_R_3, 
    
    i_R_1   = i_L_1, 
    
    i_R_2   = i_L_2.

Also, the compatibility laws are:

    V_L_1   = V_S - V_C_1 - V_R_1, 
    
    V_L_2   = V_C_1 - V_R_2, 
    
    V_R_3   = V_C_1.


Finally, these laws are simplified algebraically to produce a state space model in Eq. <ref>.


    d/dt[ V_C_1; i_L_1; i_L_2 ]
    =
    [ -1/R_3C_1     1/C_1    -1/C_1;    -1/L_1  -R_1/L_1         0;     1/L_2         0  -R_2/L_2 ][ V_C_1; i_L_1; i_L_2 ]
    +
    [     0; 1/L_1;     0 ]
    V_S




 §.§ Translational Mechanical System

The state space model of the translational mechanical system in Fig. <ref>b is developed similarly.  First, it is transformed into the linear graph shown in Fig. <ref>. According to Fig. <ref>, the through-variable in translation mechanical systems is force F, and the across-variable is velocity V. Furthermore, Fig. <ref> shows that translational dampers, masses, and translational springs are categorized as D-type, A-type, and T-type elements respectively. Consequently, a force source is a through variable source.

Second, the linear graph shown in Fig. <ref> is translated into the normal tree in Fig. <ref>.
Given the prioritization exposited in Sec. <ref>, the m_1, m_2, and b_2 elements in this translational mechanical system have been included, and consequently the F_s, b_1, k_1, and k_2 elements are removed. The across variables of the A-Type elements included in the normal tree V_m_1 and V_m_2, and the through variables of T-Type elements not included in the normal tree F_k_1 and F_k_2, are identified as system state variables.  


Thirdly, the normal tree facilitates the statement of the translational mechanical system's constitutive, continuity, and compatibility laws. The constitutive laws are:  

    dV_m_1/dt   = 1/m_1 F_m_1, 
    dV_m_2/dt   = 1/m_2 F_m_2, 
    dF_k_1/dt   = k_1 V_k_1, 
    dF_k_2/dt   = k_2 V_k_2, 
    
    V_b_2   = 1/b_2 F_b_2, 
    
    F_b_1   = b_1 V_b_1

The continuity laws are:

    F_m_1   = - F_b_1 - F_k1 - F_k2, 
    
    F_m_2   = F_b_2 + F_S, 
    
    F_b_2   = F_k_2

The compatibility laws are:

    V_k_1   = V_m_1, 
    
    V_k_2   = V_m_1 - V_m_2 - V_b_2, 
    
    V_b_1   = V_m_1


Finally, these equations are algebraically simplified to produce the system's state space model in Equation <ref>.  

    d/dt[ V_m_1; V_m_2; F_k_1; F_k_2 ]
    =
    [ -b_1/m_1        0   -1/m_1   -1/m_1;        0        0        0    1/m_2;      k_1        0        0        0;      k_2     -k_2        0 -k_2/b_2 ][ V_m_1; V_m_2; F_k_1; F_k_2 ]
    +
    [     0; 1/m_2;     0;     0 ]
    V_S




 §.§ Rotational Mechanical System

The linear graph methodology is applied similarly to the rotational mechanical system in Fig. <ref>c.   It is transformed into the linear graph shown in Fig. <ref>. Referring back to Fig. <ref>, the through-variable in a rotational mechanical system is torque τ, and the across-variable is angular velocity ω. Also referring back to Fig. <ref>, rotational dampers, rotational disks, and rotational springs are categorized as D-type, A-type, and T-type elements respectively. Consequently, a torque source is a through-variable source.

Second, the linear graph shown in Fig. <ref> is translated into the normal tree in Fig. <ref>.  Following the prioritization mentioned in Sec <ref>, the J element in this rotational mechanical system is included accordingly, and consequently, the b, K, and τ_s elements are necessarily removed. Furthermore, the across variables of A-Type elements included in the normal tree ω_J, and the through variables of T-Type elements not included in the normal tree τ_K are the state variables of this system.


Third, the normal tree facilitates the statement of the rotational mechanical system's constitutive, continuity, and compatibility laws. The constitutive laws are:

    dω_J/dt   = 1/Jτ_J 
    dτ_K/dt   = K ω_K 
    τ_b    = b ω_b

The continuity law is: 

    τ_J    = τ_s - τ_K - τ_b

The compatibility laws are:

    ω_K    = ω_J 
    ω_b    = ω_J


Finally, these laws are simplified algebraically to produce a state space model in Eq. <ref>.

    d/dt[ ω_J; τ_K ] = [ -b/J -1/J;    k    0 ][ ω_J; τ_K ] + [ 1/J;   0 ]τ_s




 §.§ Fluidic System

The linear graph methodology is also applied to the fluidic system in Fig. <ref>d. It is transformed into the linear graph shown in Fig. <ref>. In the fluidic system domain, Fig. <ref> shows that the through-variable is volumetric flow rate V̇, and the across-variable is pressure difference P.  Similarly, Fig. <ref> shows that a fluidic resistance in a pipe or valve, a fluidic capacitance in a tank, and a fluidic inertance are categorized as D-type, A-type, and T-type elements respectively. Consequently, a fluid flow source is a through-variable source.

Second, the linear graph shown in Fig. <ref> is translated into its associated normal tree in Fig. <ref>.
Given the prioritization defined in Sec. <ref>, the C_1, C_2, and R_1 elements are included, and consequently V̇_f, R_2, and I elements are necessarily removed. The across variables of A-Type elements included in the normal tree P_C_1 and P_C_2, and the through variables of T-Type elements not included in the normal tree V̇_̇ ̇İ, are the system state variables.  



Third, the constitutive, continuity, and compatibility laws are determined from the normal tree. The constitutive laws are:

    dp_C_1/dt   = 1/C_1V̇_C_1
    dp_C_2/dt   = 1/C_2V̇_C_2
    dV̇_ I/dt   = 1/IV̇_R_1
    
    P_R_1   = R_1 P_R_2
    V̇_R_2   = 1/R_2 P_R_2

The continuity laws are:

    V̇_C_1   = V̇_f - V̇_ I
    V̇_C_2   = V̇_R_1 - V̇_R_2
    V̇_R_1   = V̇_ I

The compatibility laws are:

    P_ I   = P_C_1 - P_C_2 - P_R_1
    
    P_R_2   = P_C_2


Finally, these equations are simplified into the state space model in Eq <ref>.

    d/dt[ P_C_1; P_C_2;  V̇_I ] = [          0          0     -1/C_1;          0 -1/C_2 R_2      1/C_2;       1/ I      -1/ I    -R_1/ I ][ P_C_1; P_C_2; V̇_ I ] + [ 1/C_1;     0;     0 ]V̇_f




 §.§ Thermal System

The linear graph methodology is also applied to the thermal system depicted in Fig. <ref>e.  To facilitate the process, this thermal system is first converted into an analogous electrical circuit as illustrated in Fig. <ref>.  Furthermore, the following notation is adopted.  


  * T_C_i: The temperature within the icebox, representing the temperature difference across the C_i element, which is the thermal capacitance of the icebox.

  * T_R_i: The temperature drop across icebox wall resistor.

  * T_C_h:  The temperature within the house, representing the temperature difference across the C_h element, which is the thermal capacitance of the house.

  * T_R_h: The temperature drop across the house wall resistor.

  * Q̇_C_i: The heat flow into the icebox.

  * Q̇_R_i: The heat flow through the icebox wall.

  * Q̇_C_h: The heat flow into the house.

  * Q̇_R_h: The heat flow through the house wall.


From this point, the linear graph methodology is straightforwardly applied.  The fluidic system in Fig. <ref> is transformed into the linear graph shown in Fig. <ref>.  Next, Fig. <ref> shows that, in thermal systems, the through-variable is heat flow rate Q̇, and the across-variable is temperature T. Furthermore, Fig. <ref> states that thermal resistances and capacitances are D-type and A-type elements respectively. Consequently, a fluid flow source is a through-variable source. 

Second, the associated normal tree is derived in Fig. <ref>.  Given the prioritization defined in Sec. <ref>, the C_h, and C_i elements are included, and consequently, Q̇_̇ṡ, R_h, and R_i elements are necessarily removed. The across variables of A-Type elements included in the normal tree T_C_i and T_C_h are the state variables of this system.



Third, the normal tree facilitates the statement of the thermal system's constitutive, continuity, and compatibility laws. The constitutive laws are:

    dT_C_i/dt   = 1/C_iQ̇_C_i
    dT_C_h/dt   = 1/C_hQ̇_C_h
    Q̇_R_h   = 1/R_h T_R_h
    Q̇_R_i   = 1/R_i T_R_i

The continuity laws are:

    Q̇_C_i   = Q̇_R_i
    Q̇_C_h   = Q̇_s - Q̇_R_i - Q̇_R_h

The compatibility laws are:

    T_R_h   = T_C_h
    
    T_R_i   = T_C_h - T_C_i


Finally, these equations are algebraically simplified to the state space model in Eq. <ref>

    d/dt[ T_C_i; T_C_h ] = [           -1/C_i R_i            1/C_i R_i;            1/R_i C_h -1/R_i C_h-1/C_h R_h ][ T_C_i; T_C_h ] + [     0; 1/C_h ]Q̇_s




 §.§ Multi-Energy System

First, the linear graph methodology is also applied to the electro-mechanical system shown in Fig. <ref>f.  It is transformed into the linear graph shown in Fig. <ref>. As electro-mechanical systems are a combination of electrical and (rotational) mechanical systems; current i and torque τ are the through variables, while voltage V and angular velocity ω are the across-variables.  Additionally, referring to Fig. <ref>, the electrical inductor and the rotational spring are the T-type energy storage elements.  The electrical capacitor and the rotating disk are A-type energy storage elements.  The electrical resistor and the mechanical damper are the D-type elements. The voltage V_S represents an ideal across-variable source.  Lastly, a transformer element connects the electrical subsystem to the rotational subsystem and transforms power between the two different domains.

Second, Fig. <ref> shows the normal tree associated with the electro-mechanical system.  Given the prioritization defined in Sec. <ref>, the V_S, the J, the electrical branch of the transformer, and the R elements are included.  Consequently, the L, the B, and the mechanical branch of the transformer are necessarily removed. As mentioned in the electrical and rotational mechanical system examples, ω_J, and i_L are the state variables of this system.


Third, the normal tree facilitates the statement of the electro-mechanical system's constitutive, continuity, and compatibility laws. The constitutive laws are:  

    dω_J/dt   = 1/Jτ_J 
    di_L/dt   = 1/L V_L 
    
    V_R    = R i_R 
    τ_B    = B ω_B 
    
    V_1    = 1/K_aω_2 
    τ_2    = -1/K_a i_1

The continuity laws are:

    τ_J    = -τ_2 - τ_B 
    
    i_R    = i_L 
    
    i_1    = i_L

The compatibility laws are:

    V_L    = V_s - V_1 - V_R 
    ω_2    = ω_J 
    ω_B    = ω_J


Finally, these equations are algebraically simplified to the state space model in Eq. <ref>.

    d/dt[ ω_J; i_L ] = [     -B/J  1/J K_a; -1/K_a L     -R/L ][ ω_J; i_L ] + [   0; 1/L ] V_s(t)




§ BOND GRAPHS BY EXAMPLE


In order to concretely describe the relationship between linear graphs, bond graphs, and hetero-functional graphs, the same illustrative examples are now modeled using the bond graph methodology.  According to Fig. <ref>, and the overview provided in Sec <ref>, the bond graph methodology follows these three main steps:


  * Construct the bond graph from the identified system elements.

  * State the 0-junction, 1-junction, and constitutive laws of the system using bond graph junctions.

  * Simplify the above-mentioned laws into a single state space model.

This section follows each of these three steps for the six illustrative examples identified in Fig. <ref>.  



 §.§ Electrical System

First, the bond graph associated with the electrical system illustrated in Fig. <ref>a is shown in Fig. <ref>. According to Fig. <ref>, in the electrical system domain, voltage V is the effort variable, and current i is the flow variable.  Additionally, as shown in Fig. <ref>, electrical resistors, capacitors, and inductors are categorized as generalized resistors, capacitors, and inductors respectively. Furthermore, in bond graphs, the state variables of this system are the effort variables of generalized C elements (V_C_1), and the flow variables of generalized inductors (i_L_1 and i_L_2).  

Second, the constitutive laws in Eq. <ref>-<ref> are retained, Eq. <ref>-<ref> are adopted as 0-junction laws, and Eq. <ref>-<ref> are adopted as 1-junction laws. Finally, these laws are simplified algebraically to produce the state space model in Eq. <ref>.  



 §.§ Translational Mechanical System


The bond graph methodology is also applied to the translational mechanical system shown in Fig. <ref>b. The bond graph associated with this system is illustrated in <ref>. According to Fig. <ref>, in the translational mechanical system domain, force F is the effort variable, and velocity V is the flow variable.  Referring back to Fig. <ref>, translational dampers, springs, and masses are categorized as generalized resistors, capacitors, and inductors respectively. The state variables of this system are the effort variables of generalized C elements (F_k_1 and F_k_2), and the flow variable of generalized inductors (V_m _1 and V_m_2).

After the bond graph is derived, the constitutive laws in Eq. <ref>-<ref> are retained, Eq. <ref>-<ref> are adopted as 0-junction laws, and Eq. <ref>-<ref> are adopted as 1-junction laws.  Finally, these laws are simplified algebraically to produce the state space model in Eq. <ref>.  



 §.§ Rotational Mechanical System


The bond graph associated with the rotational mechanical system illustrated in Fig. <ref>c is shown in Fig. <ref>. Fig. <ref> shows that in the rotational mechanical system domain, torque τ is the effort variable, and angular velocity ω is the flow variable.  Additionally, as shown in Fig. <ref>, rotational dampers, springs, and disks are categorized as generalized resistors, capacitors, and inductors respectively. Furthermore, the state variables of this system are the effort variable of generalized C elements (τ_K), and the flow variable of generalized inductors (ω_J).



Consequently, the constitutive laws in Eq. <ref>-<ref> are retained, Eq. <ref>-<ref> are adopted as 0-junction laws, and Eq. <ref> is adopted as 1-junction law.  Finally, these laws are simplified algebraically to produce the state space model in Eq. <ref>.  



 §.§ Fluidic System

Fig. <ref> is the associated bond graph of the fluidic system illustrated in Fig. <ref>d. According to Fig. <ref>, in the fluidic system domain, pressure P is the effort variable, and volumetric flow rate V̇ is the flow variable.  Additionally, as shown in Fig. <ref>, fluid resistance of pipes or valves, fluid tanks, and fluid inertances are categorized as generalized resistors, capacitors, and inductors respectively. Additionally, the state variables of this fluidic system are the effort variable of generalized C elements (P_C_1 and P_C_2), and the flow variable of generalized inductors (V̇_̇ ̇İ).



After constructing the bond graph, the constitutive laws in Eq. <ref>-<ref> are retained, Eq. <ref>-<ref> are adopted as 0-junction laws, and Eq. <ref>-<ref> are adopted as 1-junction laws. Finally, these laws are simplified algebraically to produce the state space model in Eq. <ref>.  



 §.§ Thermal System

First, the bond graph associated with the thermal system and its analogous electrical circuit illustrated in Fig. <ref>e and <ref>, are shown in Fig. <ref>. According to Fig. <ref>, in the thermal system domain, temperature T is the effort variable, and heat flow rate Q̇ is the flow variable.  Additionally, as shown in Fig. <ref>, thermal resistances, and thermal capacitances are categorized as generalized resistors and capacitors respectively. Next, the state variables of this system are the effort variables of generalized C elements (T_C_i and T_C_h).



Second, the constitutive laws in Eq. <ref>-<ref> are retained, Eq. <ref>-<ref> are adopted as 0-junction laws, and Eq. <ref>-<ref> are adopted as 1-junction laws. Finally, these laws are simplified algebraically to produce the state space model in Eq. <ref>.  



 §.§ Multi-Energy System


The bond graph methodology is applied similarly to the electro-mechanical system shown in Fig. <ref>f. The bond graph associated with this system is shown in Fig. <ref>. As electro-mechanical systems are a combination of electrical and (rotational) mechanical systems, voltage V and torque τ are the effort variables, and current i and angular velocity ω are the flow variables.  Additionally, as shown in Fig. <ref>, the electrical resistors and the rotational dampers are generalized resistors. The electrical capacitors and rotational springs are generalized capacitors. The electrical inductors and rotational disks are categorized as generalized inductors. Furthermore, due to the different views in bond graphs, a generalized gyrator connects the electrical subsystem to the mechanical subsystem. Lastly, As mentioned in the electrical and rotational system examples, (ω_J and i_L and i_L_2) are the state variables of this system.


Next, the constitutive laws in Eq. <ref>-<ref> are retained and Eq. <ref>-<ref> and Eq. <ref>-<ref> are adopted as 1-junction laws. Finally, these laws are simplified algebraically to produce the state space model in Eq. <ref>.  



§ HETERO-FUNCTIONAL GRAPHS BY EXAMPLE


In order to continue to concretely describe the relationship between linear graphs, bond graphs, and hetero-functional graphs, the same illustrative examples are now modeled using hetero-functional graph theory.  According to Fig. <ref>, and the overview provided in Sec <ref>, the hetero-functional graph methodology follows three main steps:  


  * Identify the system resources, the system processes, and their associated capabilities following Defn. <ref>-<ref>

  * Construct the engineering system net (and operand net if necessary) following Defn. <ref>-<ref>.

  * Setup and solve the hetero-functional network minimum cost flow problem as stated in Eq. <ref>-<ref> below.


Before proceeding with derivation for each of the illustrative examples, it is important to recognize that linear graphs and bond graphs make several inherent, and limiting assumptions that are not made in hetero-functional graph theory by default.  


  * X[k] ∈ℝ  ∀ k ∈{1 … K}. In physical systems, the primary decision variables are in the domain of real numbers.

  * Y[k] ∈ℝ  ∀ k ∈{1 … K}. 
Auxiliary decision variables are also in the domain of real numbers. 

  * Z=0. Linear graphs and bond graphs solve a set of simultaneous differential algebraic equations and do not require optimization.  Consequently, a dummy objective function is defined. 

  * Δ T → 0.  Linear graphs and bond graphs model differential algebraic equations where the simulation time step is infinitesimal.

  * k_dψ=0   ∀ k, ∀ψ.  The duration of each capability (Defn. <ref>) is instantaneous.  Consequently, Eq. <ref> becomes:

    U_ψ^+[k] = U_ψ^-[k]   ∀ k ∈{1, …, K}

Additionally, Eq. <ref> collapses to triviality and is eliminated.

  * Q_B[k] = Q_B[k+1]   ∀ k ∈{1 … K}. The engineering system does not accumulate operands at its buffers (Defn. <ref>).  Furthermore, it is important to recognize that the above treatment of linear graphs and bond graphs only uses power variables (i.e. effort and flow pairs), and Q_B[k] is a displacement variable in the Eulerian via and a momentum variable in the Lagrangian view.  Therefore, a 1-to-1 comparison of hetero-functional graphs to linear and bond graphs will not require the Q_B variable.  Consequently, Eq. <ref> becomes:

    M U[k] Δ T = 0   ∀ k ∈{1, …, K}

where M = M^+ - M^-.  

  * S_l_i = ∅. E_l_i = ∅. N_l_i = ∅ (Defn. <ref>) All of the operands used in linear graphs and bond graphs have no state evolution and do not require their associated operand nets.  Consequently, Eqs. <ref>, <ref>, and <ref> are eliminated. Similarly, without any operand net, there is no need for synchronization with the engineering system net firing vectors.  Consequently, Eqs.  <ref>, <ref> are eliminated as well.


  * The engineering system net boundary condition constraint in Equation <ref> applies only when the engineering system has through-variable sources.  In such cases, and in light of the above, the boundary condition constraint becomes:

    D_U.U[k] = C_U[k]   ∀ k ∈{1, …, K}

Furthermore, the engineering system net boundary condition constraint is used to capture any initial conditions on the engineering system net firing vector. 

    D_Ui.U[1] = C_Ui[1]


  * Without any operand net, its boundary condition constraint in Equation <ref> is eliminated. 

  * The initial condition constraint in Eq <ref> is also eliminated as Q_B is not retained as a decision variable. 

  * The final condition constraint in Eq. <ref> is also eliminated as Q_B is not retained as a decision variable.  Furthermore, all of the linear graph and bond graph models described above are initial value (rather than final value) problems. 

  * E_CP→ -∞, E_CP→∞.  The linear graph and bond graph methodologies do not place lower or upper bounds on the primary decision variables. Consequently, the inequality constraints on primary decision variables in Eq. <ref> are eliminated. 

  * The device model functions g(X,Y) in Eq. <ref> become the engineering system's constitutive laws. As elaborated below, they relate the engineering system net's primary variables (i.e. through variables) to its auxiliary variables (i.e. across variables).  

  * The device model function h(Y) in Eq. <ref> places bounds on the engineering system net's auxiliary variables.  Such constraints are used in linear graphs and bond graphs to impose times series from across variable sources.

    h(y[k]) = C_Y[k]     ∀ k ∈{1, …, K}

They are also used to impose initial conditions on the auxiliary variables. 

    h_i(y[1]) = C_yi[1]


In summary, the HFNMCF problem stated in Eq. <ref>-<ref> collapses to the following optimization problem in the context of linear and bond graph models.  


minimize  Z    = 0 

s.t. MU[k]ΔT    = 0           ∀k ∈{1, …, K} 
 
D_U.U[k]    = C_U[k]          ∀k ∈{1, …, K} 


D_Ui.U[1]    = C_U[1]


g(X,Y)   =0

h(Y)    = C_Y[k]          ∀k ∈{1, …, K} 

h_i(y[1])     = C_yi[1] 


As mentioned above, the device model constraint in the HFNMCF problem shown first in Eq. <ref> and now in Eq. <ref> represents the constitutive laws in linear graphs and bond graphs.  As there are only a small number of generalized elements (e.g. resistor, inductor, capacitor, transformer, and gyrator), it is worthwhile recognizing that these generalized elements take on generic forms in the context of hetero-functional graph theory.  For generalized resistors: 

    S_R · U[k]    =  Z_R· S_R · (-M)^T · y[k]   ∀ k ∈{1, …, K}

where S_R is a projection operator that serves to select out the relevant primary (i.e. through) variables from the engineering system net firing vector.  Furthermore, Z_R is a diagonal matrix of resistance values. The engineering system net incidence matrix adopts a negative sign so that the across variables y lose magnitude in the direction of flow.  Note that Eq. <ref>, quite appropriately, is an algebraic relation between across and through variables at the same discrete time step k.  Next, for generalized inductors (in the Eulerian view, and generalized capacitors in the Lagrangian view):

    S_L · (U[k+1]-U[k])Δ T    =  Z_L · S_L · (-M)^T · y[k]   ∀ k ∈{1, …, K-1}

where S_L  is a projection operator that serves to select out the relevant primary (i.e. through) variables from the engineering system net firing vector. Furthermore, Z_L is a diagonal matrix of inductance values. Note that Eq. <ref>, quite appropriately, is a difference equation that results from discretizing the generalized inductor law via an Euler transformation.  Next, for generalized capacitors (in the Eulerian view and generalized inductors in the Lagrangian view): 

    S_C · U[k]    =  Z_C · S_C · (-M)^T · (y[k+1]-y[k]) ·Δ t   ∀ k ∈{1, …, K-1}

where S_C is a projection operator that serves to select out the relevant primary (i.e. through) variables from the engineering system net firing vector.  Furthermore, Z_C is a diagonal matrix of capacitance values. Once again, Eq. <ref> results from the discretization of the generalized capacitance law via n Euler transformation.  Next, for generalized transformers:

    S_T y[k]    = 0   ∀ k ∈{1, …, K}

where S_T_1 is the projection operator that serves to select out the transformer's relevant auxiliary (i.e. across) variables from the engineering system net. Finally, for generalized gyrators:

    S_G_1U[k] = S_G_2 y[k]   ∀ k ∈{1, …, K}


where S_G_1 and S_G_2 are the projection operators that serve to select out the gyrator's relevant primary (i.e. through) and auxiliary (i.e. across) variables and from the engineering system net.

Given this specialized application of hetero-functional graphs to linear graphs and bond graphs, each of the six illustrative examples shown in Fig. <ref> can be solved as the HFNMCF problem using the three steps identified at the top of the section.   



 §.§ Electrical System

The first step is to recognize that the electrical system shown in Fig. <ref>a is first, a specialization into the electrical domain, followed by an instantiation of the engineering system meta-architecture in Fig. <ref>.  Consequently, Defn. <ref>-<ref> are understood as follows.  There are five electrical points that have distinct absolute values of across-variables that serve as independent buffers: V_S, V_R_L, V_C_1, V_L_2 and V_0.  Additionally, there is one across-variable source V_S that serves as a transformation resource.  Additionally, the transportation resources include generalized resistors R_1, R_2, R_3, generalized inductors L_1, L_2, and a generalized capacitor C_1.  Fig. <ref> shows that each of these transformation and transportation resources has exactly one system process; inject power with imposed through variable, dissipate power, store potential energy, and store kinetic energy.  The result is that each of these transformation and transportation resources introduces exactly one system capability with a primary through variable and an auxiliary across variable as attributes.  

In the next step, the electrical system shown in Fig. <ref>a is transformed into the engineering system net shown in Fig. <ref>. 

While it is possible to produce Fig. <ref> from the electrical circuit in Fig. <ref>a by visual inspection; such an approach falls apart in systems with multiple energy domains or capabilities with multiple inputs and outputs.  Instead, the Engineering System Net and its state transition function is constructed according to Defn. <ref> and <ref>.  Note that the hetero-functional graph theory toolbox <cit.> can automatically calculate the positive and negative hetero-functional incidence matrices from an XML input file that instantiates the information from Defn. <ref> - <ref>.   The Engineering System Net in Fig. <ref> shows the system buffers as places, the capabilities as transitions, and the incidence between them.  

In the third step, the hetero-functional network minimum cost flow problem is set up and solved.  More specifically, Eq. <ref>-<ref> are written out explicitly.  


    minimize  Z = 0


    s.t. [ +1 -1  0  0  0  0  0;  0 +1 -1  0  0  0  0;  0  0 +1 -1 -1  0 -1;  0  0  0  0 +1 -1  0;    ][ i_V_S; i_R_1; i_L_1; i_C_1; i_R_2; i_L_2; i_R_3;       ][k]Δ T = 0     ∀ k ∈{1, …, K}


    [ 0 0 1 0 0 0 0; 0 0 0 0 0 1 0 ][ i_V_S; i_R_1; i_L_1; i_C_1; i_R_2; i_L_2; i_R_3 ][1]
    =
    [ 0; 0 ]


    [ 0 1 0 0 0 0 0; 0 0 0 0 1 0 0; 0 0 0 0 0 0 1 ][ i_V_S; i_R_1; i_L_1; i_C_1; i_R_2; i_L_2; i_R_3 ][k]
    =
    [ 1/R_1     0     0;     0 1/R_2     0;     0     0 1/R_3 ][ 0 1 0 0 0 0 0; 0 0 0 0 1 0 0; 0 0 0 0 0 0 1 ][ -1  0  0  0; +1 -1  0  0;  0 +1 -1  0;  0  0 +1  0;  0  0 +1 -1;  0  0  0 -1;  0  0 +1  0 ][   V_S;  V_RL; V_C_1; V_L_2 ][k]    
    ∀ k ∈{1, …, K}


    [ 0 0 1 0 0 0 0 0; 0 0 0 0 0 1 0 0 ](
    [ i_V_S; i_R_1; i_L_1; i_C_1; i_R_2; i_L_2; i_R_3 ][k+1]
    -
    [ i_V_S; i_R_1; i_L_1; i_C_1; i_R_2; i_L_2; i_R_3 ][k]
    )
    =
    [ 1/L_1     0;     0 1/L_2 ][ 0 0 1 0 0 0 0; 0 0 0 0 0 1 0 ][ -1  0  0  0; +1 -1  0  0;  0 +1 -1  0;  0  0 +1  0;  0  0 +1 -1;  0  0  0 -1;  0  0 +1  0 ][   V_S;  V_RL; V_C_1; V_L_2 ][k]Δ T    
    ∀ k ∈{1, …, K-1}


    [ 0 0 0 1 0 0 ][ i_V_S; i_R_1; i_L_1; i_C_1; i_R_2; i_L_2; i_R_3 ][k] Δ T
    = 
    [ C_1 ][ 0 0 0 1 0 0 0 ][ -1  0  0  0; +1 -1  0  0;  0 +1 -1  0;  0  0 +1  0;  0  0 +1 -1;  0  0  0 -1;  0  0 +1  0 ](
    [   V_S;  V_RL; V_C_1; V_L_2 ][k+1]
    -
    [   V_S;  V_RL; V_C_1; V_L_2 ][k]
    )    
    ∀ k ∈{1, …, K-1}


    [ 1 0 0 0 ][   V_S;  V_RL; V_C_1; V_L_2 ][k]
    = 1     ∀ k ∈{1, …, K}


    [ 0 0 1 0 ][   V_S;  V_RL; V_C_1; V_L_2 ][k=1]
    = 0


This explicit statement of the HFNMCF problem in the context of the electrical system shown in Fig. <ref>a provides the following insights:


  * Eq. <ref> shows that the electrical system does not have an objective function and is simply a set of simultaneous equations.  

  * Eq. <ref> is a matrix restatement of the continuity laws in Eq. <ref> - <ref>.  Note that Eq. <ref> introduces an additional matrix row to account for the current provided by the voltage source i_V_S.  While this variable is not required in the linear graph and bond graph methodologies, the HFGT derivation requires across and through variables for all capabilities.  Also note that Eq. <ref> does not include the current balance associated with the voltage ground V_0.  This is because incidence matrices of closed systems (i.e. circuits) have a rank of N-1<cit.> and so the last redundant equation must be eliminated to make Eq. <ref> full rank.  Finally, the hetero-functional incidence matrix M can be automatically produced from the HFGT toolbox <cit.> for systems of arbitrary size.

  * There are no equations that impose exogenous values on the currents because there are no current sources.  

  * Eq. <ref> is the initial condition on the inductors' current as the state variables.  

  * Eq. <ref> is a matrix restatement of the constitutive law for resistors (i.e. Ohm's Law) in Eq. <ref>, <ref>, and <ref>.

  * Eq. <ref> is a matrix restatement of the constitutive law for inductors in Eq. <ref> and <ref>.

  * Eq. <ref> is a matrix restatement of the constitutive law for capacitors in Eq. <ref>.

  * The selector matrices in Eq. <ref>-<ref> can be automatically produced from the HFGT toolbox <cit.>for systems of arbitary size.  

  * Eq. <ref> imposes exogenous values on the voltages due to the presence of voltage sources.  

  * Eq. <ref> is the initial condition on the capacitor voltage as a state variable. 

  * The compatibility laws stated in Eq. <ref> - <ref> are superfluous because all of the voltages have been stated in absolute terms relative to the ground rather than as voltage differences between electrical points.  

Ultimately, the HFNMCF problem restates, in discrete time, and in matrix form, the simultaneous continuity and constitutive equations from the linear graph derivation and eliminates entirely the need for compatibility equations.  Furthermore, the HFNMCF problem reveals that only the continuity laws create relationships between capabilities (Defn. <ref>) in the engineering system.  The remaining constraints, those tied to initial conditions, exogenous values, and constitutive laws, address capabilities individually.  Consequently, the HFGT toolbox<cit.> makes setting up the HFNMCF problem relatively straightforward because it can automatically generate the hetero-functional graph structure and keep track of the indices and types of each capability.  

Once the HFNMCF problem for the electrical system has been set up, it can be simulated straightforwardly and compared against the state space ODE model derived by linear graph and/or bond graph.  The following parameter values are chosen:
R_1 = 200  Ω, R_2 = 200  Ω, R_3 = 220  Ω, L_1 = 100  mH, L_2 = 150  mH, C_1 = 10  μF, and V_s = 1  V (step input voltage). The simulation time is t = 0.01 seconds, and the time step Δ T = 1e-4 seconds.  The HFNMCF results for the primary (current) and auxiliary (voltage) decision variables are shown as solid lines in Fig. <ref>.  The associated state space ODE results are shown in dashed lines with embedded triangles.  





 §.§ Translational Mechanical System


The first step is to recognize that the translational mechanical system shown in Fig. <ref>b is first, a specialization into the mechanical domain, followed by an instantiation of the engineering system meta-architecture in Fig. <ref>.  Consequently, Defn. <ref>-<ref> are understood as follows.  There are four points that have distinct absolute values of across-variables that serve as independent buffers: V_m_1, V_k_2b_2, V_m_2 and V_g.  Additionally, there is one through-variable source F_S that serves as a transformation resource.  Additionally, the transportation resources include generalized resistors b_1, b_2, generalized inductors k_1, k_2, and generalized capacitors m_1, m_2.  Fig. <ref> shows that each of these transformation and transportation resources has exactly one system process; inject power with imposed through variable, dissipate power, store potential energy, and store kinetic energy.  The result is that each of these transformation and transportation resources introduces exactly one system capability with a primary through variable and an auxiliary across variable as attributes.  

In the next step, the translational mechanical system shown in Fig. <ref>b is transformed into the engineering system net shown in Fig. <ref>. 

While it is possible to produce Fig. <ref> from either the translational mechanical system in Fig. <ref>b or the associated linear graph in Fig. <ref> by visual inspection; such an approach falls apart in systems with multiple energy domains or capabilities with multiple inputs and outputs.  Instead, the Engineering System Net and its state transition function is constructed according to Defn. <ref> and <ref>.  Note that the hetero-functional graph theory toolbox <cit.> can automatically calculate the positive and negative hetero-functional incidence matrices from an XML input file that instantiates the information from Defn. <ref> - <ref>.   The Engineering System Net in Fig. <ref> shows the system buffers as places, the capabilities as transitions, and the incidence between them.  

In the third step, the hetero-functional network minimum cost flow problem is set up and solved.  More specifically, Eq. <ref>-<ref> are written out explicitly.  


    minimize  Z = 0


    s.t. [ +1 -1 +1  0  0  0  0;  0  0 -1 +1  0  0  0;  0  0  0 -1 -1 -1 -1 ][   F_S; F_m_2; F_b_2; F_k_2; F_m_1; F_b_1; F_k_1 ][k]Δ T = 0     ∀ k ∈{1, …, K}



    [ 1 0 0 0 0 0 0 ][   F_S; F_m_2; F_b_2; F_k_2; F_m_1; F_b_1; F_k_1 ][k]
    = 
    1   ∀ k ∈{1, …, K}



    [ 0 0 0 1 0 0 0; 0 0 0 0 0 0 1 ][   F_S; F_m_2; F_b_2; F_k_2; F_m_1; F_b_1; F_k_1 ][k=1]
    = 
    [ 0; 0 ]


    [ 0 0 0 0 0 1 0; 0 0 1 0 0 0 0;   ][   F_S; F_m_2; F_b_2; F_k_2; F_m_1; F_b_1; F_k_1 ][k]
    =
    [ b_1   0;   0 b_2 ][ 0 0 0 0 0 1 0; 0 0 1 0 0 0 0;   ][ -1  0  0; +1  0  0; -1 +1  0;  0 -1 +1;  0  0 +1;  0  0 +1;  0  0 +1;    ][    V_m_2; V_k_2b_2;    V_m_1 ][k]    
    ∀ k ∈{1, …, K}


    [ 0 0 0 0 0 0 1; 0 0 0 1 0 0 0;   ](
    [   F_S; F_m_2; F_b_2; F_k_2; F_m_1; F_b_1; F_k_1;       ][k+1]
    -
    [   F_S; F_m_2; F_b_2; F_k_2; F_m_1; F_b_1; F_k_1;       ][k]
    )
    =
    [ k_1   0;   0 k_2 ][ 0 0 0 0 0 0 1; 0 0 0 1 0 0 0;   ][ -1  0  0; +1  0  0; -1 +1  0;  0 -1 +1;  0  0 +1;  0  0 +1;  0  0 +1;    ][    V_m_2; V_k_2b_2;    V_m_1 ][k]Δ T    
    ∀ k ∈{1, …, K-1}


    [ 0 0 0 0 1 0 0; 0 1 0 0 0 0 0;   ][   F_S; F_m_2; F_b_2; F_k_2; F_m_1; F_b_1; F_k_1;       ][k] Δ T
    = 
    [ m_1   0;   0 m_2 ][ 0 0 0 0 1 0 0; 0 1 0 0 0 0 0;   ][ -1  0  0; +1  0  0; -1 +1  0;  0 -1 +1;  0  0 +1;  0  0 +1;  0  0 +1;    ](
    [   V_S; V_R_1; V_C_1; V_L_2 ][k+1]
    -
    [    V_m_2; V_k_2b_2;    V_m_1 ][k]
    )    
    ∀ k ∈{1, …, K-1}



    [ 1 0 0; 0 0 1 ][    V_m_2; V_k_2b_2;    V_m_1 ][k=1]
    = 
    [ 0; 0 ]


This explicit statement of the HFNMCF problem in the context of the translational mechanical system shown in Fig. <ref>b provides the following insights:


  * Eq. <ref> shows that the mechanical system does not have an objective function and is simply a set of simultaneous equations.  

  * Eq. <ref> is a matrix restatement of the continuity laws (i.e. Newton’s First Law) in Eq. <ref> - <ref>.  Again, the force balance on the ground place is redundant and therefore eliminated.

  * Eq. <ref> imposes exogenous values on the force due to the presence of force sources.  


  * Eq. <ref> is the initial condition on the spring force as a state variable.  

  * Eq. <ref> is a matrix restatement of the constitutive law for mechanical dampers in Eq. <ref>, and <ref>.

  * Eq. <ref> is a matrix restatement of the constitutive law for springs in Eq. <ref> and <ref>.

  * Eq. <ref> is a matrix restatement of the constitutive law for masses in Eq. <ref> and <ref>.

  * There are no equations that impose exogenous values on the velocities because there are no velocity sources.

  * Eq. <ref> is the initial condition on the mass velocities as state variables. 

  * The compatibility laws stated in Eq. <ref> - <ref> are superfluous because all of the velocities have been stated in absolute terms relative to the ground reference frame rather than as velocity differences between points.  





Once the HFNMCF problem for the translational mechanical system has been set up, it can be simulated straightforwardly and compared against the state space ODE model derived by linear graph and/or bond graph.  The following parameter values are chosen: m_1 = 1  kg, m_2 = 2  kg, k_1 = 20  N/m, k_2 = 10  N/m, b_1 = 1  Ns/m, b_2 = 10  Ns/m, and F_s = 1  N (Step input force). The simulation time K = 20 seconds, and the time step Δ T = 0.02 seconds.  The HFNMCF results for the primary (force) and auxiliary (velocity) decision variables are shown as solid lines in Fig. <ref>.  The associated state space ODE results are shown in dashed lines with embedded triangles.  





 §.§ Rotational Mechanical System

The first step is to recognize that the rotational mechanical system shown in Fig. <ref>c is first, a specialization into the rotational mechanical domain, followed by an instantiation of the engineering system meta-architecture in Fig. <ref>.  Consequently, Defn. <ref>-<ref> are understood as follows.  There are two points that have distinct absolute values of across-variables that serve as independent buffers: ω_J, and ω_g.  Additionally, there is one through-variable source τ_s that serves as a transformation resource.  Additionally, the transportation resources include a generalized resistor b, a generalized inductor K, and a generalized capacitor J.  Fig. <ref> shows that each of these transformation and transportation resources has exactly one system process; inject power with imposed through variable, dissipate power, store potential energy, and store kinetic energy.  The result is that each of these transformation and transportation resources introduces exactly one system capability with a primary through-variable and an auxiliary across-variable as attributes.  

In the next step, the rotational mechanical system shown in Fig. <ref>c is transformed into the engineering system net shown in Fig. <ref>. 

While it is possible to produce Fig. <ref> from the rotational mechanical system in Fig. <ref>c or the linear graph in Fig. <ref> by visual inspection; such an approach falls apart in systems with multiple energy domains or capabilities with multiple inputs and outputs.  Instead, the Engineering System Net and its state transition function is constructed according to Defn. <ref> and <ref>.  Again, the hetero-functional graph theory toolbox <cit.> automatically calculates the positive and negative hetero-functional incidence matrices from an XML input file that instantiates the information from Defn. <ref> - <ref>.   The Engineering System Net in Fig. <ref> shows the system buffers as places, the capabilities as transitions, and the incidence between them.  

In the third step, the hetero-functional network minimum cost flow problem is set up and solved.  More specifically, Eq. <ref>-<ref> are written out explicitly.  


    minimize  Z = 0


    s.t. [ +1 -1 -1 -1 ][ τ_s; τ_J; τ_K; τ_b ][k]Δ T = 0     ∀ k ∈{1, …, K}



    [ 1 0 0 0 ][ τ_s; τ_J; τ_K; τ_b ][k]
    = 1   ∀ k ∈{1, …, K}




    [ 0 0 1 0 ][ τ_s; τ_J; τ_K; τ_b ][k=1]
    = 
    0


    [ 0 0 0 1 ][ τ_s; τ_J; τ_K; τ_b ][k]
    =
    [ b_ω ][ 0 0 0 1 ][ -1; +1; +1; +1 ][ ω_J ][k]    
    ∀ k ∈{1, …, K}


    [ 0 0 1 0 ](
    [ τ_s; τ_J; τ_K; τ_b ][k+1]
    -
    [ τ_s; τ_J; τ_K; τ_b ][k]
    )
    =
    [ K_ω ][ 0 0 1 0 ][ -1; +1; +1; +1 ][ ω_J ][k]Δ T    
    ∀ k ∈{1, …, K-1}


    [ 0 1 0 0 ][ τ_s; τ_J; τ_K; τ_b ][k] Δ T
    = 
    [ J ][ 0 1 0 0 ][ -1; +1; +1; +1 ](
    [ ω_J ][k+1]
    -
    [ ω_J ][k]
    )    
    ∀ k ∈{1, …, K-1}



    [ ω_J ][k=1]
    = 
    0


This explicit statement of the HFNMCF problem in the context of the rotational mechanical system shown in Fig. <ref>c provides the following insights:


  * Eq. <ref> shows that mechanical system does not have an objective function and is simply a set of simultaneous equations.  

  * Eq. <ref> is a matrix restatement of the continuity law in Eq. <ref>.  Again, the torque balance on the ground place is redundant and therefore eliminated.  

  * Eq. <ref> imposes exogenous values on the torque due to the presence of torque sources.  


  * Eq. <ref> is the initial condition on the rotational spring torque as a state variable.  

  * Eq. <ref> is a matrix restatement of the constitutive law for rotational dampers in Eq. <ref>.

  * Eq. <ref> is a matrix restatement of the constitutive law for rotational springs in Eq. <ref>.

  * Eq. <ref> is a matrix restatement of the constitutive law for rotational inertias in Eq. <ref>.

  * The selector matrices in Eq. <ref>-<ref> can be automatically produced from the HFGT toolbox <cit.> for systems of arbitrary size.  

  * There are no equations that impose exogenous values on the angular velocity because there are no angular velocity sources.

  * Eq. <ref> is the initial condition on the disk angular velocity as a state variable. 

  * The compatibility laws stated in Eq. <ref> and <ref> are superfluous because all of the angular velocities have been stated in absolute terms relative to the ground reference frame rather than as angular velocity differences between points.  



Once the HFNMCF problem for the rotational mechanical system has been set up, it can be simulated straightforwardly and compared against the state space ODE model derived by linear graph and/or bond graph.  The following parameter values are chosen:  J = 0.5  kg·m^2, k = 2  N·m/rad, b = 0.5  N·m·s/rad, and τ_s = 1  N·m (Step input torque). The simulation time K = 15 seconds, and the time step Δ T = 0.1 seconds.  The HFNMCF results for the primary (torque) and auxiliary (angular velocity) decision variables are shown as solid lines in Fig. <ref>.  The associated state space ODE results are shown in dashed lines with embedded triangles. 





 §.§ Fluidic System

The first step is to recognize that the fluidic system shown in Fig. <ref>d is first, a specialization into the fluidic domain, followed by an instantiation of the engineering system meta architecture in Fig. <ref>.  Consequently, Defn. <ref>-<ref> are understood as follows. There are four fluidic points that have distinct absolute values of across-variables that serve as independent buffers: P_1, P_ℐ R_1, P_2, and P_0.  Additionally, there is one through-variable source V̇_f that serves as a transformation resource.  Additionally, the transportation resources include generalized resistors R_1 and R_2, a generalized inductor I, and generalized capacitors C_1 and C_2.  Fig. <ref> shows that each of these transformation and transportation resources has exactly one system process; inject power with imposed through variable, dissipate power, store potential energy, and store kinetic energy.  The result is that each of these transformation and transportation resources introduces exactly one system capability with a primary through-variable and an auxiliary across-variable as attributes.  

In the next step, the fluidic system shown in Fig. <ref>d is transformed into the engineering system net shown in Fig. <ref>. 

While it is possible to produce Fig. <ref> from the fluidic system in Fig. <ref>d and the linear graph in Fig. <ref> by visual inspection; such an approach falls apart in systems with multiple energy domains or capabilities with multiple inputs and outputs.  Instead, the Engineering System Net and its state transition function is constructed according to Defn. <ref> and <ref>.  Again, the hetero-functional graph theory toolbox <cit.> automatically calculates the positive and negative hetero-functional incidence matrices from an XML input file that instantiates the information from Defn. <ref> - <ref>.   The Engineering System Net in Fig. <ref> shows the system buffers as places, the capabilities as transitions, and the incidence between them.  

In the third step, the hetero-functional network minimum cost flow problem is set up and solved.  More specifically, Eq. <ref>-<ref> are written out explicitly.  


    minimize  Z = 0


    s.t. [ +1 -1 -1  0  0  0;  0 +1  0 -1  0  0;  0  0  0 +1 -1 -1 ][   V̇_f;  V̇_ I; V̇_C_1; V̇_R_1; V̇_C_2; V̇_R_2 ][k]Δ T = 0     ∀ k ∈{1, …, K}



    [ 1 0 0 0 0 0 ][   V̇_f;  V̇_ I; V̇_C_1; V̇_R_1; V̇_C_2; V̇_R_2 ][k]
    =
    1   ∀ k ∈{1, …, K}




    [ 0 1 0 0 0 0 ][   V̇_f;  V̇_ I; V̇_C_1; V̇_R_1; V̇_C_2; V̇_R_2 ][k=1]
    = 
    0



    [ 0 0 0 1 0 0; 0 0 0 0 0 1;   ][   V̇_f;  V̇_ I; V̇_C_1; V̇_R_1; V̇_C_2; V̇_R_2 ][k]
    =
    [ 1/R_1     0;     0 1/R_2 ][ 0 0 0 1 0 0; 0 0 0 0 0 1;   ][ -1  0  0; +1 -1  0; +1  0  0;  0 +1 -1;  0  0 +1;  0  0 +1;    ][     P_1; P_ℐ R_1;     P_2 ][k]    
    ∀ k ∈{1, …, K}


    [ 0 1 0 0 0 0 ](
    [   V̇_f;  V̇_ I; V̇_C_1; V̇_R_1; V̇_C_2; V̇_R_2 ][k+1]
    -
    [   V̇_f;  V̇_ I; V̇_C_1; V̇_R_1; V̇_C_2; V̇_R_2 ][k]
    )
    =
    [ 1/ I ][ 0 1 0 0 0 0 ][ -1  0  0; +1 -1  0; +1  0  0;  0 +1 -1;  0  0 +1;  0  0 +1;    ][     P_1; P_ℐ R_1;     P_2 ][k]Δ T    
    ∀ k ∈{1, …, K-1}


    [ 0 0 1 0 0 0; 0 0 0 0 1 0;   ][   V̇_f;  V̇_ I; V̇_C_1; V̇_R_1; V̇_C_2; V̇_R_2 ][k] Δ T
    = 
    [ C_1   0;   0 C_2 ][ 0 0 1 0 0 0; 0 0 0 0 1 0;   ][ -1  0  0; +1 -1  0; +1  0  0;  0 +1 -1;  0  0 +1;  0  0 +1;    ](
    [     P_1; P_ℐ R_1;     P_2 ][k+1]
    -
    [     P_1; P_ℐ R_1;     P_2 ][k]
    )    
    ∀ k ∈{1, …, K-1}
















    [ 1 0 0; 0 0 1 ][     P_1; P_ℐ R_1;     P_2 ][k=1]
    = 
    [ 0; 0 ]


This explicit statement of the HFNMCF problem in the context of the fluidic system shown in Fig. <ref>d provides the following insights:


  * Eq. <ref> shows that the fluidic system does not have an objective function and is simply a set of simultaneous equations.  

  * Eq. <ref> is a matrix restatement of the continuity laws in Eq. <ref> - <ref>.  Again, the volumetric flow rate balance on the ground place is redundant and therefore eliminated.  

  * Eq. <ref> imposes exogenous values on the volumetric flow rate due to the presence of a volumetric flow rate source.

  * Eq. <ref> is the initial condition on the pipe inductance volumetric flow rate as a state variable.  

  * Eq. <ref> is a matrix restatement of the constitutive law for the elements' fluidic resistances in Eq. <ref>, and <ref>.

  * Eq. <ref> is a matrix restatement of the constitutive law for the elements' fluidic inductances in Eq. <ref>.

  * Eq. <ref> is a matrix restatement of the constitutive law for the tanks in Eq. <ref> and <ref>.

  * The selector matrices in Eq. <ref>-<ref> can be automatically produced from the HFGT toolbox <cit.>for systems of arbitary size.  

  * There are no equations that impose exogenous values on the pressure because there are no pressure sources.

  * Eq. <ref> is the initial condition on the tank pressures as state variables. 

  * The compatibility laws stated in Eq. <ref> and <ref> are superfluous because all of the pressures have been stated in absolute terms relative to the reference ambient pressure rather than as pressure differences between fluidic points.  




Once the HFNMCF problem for the fluidic system has been set up, it can be simulated straightforwardly and compared against the state space ODE model derived by linear graph and/or bond graph.  The following parameter values are chosen:  R_1 = 2  s/m^2, R_2 = 1  s/m^2, C_1 = 0.02  m^3, C_2 = 0.05  m^3, ℐ = 2  N·s^2/m^5, and v̇_f = 1  m^3/s (Step input volumetric flow rate). The simulation time K = 10 seconds, and the time step Δ T = 0.02 seconds.  The HFNMCF results for the primary (volumetric flow rate) and auxiliary (pressure) decision variables are shown as solid lines in Fig. <ref>.  The associated state space ODE results are shown in dashed lines with embedded triangles.








 §.§ Thermal System

The first step is to recognize that the thermal system shown in Fig. <ref>e is first, a specialization into the thermal domain, followed by an instantiation of the engineering system meta architecture in Fig. <ref>.  Consequently, Defn. <ref>-<ref> are understood as follows.  There are three thermal points that have distinct absolute values of across-variables that serve as independent buffers: T_C_h, T_C_i, and T_0.  Additionally, there is one through-variable source Q̇_̇ṡ that serves as a transformation resource.  Additionally, the transportation resources include generalized resistors R_i and R_h, and generalized capacitors C_i and C_h.  Fig. <ref> shows that each of these transformation and transportation resources has exactly one system process; inject power with imposed through variable, dissipate power, and store (thermal) potential energy.  The result is that each of these transformation and transportation resources introduces exactly one system capability with a primary through-variable and an auxiliary across-variable as attributes.  

In the next step, the thermal system shown in Fig. <ref>e is transformed into the engineering system net shown in Fig. <ref>. 

While it is possible to produce Fig. <ref> from the thermal system in Fig. <ref>e, it's analogous electrical circuit in Fig. <ref> and/or its linear graph in Fig. <ref> by visual inspection; such an approach falls apart in systems with multiple energy domains or capabilities with multiple inputs and outputs.  Instead, the Engineering System Net and its state transition function is constructed according to Defn. <ref> and <ref>.  Note that the hetero-functional graph theory toolbox <cit.> can automatically calculate the positive and negative hetero-functional incidence matrices from an XML input file that instantiates the information from Defn. <ref> - <ref>.   The Engineering System Net in Fig. <ref> shows the system buffers as places, the capabilities as transitions, and the incidence between them.  

In the third step, the hetero-functional network minimum cost flow problem is set up and solved.  More specifically, Eq. <ref>-<ref> are written out explicitly.  


    minimize  Z = 0


    s.t. [ +1 -1  0 -1 -1;  0 +1 -1  0  0;    ][   Q̇_s; Q̇_R_i; Q̇_C_i; Q̇_C_h; Q̇_R_h ][k]Δ T = 0     ∀ k ∈{1, …, K}



    [ 1 0 0 0 0 ][   Q̇_s; Q̇_R_i; Q̇_C_i; Q̇_C_h; Q̇_R_h ][k]
    = [ 1 ]  ∀ k ∈{1, …, K}







    [ 0 1 0 0 0; 0 0 0 0 1;   ][   Q̇_s; Q̇_R_i; Q̇_C_i; Q̇_C_h; Q̇_R_h ][k]
    =
    [ 1/R_i     0;     0 1/R_h ][ 0 1 0 0 0; 0 0 0 0 1;   ][ -1  0; +1 -1;  0 +1; +1  0; +1  0;    ][ T_C_h; T_C_i ][k]    
    ∀ k ∈{1, …, K}
















































    [ 0 0 1 0 0; 0 0 0 1 0 ][   Q̇_s; Q̇_R_i; Q̇_C_i; Q̇_C_h; Q̇_R_h ][k] Δ T
    = 
    [ C_i   0;   0 C_h ][ 0 0 1 0 0; 0 0 0 1 0 ][ -1  0; +1 -1;  0 +1; +1  0; +1  0 ](
    [ T_C_h; T_C_i ][k+1]
    -
    [ T_C_h; T_C_i ][k]
    )    
    ∀ k ∈{1, …, K-1}



    [ 1 0; 0 1 ][ T_C_h; T_C_i ][1]
    = 
    [ 0; 0 ]


This explicit statement of the HFNMCF problem in the context of the thermal system shown in Fig. <ref>e provides the following insights:


  * Eq. <ref> shows that the thermal system does not have an objective function and is simply a set of simultaneous equations.  

  * Eq. <ref> is a matrix restatement of the continuity laws in Eq. <ref> and <ref>.  Again, the heat balance on the ground place is redundant and therefore eliminated.  

  * Eq. <ref> imposes exogenous values on the heat flow rate due to the presence of heat flow sources.  

  * Due to the absence of generalized inductors in thermal systems, there are no equations for their initial condition.

  * Eq. <ref> is a matrix restatement of the constitutive law for element's thermal resistances in Eq. <ref> and <ref>.

  * There are no equations that restate the constitutive laws for thermal inductors because there are no generalized inductors in thermal systems.

  * Eq. <ref> is a matrix restatement of the constitutive law for the thermal capacitance of system elements in Eq. <ref> and <ref>.

  * The selector matrices in Eq. <ref>-<ref> can be automatically produced from the HFGT toolbox <cit.> for systems of arbitrary size.  

  * There are no equations that impose exogenous values on the temperature because there are no temperature sources.


  * Eq. <ref> is the initial condition on the thermal capacitors' temperature as the state variables. 

  * The compatibility laws stated in Eq. <ref> and <ref> are superfluous because all of the temperatures have been stated in absolute terms relative to 0  C as a reference temperature rather than as temperature differences between points.  




Once the HFNMCF problem for the fluidic system has been set up, it can be simulated straightforwardly and compared against the state space ODE model derived by linear graph and/or bond graph.  The following parameter values are chosen:
R_i = 0.5  K/W, R_h = 0.2  K/W, C_i = 1  J/K, C_h = 2  J/K, Q̇_S = 1  W  (Step input heat flow rate).The simulation time K = 5 seconds, and the time step Δ T = 0.1 seconds. The HFNMCF results for the primary (heat flow rate) and auxiliary (temperature) decision variables are shown as solid lines in Fig. <ref>.  The associated state space ODE results are shown in dashed lines with embedded triangles.








 §.§ Multi-Energy System


The first step is to recognize that the electro-mechanical system shown in Fig. <ref>f is first, a specialization into the multi-system domain, followed by an instantiation of the engineering system meta-architecture in Fig. <ref>.  Consequently, Defn. <ref>-<ref> are understood as follows.  There are four electrical points that have distinct absolute values of across-variables that serve as independent buffers: V_S, V_RL, V_LM, V_0. Also, there are two mechanical points that have distinct absolute values of across-variables that serve as independent buffers: ω_J and ω_0. Additionally, there is one across variable source V_S that serves as a transformation resource.  Additionally, the transportation resources include generalized resistors R and B, a generalized inductor L, a generalized capacitor J, and a generalized transformer (i.e. motor) with motor constant 1/k_a.  Fig. <ref> shows that each of these transformation and transportation resources has exactly one system process; inject power with imposed through variable, dissipate power, store potential energy, and store kinetic energy.  The result is that each of these transformation and transportation resources introduces exactly one system capability with a primary through-variable and an auxiliary across-variable as attributes.  

In the next step, the electro-mechanical system shown in Fig. <ref>a is transformed into the engineering system net shown in Fig. <ref>. 

Notice that the transformer (i.e. motor) acts as a transition with two inputs and two outputs: the motor current in and out, and the motor torque in and out.  Also note that the through variable associated with the motor torque no longer appears explicitly, and instead appears implicitly in the form of the arc weights label with the motor constant k_a.  While Fig. <ref> strongly resembles the electro-mechanical diagram in Fig. <ref>f and the linear graph in Fig. <ref>, it can also be produced directly from HFGT.  The Engineering System Net and its state transition function is constructed according to Defn. <ref> and <ref>.  Note that the hetero-functional graph theory toolbox <cit.> can automatically calculate the positive and negative hetero-functional incidence matrices from an XML input file that instantiates the information from Defn. <ref> - <ref>.   The Engineering System Net in Fig. <ref> shows the system buffers as places, the capabilities as transitions, and the incidence between them.

In the third step, the hetero-functional network minimum cost flow problem is set up and solved.  More specifically, Eq. <ref>-<ref> are written out explicitly.  


    minimize  Z = 0


    s.t. [     +1     -1      0      0      0      0;      0     +1     -1      0      0      0;      0      0     +1     -1      0      0;      0      0      0 +1/k_a     -1     -1;        ][ i_V_S;   i_R;   i_L;   i_m;   τ_B;   τ_J;       ][k]Δ T = 0     ∀ k ∈{1, …, K}




    [ 0 0 1 0 0 0 ][ i_V_S;   i_R;   i_L;   i_m;   τ_B;   τ_J;       ][k=1]
    = 
    [ 0 ]


    [ 0 1 0 0 0 0; 0 0 0 0 1 0;   ][ i_V_S;   i_R;   i_L;   i_m;   τ_B;   τ_J;       ][k]
    =
    [ 1/R   0;   0   B ][ 0 1 0 0 0 0; 0 0 0 0 1 0;   ][     -1      0      0      0;     +1     -1      0      0;      0     +1     -1      0;      0      0     +1 -1/k_a;      0      0      0     +1;      0      0      0     +1;        ][  V_S; V_RL; V_LM;  ω_J;      ][k]    
    ∀ k ∈{1, …, K}


    [ 0 0 1 0 0 0 ](
    [ i_V_S;   i_R;   i_L;   i_m;   τ_B;   τ_J;       ][k+1]
    -
    [ i_V_S;   i_R;   i_L;   i_m;   τ_B;   τ_J;       ][k]
    )
    =
    [ 1/L ][ 0 0 1 0 0 0 ][   -1    0    0    0;   +1   -1    0    0;    0   +1   -1    0;    0    0   +1 +k_a;    0    0    0   +1;    0    0    0   +1;      ][  V_S; V_RL; V_LM;  ω_J;      ][k]Δ T    
    ∀ k ∈{1, …, K-1}


    [ 0 0 0 0 0 1 ][ i_V_S;   i_R;   i_L;   i_m;   τ_B;   τ_J;       ][k] Δ T
    = 
    [ J ][ 0 0 0 0 0 1 ][     -1      0      0      0;     +1     -1      0      0;      0     +1     -1      0;      0      0     +1 -1/k_a;      0      0      0     +1;      0      0      0     +1 ](
    [  V_S; V_RL; V_LM;  ω_J;      ][k+1]
    -
    [  V_S; V_RL; V_LM;  ω_J;      ][k]
    )    
    ∀ k ∈{1, …, K-1}






















    [      0      0      1 -1/k_a ][  V_S; V_RL; V_LM;  ω_J;      ][k]=
    [ 0 ]  ∀ k ∈{1, …, K}



    [ 1 0 0 0 ][  V_S; V_RL; V_LM;  ω_J;      ][k]
    = [ 1 ]  ∀ k ∈{1, …, K}


    [ 0 0 0 1 ][  V_S; V_RL; V_LM;  ω_J;      ][k=1]
    = 
    [ 0 ]


This explicit statement of the HFNMCF problem in the context of the electro-mechanical system shown in Fig. <ref>f provides the following insights:


  * Eq. <ref> shows that an electro-mechanical system does not have an objective function and is simply a set of simultaneous equations.  

  * Eq. <ref> is a matrix restatement of the continuity laws in Eq. <ref> - <ref>.  
The first three rows apply a current balance on each electrical place, while the last applies a torque balance on each mechanical place.  Note that the motor constant k_a serves to transform the motor torque i_m into the motor torque.  This serves to combine the transformer's constitutive law in Eq. <ref> with the torque balance in Eq. <ref>.  Note that Eq. <ref> introduces an additional matrix row to account for the current provided by the voltage source i_V_S.  While this variable is not required in the linear graph and bond graph methodologies, the HFGT derivation requires across and through variables for all capabilities.  Again, the current balance on the electrical ground and the torque balance on the mechanical ground are redundant and therefore eliminated.  

  * There are no equations that impose exogenous values on the currents and angular velocities because there are no associated sources. 

  * Eq. <ref> is the initial condition on the inductor current as a state variable.  

  * Eq. <ref> is a matrix restatement of the constitutive law for the resistor and the physical damper in Eq. <ref> and <ref>.

  * Eq. <ref> is a matrix restatement of the constitutive law for the inductor in Eq. <ref>.

  * Eq. <ref> is a matrix restatement of the constitutive law for rotating disk in Eq. <ref>.


  * Eq. <ref> is a matrix restatement of the constitutive law for the auxiliary (i.e. across) decision variable for transformer in Eq. <ref>.  Again, the transformer's second constitutive law has already been incorporated in the context of <ref>.

  * The selector matrices in Eq. <ref>-<ref> can be automatically produced from the HFGT toolbox <cit.> for systems of arbitrary size.  

  * Eq. <ref> imposes exogenous values on the voltages due to the presence of voltage sources.  

  * Eq. <ref> is the initial condition on the disk angular velocity as a state variable. 

  * The compatibility laws stated in Eq. <ref> - <ref> are superfluous because all of the voltages and angular velocities have been stated in absolute terms relative to the ground rather than as voltage/angular velocity differences between points.  



Once the HFNMCF problem for the fluidic system has been set up, it can be simulated straightforwardly and compared against the state space ODE model derived by linear graph and/or bond graph.  The following parameter values are chosen:
R = 1  Ω, L = 0.01  mH, J = 5  kg·m^2, B = 0.1  N·m·s/rad, and k_a = 0.1, and V_s = 1  V (Step input voltage).  The simulation time K = 0.3 seconds, and the time step Δ T = 0.001 seconds.  The HFNMCF results for the primary (current and torque) and auxiliary (voltage and angular velocity) decision variables are shown as solid lines in Fig. <ref>.  The associated state space ODE results are shown in dashed lines with embedded triangles.





§ ON THE GENERALITY OF HETERO-FUNCTIONAL GRAPHS


The previous section concretely demonstrated the relationship between linear graphs, bond graphs, and hetero-functional graphs on the six illustrative examples depicted in Fig <ref>.  Each time, the result of the HFNMCF problem was numerically equivalent to the simulation of the associated state space ODE model.  In effect, the linear graphs and bond graph methodologies derive continuity laws (i.e. 0-Junction in Eulerian view systems/ 1-Junction in Lagrangian view systems), constitutive laws, and compatibility laws (i.e. 1-Junction in Eulerian view system/ 0-Junction in Lagrangian view systems) and then use algebraic manipulations to simplify them into a state space ODE model.  Hetero-functional graph theory, quite similarly, includes the continuity laws in the engineering system net state transition function, includes the constitutive laws in the device models, and eliminates the need for compatibility models by virtue of its choice of reference frame and then states these laws as equations that are solved simultaneously and numerically (without manual algebraic manipulations).  Consequently, while the numerical evidence in the previous section is compelling from a pedagogical perspective, in reality, the pattern of results points to two more general results.  


Given an arbitrary linear graph composed of 


  * across variable sources, 

  * through variable sources, 

  * D-Type elements, 

  * A-Type elements, 

  * T-Type elements, 

  * generalized transformers, and 

  * generalized gyrators, 

organized in an arbitrary topology, and a minimal set of initial conditions on the associated state variables, the solution of its associated state space ODE model is equivalent to the solution of a specialized instance of the HFNMCF problem.  



The linear graph's state space ODE model is equivalent to a set of simultaneous differential algebraic equations composed of continuity laws, constitutive laws, and compatibility laws.  Furthermore, the compatibility laws can be eliminated entirely with an algebraic change of variable that measures all across variables relative to a ground reference frame.  Furthermore, the differential algebraic equation form of the continuity and constitutive laws can be stated as algebraic equations with a sufficiently small choice of the discrete-time step Δ T.  Next, the continuity laws can be algebraically recast into the form stated in Eq. <ref>.  Additionally, the constitutive laws can be algebraically recast into the form stated in Eq. <ref> where 


  * generalized resistors laws take the form in Eq. <ref>,

  * generalized T-Type element laws take the form in Eq. <ref>,

  * generalized A-Type element laws take the form in Eq. <ref>, 

  * generalized transformers laws take the form in Eq. <ref>,

  * generalized gyrator laws take the form in Eq. <ref>.

Additionally, the across-variable sources are described by Eq. <ref>, and the through-variable sources are described by Eq. <ref>.  Next, the initial conditions on through-type state variables are described by Eq. <ref> and the initial conditions on across-type state variables are described by Eq. <ref>.  Next, the solution of the simultaneous equations in Eq. <ref>-<ref> can be recast as an optimization program with the null objective function in Eq. <ref> and these same equations as constraints.  Finally, the optimization problem stated in Eq. <ref>-<ref> is a special case of the HFNMCF problem in Eq. <ref>-<ref> under the conditions described in the beginning of Sec. <ref>.  




Given an arbitrary bond graph composed of 


  * effort sources, 

  * flow sources, 

  * generalized resistors, 

  * generalized capacitors, 

  * generalized inductors, 

  * generalized transformers, and 

  * generalized gyrators, 

organized in an arbitrary topology, and a minimal set of initial conditions on the associated state variables, the solution of its associated state space ODE model is equivalent to the solution of a specialized instance of the HFNMCF problem.  



The bond graph's state space ODE model is equivalent to a set of simultaneous differential algebraic equations composed of 0-junction laws, 1-junction laws, and constitutive laws. Furthermore, 0-junction laws, 1-junction laws, and bond graph system elements can be transformed 1-to-1 to form the continuity laws, compatibility laws, and system elements of the corresponding linear graph.  As elaborated in Sec. <ref>) and more specifically, 


  * In systems with an Eulerian view (e.g. electrical systems, fluidic systems, thermal systems)

    
  * effort sources are equivalent to across variable sources,
    
  * flow sources are equivalent to through variable sources,
    
  * generalized resistors are equivalent to D-Type variables,
    
  * generalized capacitors are equivalent to A-type variables,
    
  * generalized inductors are equivalent to T-Type variables,
    
  * 0-Junction laws are equivalent to constitutive laws,
    
  * 1-junction laws are equivalent to compatibility laws.
     

  * In systems with the Lagrangian view (e.g. Mechanical system)

    
  * effort sources are equivalent to through-variable sources,
    
  * flow sources are equivalent to across-variable sources,
    
  * generalized resistors are equivalent to D-Type variables,
    
  * generalized capacitors are equivalent to T-Type variables,
    
  * generalized inductors are equivalent to A-type variables,
    
  * 0-Junction laws are equivalent to compatibility laws,
    
  * 1-junction laws are equivalent to continuity laws.


  * A generalized gyrator in a bond graph is equivalent to either a generalized transformer or generalized gyrator in the linear graph methodology depending on the choice of system on either side of the element.  

  * Similarly, a generalized transformer in a bond graph is equivalent to either a generalized transformer or generalized gyrate in the linear graph methodology depending on the choice of system on either side of the element.  

Because an arbitrary bond graph model can be transformed to an equivalent linear graph model, then by Theorem <ref>, the ODE state space model derived by the bond graph is a special case of the HFNMCF problem.





§ CONCLUSION AND FUTURE WORK

This paper relates hetero-functional graphs to linear graphs and bond graphs.  Despite having completely different theoretical origins, it demonstrates the former is a generalization of the latter two.  To facilitate the comparison, each of the three modeling techniques is described and then compared conceptually.   These three descriptions reveal that hetero-functional graphs, linear graphs, and bond graphs have completely different ontologies so finding a direct relationship through a purely abstract treatment is difficult.  Instead, the paper focuses the discussion concretely on six example systems:  (a) an electrical system, (b) a translational mechanical system, (c) a rotational mechanical system, (d) a fluidic system, (e) a thermal system, and (f) a multi-energy (electro-mechanical) system.  Each of these systems was modeled with hetero-functional graphs, linear graphs, and bond graphs to reveal that dynamic simulation models produced by each of these modeling techniques result in numerically equivalent results.  Finally, this concrete numerical evidence provides significant intuition and insight that overcomes the ontological differences between these three types of graph approaches.  The paper proves mathematically that hetero-functional graphs are a formal generalization of both linear graphs and bond graphs.  

This abstract and highly general result is significant for several reasons.  First, linear graphs and bond graphs have a much longer history in the literature and have produced extensive theoretical and practical results.   Until now, these contributions have been theoretically divorced from the hetero-functional graph theory literature.  A direct relationship between hetero-functional, linear, and bond graphs facilitates the cross-pollination of theoretical and practical results between these approaches.  For example, bond graphs are often used to study system causality<cit.>; where such an analysis has been elusive in hetero-functional graphs.  More practically, the well-known modeling and simulation tool, Modelica<cit.>, was originally developed on a bond-graph foundation but its connection to hetero-functional graphs has not been made.  Looking further ahead, and as exposited in the introduction, the 21st century is creating challenges that demand a deep understanding of the structure and behavior of systems-of-systems.  This requires modeling approaches with an open, rather than closed, set of modeling primitives that spans systems of fundamentally different functions.  These systems must address operands of energy, matter, information, money, and living organisms, and not just energy.  It also requires modeling approaches that can handle continuous time, discrete time, and discrete event dynamics.  This paper reveals that HFGT can provide such analytical flexibility and extensibility without losing the rich tradition of graph-based modeling that originated in the previous century.  


IEEEtran





