Azzera filtri
Azzera filtri

Integrate simulink position in simscape

1 visualizzazione (ultimi 30 giorni)
Jonas Horntvedt
Jonas Horntvedt il 25 Gen 2023
Modificato: Nehemiae il 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.

Risposte (1)

Nehemiae
Nehemiae il 10 Mar 2023
Modificato: Nehemiae il 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.

Categorie

Scopri di più su Multibody Modeling in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by