This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Model a Compound Body

Model Overview

This example shows how to model a binary link—a compound body with two holes each for a joint connection. The model that you create comprises three Solid blocks representing the main body of the link and each of its hole sections. Two Rigid Transform blocks establish the rigid spatial relationships between the solids, translating them relative to each other so that they assemble without gaps or overlaps. The figure shows a front view of the binary link modeled in this example.

Create the Binary Link Model

  1. Open a new Simulink® Model window.

  2. Drag the following blocks to the model.

    Simscape > UtilitiesSolver Configuration1
    Simscape > Multibody > Frames and TransformsRigid Transform2
    Simscape > Multibody > Body ElementsSolid3

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

    Be sure to flip the Rigid Transform block. Its B frame port must face the Main Solid block. Also include the broken line extending from the Hole B block (right click the existing connection line and drag).

  4. In the solid block dialog boxes, specify these parameters.

    ParameterHole AMainHole B
    Geometry > ShapeSelect General Extrusion.Select General Extrusion.Select General Extrusion.
    Geometry > Cross-sectionEnter HoleACS. Select units of cm.Enter MainCS. Select units of cm.Enter HoleBCS. Select units of cm.
    Geometry > LengthEnter T. Select units of cm.Enter T. Select units of cm.Enter T. Select units of cm.
    Inertia > DensityEnter Rho.Enter Rho.Enter Rho.
    Graphic > Visual Properties > ColorEnter LinkRGB.Enter LinkRGB.Enter LinkRGB.

  5. In the rigid transform block dialog boxes, specify these parameters.

    ParameterRigid TransformRigid Transform1
    Translation > MethodSelect Standard Axis.Select Standard Axis.
    Translation > AxisSelect +X.Select +X.
    Translation > OffsetEnter -L/2. Select units of cm.Enter +L/2. Select units of cm.

Generate the Body Subsystem

Enclose the binary link blocks in a Subsystem block, define the general extrusion coordinates, and specify the relevant parameter values:

  1. Select all blocks excluding Solver Configuration and press Ctrl+G.. Simulink encloses the selected blocks in a new subsystem block. Rename the subsystem block as shown in the figure.

  2. Select the subsystem block and press Ctrl+M. Simulink adds a parameter mask to the subsystem block.

  3. In the Parameters & Dialog tab of the Mask Editor, drag six edit boxes into the Parameters group and specify the following parameters.

    Peg Hole RadiusR
    Mass DensityRho
    Link ColorLinkRGB

  4. In the Initialization tab of the Mask Editor, define the extrusion cross sections and click OK:

    % Cross-section of Main:
    Alpha = (pi/2:-0.01:-pi/2)';
    Beta = (3*pi/2:-0.01:pi/2)';
    EndACS = [-L/2 W/2; -L/2+R*cos(Alpha)...
    R*sin(Alpha); -L/2 -W/2];
    EndBCS = [L/2 -W/2; L/2+R*cos(Beta)...
    R*sin(Beta); L/2 W/2];
    MainCS = [EndACS; EndBCS];
    % Cross-section of HoleA:
    Alpha = (pi/2:0.01:3*pi/2)';
    Beta = (3*pi/2:-0.01:pi/2)';
    HoleACS = [W/2*cos(Alpha) W/2*sin(Alpha);...
    R*cos(Beta) R*sin(Beta)];
    % Cross-section of HoleB:
    Alpha = (-pi/2:0.01:pi/2)';
    Beta = (pi/2:-0.01:-pi/2)';
    HoleBCS = [W/2*cos(Alpha) W/2*sin(Alpha);...
    R*cos(Beta) R*sin(Beta)];

  5. In the dialog box of the Binary Link B subsystem block, specify these parameters.

    Peg Hole Radius0.4
    Mass Density2700
    Link Color [R G B][0.25 0.4 0.7]

Visualize the Model

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

Open Reference Model

To open a completed version of the binary link model, at the MATLAB® command prompt, enter smdoc_binary_link_b.

Related Topics

Was this topic helpful?