A Framework for Comparison of Methods for Solving Complementarity Problems That Arise in Multibody Dynamics
Total Page:16
File Type:pdf, Size:1020Kb
A FRAMEWORK FOR COMPARISON OF METHODS FOR SOLVING COMPLEMENTARITY PROBLEMS THAT ARISE IN MULTIBODY DYNAMICS By Ying Lu A Dissertation Submitted to the Graduate Faculty of Rensselaer Polytechnic Institute in Partial Fulfillment of the Requirements for the Degree of DOCTOR OF PHILOSOPHY Major Subject: COMPUTER SCIENCE Approved by the Examining Committee: Jeffrey C. Trinkle, Dissertation Adviser Christopher Carothers, Member Barbara Cutler, Member John Mitchell, Member Rensselaer Polytechnic Institute Troy, New York May 2016 (For Graduation August 2016) c Copyright 2016 by Ying Lu All Rights Reserved ii CONTENTS LIST OF TABLES . vii LIST OF FIGURES . viii ACKNOWLEDGMENT . xi ABSTRACT . xii 1. INTRODUCTION . .1 1.1 Motivation . .1 1.2 Contributions and Organization . .6 1.2.1 Contributions . .6 1.2.2 Organization . .7 2. PREVIOUS WORK . .8 2.1 Benchmark Frameworks . .8 2.1.1 Generality . .8 2.1.2 Veracity . .9 2.1.3 Flexibility . 10 2.2 Parallel Multibody Dynamics Simulation . 11 2.3 Open-Source Software . 13 2.4 Summary . 15 3. BACKGROUND . 16 3.1 Equations of Motion . 16 3.2 Constraints and Friction . 17 3.2.1 Unilateral Contact . 18 3.2.2 Bilateral Constraint . 20 3.2.3 Friction . 23 3.2.3.1 Approximations of the Friction Model . 27 3.3 Time-Stepping Method . 31 3.4 Complementarity Problems . 32 3.4.1 Mixed Nonlinear Complementarity Problem . 33 3.4.2 Mixed Linear Complementarity Problem . 34 iii 3.4.3 Linear Complementarity Problem . 35 3.5 Parallel Computing . 36 3.5.1 Parallel Architecture . 37 3.5.2 POSIX Threads . 38 3.5.3 Compute Unified Device Architecture . 38 3.6 Summary . 39 4. SOLUTION ALGORITHMS . 40 4.1 Pivoting Method . 41 4.2 First-Order Iterative Method . 43 4.2.1 Matrix Splitting . 43 4.2.1.1 Projected Jacobi . 45 4.2.1.2 Projected Successive Over-Relaxation . 45 4.2.1.3 Projected Gauss-Seidel . 47 4.2.1.4 Relaxation Metrics . 48 4.3 Generalized Newton Method . 49 4.3.1 Different Systems . 49 4.3.1.1 Fischer-Burmeister System . 49 4.3.1.2 Chen-Chen-Kanzow System . 50 4.3.1.3 Minimum-Map System . 51 4.3.2 The Local Newton Method . 51 4.4 Line Search Algorithm . 52 4.4.1 Wolfe Algorithm . 53 4.4.2 Armijo Algorithm . 53 4.4.3 Goldstein-Price Algorithm . 54 4.5 Prox Solver . 56 4.5.1 Fixed-Point Iteration . 56 4.5.2 Proximal Point Function . 57 4.5.3 Algorithm Implementation . 58 4.5.4 Traditional Parameter Choice Strategy . 61 4.6 Summary . 62 5. BPMD DATABASE AND FRAMEWORK . 63 5.1 Motivation . 64 5.2 BPMD Database . 65 iv 5.2.1 Database Schema . 66 5.2.2 Utilize the Database . 70 5.3 BPMD Framework . 72 5.3.1 Available Models and Solvers . 73 5.3.2 Synthetic Versus Realistic Data . 73 5.3.2.1 Synthetic Data . 74 5.3.2.2 Realistic Data . 80 5.3.3 Comparison Results . 82 5.4 Parameter Dependence on Vector b .................. 84 5.4.1 Limitation of the Relaxation . 89 5.5 Verification and Validation with 2dgad . 91 5.5.1 Experiment Setup . 93 5.5.2 System Parameter Estimation . 94 5.5.2.1 Random Sampling . 94 5.5.2.2 MPEC Formulation . 95 5.5.3 Compare Simulation with Experiment . 98 5.5.3.1 Validation Results with Random Sampling . 98 5.5.3.2 Validation Results with MPEC Formulation . 100 5.6 Summary . 100 6. ANALYSIS OF PARALLEL METHODS . 102 6.1 Why Compute in Parallel . 103 6.1.1 Multithreading Parallelization with Pthreads . 104 6.1.2 GPU Parallelization with CUDA . 105 6.1.3 Hardware Parameters . 105 6.2 Simulation Scenarios Setup . 106 6.2.1 Multiple Low-Complexity Models . 106 6.2.2 Single High-Complexity Model . 107 6.2.3 Multiple High-Complexity Models . 107 6.2.4 Many-Rigid-Body Model . 107 6.2.5 Single Exponential-Complexity Model . 108 6.3 Profiling and Timing Measurement . 109 6.4 Pthreads Parallelization Results . 110 6.4.1 Multiple Revolute Joints . 110 6.4.2 Single PR2 Robot . 111 v 6.4.3 A Pair of PR2 Robots . 111 6.4.4 Dropping Test with Many Bodies . 113 6.4.5 Joint Tree Test . 115 6.5 GPU Parallelization Strategy . 116 6.6 GPU Parallelization Results . 120 6.7 Summary . 121 7. CONTRIBUTION TO MULTIBODY DYNAMICS COMMUNITY . 122 7.1 Standard Solver Interface . 122 7.2 Coulomb Friction Model Integration . 125 7.3 Haptic Hand Contact Dynamics . 126 7.4 HDF5 Instrument Tool . 126 7.5 Summary . 128 8. CONCLUSIONS AND FUTURE WORK . 129 8.1 Conclusions . 129 8.2 Future Work . 131 REFERENCES . 134 vi LIST OF TABLES 4.1 The existence and uniqueness of solutions to LCP . 43 5.1 The high-level hierarchy of BPMD database . 67 5.2 Standard simulation data stored in our BPMD database . 68 5.3 Different methods and solvers in the BPMD framework . 73 5.4 Scaling analysis of direct method with synthetic data . 77 5.5 Scaling analysis of matrix splitting methods with synthetic data . 79 5.6 Scaling analysis of generalized Newton methods with synthetic data . 80 5.7 Average time per iteration for different solvers . 84 5.8 Optimal parameters estimated for each solver . 95 5.9 The unknowns in MPEC formulation . 95 5.10 Lower and upper bounds of the unknowns in MPEC formulation . 96 6.1 GPU device hardware information . 106 vii LIST OF FIGURES 1.1 Applications of multibody dynamics simulation in different fields . .2 1.2 The main steps in multibody dynamics simulation . .4 1.3 A simulation scene from the multibody dynamics simulation software Algoryx . .5 3.1 World coordinate {W} and body coordinate {B} ............. 18 3.2 Contact formulation between two rigid bodies . 19 3.3 Revolute joint . 21 3.4 Prismatic joint . 21 3.5 Prismatic joint and revolute joint in simulation scenarios . 22 3.6 Bilateral joints on a PR2 robot . 23 3.7 Coulomb friction model with three physical states . 25 3.8 Approximations of Coulomb friction.