SimPowerSystems Model parameter change dynamically

조회 수: 1 (최근 30일)
Ashikur
Ashikur 2011년 10월 16일
I am using SimPowerSystem tool of Simulink. Is there any way to convert 'mdl' to m file ? No !!!!!
Well, I need to simulate 1000s of possible pattern in my model changing the parameters of building blocks of my model. How do I do that? Hope you won't tell me to do it manually.
I am dying for a solution, please suggest. (I cannot code each blocks as m file, it will take me 1000 years )

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 10월 16일
You can't convert .mdl file to .m file
You can control the simulation of your .mdl file using .m file. The key function is sim(). You can write a .m script changing your parameters and then run simulation using sim(). You can put this in a loop to run it thousands of times.
  댓글 수: 2
Kaustubha Govind
Kaustubha Govind 2011년 10월 17일
+1
Using SET_PARAM to change model/block parameters before each simulation, and running the simulation using SIM is the way to go.
Ashikur
Ashikur 2011년 10월 18일
Thanks both of you , you put me on the right track.
But Guy's blog helped me great
----------------------------------
open_system('vdp_mu')
muSweep = .5:.1:1.5;
for i = 1:length(muSweep)
mu = muSweep(i);
[t,x,y] = sim('vdp_mu');
plot(t,y); hold on;
end
title('VDP States for mu=.5 to 1.5')
xlabel('Time'); legend('x1','x2')
............................................................

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Manual Performance Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by