SimMechanics Rotation Control via Torque Application

1 view (last 30 days)
Using a body sensor block I am retrieving the rotation matrix of a simulated body. Knowing the initial rotation and the current body rotation, I am attempting to apply a torque to this body so that it returns to the initial rotation. I have converted the rotation matrix form to Euler angles, determined the difference between the rotations via cross product and have multiplied this by the diagonal terms of the body's inertia tensor (Ixx, Iyy and Izz). The resultant vector is input to a body actuator that is set to actuate my model with an applied torque. However, my simulation does not run and a singularity occurs. Is there a way to achieve rotation regulation of a body that I may have overlooked?

Answers (1)

Steve Miller
Steve Miller on 24 Nov 2021
If you are getting an error concerning a singularity, I suspect you are either
  1. Using a Gimbal Joint which has gone into Gimbal Lock (two degrees of freedom are aligned). In this case, switch to a Spherical Joint
  2. Are missing inertia on a degree of freedom. In this case, add inertia to that degree of freedom.
--Steve

Categories

Find more on Simscape Multibody in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!