Main Content

Connecting Simscape Networks to Simscape Multibody Joints

You can model 3-D mechanical systems by using Simscape™ Multibody™ blocks representing bodies, joints, constraints, force elements, and sensors. These models can also include Simscape networks that represent hydraulic, electrical, pneumatic, and other physical systems. Examples of multidomain models that require connections between Simscape networks and Simscape Multibody blocks are:

  • A mechanical system consisting of Simscape Multibody blocks that is powered by a hydraulic system and therefore needs to interface with hydraulic actuators from Simscape Fluids™ libraries

  • A Simscape electrical circuit with a motor, where the motor is used to actuate a Simscape Multibody joint

  • Modeling nonlinear springs, dampers, friction for Simscape Multibody joints

Simscape networks are one-dimensional, while Simscape Multibody provides 3-D modeling capabilities. Therefore, you cannot directly connect Simscape mechanical rotational and translational ports to Simscape Multibody blocks. You need to establish bidirectional connections between the Simscape portions of a block diagram and Simscape Multibody joints that involve both sensing and actuation, and in some cases must pass position information as well:

  • Force and relative velocity must be equal across the translational interface. To make the connection more robust, sense the velocity of the joint and provide force actuation to the joint.

  • Torque and relative angular velocity must be equal across the rotational interface. To make the connection more robust, sense the angular velocity of the joint and provide torque actuation to the joint.

  • Simscape Multibody connections contain position information, while Simscape mechanical connections account only for relative velocity. Some Simscape blocks depend only on velocity, but certain Simscape blocks depend on velocity and position. If the behavior of a Simscape block depends on position or angle, its position or angle must be equal to the position or angle of the connected Simscape Multibody joint, both at initialization time and during simulation.

Anytime you need to connect a Simscape network to a Simscape Multibody joint, use the Translational Multibody Interface or Rotational Multibody Interface block and follow the steps in How to Use Interface Blocks. If the Simscape network contains blocks that depend on position or angle, additionally follow the steps in How to Pass Position Information.

How to Use Interface Blocks

The Translational Multibody Interface and Rotational Multibody Interface blocks help you connect Simscape portions of a block diagram to Simscape Multibody joints:

  • The Translational Multibody Interface block matches the force and relative velocity across the interface. You can connect it to any Simscape Multibody joint that has a prismatic primitive. The Translational Multibody Interface block has two mechanical translational ports, C and R, for connections to the Simscape network, and two physical signal ports, f and v, that you connect to the respective actuation and sensing ports of the Simscape Multibody joint.

  • The Rotational Multibody Interface block matches the torque and relative angular velocity across the interface. You can connect it to any Simscape Multibody joint that has a revolute primitive. The Rotational Multibody Interface block has two mechanical rotational ports, C and R, for connections to the Simscape network, and two physical signal ports, t and w, that you connect to the respective actuation and sensing ports of the Simscape Multibody joint.

This block diagram shows a Simscape mechanical translational network, containing Translational Friction and Translational Damper blocks. This network is connected to a Simscape Multibody Prismatic Joint block by using a Translational Multibody Interface block.

Block diagram showing how to connect the Translational Multibody Interface block

To use the Translational Multibody Interface block:

  1. In the Prismatic Joint block, specify the actuation and sensing options for the prismatic joint primitive:

    • Under Actuation, set Force to Provided by Input, to enable the force actuation port f.

    • Under Sensing, select Velocity, to enable the velocity sensing port v.

    If the joint has multiple degrees of freedom, make sure that the selected actuation and sensing options correspond to the same degree of freedom.

  2. Connect physical signal ports f and v of the Translational Multibody Interface block to ports f and v of the Prismatic Joint block.

  3. Connect ports C and R of the Translational Multibody Interface block to the Simscape mechanical translational network. In this example, connect ports C and R of the Translational Friction and Translational Damper blocks to the respective ports of the Translational Multibody Interface block.

How to Pass Position Information

Blocks like Translational Friction and Translational Damper do not require position information, and for these blocks the interface based on force and relative velocity is sufficient. Other blocks, like hydraulic actuators, require information on relative position, or relative angle, between their ports.

To connect these blocks to a Simscape Multibody joint:

  1. Use the Translational Multibody Interface or Rotational Multibody Interface block to connect the Simscape network to the joint. Enable the actuation and velocity sensing ports on the joint, and connect the ports as described in How to Use Interface Blocks.

  2. Additionally, enable the position sensing port p (or, for rotational degrees of freedom, port q) on the joint. If the joint has multiple degrees of freedom, make sure that the position sensing corresponds to the same degree of freedom as the actuation and velocity sensing options selected in Step 1.

  3. On the actuator block, enable the position input port p (or, for rotational actuators, port q), by setting the Interface displacement (or the Interface rotation) parameter to Provide input signal from Multibody joint. Connect the input port on the actuator block to the respective sensing port of the Simscape Multibody joint.

Block diagram showing how to connect the Translational Multibody Interface block and pass the position information

For example, to connect a Translational Mechanical Converter (IL) block to a Prismatic Joint block, as shown in the block diagram:

  1. In the Prismatic Joint block, specify the actuation and sensing options for the prismatic joint primitive:

    • Under Actuation, set Force to Provided by Input, to enable the force actuation port f.

    • Under Sensing, select Velocity, to enable the velocity sensing port v.

    • Under Sensing, select Position, to enable the position sensing port p.

    If the joint has multiple degrees of freedom, make sure that the selected actuation and sensing options correspond to the same degree of freedom.

  2. Connect physical signal ports f and v of the Translational Multibody Interface block to ports f and v of the Prismatic Joint block.

  3. Connect ports C and R of the Translational Multibody Interface block to ports C and R of the Translational Mechanical Converter (IL) block.

  4. In the Translational Mechanical Converter (IL) block, set the Interface displacement parameter to Provide input signal from Multibody joint, to enable the physical signal input port p.

  5. Connect the position sensing port p of the joint to the physical signal input port p of the Translational Mechanical Converter (IL) block.

For a detailed example of passing position information from a Multibody joint to hydraulic actuators, while also accounting for different mechanical orientation of the actuators, see Modeling a Double-Acting Actuator.

How to Model Masses and Inertias

For models with Translational Multibody Interface or Rotational Multibody Interface blocks, it is recommended that you use Simscape Multibody blocks to model masses and inertias. The reason is that Simscape networks need to have a ground (reference) node, with all the masses and inertias in the network accelerating with respect to this node. In a Simscape Multibody joint, both the base and follower frames may be accelerating. Therefore, a mass or inertia in the Simscape network connected to a joint may not have the correct inertial reference.

See Also

|

Related Topics