assign a phisical component as variables in simulink

1 view (last 30 days)
I would like to learn how to add physical parts like resistors, capacitors, diodes as variables in Simulink to perform the sensitivity analysis and Monte Carlo simulation.

Answers (1)

Jaynik
Jaynik on 22 Sep 2023
Hi Fred,
I see that you are trying to perform Monte Carlo simulation for sensitivity analysis using different values of resistance, etc. and you want to provide these values to Simulink directly as variables. For adding the physical parts in Simulink, you can search them in the Simulink Library Browser. For example, you can find electrical components in the "Simscape > Foundation Library > Electrical". Once these elements are present on the canvas, you can connect them together to establish the desired connections between them.
You can double click on each component to open its Block Parameters. In MATLAB, you can write the code for generating the random values (using the appropriate distribution in the random function) for the Monte Carlo simulation. These variables are now a part of the base workspace in MATLAB and can be used in the Simulink Block Parameters directly.
Simulink provides its own “Sensitivity Analyzer” which can be found under the "APPS" tab. Here you can specify your requirements and run the simulations. Or you can use the “Simulink Design Optimization” for sensitivity analysis.
For further learning related to Sensitivity Analyzer, you can refer the following video:
You can read more about these blocks here:
Thanks,
Jaynik

Categories

Find more on Composite Components in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!