Integrate simulink position in simscape

1 次查看(过去 30 天)
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.

回答(1 个)

Nehemiae
Nehemiae 2023-3-10
编辑:Nehemiae 2023-3-10
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.

类别

Help CenterFile Exchange 中查找有关 Multibody Modeling 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by