Combining One- and Three-Dimensional Mechanical Elements

About Interface Elements

SimMechanics™ software is built on the Simscape™ environment, which supports one-dimensional domains of translational and rotational motion, along or about a single axis for one body at a time. The mechanical elements of the Simscape Foundation library include masses, inertias, and internal forces and torques, as well as sensors and actuators. The blocks of the Interface Elements library allow you to selectively couple a SimMechanics machine to a mechanical circuit.

Consult the Simscape documentation for more about Physical Networks and one-dimensional domains.

How Mechanical Interface Elements Couple Motion and Forces Between SimMechanics™ Machines and Simscape™ Circuits

Because Simscape models simulate motion along or about one axis, one Interface Element block can couple only one SimMechanics joint primitive at a time to a Simscape circuit, interfacing through a Sensor/Actuator port on a Joint block. An Interface Element neither adds nor subtracts degrees of freedom (DoFs) to or from the combined machine-mechanical circuit. Its coupling is like a force element between the two domains (see Adding Internal Forces preceding):

Interface Elements can couple prismatic or revolute joint primitives to translational or rotational motion, through the Prismatic-Translational Interface or Revolute-Rotational Interface blocks, respectively.

Limitations on the Interfaced Simscape™ Mechanical Circuit

SimMechanics and Simscape mechanical simulations are separately valid. However, simulation of moving bodies modeled as Simscape mass and inertia elements coupled through Interface Elements to a SimMechanics machine is not complete and requires care to avoid unphysical results. These limitations arise from their different representations of motion and dynamics coming into conflict:

As the mass and/or inertia modeled in the interfaced mechanical circuit is increased, so is the violation of Newton's second law. As such mass and/or inertia is decreased, so is the violation.

Working with Interface Elements

To interface a Joint with a Simscape mechanical circuit:

  1. Select the appropriate Interface Element block, prismatic or revolute, from the Interface Elements library.

    You cannot mix translational and rotational motion with an Interface Element.

  2. Copy the selected Interface Element block into your model.

  3. Open the Joint dialog and add an extra Sensor/Actuator port. Close the dialog.

  4. Connect the Interface Element mechanical connector port to the new Sensor/Actuator port on the Joint.

  5. Open the Interface Element dialog. The Connected to primitive pull-down menu contains a list of all the primitives of appropriate type (prismatic or revolute) in the interfaced Joint.

    Select the primitive you want to interface. The Simscape circuit will move along or about that axis. Click OK or Apply.

On the machine side, the Joint must follow the standard rules for Joints and in particular be connected to a Body on each side. (See Modeling Degrees of Freedom preceding.) You should connect the Interface Element with the rest of the mechanical circuit.

Example: Rotational Spring-Damper with Hard Stop

The mech_interface_rot_spr_damper demo illustrates proper interface of Simscape mechanical elements with a three-dimensional SimMechanics machine.

The interfaced mechanical circuit has no inertia or mass elements, which prevents the problems discussed in Limitations on the Interfaced Simscape™ Mechanical Circuit preceding. It contains only force elements: a rotational spring, a rotational damper, and a rotational hard stop. Together, these force elements create a hard stop for the Revolute block. This block contains only one primitive, R1, which you can view by opening its dialog. Through this primitive, the Simscape force elements act between Body A and Body B, limiting their relative angular motion about the revolute R1 axis to ±π/6 radians.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS