Representing Frames

You represent frames with frame ports, lines, and nodes. Each of these frame entities represents one frame. You connect one frame entity to any other using a connection line. When you do so, you apply a spatial relationship between the two frames. Spatial relationships that you can specify include:

  • Identity — Make two frames coincident with each other.

  • Translation — Maintain an offset distance between two frame origins.

  • Rotation — Maintain an angle between two frames.

The figure illustrates these spatial relationships. Letters B and F represent the two frames between which you apply a spatial relationship.

A frame port is any port with the frame icon . A frame line is any connection line that joins two frame ports. A frame node is the junction point between two or more frame lines. You can connect one frame entity only to another frame entity. Connecting frame ports, lines, or nodes to other types of ports, lines, or nodes is invalid. For example, you cannot connect a frame port to a physical signal port.

Identity Relationships

To make two frames coincident in space, connect the corresponding frame entities with a frame line. The frame line applies a rigid identity relationship between the two frames. During simulation, the two frames can move only as a single unit. They cannot move with respect to each other. The figure shows three ways to make two frames coincident.

Alternatively, use the Weld Joint block to make two frames coincident for all time. The Weld Joint block fixes the relative positions and orientations of frames belonging to different rigid bodies.

    Note:   Ensure each joint frame port connects rigidly to a Solid or Inertia block. The connection can be direct, through a connection line, or indirect, through one or more Rigid Transform blocks. Joint frame ports not rigidly connected to components with inertia (those containing at least one Solid or Inertia block) can cause a degenerate-mass error during simulation.

Translation and Rotation

To separate two frames in space, you use the Rigid Transform block. By connecting two frame entities to the base and follower frame ports of this block, you apply the rigid transformation that the block specifies. Rigid transformations include translation and rotation.

You can apply an offset distance between two frame origins, a rotation angle between the frame axes, or both. Two frames that you connect using a Rigid Transform block behave as a single entity. If you specify neither translation or rotation, the Rigid Transform block represents the identity relationship. The two frames become coincident in space. In the figure, a Rigid Transform block applies a rigid transformation between two solid reference frames.

Interpreting a Frame Network

As an example, consider the frame network of a binary link. SimMechanics™ provides a model of this rigid body. To open it, at the MATLAB® command prompt, enter sm_compound_body. Double-click the Compound Body subsystem block to view the underlying block diagram. The figure shows this diagram.

To represent the binary link, the Compound Body subsystem contains three Solid blocks. The blocks represent the main, peg, and hole sections. Three frames provide the position and orientation of the three solids according to the guidelines that section Identity Relationships introduces. Each group of frame ports, lines, and nodes that directly connect to each other represents one frame. The figure shows the three frames in the block diagram.

Two Rigid Transform blocks represent the spatial relationships between the three frames. One block translates the hole frame with respect to the reference frame along the common -X axis. The other block translates the peg frame with respect to the reference frame along the common +X axis. The figure shows these two blocks.

Related Examples

More About

Was this topic helpful?