Git Product home page Git Product logo

Comments (4)

andreadelprete avatar andreadelprete commented on July 21, 2024

I've managed to repeat the same test as above with a time step of 10 ms, and Exponential is still stable with this large time step!
romeo_walk_err_dt_10ms
With dt=10 ms Exponential gives roughly the same integration error of Euler with dt=1/4 ms. This means that we need 40 times more time steps with Euler than with Exponential.

from consim.

andreadelprete avatar andreadelprete commented on July 21, 2024

I've found the maximum time step for the controller to remain stable (it is 40 ms), and I've used it as basic time step for the simulator. Here the new results:
romeo_walk_err_dt_40ms
Results are good even with large time steps. However, it should be noticed that this doesn't mean the simulator would work with a time step of 40 ms. In these tests we are indeed measuring the local error, which means that every time step (40 ms) the state of the system is reset to the ground truth, so the simulator cannot diverge. If instead I measure the global error (i.e. I don't reset the state to the ground truth) I can see that even Exponential diverges for time steps >= 5ms:
romeo_walk_global_err_dt_40ms
However, for dt=2.5 ms Exponential is stable, while Euler is not. For dt<=1.25 ms both Exponential and Euler are stable, but Exponential performs better.

Anyway I think it's better to focus on the local error, because the global error is dominated by the collision checking errors, which are rather independent of the integration scheme, and so it tends to "hide" the benefits of Exponential over Euler.

from consim.

andreadelprete avatar andreadelprete commented on July 21, 2024

New results for the same test. Here I'm showing the local integration error as a function of the computation time (per time step, which is 40 ms in this test):

local_err_vs_comp_time

These results are excellent. Euler never beats Exponential. Using 0, 1 or 2 matrix multiplications in expm we get peak performance of Exponential.

from consim.

andreadelprete avatar andreadelprete commented on July 21, 2024

The previous test was using a contact stiffness of 1e5 and a contact damping of 1e2, which is underdamped. If we use instead a critically damped contact (i.e. damping 5e2) the results are a bit better for Euler:
local_err_vs_comp_time_k_1e5_b_5e2
Euler is never the best, but sometimes it's better than the standard Exponential integrator. It seems that Exponential is most beneficial for underdamped contacts, probably because it's able to predict the contact force oscillations much better than Euler, which simply assumes constant forces during the time step.

from consim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.