Connect and use more simulink models downloaded from MathWorks

27 views (last 30 days)
Dear all,
I'm a engineering bachelor student that as a thesis project needs to create a model of a PEM Electrolyzer with:
  • Renewable sources as energy input, so I was thinking about using Solar Panels and Wind Turbine;
  • Output that converts produced hydrogen into mechanical energy, like a gas turbine (so I would like to use a cycle with gas e.g. methane blended in differente percentages with hydrogen).
Given that I never used neither MatLab nor Simulink-Simscape, I was wondering if:
  1. I can combine models downladed from MathWorks, in particular I found these that I would like to use: https://it.mathworks.com/help/simscape/ug/pem-electrolysis-system.html (Electrolyzer), https://it.mathworks.com/matlabcentral/fileexchange/46410-hybrid-photovoltaic-and-wind-power-system?s_tid=ta_fx_results (hybrid EV-wind system), https://it.mathworks.com/help/simscape/ug/brayton-cycle-gas-turbine-with-custom-components.html (gas turbine);
  2. is it possible to combine the linked systems and how. Furhtermore ,do I have to write a lot of code in MatLab for this purpose?
  3. is possible to create a GUI where I can set easily parameters for the simulation and show data and graphical analysis. Is it possible to create a GUI that sets parameters in an already existing model? If yes, are there any tutorial about it?
Thank you very much for your help. I am glad to answer If you need further explanations about my project.

Answers (2)

Malay Agarwal
Malay Agarwal on 18 Mar 2025
Please take a look at Model References, which can be used to create a model which references other models. The following resource has more information on Model References: https://www.mathworks.com/help/simulink/model-reference.html
You can create GUIs to change simulation parameters using App Designer. The following resource has information on how to create an App Designer app for a Simulink model which can be used to control the simulation and tune it's parameters: https://www.mathworks.com/help/simulink/ug/create-app-for-simulink-model.html
Please refer to the documentation of App Designer for more information: https://www.mathworks.com/help/matlab/ref/appdesigner.html
Hope this helps!

Adit
Adit on 14 Aug 2025 at 11:30
Hi MATTEO,
I went through your question and understood that you want to combine different Simulink and Simscape models and create a GUI for simulation control and visualization. To achieve this, follow the steps below:
1. Combining Simulink/Simscape Models:
Yes, you can combine different models downloaded from MathWorks documentation or File Exchange (like PEM Electrolyzer, Hybrid PV-Wind, Gas Turbine).
Steps to combine:
Coding requirement: Most of the work in Simulink is graphical; you only need minimal MATLAB code for automation or custom calculations.
2. Creating a GUI for Simulation Control and Visualization
You can create a GUI (Graphical User Interface) to set parameters and visualize results using MATLAB’s App Designer (refer to the MathWorks documentation https://www.mathworks.com/help/matlab/app-designer.html).
How to proceed:
  • App Designer lets you add sliders, buttons, dropdowns, and plots to your GUI.
  • Link GUI controls to your Simulink model using MATLAB commands like set_param, get_param, and sim. For a step-by-step guide, see the following documentation: https://www.mathworks.com/help/simulink/ug/create-app-for-simulink-model.html
  • The GUI can set simulation parameters, start/stop the model, and display results graphically or in tables.
  • You can build a GUI for any existing Simulink model as long as you know the names of the parameters you want to control.
Check out the interactive tutorials on Simulink Onramp (https://matlabacademy.mathworks.com/details/simulink-onramp/simulink) and Simscape Onramp (https://matlabacademy.mathworks.com/details/simscape-onramp/simscape) for hands-on learning.
Hope this helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!