me751 advanced computational multibody dynamics · the solution to the kinematics and dynamics...
TRANSCRIPT
ME751 Advanced Computational
Multibody Dynamics
Section 9.6September 28, 2016
Dan NegrutUniversity of Wisconsin-Madison
Quote of the Day
“Eighty percent of success is showing up.” -- Woody Allen
NOTE: I’m taking suggestions for “Quote of the Day” and “Song of the Day”
2
Before we get started…
Last Time: Connection between angular velocity of a body and time derivative of Euler parameters Discussed the concept of Geometric Constraints
Basic, intermediate, high-level pairs Four basic constraints combined to provide all other intermediate and high-level pairs
Today: The p vs. formulation Computing sensitivities (Jacobian information) Quick remarks on Position Analysis + Newton Raphson Looking ahead: simulation engine vs. Chrono use
Student Feedback On Friday, please provide feedback on how the class is going
3
GCon’s: Putting Things in Perspective
All four basic geometric constraints are scalar conditions
If you want to implement your own Kinematics solver, with only four basic constraints you can cover 80% of the most used GCons
The approach outlined for defining various GCons is not unique Don’t have to use the four building blocks, you can have each GCon be
defined in its own specific way If you do this, you lose generality, hard to write software to generate a library of
GCons
Unfinished business: We still have to produce the Jacobian matrices for the four basic geometric constraints
4
Kinematics Analysis:[ ]
The three stages of Kinematics Analysis: position analysis, velocity analysis, and acceleration analysis they each follow *very* similar recipes for finding for each body of the mechanism its position, velocity, and acceleration, respectively
ALL STAGES RELY ON THE CONCEPT OF JACOBIAN MATRIX: q – the partial derivative of the constraints wrt the generalized coordinates
ALL STAGES REQUIRE THE SOLUTION OF A SYSTEM OF EQUATIONS
WHAT IS DIFFERENT BETWEEN THE THREE STAGES IS THE EXPRESSION OF THE RIGHT-SIDE OF THE LINEAR EQUATION, “b”
5
One Slide Warm Up
6
7
“When You Come to a Fork in the Road, Take It!"-- Yogi Berra
8
[Cntd.]
9
10
[Cntd.]
11
[One Slide Detour]
12
13Body1, r
Bodyi, r
Bodyj, r
Bodyi-1, p
Bodyi, p
Bodynb, p
Bodyi+1, p
Bodyj-1, p
Bodyj, p
Bodyj+1, p
[Short Detour]:
14
15
16
17
18
19
20
21
22
23
24
25
26
Solving a Nonlinear System
Most important two numerical algorithms in Kinematics: Solving a nonlinear system (required by Position Analysis) Solving a linear system (for Velocity Analysis and Acceleration Analysis)
Focus next on solving a nonlinear system Used almost in all analysis modes
Kinematics Dynamics Equilibrium
How does one go about finding the solution of the problems below?
27
Newton-Raphson Method[covered at length in ME451]
28
Newton-Raphson MethodGeometric Interpretation
29
The algorithm becomes
The Jacobian is defined as
Newton-RaphsonThe Multidimensional Case
Solve forthe nonlinear system
7nbq
30
Putting things in perspective…
Newton algorithm for nonlinear systems requires: A starting point q(0) from where the solution starts being searched for An iterative process in which the approximation of the solution is
gradually improved:
31
Newton’s Method: Closing Remarks
Can ever things go wrong with Newton’s method?
Yes, there are at least three instances:
1. Most commonly, the starting point is not close to the solution that you try to find and the iterative algorithm diverges (goes to infinity)
2. Since a nonlinear system can have multiple solutions, the Newton algorithm finds a solution that is not the one sought (happens if you don’t choose the starting point right)
3. The speed of convergence of the algorithm is not good (happens if the Jacobian is close to being singular (zero determinant) at the root, not that common)
32
Newton’s Method: Closing Remarks
What can you do address these issues?
You cannot do anything about 3 above, but can fix 1 and 2 provided you choose your starting point carefully
Newton’s method converges very fast (quadratically) if started close enough to the solution
To help Newton’s method in Position Analysis, you can take the starting point of the algorithm at time tk to be the value of q from tk-1(that is, the very previous configuration of the mechanism)
See the pptx file available on the class website for MATLAB code that implements the Newton-Raphson method implemented in conjunction with the Position Analysis stage 33
[Side Trip]Putting What We Learn to Good Use
How do we use what we have learned? How do we put it to work?
Three ways to go about it – assignments structured to reflect this:1) The hard way: Use Chrono to determine the time evolution of a
mechanical system2) The harder way: Write MATLAB code (simEngine3D) that implements
the solution to the Kinematics and Dynamics analysis3) The hardest way: do both
If you successfully do both, you get double points for HW part of your grade Most likely guarantees A in this class Very time consuming, but you’ll understand Computational Dynamics well
The assignments will be structured to reflect these options
34
[Side Trip]Putting What We Learn to Good Use
For Chrono selection: You will have to put together, over five weeks/assignments, five different
mechanical systems and upload the results onto a benchmarking webpage
Benchmarking webpage, put together by group in Spain http://lim.ii.udc.es/mbsbenchmark
Description of the benchmark: http://link.springer.com/article/10.1007/s11044-006-9020-8
Similar benchmarking effort done in Italy, using code from Stanford http://rehabenggroup.github.io/MBSbenchmarksInOpenSim/index.html https://github.com/RehabEngGroup/MBSbenchmarksInOpenSim
35
[Side Trip]Five Benchmark Models Simple pendulum
http://lim.ii.udc.es/mbsbenchmark/dist/A01/A01_specification.xml
N-four-bar mechanism http://lim.ii.udc.es/mbsbenchmark/dist/A02/A02_specification.xml
Andrew's mechanism http://lim.ii.udc.es/mbsbenchmark/dist/A03/A03_specification.xml
Bricard's mechanism http://lim.ii.udc.es/mbsbenchmark/dist/A04/A04_specification.xml
Flyball governor http://lim.ii.udc.es/mbsbenchmark/dist/A05/A05_specification.xml
36
[Comments, “The harder route”]The MATLAB Route: SimEngine3D
On Friday, first in a series of assignments that each contains a MATLAB component For first one you’ll have to implement computational support for two basic GCon’s
You will be coding over the next four or five HWs a series of MATLAB functions that in the end should form a cohesive 3D Simulation Engine for Kinematics and Dynamics Analysis
The task of putting together simEngine3D can become your Final Project
37
SimEngine3D: Comments
The code of each of you should be available on GitHub Please make sure it’s visible to all (not private) On the class forum, please post link to your GitHub repo so that people can look at it
I will not debug your code but rather inspect it and try to run using different input
If not happy w/ the code for this week, when working on next assignment it might be wise to look at other people’s repo and recycle code
This is a multi-week project – USE COMMENTS heavily in your code. Otherwise, in four weeks you’ll struggle to understand what you did in the past
38
39
End Kinematics
Start Dynamics