This page describes how to simulate the Humidifier example model in Simulink. Learn more about Humidifier sample model >>

You can find the Humidifier sample model in:

  • the modeling tool: Welcome window > Samples > Simulink and Modelica Transformation > Humidifier.
  • the Installation directory: <modeling tool installation directory>\samples\SysML\Simulink and Modelica Transformation\Humidifier.


To simulate the Humidifier System model


  1. Export the HumidifierSystem Block to Simulink file. How to >>
  2. In the Simulink Export Options dialog select the following options:
    • Format: XML (.slx)

    • S-Function or Simscape: S-Function version 2

    • Composite Signals: Bus Creators/Selectors
  3. Make sure the MATLAB tool is installed.
  4. Double-click the MATLAB icon to start it.
  5. In the file directory select the location of your exported Humidifier Simulink files. They are displayed in the Current Folder panel. 
  6. Double-click the file HumidifierSystem.slx. The model open in the Simulink window.
  7. On the SIMULATION tab, click
  8. In the Simulink Library Browser dialog, select expand the Simulink group and select Sinks. See the figure below.
  9. Drag and drop the Scope block onto the HumidifierSystem Simulink model. See the figure below.
  10. Select signal line that connects the humidity-out port of the room block to the humidity-in port of the humidifier block and click on the Scope block. See the figure below.

  11. On the SIMULATION tab, click the arrow on the PREPARE area and select the Model Settings.

  12. In the Configuration Parameters dialog, on the left side of the dialog select a  Solver and specify the following on the right side of the dialog:
      - In the the Simulation time group change Start time to 0.0Stop time to 3600.
      - In the Solver selection group select Type Variable-step or any other desirable solver that is suitable.
      - Click the arrow of the Solver details group and change the Max step size to 0.1.
  13. Press Apply > OK.
  14. Double-click the Scope block in the model. An empty black plot opens. 
  15. Click button. In the Configuration Properties: Scope dialog, select the Logging tab and clear the Limit data points to last box.

  16. Press Apply OK.
  17. In the Scope plot toolbar, click  and wait for the simulation results in the plot.