Why do I receive the following error when I run my Simscape Multibody model? *** Model not assembled: position violation *** Resolve this issue in order to simulate the model. How do I fix it?

Why do I receive the following error when I run my Simscape Multibody model?
Model not assembled: position violation *** Resolve this issue in order to simulate the model.
How do I fix it?

 Accepted Answer

This error has to do with the Base and Follower coordinate frames of a joint violating the degrees-of-freedom constraints of the joint. Here are examples where that error will be triggered.
Example 1: In this example, the root cause of the error message is quite obvious. The body is connected to two weld joints, and one is directly connected to the world frame, while the other is offset from it.
Example 2: This example models a swing. When trying to simulate the model below, one will encounter an error stating that the model is not assembled.  When looking at the Multibody Explorer (Mechanics Explorer before R2025a), the root cause may not be obvious at first glance because the model appears to be visually properly assembled. However, when toggling through the components, one will notice that the coordinate frames at the connection points do not match, whereas in the model, they are directly connected.
Adding another Rigid Transform block resolves the error in this case:
In summary, when facing such an error in your model, check what the model looks like in the Multibody Explorer. Double-check coordinate frames at the connection ports, and if they do not align, ensure that a transform block is placed between the frames.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!