- Simulink Design Optimization: https://www.mathworks.com/products/sl-design-optimization.html
- Random function: https://www.mathworks.com/help/stats/prob.normaldistribution.random.html
assign a phisical component as variables in simulink
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Design Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!