Simscape Multibody Contact with variable friction coefficent

8 views (last 30 days)
Hello,
I'm trying to figure out how to dynamically change the friction coefficients inside of a Spatial Contact Force block between two geometries in Simscape. I am already using a workspace variable to set the coefficients (i.e., "mu_s" and "mu_k) but changing these variable during the simulation (using a Matlab Function block and "assignin()" as explained here) does't seem to affect the simulated friction.
Am I to understand that friction coefficient (and other parameters in multibody blocks) are not reconfigurable during the simulation?
In my case, I want to vary the friction coefficent as a function of the angle of rotation of a joint.
Any help is very much appreciated.

Answers (1)

Steve Miller
Steve Miller on 25 Nov 2022
The Spatial Contact Force block lets you use your own custom friction force if you set the Frictional Force Method to "Provided by Input". Then you can have the coefficient of friction value depend on any quantity you want.
There is an example of this in File Exchange submission Spatial Contact Force Examples in Simscape Multibody
Download the files and try sm_disk_floor_custom_friction.slx
--Steve

Categories

Find more on Simscape Multibody in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!