14 2 PRINCIPLES OF MODELLING AND SIMULATION displayed in a debugger that shows the current status of the software,i.e.program line and variable values,plus their outputs on the terminal.Without this type of simulation,software development would be unthinkable. Like electronics,the construction of mechanical systems in reality is very expen- sive in terms of time and costs.In many of the industries in question the answer to this problem lies in the increased use of simulation.The automotive industry is particularly advanced in this field.The two main key words here are digital mock-up and virtual protorype,see for example Paulini et al.[317]or Schweer et al.[376].A digital mock-up is as complete as possible a description of a single product on the computer and thus represents a limited data quantity.All the various tools check the design on the basis of this data.The digital mock-up thus primarily represents a medium for information exchange.which links together data sources and data sinks in the design process.At regular intervals,for example every two weeks [376],new data are put in and thus are available to all possible users. A vir tual protorype is extracted from the data of the digital mock-up,which can then be used for experiments on the computer.A classic example of this is the simulation of crash tests.In this application,a finite-element model is obtained from the CAD data of the body by automatic meshing.which can then be subiected to any desired crash situations.Although the simulation requires several hours of processing time even on the fastest computer,it means that the majority of real crash tests can be dispensed with.Furthermore,simulations are also run in virtually all other sectors of the automotive industry,such as for example in the development of running gear,engine,drive train a nd the associated electronics. 2.4 Model Development 2.4.1 Introduction The following section provides an overview of the most up-to-date methods for model development in electronics and mechanics,looking at both the common ddiferences.We can make a initial clasification by asking whether cribes the structureor the behaviour of a system. Taking the first case,in classic modelling the model establishes only which com- ponents make up the system and how these are connected together.Alternativelv. however,the term structural modelling can also be expanded and,for example,take in the description of the structure of an equation system or a finite state machine. In such cases the following forms of model description may be called structural: electronic circuit diagrams,state graphs,multibody diagrams,meshes of finite ele ments,block diagrams,bond graphs and Petri nets.The common factor of all these descriptive forms is that they are all graphical in nature If,on the other hand,it is the behaviour of a system that is to be described then this can be achieved on the basis of the underlying physics or the measured input/output behaviour.In the former case the development of such models is
14 2 PRINCIPLES OF MODELLING AND SIMULATION displayed in a debugger that shows the current status of the software, i.e. program line and variable values, plus their outputs on the terminal. Without this type of simulation, software development would be unthinkable. Like electronics, the construction of mechanical systems in reality is very expensive in terms of time and costs. In many of the industries in question the answer to this problem lies in the increased use of simulation. The automotive industry is particularly advanced in this field. The two main key words here are digital mock-up and virtual prototype, see for example Paulini et al. [317] or Schweer et al. [376]. A digital mock-up is as complete as possible a description of a single product on the computer and thus represents a limited data quantity. All the various tools check the design on the basis of this data. The digital mock-up thus primarily represents a medium for information exchange, which links together data sources and data sinks in the design process. At regular intervals, for example every two weeks [376], new data are put in and thus are available to all possible users. A virtual prototype is extracted from the data of the digital mock-up, which can then be used for experiments on the computer. A classic example of this is the simulation of crash tests. In this application, a finite-element model is obtained from the CAD data of the body by automatic meshing, which can then be subjected to any desired crash situations. Although the simulation requires several hours of processing time even on the fastest computer, it means that the majority of real crash tests can be dispensed with. Furthermore, simulations are also run in virtually all other sectors of the automotive industry, such as for example in the development of running gear, engine, drive train and the associated electronics. 2.4 Model Development 2.4.1 Introduction The following section provides an overview of the most up-to-date methods for model development in electronics and mechanics, looking at both the common ground and differences. We can make an initial classification by asking whether the model describes the structure or the behaviour of a system. Taking the first case, in classic modelling the model establishes only which components make up the system and how these are connected together. Alternatively, however, the term structural modelling can also be expanded and, for example, take in the description of the structure of an equation system or a finite state machine. In such cases the following forms of model description may be called structural: electronic circuit diagrams, state graphs, multibody diagrams, meshes of finite elements, block diagrams, bond graphs and Petri nets. The common factor of all these descriptive forms is that they are all graphical in nature. If, on the other hand, it is the behaviour of a system that is to be described then this can be achieved on the basis of the underlying physics or the measured input/output behaviour. In the former case the development of such models is
2.4 MODEL DEVELOPMENT 15 relatively costly and requires a comprehensive understanding of the system.On the other hand,such models can be adapted to the actual system over a wide range by modifying parameters.If,for example,a system is to be driven by a DC motor.various makes can be included in the simulation by the use of the applicable parameters.These 'generic'models thus cover a whole class of components.As an alternative to modelling on the basis of physical behaviour the other option is to take measured data and feed this into models.This is also called experimental modelling and is used if physical modelling is not implementable or the resulting model is too complex for the desired purpose.Typically,however,experimental modelling has to be repeated every time one of the components in question is altered.Both in the case of physical and experimental modelling the models are generally formulated on the basis of equations and assignments,i.e.consequently formulated in the form of text. In addition to a simulation,an emulation may also come into consideration under certain speed requirements.This has different characteristics for electronics and mechanics.In the field of digital electronics the term emulator is used to mear a device that can take on the function of any desired digital circuit,see for example Bender and Kaiser [25].This function is based upon a number of programmable chips,for example so-called FPGAs,the logic functions of which are stored in a local RAM and can thus be modified.Currently up to a hundred thousand gate functions can be stored on a single FPGA.With regard to speed,FPGAs,and thus emulators,are generally significantly slower than dedicated hardware,but are,however,faster than a simulation by orders of magnitude.The emulation of analogue electronics and mechanics on the other hand is based upon signa processors,so-called DSPs,that are optimised for analogue signal processing,see for example [155]orGeorgiew.So differential equation models of mechanical components can again be calculated faster than is the case for a simulator by orders of magnitude Since modelling is a difficult process,and prone to errors,in some cases real components are embedded into a simulation,see for example Helldorfer et al. [136]or Le et al.[219].This is also called 'hardware in the loop'.This does not mean that the entire system is constructed as an electronic bread-board assembly or mechanical prototype,instead usually just one component is fitted.Alternatively, the environment of the system to be developed can be included in real form The rest of the system is modelled in the classical manner,so that simulated and real behaviour are mixed together.The advantage of this is that the modelling and its validation can be dispensed with for the real hardware in the simulation loop.However,the principle disadvantage is that the real components have to be fully installed in the laboratory and adequately fitted with actuators and sensors in order to ensure the main inputs and outputs.Furthermore,the simulation of the remainder of the svstem must in this case take place in real time.which mav involve considerable cost,depending upon the system.Alternatively,this real time simulation can be replaced by an emulation to speed things up
2.4 MODEL DEVELOPMENT 15 relatively costly and requires a comprehensive understanding of the system. On the other hand, such models can be adapted to the actual system over a wide range by modifying parameters. If, for example, a system is to be driven by a DC motor, various makes can be included in the simulation by the use of the applicable parameters. These ‘generic’ models thus cover a whole class of components. As an alternative to modelling on the basis of physical behaviour the other option is to take measured data and feed this into models. This is also called experimental modelling and is used if physical modelling is not implementable or the resulting model is too complex for the desired purpose. Typically, however, experimental modelling has to be repeated every time one of the components in question is altered. Both in the case of physical and experimental modelling the models are generally formulated on the basis of equations and assignments, i.e. consequently formulated in the form of text. In addition to a simulation, an emulation may also come into consideration under certain speed requirements. This has different characteristics for electronics and mechanics. In the field of digital electronics the term emulator is used to mean a device that can take on the function of any desired digital circuit, see for example Bender and Kaiser [25]. This function is based upon a number of programmable chips, for example so-called FPGAs, the logic functions of which are stored in a local RAM and can thus be modified. Currently up to a hundred thousand gate functions can be stored on a single FPGA. With regard to speed, FPGAs, and thus emulators, are generally significantly slower than dedicated hardware, but are, however, faster than a simulation by orders of magnitude. The emulation of analogue electronics and mechanics on the other hand is based upon signal processors, so-called DSPs, that are optimised for analogue signal processing, see for example Huang et al. [155] or Georgiew [116]. So differential equation models of mechanical components can again be calculated faster than is the case for a simulator by orders of magnitude. Since modelling is a difficult process, and prone to errors, in some cases real components are embedded into a simulation, see for example Helldorfer ¨ et al. [136] or Le et al. [219]. This is also called ‘hardware in the loop’. This does not mean that the entire system is constructed as an electronic bread-board assembly or mechanical prototype, instead usually just one component is fitted. Alternatively, the environment of the system to be developed can be included in real form. The rest of the system is modelled in the classical manner, so that simulated and real behaviour are mixed together. The advantage of this is that the modelling and its validation can be dispensed with for the real hardware in the simulation loop. However, the principle disadvantage is that the real components have to be fully installed in the laboratory and adequately fitted with actuators and sensors in order to ensure the main inputs and outputs. Furthermore, the simulation of the remainder of the system must in this case take place in real time, which may involve considerable cost, depending upon the system. Alternatively, this real time simulation can be replaced by an emulation to speed things up
16 2 PRINCIPLES OF MODELLING AND SIMULATION All the methods described up to this point relate to the description of an error- free system.This is worthwhile if the simulation is to contribute to the actual design.In some cases,however,the aim is to investigate the effect of errors within the system.In this case error modelling is called for.One application for this is the evaluation of measures to increase intrinsic safety:another is the evaluation of test methods for differentiating between functional systems and rejects during production.In both cases,errors that impair the function of the system under consideration are modelled.Here too the modelling represents an abstraction of reality.which in the ideal case covers several error mechanisms.For example the stuck-at error model in digital electronics describes the permanent presence of a logicalor logical ata signal of the circuit Whether this is caused by a short-circuit with a supply cable or by excessively deep etching of contact holes is of secondary importance.The decisive point is that the circuit no longer functions correctly and that this problem can be detected by the tests developec Due to their importance,structural,physical and experimental model develop- ment will be considered in more depth in the following.Finally.we note that specialist fields,such as modelling with neural networks,fuzzy techniques or genetic programming,will not be considered. 2.4.2 Structural modelling Introduction A structural model is characterised by the basic models used and the connection structure between these basic models.A module can be composed of basic models and can itself be again connected to other modules.This can be performed succes sively,thus describing complex systems.A structural model can be characterised on the basis of the following terms:Hierarchy,modularity,regularity and local- ity.The hierarchy of a model is derived from the call structure of basic models and modules.So an operational amplifier (=module)can be put together from MOS transistors (=basic models)and then circuits can be built up from opera- tional amplifiers.Using graph theory,such a hiera chy can be described as a tree in which the roots represent the system as a whole and the leaves represent the basic models.The number of levels of the hierarchy grow in a logarithmic rela- tionship to the number of basic elements involved. The modularity of the system relates to the question of how simple and reasonable it is to divide the system into modules.Regularity is a measure of how many module types are necessary to represent the entire system.A low number is beneficial here because it indicates a compact representation.Finally,locality is a measure of how well a module can be considered without the context of its installation.Modules with straightforward interfaces to their outside world are particularly beneficial here. In the following,models are considered in the form of circuit diagrams,state graphs,multibody diagrams and finite elements.Further descriptions with structural
16 2 PRINCIPLES OF MODELLING AND SIMULATION All the methods described up to this point relate to the description of an errorfree system. This is worthwhile if the simulation is to contribute to the actual design. In some cases, however, the aim is to investigate the effect of errors within the system. In this case error modelling is called for. One application for this is the evaluation of measures to increase intrinsic safety; another is the evaluation of test methods for differentiating between functional systems and rejects during production. In both cases, errors that impair the function of the system under consideration are modelled. Here too the modelling represents an abstraction of reality, which in the ideal case covers several error mechanisms. For example, the stuck-at error model in digital electronics describes the permanent presence of a logical 0 or logical 1 at a signal of the circuit. Whether this is caused by a short-circuit with a supply cable or by excessively deep etching of contact holes is of secondary importance. The decisive point is that the circuit no longer functions correctly and that this problem can be detected by the tests developed. Due to their importance, structural, physical and experimental model development will be considered in more depth in the following. Finally, we note that specialist fields, such as modelling with neural networks, fuzzy techniques or genetic programming, will not be considered. 2.4.2 Structural modelling Introduction A structural model is characterised by the basic models used and the connection structure between these basic models. A module can be composed of basic models and can itself be again connected to other modules. This can be performed successively, thus describing complex systems. A structural model can be characterised on the basis of the following terms: Hierarchy, modularity, regularity and locality. The hierarchy of a model is derived from the call structure of basic models and modules. So an operational amplifier (=module) can be put together from MOS transistors (=basic models) and then circuits can be built up from operational amplifiers. Using graph theory, such a hierarchy can be described as a tree, in which the roots represent the system as a whole and the leaves represent the basic models. The number of levels of the hierarchy grow in a logarithmic relationship to the number of basic elements involved. The modularity of the system relates to the question of how simple and reasonable it is to divide the system into modules. Regularity is a measure of how many module types are necessary to represent the entire system. A low number is beneficial here because it indicates a compact representation. Finally, locality is a measure of how well a module can be considered without the context of its installation. Modules with straightforward interfaces to their outside world are particularly beneficial here. In the following, models are considered in the form of circuit diagrams, state graphs, multibody diagrams and finite elements. Further descriptions with structural
2.4 MODEL DEVELOPMENT 11 na高e m o-mechanical systems,these are described in detail in Chapter 3 as alternatives to modelling using hardware description languages. Circuit diagrams In the case of design using a circuit diagram editor,modelling is primarily used for the derivation of a net list.which is used as a circuit model,incorporating the component or gate models.This procedure is so simple and unproblematic that the process of modelling a circuit is not generally perceived as such.Likewise,there are not normally any problems with the validation of the circuit model.In the most xtreme as here may be verification problems with the program for deriving the net list.The field of application is predominantly the development of analogue circuits.Although digital circuits can also be developed using circuit diagrams,a o design process is only possible using behavioural modelling based upon description languages. State graphs Digital systems can alsobe represented by state graphs with the system structure then being stored on relatively abstract levels.The selection of the state transitions is precisely specified by conditions.Furthermore,in state graphs only the structure of the connections is necessary in order to characterise the model in question.Such a model can,for example,be used for the specification of digital behaviour,but it can also be translated into a programming or hardware description language and then used directly for the design of software and hardware. Multibody diagrams Things are more complicated for multibody mechanics.Although the importance of structural modelling is gaining increasing recognition example the work of Panreck [313],when drawing up the model equations it is often the system as a whole that is considered rather than viewing it as a collection of components.Only with the introduction of modelling.see Otter [308]or Kecskemethy [185],does the structural modelling of multibody systems also become more prevalent. Finite elements A particularly graphic form of structural modelling is to break down mechanical structures into finite elements for the modelling of continuum mechanics.This is Predicate/transition network
2.4 MODEL DEVELOPMENT 17 aspects are bond graphs, block diagrams and Pr/T networks.1 As these descriptive forms also permit a modelling of electro-mechanical systems, these are described in detail in Chapter 3 as alternatives to modelling using hardware description languages. Circuit diagrams In the case of design using a circuit diagram editor, modelling is primarily used for the derivation of a net list, which is used as a circuit model, incorporating the component or gate models. This procedure is so simple and unproblematic that the process of modelling a circuit is not generally perceived as such. Likewise, there are not normally any problems with the validation of the circuit model. In the most extreme case there may be verification problems with the program for deriving the net list. The field of application is predominantly the development of analogue circuits. Although digital circuits can also be developed using circuit diagrams, a top-down design process is only possible using behavioural modelling based upon hardware description languages. State graphs Digital systems can also be represented by state graphs with the system structure then being stored on relatively abstract levels. The selection of the state transitions is precisely specified by conditions. Furthermore, in state graphs only the structure of the connections is necessary in order to characterise the model in question. Such a model can, for example, be used for the specification of digital behaviour, but it can also be translated into a programming or hardware description language and then used directly for the design of software and hardware. Multibody diagrams Things are more complicated for multibody mechanics. Although the importance of structural modelling is gaining increasing recognition here too, see for example the work of Panreck [313], when drawing up the model equations it is often the system as a whole that is considered rather than viewing it as a collection of components. Only with the introduction of object-oriented modelling, see Otter [308] or Kecskemethy [185], does the structural modelling of multibody systems ´ also become more prevalent. Finite elements A particularly graphic form of structural modelling is to break down mechanical structures into finite elements for the modelling of continuum mechanics. This is 1 Predicate/transition network
18 2 PRINCIPLES OF MODELLING AND SIMULATION also called meshing,and both geometric dimensions and topological information are important.The element matrices of the individual finite elements are found from their material parameters and geometry,whereas the connection structure between the elements,and consequently the system matrix,is derived from the topology.Often the meshing has to be checked manually in order to ensure that the elements have the correct form,the grid is sufficiently fine and available symmetries are exploited. 2.4.3 Physical modelling Introduction In physical modelling the laws of physics are used to describe the behaviour and inner action mechanism of a system or a component.The selection of the relevant relationships depending upon suitability and efficiency and the establishment of cause and effect chains,requires a comprehensive understanding of the system and remains an engineering task.Computer support for this form of modelling is at best rudimentary. In the following.some classifications will be undertaken for the characterisation of the physical modelling based upon various criteria.These consider the perspec tives of modelling and the nature of the yielded equations.Otherwise the reader is referred at this point to Chapters 5 and 6 on modelling,and also to Chapters 7 and 8onapplications,which contain a whole range of examples of physical modelling and electro-mechanical systems. Perspectives of modelling The perspectives of modelling offer a coarse division of the physical models which, however,runs through all disciplines like a red thread.We should differentiate her between whether the system perspective or the component perspective has been selected.In one case the system-oriented modelling formulates the system in the odelling describes components The decisive factor is that in object-oriented modelling no system knowledge is fed into the component model.This ensures that the components can be used in any desired context,so that modelling work only has to be performed once and not for each system. Hitherto in electronics,more significance has been attached to object-oriented modelling.The physical models for electronic components provide the classic example of this.These are formulated independently of the circuit in which they are used.The connection structure is determined in a circuit diagram,which forms a structural model.Thus the validation of the circuit model is in principle achieved by a validation of the component model.This is particularly worthwhile if the
18 2 PRINCIPLES OF MODELLING AND SIMULATION also called meshing, and both geometric dimensions and topological information are important. The element matrices of the individual finite elements are found from their material parameters and geometry, whereas the connection structure between the elements, and consequently the system matrix, is derived from the topology. Often the meshing has to be checked manually in order to ensure that the elements have the correct form, the grid is sufficiently fine and available symmetries are exploited. 2.4.3 Physical modelling Introduction In physical modelling the laws of physics are used to describe the behaviour and inner action mechanism of a system or a component. The selection of the relevant relationships depending upon suitability and efficiency and the establishment of cause and effect chains, requires a comprehensive understanding of the system and remains an engineering task. Computer support for this form of modelling is at best rudimentary. In the following, some classifications will be undertaken for the characterisation of the physical modelling based upon various criteria. These consider the perspectives of modelling and the nature of the yielded equations. Otherwise the reader is referred at this point to Chapters 5 and 6 on modelling, and also to Chapters 7 and 8 on applications, which contain a whole range of examples of physical modelling and electro-mechanical systems. Perspectives of modelling The perspectives of modelling offer a coarse division of the physical models which, however, runs through all disciplines like a red thread. We should differentiate here between whether the system perspective or the component perspective has been selected. In one case the system-oriented modelling formulates the system in the overall context; in the other case object-oriented modelling describes components, which only form a system by their connection together, i.e. by structural modelling. The decisive factor is that in object-oriented modelling no system knowledge is fed into the component model. This ensures that the components can be used in any desired context, so that modelling work only has to be performed once and not for each system. Hitherto in electronics, more significance has been attached to object-oriented modelling. The physical models for electronic components provide the classic example of this. These are formulated independently of the circuit in which they are used. The connection structure is determined in a circuit diagram, which forms a structural model. Thus the validation of the circuit model is in principle achieved by a validation of the component model. This is particularly worthwhile if the