MATLAB: Joint force sensing in Simscape not giving the same results as the equations

joint forcemultibodySimscapeSimscape Multibody

Hello everyone,I have a simple mechanism modeled in Simscape. A revolute joint rotating around z axis and a simple bar connected to it.I am applying a position as the motion input of the joint and the torque is being automatically computed.
I'm trying to sense the forces(fx and fy) that the revolute joint is applying to the bar using the "Total force" option in the "composite force/torque sensor" of the revolute joint block. The problem is I'm always getting the weight of the bar as fy and fx is always zero whereas according to the equations there should be a change in fx and fy based on the acceleration of the bar.
I tried giving different position profiles just to make sure it isn't a problem of zero acceleration on x axis but I keep getting fx=0 and fy=mg. Is there something wrong with my simulation or there is another way for computing these forces? I would really appreciate the help.

Best Answer

There is a problem with the Simulink-PS Converter (the one below the revolute joint). You provide the position signal but not the first and second derivatives.
To correct the model:
  1. Double click the Simulink-PS Converter
  2. Go to the Input Handling tab
  3. Select Filtering and derivatives: Filter input, derivatives calculated
  4. Select Input filtering order: Second-order filtering