### Matlab 09 Results

Matthew

**Moderator:** RaduS

Here are the results for Problem 1, parts 2 and 3. Will post for Problem 3 separately later.

Matthew

Matthew, display the difference between the solution obtained using ode45 (with a tight tolerance) and FE, then the difference between the ode45 and BE solutions.

Frankie, your BE plot looks fine. However, it seems to me that you got the slope for the RK4 order analysis reverted (the error should increase with the step-size, not the other way around).

Here are the results I obtained (including BDF2 -- note that this is a 2nd order method as indicated by the slope of the corresponding line in the order analysis plot).

-Radu

Frankie, your BE plot looks fine. However, it seems to me that you got the slope for the RK4 order analysis reverted (the error should increase with the step-size, not the other way around).

Here are the results I obtained (including BDF2 -- note that this is a 2nd order method as indicated by the slope of the corresponding line in the order analysis plot).

-Radu

Here are the figures...look much better now.

Matthew T

Forward Euler

Backward Euler

Runge-Katta

-Dayton S

Forgot absolute value

Added BDF2: Mine is like Woongjo Choi's - roughly negative of Radu's

Added BDF2: Mine is like Woongjo Choi's - roughly negative of Radu's

Frankie

- Amir

F13fnmercado wrote:Added BDF2: Mine is like Woongjo Choi's - roughly negative of Radu's

Frankie, this is not necessarily surprising. When using an implicit integration formula, the IVP solution obviously depends on how the underlying nonlinear problem is solved (including the tolerance, the initial guess, how the Jacobian is obtained, etc.).

In my implementation of the implicit methods (BE and BDF2) I used Matlab's fsolve function with:

- a tolerance of 1e-10 (you need a relatively tight tolerance in the nonlinear solver so that errors at that stage do not negatively impact the integration accuracy)
- the IVP solution at the previous step as an initial guess (like you must have also done)
- letting fsolve evaluate derivatives numerically, through finite differences, which is its default setting (I assume you used the exact Jacobian?)

Note that we do not see obvious differences in our results for BE because the accuracy of that method is lower than that of BDF2, O(h) vs. O(h2), and therefore the differences in how we each solve the underlying nonlinear problem are less relevant.

Good observation,

-Radu

WoongJo, your plot of the time evolution of the x coordinate for the 2nd body is correct. How about those reaction forces/torques?

For reference, I post the results I obtained.

-Radu

For reference, I post the results I obtained.

-Radu

34 posts
• Page **1** of **3** • **1**, 2, 3

Return to ME451 Fall 2013: Kinematics and Dynamics of Machine Systems

Users browsing this forum: No registered users and 2 guests