MATLAB: How can i add nonlinear spring in the Simscape model

simmechanicsSimscapeSimscape Multibodysimulink

Hello, I found this model of the double pendulum on the internet.I want to get a nonlinear spring(cubic) behaviour from the second revolute joint which is not available with the intrinsic options. I am trying to attach a nonlinear spring externally but it is showing red dotted lines.The green block is the nonlinear spring that I am trying to connect to the solid block. Help is appreciated.

Best Answer

The nonlinear rotational spring is a Simscape Mechanical Rotational block, whereas the rest of your model uses Simscape Multibody blocks. Since these are two different domains, you need an interface block to connect the nonlinear spring to the Simscape Multibody network.
An example of how to interface the two domains is the Joint Limits and Friction Methods in a Hinge model in the Simscape Multibody Multiphysics Library.
Related Question