assign a phisical component as variables in simulink

조회 수: 1 (최근 30일)
Fred Tabash
Fred Tabash 2022년 3월 30일
답변: Jaynik 2023년 9월 22일
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.

답변 (1개)

Jaynik
Jaynik 2023년 9월 22일
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

카테고리

Help CenterFile Exchange에서 Simulink Design Optimization에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by