Page 68 - Mechatronic Systems Modelling and Simulation with HDLs
P. 68

3.4  DOMAIN-INDEPENDENT DESCRIPTION FORMS                            57


                Pin p, n;
                Voltage v;
                Current i;
               equation
                v = p.v -n.v;
                0 = p.i + n.i;
                i = p.i
               end TwoPin;
               ...
               model Resistor "Ideal electrical resistor"
                 extends TwoPin;
                 parameter Real R (unit="Ohm") "Resistance"
               equation
                R*i = v;
               end Resistor;
               model Capacitor "Ideal electrical capacitor"
                 extends TwoPin;
                 parameter Real C (unit="F") "Capacitance"
               equation
                C* der(v) = i;
               end Capacitor;
               ...
               Hardware description 3.2  Model of the components from Hardware description 3.1



               3.4.4    Evaluation of domain-independent
                        description forms

               From the examples shown above it is clear that bond graphs can describe both
               analogue electronics and mechanics (and also a range of further domains) in com-
               pact and graphic form. However, if we go beyond unidimensional mechanics and
               passive electronics there are significant problems to be solved. Although the mod-
               elling of transistors is also possible in principle using bond graphs, a meaningful
               simulation of circuits of substantial complexity remains the exclusive preserve of
               a dedicated circuit simulator. The same applies for three-dimensional multibody
               mechanics. Moreover, bond graphs are in principle limited to continuous systems,
               so that digital electronics and software cannot be illustrated using classical bond
               graphs, or at least this cannot be done efficiently. Furthermore, every element must
               be assigned a fixed causality prior to the simulation. This causality may alter dur-
               ing a simulation, for example, if an electric motor becomes a generator, so that
               such systems cannot be simply investigated using bond graphs. The same applies
               in principle for block diagrams.
                 Domain-independent languages, and Modelica in particular, are broadly compa-
               rable with analogue hardware description languages. However, they don’t have the
               model basis of a circuit simulator. Furthermore, the event-oriented field is much
   63   64   65   66   67   68   69   70   71   72   73