Effacer les filtres
Effacer les filtres

assign a phisical component as variables in simulink

3 vues (au cours des 30 derniers jours)
Fred Tabash
Fred Tabash le 30 Mar 2022
Réponse apportée : Jaynik le 22 Sep 2023
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.

Réponses (1)

Jaynik
Jaynik le 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

Catégories

En savoir plus sur Composite Components dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by