Drift in simMechanics forward dynamics solver
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have boiled this down to the following simple example:
Say you were trying to model a plank not attached to the ground in SimMechanics (for a simple 2-D case). You would need a body with two joints attached to ground, one at -Rarm from the center of gravity, one at +Rarm from the center of gravity. These joints would need 1 prismatic DOF(allowing the up and down motion) and 1 rotational DOF (allowing their relative angles to change..
If you apply the same upward force to each side, (essentially pushing up on both sides of the plank with the same force) you would expect the entire body to move upward without rotation. However, when I attempt this, not only do I get the expected upward motion, I also get a very slight rotation.
If I put a body sensor on it, the angular accel looks like numerical noise around 0... the angular rate looks like a ramp and the angle looks parabolic. I assume someone is going to say something like--once you double integrate the error in angular acceleration your angle drift is pretty bad. But why is there any error at all if the forces are exactly the same at exactly the same distances away?
2 Commenti
Arnaud Miege
il 23 Mag 2011
Can you upload your model to a filesharing site? It'd be a lot easier to comment on what's going on or make any suggestions.
Risposte (1)
Guy Rouleau
il 24 Mag 2011
Based on the description, it seems like your model contains a closed loop (something like ground-Joint-Body-Joint-Ground).
If this is the case, then SimMechanics cuts the loop at one joint and replace it by a constraint. This is explained here:
If you want to see which joint is replaced, enable the "Mark automatically cut joints" from the model configuration
Because of this "cutting", your closed loop is not as symetric as you think. One side is ideal and one side is resolved with a constraint.
One thing you can do is to put a Machine Environment block in the model. In the Constraint Tab, set the solver type to "Machine Precision". As explained here, this is your best bet for maximum accuracy:
However this is not perfect. As you mention, position is double integration of the force actuation. Consequently, even a small error the level of machine precision, when integrated twice will grow over time.
3 Commenti
Guy Rouleau
il 27 Mag 2011
The scaling can help, but this is not guaranteed.
Can you provide more details on what is your end goal?
In real life, there will for sure be a small unbalance if one tries to build such system. It can be a small difference in the friction, the center of mass not exactly in the center, etc.
Knowing your final goal can help viewing the problem from a different angle and find how to get what you are really looking for.
Vedere anche
Categorie
Scopri di più su Assembly in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!