Using the 6-DOF joint for free motion of a body in SimMechanics 2nd generation

17 views (last 30 days)
Hi there!
I'm trying to model a boat in Simmechanics, and I'm having some trouble getting the body to move in the desired direction. I've started easily, getting it to move in 1-D with just forces acting along the x-axis and that works fine!
When I'm now trying to get it to turn, with forces acting in both the x- and y-directions aswell as a torque around the z-axis (representing the torque from the rudder) it just turns the boat around and it floats away along some trajectory between x- and y-axis. It should turn around in a circle, given that there's a constant force in the x-direction (propeller thrust) and constant torque from the rudder.
I'm using the 6-DOF joind between the world frame and the body frame, sensing velocity in x- and y-directions and torque around z. I then have functions calculating the torque depending on the rudder angle etc and acting on the tz-input, aswell as functions acting on the fx- and fy-inputs.
It seems that the forces are acting along the CS of the world frame, and not the one fixed to the body, which ofcourse will make the boat go in one direction and not turn. The functions I've calculated are correct, they work fine when simulating in simulink only. So, how can I get the forces to act on the frame fixed to the body?
I'm very grateful for any help, I've been struggeling with this for a couple of days now!
/Magnus
  2 Comments
Magnus
Magnus on 24 Feb 2014
I still haven't found a god solution to this problem, help anyone? And someone answered that I should turn the joint around, so that the boat was attached to the base frame and the world to the follower frame, but that didn't work either.
Emil Jacobsen
Emil Jacobsen on 25 Mar 2021
Edited: Emil Jacobsen on 25 Mar 2021
I was having the same problem, and I have found that using the inputs of the 6-DOF joint block does not allow for applying forces in the body frame. Instead I use the "External Force and Torque" block to apply forces in the body frame. Connect the base frame of the 6-DOF Joint to the world frame, and connect your 3D objects body frame to the follower frame. When simply use the External Force and Torque block to apply forces in the follower frame (this is done inside my "Drone Model" block). Tip: You can use the 6-DOF Joint as a absolute sensor to measure position and attitude.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!