# CrankSlider2D---Joint

[LEFT]Hello,

I have a question regarding the “CrankSlider2D” model. It seems that when the kinematic joint is activated (SetInitialCondition), it will align
the slave reference frame (second reference frame in the joint definition) to be the same as the master reference frame. When I remove the third segment in this case, which is the Slider, and the universal joint between Crank and Coupler is activated, the joint will adjust the two connected frames as what I mentioned above.
However, when the Slider segment and the prismatic joint are included in this model, the universal joint can only keep two z axes of thetwo reference frames in the same plane. Similarly, the spherical joint between SlderNode (on the Coupler) and Slider Segment will not force the slave frame to be parallel with master frame (it can be clearly seen if you rotate the SliderNode’s nodal reference frame randomly). It seems that the universal and spherical joints are adjusted automatically to guarantee the prismatic joint working properly. How does it actually work? Also, I am really wondering when multiple joints are used simultaneously, how does the system cooperate them to achieve expected motion?

Thank you!

Jack Xie
Clemson University
[/LEFT]

Jack,

The multibody engine inside AnyBody is based on a so-called full cartesian formulation. It considers each segment as an independent body with 6 degrees of freedom and then solves the nonlinear constraint equations to determine all the degrees of freedom. This is why the system handles any conceivable mechanism topology and accepts rather subtle constraint definitions.

The system is based on the formalism of the Parviz Nikravesh from the University of Arizona and is explained in detail in hios excellent book: Computer-Aided Analysis of Mechanical Systems.

However, you can also find a somewhat less detailed description in the basic paper on AnyBody:

Michael Damsgaard, John Rasmussen, Søren Tørholm Christensen, Egidijus Surma, and Mark de Zee (2006): Analysis of musculoskeletal systems in the AnyBody Modeling System. Simulation Modelling Practice and Theory, 14(8), 1100-1111.

Best regards,
John

Hi John,

Thank you for your answer. Regarding this CrankSlider model, physically, how could the system take priority to deal with the prismatic joint. I found it is a little bit difficult to interpret the joints at a physical level.

Thank you

Jack

Jack,

I have to understand your question a bit better. You say that you remove the slider. When this is done, it is also necessary to remove objects that refer to the slider, i.e. the prismatic joint Rail and the spherical joint Ball.

When these two joints are gone, the system is kinematically under-determinate. You should get a warning about that when you load the model. If you subsequently run the SetInitialConditions operation, the system is essentially trying to solve a nonlinear system of equations with more unknowns than equations. The algorithm is not really set up to do this, but it sometimes is capable of finding a solution to the underdeterminate problem. Unfortunately the result of these efforts is rather random and depends a lot on initial conditions, round-off errors and other unpredictable circumstances.

I hope this contributes to clarifying what you are seeing.

John

Hi John,

I am afraid maybe I didn’t explain the problem clearly. Sorry… Actually I focused on the working of joints, especially the universal joint and spherical joint. When I say “Remove” the segment, I in fact remove the segment and its associated joints or drivers and then re-balance the model. For example, I did comment the Slider segment, prismatic joint and spherical joint definition, and I used AnyKinEqSimple driver to balance 2 dof due to removal of the previously used joints. So for every time, the model is kinematically determinate. As I mentioned in the question, the universal joint will not align the two constructing reference frames in the complete model, while it did align when only Coupler and Crank were kept. And for the complete model, the local reference frame of Slider will be aligned by the prismatic joint to be the same as global reference frame, rather than followed by the spherical joint. That is what I feel confused…Is that clear to you?

Thank you very much.

Jack

Hi John,

I realize I forgot to mention… :o In this case, I didn’t use the original ARel definition for CrankNode. Actually, I used ARel =RotMat(60*pi/180, z) for both CrankNode and SliderNode. Thank you

Jack

Hi Jack,

Perhaps it is easier if you attach your updated model to a message and also a picture or two illustrating exactly what you are in doubt about?

Best regards,
John