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

2.7  SIMULATORS AND SIMULATION                                       35


               which means that virtually all logic simulators on the market currently work in an
               event-oriented manner.
                 The two main strategies for simulation are the compiled and the interpreted
               simulation. In the compiled simulation, the circuit is translated prior to simulation
               into a programme, the processing of which brings about the simulation. In the
               simplest case the circuit contains a few gates and no feedback loops. In this case
               an instruction can be provided for every gate, which applies the function of the gate
               at the gate’s inputs and stores the result as a variable, which represents the output
               signal of the gate. These instructions are sorted topologically, so that all values
               are already calculated if they are needed in a calculation. If the circuit contains
               back-couplings this principle can no longer be maintained. In this case we work
               with two sets of variables — one for the values drawn into the calculation and one
               for the newly calculated values. Then we iterate until no more changes occur in
               the circuit.
                 By contrast, in the interpreted simulation, information is available for every gate
               about which other gates are connected to it. The idea is to not recalculate all gates
               afresh for each step, but only to calculate those for which the logical value of the
               input has changed. For all other gates nothing has changed. We start with the inputs
               to the circuit and evaluate the gates connected to it. In this manner, future events
               are generated at the gate outputs in question, which are stored in a chronologically
               sorted list. Based upon this list the next event in chronological terms can be deter-
               mined and the associated gate calculated, which often triggers further events. In
               addition, further events may occur at the circuit inputs. The simulation ends when
               the event list is empty or a predetermined time period has passed.




               2.7.4 Multibody simulation

               In this context we can differentiate between two main types of mechanical simula-
               tors, see Leister and Schielen [233]. Firstly, there are the simulators that formulate
               the mechanics as a symbolic equation system, which can then be processed using
               numerical standard solution procedures. The other option is to consider the mechan-
               ics as a linear system with mass, damping and stiffness matrix. In this case, the
               individual coefficients of the matrices have to be determined afresh for every time
               increment. Both approaches have their advantages and disadvantages.
                 Depending upon the application under consideration, the symbolic equations
               may explode in size, putting them beyond any simulation. On the other hand,
               there are occasionally numerical advantages, because, in the case of symbolic
               equations, the equation solver is in possession of all relevant information about the
               system. This is not the case for the numerical variant because the calculation of
               system matrices typically tends to be independent of the differential equation solver.
               Finally, symbolic equations can also be used in another context, for example,
               optimisation.
   41   42   43   44   45   46   47   48   49   50   51