I am trying to model a close kinematic chain in simulink. However the model fails to be created and i get the following error:
*** Model not assembled: position violation ***
I am looking for any suggestions to get it working.
I have the following link structure:
All the above joints are revolute joints (MH-link11,MH-link12,link11-link21,link12-link22).
I want to connect link21 and link22. I have found the exact intersection point and even used a transform sensor to compensate small errors (order of magnitude 1e-5). So the frames i want to attach match exactly.
The transform sensor gives me the following translation:
[x,y,z] = [3.2594e-10,1.2520e-10,3.3367e-11]
and the following axis and angle:
axis: -z
, angle = 67.329
(degrees).
The transform sensor measurement frame is the Base frame, and the sensor is in the following figure:
So i add a revolute joint with a state target of -67.329
degrees and low priority, seen below.
From the mechanics explorer tab, i see the base and follower frames of the revolute joint match the joint21_EE (B) and joint22_EE (F) frames exactly.
In the Base-Crank Revolute Joint block dialog box, expand State Targets and select
Specify Position Target
.Specify the
Value
parameter as-30
deg.For the Coupler-Rocker Revolute Joint block, in the
Z Revolute Primitive (Rz)
>State Targets
section, select theSpecify Position Target
parameter, and specify theValue
parameter as0
deg andPriority
parameter asLow (approximate)
.On the Modeling tab of the Simulink® Toolstrip, click
Update Model
. Mechanics Explorer opens with a static display of the four-bar linkage in its initial configuration. The image shows the isometric view of the four-bar linkage.
Targets or motion inputs are specified for every joint around a kinematic loop:
High priority position target +0 (deg) not achieved; actual value: -0.000717909 (deg) You can configure this diagnostic in the Simscape Multibody Configuration Parameters dialog.
So, after a while, i found the root of the problem.
In the mathworks example, the close chain can move in 2D. So, by trying to close the chain, the error was only in the relative angle. and thus a low priority angle was sufficient.
One can see that the angle error was quite large 103 degrees
:
In my example, the kinematic chain can move in 3D, and thus kinematic loop errors are in [x,y,z]
and [Rx,Ry,Rz]
. So, to close the chain, i need a bushing joint, to add position targets for all directions/orientations apart Rz
, to let it rotate.