WILEY mechatronic systems modelling and simulation with HDLs GEORG PELZ
Mechatronic Systems Modelling and Simulation with HDLs Georg Pelz Infineon Technologies,Munich,Germany Translated by Rachel Waddington Member of the Institute of Translation and Interpreting WILEY
Mechatronic Systems Modelling and Simulation with HDLs Georg Pelz Infineon Technologies, Munich, Germany Translated by Rachel Waddington Member of the Institute of Translation and Interpreting
Contents Preface 1 Objective and Motivation 1.1 Introduction 1 2 Principles of Modelling and Simulation 5 2.1 Introduction 2.2 Model Categories 2.3 Fields of Application 2.3.1 Introduction 2.3.2 Bottom-up design 2.33 Top-down design 10 2.3.4 Relationship of design strategies to modelling 2.3.5 Modelling for the specification 2.3.6 Modelling for the design 1213 2.4 Model Development 14 2.4.1 Introduction 2.4.2 Structural modelling 16 2.4.3 Physical modelling 2.4.4 Experimental modelling 2.5 Model Verification and Validation 2.5.I Introduction 02444 2.5.2 Model verification 2.5.3 Model validation 2.6 Model Simplification 72 2.7 Simulators and Simulation 33 2.7.1 Introduction 2.7.2 Circuit simulation 33 2.7.3 Logic simulation 2.74 Multibody simulation 2.7.5 Block diagram simulation 36
Contents Preface xi 1 Objective and Motivation 1 1.1 Introduction 1 2 Principles of Modelling and Simulation 5 2.1 Introduction 5 2.2 Model Categories 8 2.3 Fields of Application 9 2.3.1 Introduction 9 2.3.2 Bottom-up design 9 2.3.3 Top-down design 10 2.3.4 Relationship of design strategies to modelling 12 2.3.5 Modelling for the specification 12 2.3.6 Modelling for the design 13 2.4 Model Development 14 2.4.1 Introduction 14 2.4.2 Structural modelling 16 2.4.3 Physical modelling 18 2.4.4 Experimental modelling 20 2.5 Model Verification and Validation 24 2.5.1 Introduction 24 2.5.2 Model verification 24 2.5.3 Model validation 27 2.6 Model Simplification 32 2.7 Simulators and Simulation 33 2.7.1 Introduction 33 2.7.2 Circuit simulation 33 2.7.3 Logic simulation 34 2.7.4 Multibody simulation 35 2.7.5 Block diagram simulation 36
i CONTENTS 2.7.6 Finite element simulatior 36 2.7.7 Software simulation 3 2.8 Summary 3 Modelling and Simulation of Mixed Systems 39 3.1 Introduction 39 3.2 Electronics and Mechanics 40 3.2.1 Introduction 3.2.2 Analogies 3.2.3 Limits of the analogies 43 3.2.4 Differences between electronics and mechanics 3.3 Model Transformation 3.3.1 Introduction 3.3.2 Circuit simulation 3.3.3 Logic/Petri net simulation 3.3.4 Multibody simulation 3.3.5 Finite-element simulation 0 3.3.6 Evaluation of the model transformation 3.4 Domain-Independent Description Forms 3.4.1 Bond graphs 3.4.2 Block diagrams 24 3.4.3 Modelling languages for physical systems 3.44 Evaluation of domain-independent description forms 57 3.5 Simulator Coupling 58 3.5.1 Introduction 3.52 Simulator backplane 35.3 Examples of the simulator coupling 60 3.5.4 Evaluation 3.6 Summary 4 Modelling in Hardware Description Languages 4.1 Introduction 63 4.2 Fields of Application 65 4.2.1 Formulation of specification and design 4.22 Validation of specifications and verification of designs 4.2.3 Automatic synthesis 4.3 Characterisation of Hardware Description Languages 4.4 Languages 68 4.5 Modelling Paradigms 69
vi CONTENTS 2.7.6 Finite element simulation 36 2.7.7 Software simulation 36 2.8 Summary 37 3 Modelling and Simulation of Mixed Systems 39 3.1 Introduction 39 3.2 Electronics and Mechanics 40 3.2.1 Introduction 40 3.2.2 Analogies 41 3.2.3 Limits of the analogies 43 3.2.4 Differences between electronics and mechanics 44 3.3 Model Transformation 45 3.3.1 Introduction 45 3.3.2 Circuit simulation 45 3.3.3 Logic/Petri net simulation 47 3.3.4 Multibody simulation 50 3.3.5 Finite-element simulation 51 3.3.6 Evaluation of the model transformation 51 3.4 Domain-Independent Description Forms 52 3.4.1 Bond graphs 52 3.4.2 Block diagrams 54 3.4.3 Modelling languages for physical systems 55 3.4.4 Evaluation of domain-independent description forms 57 3.5 Simulator Coupling 58 3.5.1 Introduction 58 3.5.2 Simulator backplane 58 3.5.3 Examples of the simulator coupling 60 3.5.4 Evaluation 62 3.6 Summary 62 4 Modelling in Hardware Description Languages 63 4.1 Introduction 63 4.2 Fields of Application 65 4.2.1 Formulation of specification and design 65 4.2.2 Validation of specifications and verification of designs 65 4.2.3 Automatic synthesis 66 4.3 Characterisation of Hardware Description Languages 66 4.4 Languages 68 4.5 Modelling Paradigms 69
CONTENTS 4.5.1 Introduction 4.5.2 Structural and behaviour-oriented modelling 4.5.3 Digital modelling 4.5.4 Analogue modelling 4.6 Simulation of Models in Hardware Description Languages 4.7 Summary 81 5 Software in Hardware Description Languages 83 5.1 Introduction 5.2 Simulation of Hardware for the Running of Software 5.3 Co-simulation by Software Interpretation 85 5.4 Co-simulation by Software Compilation 88 5.4.1 Introduction 5.4.2 Software representation 5.4.3 Synchronisation 90 5.4.4 Example of software modelling 92 5.4.5 Debugging of software 55 Summary 98 6 Mechanics in Hardware Description Languages s9 6.1 Introduction 6.2 Multibody Mechanics 100 6.2.1 Introduction 100 6.2.2 System-oriented modelling 6.2.3 Object-oriented modelling 6.2.4 Example:wheel suspension 6.2.5 Further applications 113 6.3 Continuum Mechanics 1 6.3.1 Introduction 6.3.2 Structural modelling 6.3.3 Physical modelling 125 6.3.4 Experimental modelling 130 6.4 Summary 132 7 Mechatronics 135 7.1 Modelling of Mechatronic Systems 135 7.2 Demonstrator 1:Semi-Active Wheel Suspension 136 7.2.1 System description 136 7.2.2 Modelling of software 138
CONTENTS vii 4.5.1 Introduction 69 4.5.2 Structural and behaviour-oriented modelling 70 4.5.3 Digital modelling 71 4.5.4 Analogue modelling 74 4.6 Simulation of Models in Hardware Description Languages 79 4.7 Summary 81 5 Software in Hardware Description Languages 83 5.1 Introduction 83 5.2 Simulation of Hardware for the Running of Software 85 5.3 Co-simulation by Software Interpretation 85 5.4 Co-simulation by Software Compilation 88 5.4.1 Introduction 88 5.4.2 Software representation 89 5.4.3 Synchronisation 90 5.4.4 Example of software modelling 92 5.4.5 Debugging of software 98 5.5 Summary 98 6 Mechanics in Hardware Description Languages 99 6.1 Introduction 99 6.2 Multibody Mechanics 100 6.2.1 Introduction 100 6.2.2 System-oriented modelling 104 6.2.3 Object-oriented modelling 108 6.2.4 Example: wheel suspension 111 6.2.5 Further applications 113 6.3 Continuum Mechanics 115 6.3.1 Introduction 115 6.3.2 Structural modelling 116 6.3.3 Physical modelling 125 6.3.4 Experimental modelling 130 6.4 Summary 132 7 Mechatronics 135 7.1 Modelling of Mechatronic Systems 135 7.2 Demonstrator 1: Semi-Active Wheel Suspension 136 7.2.1 System description 136 7.2.2 Modelling of software 138
viⅷ CONTENTS 7.2.3 Modelling of mechanics 139 7.2.4 Simulation 140 7.3 Demonstrator 2:Intemal Combustion Engine with Drive Train 143 7.3.1 System description 7.3.2 Modelling 7.3.3 Simulation 147 7.4 Demonstrator 3:Camera Winder 1 7.4.1 Introduction 148 7.4.2 System description 7.4.3 Modelling 7.4.4 Simulation 7.5 Demonstrator 4:Disk Drive 152 7.5.1 Introduction 7.5.2 The disk drive 7.5.3 Circuit development for disk drives 7.5.4 The virtual disk drive 7.5.5 System modelling 75.6 Simulation and results 7.5.7 Conclusion 7.5.8 Acknowledgement 7.6 Summary 161 8 Micromechatronics 163 8.1 Modelling Micromechatronic Systems 8.11 8.1.2 Component design 8.1.3 System design 8.2 Demonstrator 5:Capacitive Pressure Sensor 8.2.1 System description 8.2.2 Modelling 8.2.3 Simulation 8.3 Demonstrator 6:Micromirror 8.3.1 System description 8.3.2 Modelling 8.3.3 Simulation 8.4 Summary 186 9 Summary and Outlook 187 Literature 189
viii CONTENTS 7.2.3 Modelling of mechanics 139 7.2.4 Simulation 140 7.3 Demonstrator 2: Internal Combustion Engine with Drive Train 143 7.3.1 System description 143 7.3.2 Modelling 145 7.3.3 Simulation 147 7.4 Demonstrator 3: Camera Winder 148 7.4.1 Introduction 148 7.4.2 System description 148 7.4.3 Modelling 148 7.4.4 Simulation 152 7.5 Demonstrator 4: Disk Drive 152 7.5.1 Introduction 152 7.5.2 The disk drive 153 7.5.3 Circuit development for disk drives 154 7.5.4 The virtual disk drive 157 7.5.5 System modelling 158 7.5.6 Simulation and results 159 7.5.7 Conclusion 160 7.5.8 Acknowledgement 161 7.6 Summary 161 8 Micromechatronics 163 8.1 Modelling Micromechatronic Systems 163 8.1.1 Introduction 163 8.1.2 Component design 164 8.1.3 System design 165 8.2 Demonstrator 5: Capacitive Pressure Sensor 166 8.2.1 System description 166 8.2.2 Modelling 168 8.2.3 Simulation 176 8.3 Demonstrator 6: Micromirror 182 8.3.1 System description 183 8.3.2 Modelling 183 8.3.3 Simulation 186 8.4 Summary 186 9 Summary and Outlook 187 Literature 189
CONTENTS i Appendix 217 Symbols 217 Abbreviations 20 Registered Trademarks 220 Index 221
CONTENTS ix Appendix 217 Symbols 217 Abbreviations 220 Registered Trademarks 220 Index 221
Preface Most of this work came into being during my employment at the Chair for Electron Devices and Circuits in the Electronics Engineering department of the Gerhard- Mercator University,Duisburg.Section 7.5 covers material that I have worked on for my current employer,Infineon Technologies. At this point I would like to express my gratitude for the support that I received from many sides.My special thanks go to Prof.Dr.G.Zimmer,in whose depart- ment I was able to work continuously for many years on the subject of this book and who helped me in many ways in the process.Moreover,I would like to thank Prof.Dr.M.Glesner for his support of the work. I would also like to thank my colleagues at the Gerhard-Mercator Univer- sity,Duisburg,the Fraunhofer Institut IMS and Infineon Technologies,who pro- vided a great deal of assistance in the form of discussions and suggestions dur- ing the preparation of the book.The following in particular should be men- tioned:Dr.J.Bielefeld,Dr.M.Leineweber,Dipl.-Ing.A.Luidecke and Dipl.-Ing. L.VoBkamper. Apart from the technical side,I would like to express my thanks to Tilmann Leopold.Last,but not least,I thank my family for their encouragement and support during the composition of this book. Ebersberg,January 2003 Georg Pelz(Georg.Pelz@onlinehome.de)
Preface Most of this work came into being during my employment at the Chair for Electron Devices and Circuits in the Electronics Engineering department of the GerhardMercator University, Duisburg. Section 7.5 covers material that I have worked on for my current employer, Infineon Technologies. At this point I would like to express my gratitude for the support that I received from many sides. My special thanks go to Prof. Dr. G. Zimmer, in whose department I was able to work continuously for many years on the subject of this book, and who helped me in many ways in the process. Moreover, I would like to thank Prof. Dr. M. Glesner for his support of the work. I would also like to thank my colleagues at the Gerhard-Mercator University, Duisburg, the Fraunhofer Institut IMS and Infineon Technologies, who provided a great deal of assistance in the form of discussions and suggestions during the preparation of the book. The following in particular should be mentioned: Dr. J. Bielefeld, Dr. M. Leineweber, Dipl.-Ing. A. Ludecke and Dipl.-Ing. ¨ L. Voßkamper. ¨ Apart from the technical side, I would like to express my thanks to Tilmann Leopold. Last, but not least, I thank my family for their encouragement and support during the composition of this book. Ebersberg, January 2003 Georg Pelz (Georg.Pelz@onlinehome.de)
1 Objective and Motivation 1.1 Introduction The objective of this work was to support the design of mechatronic systems by the use of simulations.This raises the question of what exactly is mechatronics.Current definitions describe mechatronics as an interaction between electronics,mechanics and information technology,see Isermann [164]or Wallaschek [421].It makes no differenc here whether we are talking about macromechanicsor micromechanics. In the former case we speak of mechatronics,in the latter of micromechatronics or microelectromechanical systems (MEMS).As was discovered during the course of this project,although the dimensions of the mechanics in the systems under inves tigation may vary,the methods used for modelling and simulation are largely the same,which makes the joint consideration of macromechanics and micromechanics an obvious approach. Why is the modelling and simulation of mechatronic systems difficult?First of all,the field of mechatronics incorporates very different domains and similarly var- ied methods of description.Thefield analogue and digital as well as continuous and event-oriented,processes.The same is true of mechan- ics,although often for totally different reasons.In the field of mechanics,events may,for example,be triggered by the transition from static to sliding friction.In electronics,on the other hand,an event is brought about by the flicking of a switch, triggering a connection to the entire digital world.In mechanics we also have to deal with geometric aspects in three spatial dimensions.Furthermore.multibody and continuum mechanics of different representational forms also have to be taken into account.Finally,software can be considered as information in bistable cir- cuits and thus classified as electronics.However,this is not sufficient to achieve an efficient and transparent consideration,which means that we have to develop our own models for the software. The development of models is thus a difficult process at the best of times and one which is prone to errors.However,a systematic verification and validation of the model is not in sight.As in other fields of simulation,models containing errors can produce arbitrary results.Recognising such errors is often not a simple matter gySs联om4n7
1 Objective and Motivation 1.1 Introduction The objective of this work was to support the design of mechatronic systems by the use of simulations. This raises the question of what exactly is mechatronics. Current definitions describe mechatronics as an interaction between electronics, mechanics and information technology, see Isermann [164] or Wallaschek [421]. It makes no difference here whether we are talking about macromechanics or micromechanics. In the former case we speak of mechatronics, in the latter of micromechatronics or microelectromechanical systems (MEMS). As was discovered during the course of this project, although the dimensions of the mechanics in the systems under investigation may vary, the methods used for modelling and simulation are largely the same, which makes the joint consideration of macromechanics and micromechanics an obvious approach. Why is the modelling and simulation of mechatronic systems difficult? First of all, the field of mechatronics incorporates very different domains and similarly varied methods of description. The field of electronics includes analogue and digital, as well as continuous and event-oriented, processes. The same is true of mechanics, although often for totally different reasons. In the field of mechanics, events may, for example, be triggered by the transition from static to sliding friction. In electronics, on the other hand, an event is brought about by the flicking of a switch, triggering a connection to the entire digital world. In mechanics we also have to deal with geometric aspects in three spatial dimensions. Furthermore, multibody and continuum mechanics of different representational forms also have to be taken into account. Finally, software can be considered as information in bistable circuits and thus classified as electronics. However, this is not sufficient to achieve an efficient and transparent consideration, which means that we have to develop our own models for the software. The development of models is thus a difficult process at the best of times and one which is prone to errors. However, a systematic verification and validation of the model is not in sight. As in other fields of simulation, models containing errors can produce arbitrary results. Recognising such errors is often not a simple matter. Mechatronic Systems Georg Pelz 2003 John Wiley & Sons, Ltd ISBN: 0-470-84979-7
2 1 OBJECTIVE AND MOTIVATION This is particularly true if the simulation relates to the design of a technical system and its task is to make predictions about the system's functionality.In this case the system in question does not exist at all in the real world,which means that no measurements are available for checking the model.Rather,the design has yet to be investigated and completed.So proving the correctness of a model is a matter of importance.If we now interpret-as did Butterfield in [55]-a model as a scientific theory,then the validation of the model must be placed within narrow boundaries.According to Popper [338]the following is true for the validation of a theory: In order to be scientific,a theory must be falsifiable.It must be empirically testable at least in principle,and there must be a test that disproves the theory in the event of a negative outcome rbe a rigor The same applies for the validation of models.We can develop as many tests for a model as we like,but this does not prove the validity of the model.At best,trust in a model increases with the number of tests. Depending upon the problem to be solved,we can differentiate between two fun- damental starting points in the simulation of mechatronic systems.If the mechanical part of a mechatronic system is to be developed,then the mechanics should be developed taking into account the electronics.In this case electronics and software are commonly considered as a regulatory function and dealt with along with the mechanics in the form of suitable equations.The purpose of this work is to inves tigate the opposite case-the development of electronics and software taking into account the mechanical component.This type of design should be supported by simulations Hardware description languages,which have been widespread in the field of electronics for some time.and for which various commercial simulators are already available,represent the tools for achieving this end.Anything that can be modelled using a hardware description language can also be simulated. Thus the task is primarily a modelling problem.Furthermore,standards exist for hardware description languages,which means that models can be exchanged between simulators.One example is the IEEE standard VHDL 1076.1 (VHDL- AMS)[160],which permits the description of digital and analogue systems.The aim of this work is to cover the entire breadth of modelling for mechatronic and micromechatronic systems using hardware description languages and to thereby take a direct route to the corresponding simulations. This structure of this work is as follows:After the introduction,the second chapter deals with the principles of modelling and simulation for electronics and mechanics.Particular importance is attributed to the verification and validation of models.The third chapter describes state of the art techniques for the simulation
2 1 OBJECTIVE AND MOTIVATION This is particularly true if the simulation relates to the design of a technical system and its task is to make predictions about the system’s functionality. In this case the system in question does not exist at all in the real world, which means that no measurements are available for checking the model. Rather, the design has yet to be investigated and completed. So proving the correctness of a model is a matter of importance. If we now interpret — as did Butterfield in [55] — a model as a scientific theory, then the validation of the model must be placed within narrow boundaries. According to Popper [338] the following is true for the validation of a theory: In order to be scientific, a theory must be falsifiable. It must be empirically testable, at least in principle, and there must be a test that disproves the theory in the event of a negative outcome. There can never be a rigorous validation of a scientific theory. The best that we can do is to develop empirical tests for the theory— fair tests, but the stricter the better — and to hold onto the theory only as long as it has passed all tests. The same applies for the validation of models. We can develop as many tests for a model as we like, but this does not prove the validity of the model. At best, trust in a model increases with the number of tests. Depending upon the problem to be solved, we can differentiate between two fundamental starting points in the simulation of mechatronic systems. If the mechanical part of a mechatronic system is to be developed, then the mechanics should be developed taking into account the electronics. In this case electronics and software are commonly considered as a regulatory function and dealt with along with the mechanics in the form of suitable equations. The purpose of this work is to investigate the opposite case — the development of electronics and software taking into account the mechanical component. This type of design should be supported by simulations. Hardware description languages, which have been widespread in the field of electronics for some time, and for which various commercial simulators are already available, represent the tools for achieving this end. Anything that can be modelled using a hardware description language can also be simulated. Thus the task is primarily a modelling problem. Furthermore, standards exist for hardware description languages, which means that models can be exchanged between simulators. One example is the IEEE standard VHDL 1076.1 (VHDLAMS) [160], which permits the description of digital and analogue systems. The aim of this work is to cover the entire breadth of modelling for mechatronic and micromechatronic systems using hardware description languages and to thereby take a direct route to the corresponding simulations. This structure of this work is as follows: After the introduction, the second chapter deals with the principles of modelling and simulation for electronics and mechanics. Particular importance is attributed to the verification and validation of models. The third chapter describes state of the art techniques for the simulation