Integrate simulink position in simscape

3 vues (au cours des 30 derniers jours)
Jonas Horntvedt
Jonas Horntvedt le 25 Jan 2023
Modifié(e) : Nehemiae le 10 Mar 2023
I am using Simulink to simulate an autonomous surface vehicle. For transit purposes this work fine, but when modelling the docking sequence I would like to use the spatial contact force block in simscape to simluate the contact forces between the dock and the boat. Is there any way extract the position data from Simulink, and use them for position for a rigid body in Simscape? The only opportunity I find is by adding external forces to the joint, but I would rather command the position of the boat, then just extract the forces from sensing, and apply this on the boat in Simulink.

Réponses (1)

Nehemiae
Nehemiae le 10 Mar 2023
Modifié(e) : Nehemiae le 10 Mar 2023
Hello,
To integrate the position data from Simulink for the Spatial Contact Force block, the Point Cloud block can be used. Here, the geometry of the object is created from the coordinate matrix (which could be defined in the model workspace) specified, and this can be fed into the Spatial Contact Force block. The R port of the block is the reference frame for the point cloud.
The documentation on the Point Cloud block (https://www.mathworks.com/help/sm/ref/pointcloud.html) and the contact modelling example for a ball on a grid surface (https://www.mathworks.com/help/sm/ug/grid_surface_ball.html) are helpful in this regard.

Catégories

En savoir plus sur Simscape Multibody dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by