Main Content

Model Interactions with Other Domains

In block diagrams, each Simscape domain uses a distinct color for the connection lines. When blocks support connections to more than one domain, the block calculates the interactions between these domains. For example, the Simple Gear block can optionally connect to the thermal domain, and blocks like the Leadscrew, Rack & Pinion, and Slider-Crank block convert between rotational and translational motion.

Open the model from the Build a Model and Visualize Results tutorial by entering:


Rotational model with an Ideal Rotational Motion Sensor block and a Scope block that measure the output speed of the Simple Gear block.

The model uses a Simple Gear block to reduce the speed of a shaft where all interactions are ideal, and the system has no mass. The Scope block shows the reduced response of the output shaft to the step input.

In this example, you convert the rotational motion from the output of the Simple Gear block into oscillating translational motion, and you replace the Ideal Angular Velocity Source block with an electrical network to drive the system.

Model a Conversion from Rotational Motion to Translational Motion

To convert from rotational motion to translational motion,

  1. Replace the Rotational Free End block with a Slider-Crank block.

  2. Connect port S of the Slider-Crank block to a Translational Free End block.

  3. Use the existing Scope block and an Ideal Translational Motion Sensor block to track the conversion from rotational energy to translational energy.

    1. From the Simulation tab, in the Prepare section, click Property Inspectory. Then, select the Scope block and set Number of input ports to 2.

    2. Add an Ideal Translational Motion Sensor block to the canvas and set Measurement reference to Absolute.

    3. Connect port R between the Slider-Crank block and the Rotational Free End block.

    4. Use a PS-Simulink Converter block to connect port V of the Slider-Crank block to the Scope block.

Model with rotational and translational motion and sensors connected to a Scope block.

Open the Scope block and select View > Layout, and select two vertically stacked cells. Run the model andand observe the oscillating translational step response and the constant rotational step response. If the results are not visible, click the Scale Y-Axis Limits button.

Top subplot shows an oscillating velocity in the translational domain. Bottom subplot show a constant velocity in the rotational domain.

The top plot shows the translational velocity of the slider. The bottom plot shows the rotational motion. The rotational constant velocity generates oscillating translational velocity.

Model Power System Interactions with the Electrical Domain

If you want to capture the mechanical system interaction with an electrical power supply, you must connect the blocks to the electrical domain. Replace the Ideal Angular Velocity Source block with a Rotational Electromechanical Converter block, and set Constant of proportionality K to 1 to represent a lossless system. You must connect the Rotational Electromechanical Converter to a complete electrical circuit.

  1. Add a Controlled Voltage Source block and reconnect the PS Step block to the physical signal port of the Controlled Voltage Source block.

  2. Connect the Rotational Electromechanical Converter block + and - ports to the Controlled Voltage Source + and - ports, respectively.

  3. Add an Electrical Reference block to ground the electrical circuit.

Model with rotational and translational motion driven by DC voltage.

Confirm that the results in the Scope block are the same as before.

Top subplot shows an oscillating velocity in the translational domain. Bottom subplot show a constant velocity in the rotational domain.

The results are the same as before because the electrical voltage

Model Heat Flow with the Thermal Domain

The Simple Gear block interfaces with the thermal domain when you set Friction model to Temperature-dependent efficiency or Temperature and load-dependent efficiency. Set the Friction model parameter to Temperature-dependent efficiency to enable port H, which connects to the thermal domain. Add these blocks to the canvas:

  • Conductive Heat Transfer

  • Heat Flow Rate Sensor

  • Thermal Reference

  • PS-Simulink Converter

  • Scope

Connect port A of the Conductive Heat Transfer block to port H of the Simple Gear block, and connect port B to port A of the Heat Flow Rate Sensor block. Connect port B of the Heat Flow Rate Sensor block to the Thermal Reference block, and connect port H to the PS-Simulink Converter and Scope blocks.

Model with heat transfer from a constant heat source.

Open the new Scope block and run the model.

Positive heat flow starting above 120 W and gradually declining to below 112 W during 10 seconds.

The positive values indicate heat flow away from the Simple Gear block.

See Also