Spatial Contact Force -- Normal Force documentation

20 views (last 30 days)
Ben Navon
Ben Navon ungefär 6 timmar ago
Commented: dpb 29 minuter ago
I am working with Simscape Multibody using Spatial Contact Force block. Can anyone point me to the documentation on the following:
  1. How is the first time derivative of the penetration depth computed as a function of time?
  2. What is the equation of the smoothing function?
Thank you in advance!
  2 Comments
Umar
Umar ungefär en timme ago
Edited: Umar 44 minuter ago

Hi @Ben,

I looked into the Spatial Contact Force block in Simscape Multibody and here’s what I found regarding your questions.

How the time derivative of penetration depth (dot d) is computed

Feedback: The documentation calls it “the first time derivative of the penetration depth,” meaning how fast the two objects are moving relative to each other along the contact direction.

What’s missing: The docs don’t explain exactly how Simscape calculates it internally. So,I don’t know if it’s based on the relative velocity at the contact point, a numerical difference of the penetration depth over time, or some other method.

The smoothing function

Feedback: The block uses a smoothing function to make the force increase gradually as the objects start to touch. The documentation says:

  • The function is 0 when objects are just touching, and 1 when penetration reaches the transition width.
  • It increases smoothly and continuously.
  • Its slope is zero at the start and end (so the force doesn’t jump abruptly).

What’s missing:* The documentation never gives the actual formula,which means you will only know the general behavior, not the exact math.

What you can do

Feedback: Contact MathWorks support to ask for the exact smoothing function and how the derivative is calculated — sometimes they can provide internal notes.If you just need something to test with, you can create your own smooth function that meets the same behavior (like a simple curve that goes from 0 to 1 smoothly).

*You can also log the penetration depth in your simulation and calculate its rate of change yourself

If you want full control, you can build a custom force function in Simscape or Simulink and define both the smoothing and the derivative yourself.

Also, I checked archived manuals from older versions of Simscape, and they repeat the same explanations, but still don’t show the exact formula or computation method.

Hope this helps.

dpb
dpb 29 minuter ago
I would extend @Umar's suggestion to contact Mathworks support with the submittal of a formal documentation enhancement to add these pieces of background informationl

Sign in to comment.

Answers (0)

Tags

Products


Release

R2025b

Community Treasure Hunt

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

Start Hunting!