MATLAB: Time-Varying Passive Components in Simmechanics

simmechanics

Passive components in revolute joints require constant values. In other words, spring and damping constants cannot handle vectors. Are there plans to enable such capabilities?
Motivation: I am studying biomechanics, and an area of interest is how animals use muscle coordination to actively change stiffness during certain tasks. It would be convenient to supply damping coefficients as a function of time in my simulations.
Thanks, Brian

Best Answer

True that it's not directly available, but you can actually implement this yourself with blocks from the "Simscape > Foundation Library > Physical Signals" library.
You can measure the positions/velocities of the joints, multiply them by time-varying stiffness/damping coefficients (C/K) that come from Simulink. That is:
  • Damping force = -C*velocity
  • Spring force = -K*(position-equilibrium position)
Sum them up and feed them back as actuation forces/torques, and you should be good to go!
- Sebastian