Simscape Multibody Contact with variable friction coefficent

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.

답변 (1개)

Steve Miller
Steve Miller 2022년 11월 25일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Simscape Multibody에 대해 자세히 알아보기

제품

릴리스

R2021b

질문:

2022년 3월 14일

답변:

2022년 11월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by