Rigid Body Dynamics: Links and Joints
Total Page:16
File Type:pdf, Size:1020Kb
FRIEDRICH-ALEXANDER-UNIVERSITAT¨ ERLANGEN-NURNBERG¨ INSTITUT FUR¨ INFORMATIK (MATHEMATISCHE MASCHINEN UND DATENVERARBEITUNG) Lehrstuhl f¨urInformatik 10 (Systemsimulation) Rigid Body Dynamics: Links and Joints Kristina Pickl Master Thesis Rigid Body Dynamics: Links and Joints Kristina Pickl Master Thesis Aufgabensteller: Prof. Dr. Ulrich R¨ude Betreuer: Klaus Iglberger, M. Sc. Bearbeitungszeitraum: 16.03.2009 { 16.09.2009 Declaration: I confirm that I developed this thesis on my own, without any help of others and that no sources and facilities other than those mentioned in this thesis were used. This thesis has never been submitted in total, in part or in modified form to any other examination board. All quotations taken from other sources are referenced accordingly. Erkl¨arung: Ich versichere, dass ich die Arbeit ohne fremde Hilfe und ohne Benutzung anderer als der angegebenen Quellen angefertigt habe und dass die Arbeit in gleicher oder ¨ahnlicher Form noch keiner anderen Prufungsbeh¨ ¨orde vorgelegen hat und von dieser als Teil einer Prufungs-¨ leistung angenommen wurde. Alle Ausfuhrungen,¨ die w¨ortlich oder sinngem¨aß ubernommen¨ wurden, sind als solche gekennzeichnet. Erlangen, den 16.09.2009 . Abstract Physics-based multibody simulations have a wide range of applications. In order to be capable of analyzing complex problem formulations, e.g. the motion of the human skeleton, joints are a necessary requirement for multibody simulation frameworks. The major focus of this thesis lies on the development and implementation of a general scheme to integrate joint motion constraints into the pe framework, which is developed at the Chair for System Simulation at the Friedrich-Alexander University Erlangen-Nuremberg. The mathematical background based on complementarity constraints is elucidated profoundly. Full-Coordinate methods are used to preserve the motion constraints. The complex mechan- ical background is elaborated. An abstract formulation, which incorporates joint, contact and limit constraints, and which is based on analytical mechanics is deduced. The Jacobian matrix notation is introduced to achieve a unified complementarity formulation. Several example joints are modeled and explained in detail. Error correction parameters for drifting problems due to the Full-Coordinate method are introduced in order to keep the er- rors to a minimum. Special emphasis lies on the modular class design, which enables the easy addition of other joint types in the future. In order to demonstrate the suitability of the extension selected joints are implemented. The correctness is substantiated with the help of several test scenarios, which test the specific char- acteristics of each implemented joint type. The results of these validation tests are analyzed and further interesting joint types and augmentations to the implementation are suggested. Zusammenfassung Physikalisch korrekte Starrk¨orpersimulationen k¨onnen vielf¨altig angewandt werden. Um kom- plexe Problemstellungen, wie z.B. die Bewegung des menschlichen Skeletts analysieren zu k¨onnen, ben¨otigt man in einem System zur Simulation von Mehrk¨orpern Verbindungen zwi- schen den K¨orpern. Das Hauptaugenmerk dieser Arbeit liegt in der Entwicklung und Implementierung eines allge- meinen Modells zur Einbindung von Zwangsbedingungen auf die Bewegung von Starrk¨orpern in das Simulationstool pe, das am Lehrstuhl fur¨ Systemsimulation der Friedrich-Alexander Universit¨at Erlangen-Nurnberg¨ entwickelt wird. Der mathematische Hintergrund, der auf linearen Komplementarit¨atsproblemen basiert, wird tiefgehend erl¨autert. Full-Coordinate Methoden werden dazu benutzt, die Zwangsbewegungen einzuhalten. Der komplizierte mechanische Hintergrund wird sorgf¨altig ausgearbeitet. Eine abstrakte Formulierung, die Verbindungen, Kontakte und Grenzen miteinbezieht und auf ana- lytischer Mechanik basiert, wird hergeleitet. Die Notation mit Hilfe von Jacobimatrizen wird eingefuhrt¨ um eine ganzheitliche Komplementarit¨atsformulierung zu erhalten. Zahlreiche Beispielverbindungen werden modelliert und detailgetreu erl¨autert. Parameter zur Fehlerkorrektur bezuglich¨ Abdriften der K¨orper, was auf die Full-Coordinate Methode zuruck-¨ zufuhren¨ ist, werden eingefuhrt¨ um die Fehler minimal zu halten. Ein besonderer Schwerpunkt liegt auf dem modularen Klassendesign, welches eine leichte zukunftige¨ Einbindung von wei- teren Verbindungsarten erm¨oglicht. Um die Eignung der Erweiterung zu zeigen, werden ausgew¨ahlte Beispielverbindungen imple- mentiert. Die Richtigkeit wird durch mehrere Testszenarien untermalt, welche die spezifischen Charakteristika jeder implementierten Verbindung prufen.¨ Die Ergebnisse dieser Validierungs- tests werden analysiert und weitere interessante Arten von Verbindungen sowie zukunftige¨ Erweiterungen der Implementierung vorgeschlagen. Acknowledgements I would like to thank Prof. Dr. Ulrich R¨udefor providing me with this interesting master thesis topic, for tutoring me throughout my studies and for offering me the great opportunity to attend the Multibody Dynamics Conference in Warsaw, which gave me a profound insight into the multibody community. Very special thanks to my supervisor Klaus Iglberger for his overall support and advice, not only in the context of this thesis, but also throughout the rest of my studies. Also, very special thanks to my \contact person" Tobias Preclik for several helpful hints and discussions and, moreover, for proofreading this thesis. Additionally, I would like to thank Tobias Gradl and Stefan Donath for several hints on the LaTeX layout of this thesis. Furthermore, many thanks to Dr. Harald K¨ostlerfor supporting and encouraging me during my studies. Contents Contents 1 Introduction1 1.1 Motivation......................................1 1.2 Overview.......................................2 2 Mechanical Background3 2.1 Classical Mechanics..................................3 2.1.1 Newton-Euler Equations for Contact Mechanics..............4 2.1.2 Integration of Joints.............................6 2.2 Analytical Mechanics.................................6 2.2.1 Velocity-based Constraint Formulation...................7 2.2.2 Bilateral Constraints.............................7 2.2.3 Unilateral Constraints............................8 2.3 Unified Constraint Formulation...........................9 3 Numerical Background 11 3.1 Linear Complementarity Problem.......................... 11 3.2 Solver......................................... 12 3.3 Error Reduction................................... 12 3.4 Limits......................................... 13 3.5 Unified Complementarity Notation......................... 14 4 Joint Modeling 17 4.1 Joint Types...................................... 17 4.1.1 Fixed Joint.................................. 18 4.1.2 Slider Joint.................................. 20 4.1.3 Hinge Joint.................................. 22 4.1.4 Contact Joint................................. 24 4.2 Joint Limits...................................... 25 4.2.1 Linear Limits................................. 26 4.2.2 Angular Limits................................ 27 5 Implementation 31 5.1 Data Preparation................................... 31 5.1.1 Data Storage and Allocation........................ 32 5.1.2 Data Insertion................................ 33 5.2 Class Design..................................... 37 5.3 Visualization..................................... 38 i Contents 6 Validation and Results 41 6.1 Fixed Joint...................................... 41 6.1.1 Test Scenario................................. 41 6.1.2 Results.................................... 42 6.2 Slider Joint...................................... 46 6.2.1 Test Scenario................................. 46 6.2.2 Results.................................... 46 6.3 Hinge Joint...................................... 50 6.3.1 Test Scenario................................. 50 6.3.2 Results.................................... 51 6.4 Planar Slider Crank Mechanism........................... 54 6.4.1 Test Scenario................................. 54 6.4.2 Results.................................... 54 7 Conclusions and Future Work 59 7.1 Conclusions...................................... 59 7.2 Future Work..................................... 60 Bibliography 63 ii List of Figures List of Figures 2.1 Sketch of a slider joint which can only move along one axis...........6 3.1 Dislocated ball-in-socket joint............................ 13 4.1 A fixed joint...................................... 18 4.2 Sketch of a fixed joint w.r.t. the global coordinate system............. 18 4.3 A slider joint...................................... 20 4.4 Sketch of a slider joint w.r.t. the global coordinate system............. 20 4.5 A hinge joint...................................... 22 4.6 Sketch of a hinge joint w.r.t. the global coordinate system............. 22 4.7 A contact joint..................................... 24 4.8 Sketch of a contact point w.r.t. the global coordinate system........... 25 4.9 Sign convention of the aperture angle of a hinge joint............... 28 4.10 An arbitrary initial angle of a hinge joint...................... 29 4.11 Calculation of an arbitrary initial angle of a hinge joint.............. 30 5.1 Hierarchy of the collision response module..................... 31 5.2 Example scenario................................... 34 5.3 Global Jacobian matrix of the example scenario.................. 34 5.4 Class design of the implementation.......................... 38 6.1 Test scenario