Search code examples
matlabsimulationsimulinksimscapesimmechanics

Change Revolute Joint Axis in SimMechanics


I am leveraging SimMechanics, SimElectronics, and Simulink to model a quadcopter system for an embedded system class project ( files here ). I have generated a 2nd Generation SimMechanics model of an F450 quadcopter frame, including the motors and propellers. We were hoping to develop a model of a quadcopter with only a single rotational degree of freedom around either the x or y axis. I was hoping to model this with a revolute joint connecting the quadcopter frame to the "world frame". However, the "revolute joint" block in SimMechanics only acts around the z-axis. How can I change the axis of rotation for a revolute joint?

It appears that another individual has asked the same question, but no one has yet responded to his question.


Solution

  • See Assembling Multibody Models in the SimMechanics documentation, in particular the section on "orienting joints":

    To obtain the motion expected in a model, you must align its various joint motion axes properly. This means aligning the joints themselves as observed or anticipated in the real system. Misaligning the joint axes may lead to unexpected motion but it often leads to something more serious, such as a failure to assemble and simulate.

    You can specify and change joint alignment by rotating the connection frames local to the adjoining body subsystems. For this purpose, you specify rotation transforms using Rigid Transform blocks, either by adding new blocks to the body subsystems or, if appropriate, by changing the rotation transforms in existing blocks within the subsystems.

    Why change the orientation of joints through body subsystem frames? The primitives in a Joint block each have a predetermined motion axis, such as x or z. The axis definition is fixed and cannot be changed. Realigning the connection frames local to the adjoining body subsystems provides a natural way to reorient joints while avoiding confusion over which axis a particular joint uses.

    For an example of how to rotate joint connection frames, see Model Mount.

    So the answer is to use a Rigid Transform block to change the orientation of the frames, you cannot change the axis of the revolute joint.