me751 advanced computational multibody dynamics · the solution to the kinematics and dynamics...

39
ME751 Advanced Computational Multibody Dynamics Section 9.6 September 28, 2016 Dan Negrut University of Wisconsin-Madison

Upload: others

Post on 15-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

ME751 Advanced Computational

Multibody Dynamics

Section 9.6September 28, 2016

Dan NegrutUniversity of Wisconsin-Madison

Page 2: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

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

Page 3: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

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

Page 4: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

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

Page 5: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

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

Page 6: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

One Slide Warm Up

6

Page 7: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

7

“When You Come to a Fork in the Road, Take It!"-- Yogi Berra

Page 8: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

8

Page 9: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

[Cntd.]

9

Page 10: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

10

[Cntd.]

Page 11: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

11

Page 12: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

[One Slide Detour]

12

Page 13: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

13Body1, r

Bodyi, r

Bodyj, r

Bodyi-1, p

Bodyi, p

Bodynb, p

Bodyi+1, p

Bodyj-1, p

Bodyj, p

Bodyj+1, p

Page 14: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

[Short Detour]:

14

Page 15: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

15

Page 16: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

16

Page 17: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

17

Page 18: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

18

Page 19: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

19

Page 20: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

20

Page 21: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

21

Page 22: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

22

Page 23: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

23

Page 24: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

24

Page 25: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

25

Page 26: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

26

Page 27: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

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

Page 28: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

Newton-Raphson Method[covered at length in ME451]

28

Page 29: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

Newton-Raphson MethodGeometric Interpretation

29

Page 30: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

The algorithm becomes

The Jacobian is defined as

Newton-RaphsonThe Multidimensional Case

Solve forthe nonlinear system

7nbq

30

Page 31: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

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

Page 32: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

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

Page 33: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

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

Page 34: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

[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

Page 35: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

[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

Page 36: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

[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

Page 37: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

[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

Page 38: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

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

Page 39: ME751 Advanced Computational Multibody Dynamics · the solution to the Kinematics and Dynamics analysis 3) The hardest way: do both If you successfully do both, you get double points

39

End Kinematics

Start Dynamics