FAQ  •  Login

Assignment 8 (posted on March 11)

<<

ME451Tyler

ME751 Student

Posts: 25

Joined: Tue Mar 02, 2010 10:19 pm

Unread post Wed Mar 17, 2010 7:46 am

Re: Assignment 8 (posted on March 11)

Yes, checked against Adams.

I no longer have a need for initial velocity inputs/guesses.  Is that ok?
<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Wed Mar 17, 2010 9:02 am

Re: Assignment 8 (posted on March 11)

Dan Negrut wrote:
ME751Chris wrote:I'm getting the error that my jacobian is singular to working precision.  I use this function for my driving DP1 constraint:
constraint DP1
body_i ground
abar_i 0 1 0
body_j pendulum
abar_j 1 0 0
funct cos(pi/4*sin(2*t)-pi/2)

with the initial pendulum in this configuration
pendulum
r 0 0 -2
p 1 0 0 0

if I have p 0.5 0.5 0.5 0.5, then the newtonRaphson solver blows up (correction gets larger)


Chris - recall that for Newton-Raphson to converge it needs a good starting point.  Your starting points are not that good.
Take a look at the initial configuration of the pendulum at t=0.  It hangs down.  Consequently, the A matrix looks like this:
A =
[ 0 0 1
0 1 0
-1 0 0]

As such, e_0 = sqrt(2)/2, e_1=0, e_2=sqrt(2)/2, e_3=0.
Your r is good.

The immediate question is this: so what should be the initial guess for Newton-Raphson at the next step.  A good guess is this: always take as initial guess the configuration at the previous time step.  In fact, if I remember correctly this is what the Newton-Raphson code the was provided in the slides uses.
Please comment on this once you get to implement it.
Dan



I used the info Tyler gave me of what r and p were at time t =1.  That worked.
<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Wed Mar 17, 2010 9:12 am

Re: Assignment 8 (posted on March 11)

ME751Tyler wrote:
ME751Chris wrote:My velocities turned out to be zero for Q, but my accelerations were non-zero (specifically in the 'y' and 'z' direction...'x' direction was pretty much zero).  Any reason why? I'm using the equation on slide 8 of 2/16.


I had a similar problem for a while.  I was calculating gamma before I knew what omega was.  (I was using initial guess values all the time)  I pulled my gamma calculation out of my newton-raphson and computed gamma after i had the velocities.  That way I could use the correct omega values.


Thanks.  I had implemented this wrong last night.  I forgot I was calculating pi instead of pibar.  I was therefore setting my omega_bar from values found in pi.  However, they were in different reference frames.  I therefore set my omega_bar to A'*pi(4:6), where pi(4:6) are the omega terms and premultiplying them by A' gets them into the L-RF which is what my code uses.
<<

ME751Chris

ME751 Student

Posts: 55

Joined: Tue Mar 02, 2010 10:15 pm

Unread post Wed Mar 17, 2010 9:14 am

Re: Assignment 8 (posted on March 11)

ME751Tyler wrote:Yes, checked against Adams.

I no longer have a need for initial velocity inputs/guesses.  Is that ok?




I think that is okay.  I have still have my velocity input/guesses, but they don't do anything.
<<

ME451Tyler

ME751 Student

Posts: 25

Joined: Tue Mar 02, 2010 10:19 pm

Unread post Wed Mar 17, 2010 9:43 am

Re: Assignment 8 (posted on March 11)

Dr. Negrut,

Can you clarify what you want handed in.

Upload the code as normal.
Include a folder called solution with the movie.
  Should this folder have the graphs as well, or do we hand those in on paper?
  Does it matter what program we use to make the graphs?
I am going to assume you don't want our 10000 data files, correct?
<<

Dan Negrut

Global Moderator
Global Moderator

Posts: 833

Joined: Wed Sep 03, 2008 12:24 pm

Unread post Wed Mar 17, 2010 12:52 pm

Re: Assignment 8 (posted on March 11)

ME751Tyler wrote:Yes, checked against Adams.

I no longer have a need for initial velocity inputs/guesses.  Is that ok?




that's ok.  you need an initial guess for positions since you use an iterative method (Newton-Raphson), which needs a starting point.
The velocities are the solution of a linear system.  This is a one shot deal, no need to iterate.
Dan
<<

Dan Negrut

Global Moderator
Global Moderator

Posts: 833

Joined: Wed Sep 03, 2008 12:24 pm

Unread post Wed Mar 17, 2010 12:54 pm

Re: Assignment 8 (posted on March 11)

ME751Tyler wrote:Dr. Negrut,

Can you clarify what you want handed in.

Upload the code as normal.
Include a folder called solution with the movie.
  Should this folder have the graphs as well, or do we hand those in on paper?
  Does it matter what program we use to make the graphs?
I am going to assume you don't want our 10000 data files, correct?


I'll send out an email about this momentarily.
Dan
<<

ME751James

ME751 Student

Posts: 13

Joined: Tue Mar 02, 2010 10:20 pm

Unread post Tue Mar 23, 2010 9:47 pm

Re: Assignment 8 (posted on March 11)

I tried simulating my pendulum for 60 seconds at 48 fps.  I noticed that my pendulum began to drift along the z and x axis (haven't attempted to determine if it's drifting on the y axis too).  It's pretty bad along the Z axis.

I've checked my constraint equations and my evaluations of phi r and phi p for my cd constraints.  I'm sure it's an oversight in the code.  Has anyone else run into this issue?
<<

ME751James

ME751 Student

Posts: 13

Joined: Tue Mar 02, 2010 10:20 pm

Unread post Tue Mar 23, 2010 11:38 pm

Re: Assignment 8 (posted on March 11)

Turns out it was a bug in my code.  I doubt anyone else would have the problem I'm having but if you do have a drifting problem, you're probably not updating all of your constraint values when you update your position values for each body.

Runs perfectly now.  :D
<<

Dan Negrut

Global Moderator
Global Moderator

Posts: 833

Joined: Wed Sep 03, 2008 12:24 pm

Unread post Wed Mar 24, 2010 7:37 am

Re: Assignment 8 (posted on March 11)

ME751James wrote:Runs perfectly now.  :D

... don't repeat the experiment.
Previous

Return to ME751 Spring 2010: Advanced Computational Multibody Dynamics

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.