How do I customize contact force calculation in Simscape Multibody?

4 views (last 30 days)
I want to implement my customized contact force when contact happens between two soilds in Simscape Multibody R2024b.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 21 Oct 2025 at 0:00
The Spatial Contact Force block is designed to support custom friction and normal force laws. You set this up in the dialog by choosing Normal Force->Method->Provided by Input and/or Frictional Force->Method->Provided by Input, which expose input ports on the block. The normal force input expects a scalar normal force magnitude signal. The frictional force input expects a 2x1 friction force vector signal (x and y components of friction with respect to the contact frame). So taken together, the normal and frictional force inputs fully define the total 3D contact force. The outputs you can sense from the Spatial Contact Force block should likely be sufficient for creating custom normal and frictional forces. A common approach is to feed the outputs of the Spatial Contact Force block into a MATLAB Function block which computes the forces, and then feed those forces back into the Spatial Contact Force block. For instance, simple friction forces like Coulomb friction are usually based on tangential velocity (i.e., sliding velocity) and normal force, both of which can be sensed by the block; simple normal forces are usually based on penetration depth and penetration velocity ("Relative Normal Velocity"), both of which can also be sensed by the block.
For reference, this doc page attempts to illustrate the contact plane and contact frame.

More Answers (0)

Categories

Find more on Simscape Multibody in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!