Documentation

Model Mount

Model Overview

Bodies in Simscape™ Multibody™ models are often combinations of simpler solid elements. These bodies are known as compound. They comprise various Solid and Rigid Transform blocks often placed inside a Simulink® Subsystem block. This example shows how to model a compound body consisting of an hexagonal plate and a cylindrical peg.

To model the mount body, you use two Solid blocks—one for the hexagonal plate, another for the cylindrical peg. Each Solid block provides a reference frame, located at the geometric center of the solid shape. You specify the spatial relationship between the two solids by connecting the reference frame ports through a Rigid Transform block.

Build Model

  1. Drag these blocks into a new model.

    BlockLibraryQuantity
    SolidSimscape > Multibody > Body Elements2
    Rigid TransformSimscape > Multibody > Frames and Transforms2
    Solver ConfigurationSimscape > Utilities1

  2. Connect and name the blocks as shown in the figure.

      Note:   Include the disconnected frame line. This line becomes important when you generate a subsystem for the pivot mount. To add this line, right-click on the solid frame line and drag to the right.

  3. In the Hexagon block dialog box, specify these parameters.

    ParameterValue
    Geometry > ShapeSelect Regular Extrusion.
    Geometry > Number of SidesEnter 6.
    Geometry > Outer RadiusEnter HexagonR. Select units of cm.
    Geometry > LengthEnter T. Select units of cm.
    Inertia > DensityEnter Rho.
    Graphic > ColorEnter HexagonRGB.

  4. In the Peg block dialog box, specify these parameters.

    ParameterValue
    Geometry > ShapeSelect Cylinder
    Geometry > RadiusEnter PegR. Select units of cm.
    Geometry > LengthEnter 2*T.
    Inertia > DensityEnter Rho.
    Graphic > ColorEnter PegRGB.

  5. In the To Peg block dialog box, specify these parameters.

    ParameterValue
    Translation > MethodSelect Standard Axis.
    Translation > AxisSelect +Z.
    Translation > OffsetEnter 3/2*T. Select units of cm.

  6. In the To World block dialog box, specify these parameters.

    ParameterValue
    Rotation > MethodSelect Standard Axis.
    Rotation > AxisSelect –Y.
    Rotation > AngleEnter 90.

Generate Subsystem

You can now generate a subsystem to encapsulate the pivot mount block diagram. The subsystem mask provides a convenient place to initialize the MATLAB® variables that you defined the block parameters with. To generate the subsystem:

  1. Select all the blocks excluding Solver Configuration.

  2. Press Ctrl+G to enclose the blocks in a subsystem. Name the subsystem block Pivot Mount.

  3. Select the Pivot Mount block and create a subsystem mask, e.g., by pressing Ctrl+M.

  4. In the Parameters & Dialog tab of the Mask Editor, drag six edit boxes into the Parameters group and specify their properties. Click OK.

    PromptName
    Hexagon Outer RadiusHexagonR
    Hexagon ThicknessT
    Mass DensityRho
    Hexagon ColorHexagonRGB
    Peg RadiusPegR
    Peg ColorPegRGB

  5. In the Pivot Mount block dialog box, specify these parameters.

    ParameterValue
    Hexagon Outer Radius (m):4
    Hexagon Thickness (m):0.8
    Mass Density (kg/m^3):2700
    Hexagon Color [R G B]:[0.25 0.4 0.7]
    Peg Radius (m):0.4
    Peg Color [R G B]:[1 0.6 0.25]

Visualize Model

Update the block diagram. You can do this by pressing Ctrl+D. Mechanics Explorer opens with a static display of the pivot mount rigid body. To obtain the view shown in the figure, in the Mechanics Explorer toolstrip select the isometric view button .

Open Reference Model

To view a completed version of the pivot mount model, at the MATLAB command prompt enter smdoc_pivot_mount.

More About

Was this topic helpful?