running a model repetitively from a m-file using sim() command

2 ビュー (過去 30 日間)
Krishnendu Mukherjee
Krishnendu Mukherjee 2012 年 1 月 27 日
im trying to run a simulink model of pi controller through a m-file in a repetitive way.in each iteration a value of the pi parameter will be set,and the corresponding output will aslo be tabulated.in the next iteration the pi parameter will also be changed by a new values.how this can be done?
  3 件のコメント
Krishnendu Mukherjee
Krishnendu Mukherjee 2012 年 1 月 27 日
actually the overshoot,setling time,error etc. will be determined for a given set of value of pi parameter.
in the next iteration new value of pi will be set,again for those new set of values, settling time,overshoot,error will be calculated.
its for optimization.
Krishnendu Mukherjee
Krishnendu Mukherjee 2012 年 1 月 27 日
the previous value of pi are not needed,only the settling time,overshoot,steady state error,etc.are required to be returned.when minimum output(error,over shoot,etc) will be found iteration will be stooped.that value of pi will be saved permanently

サインインしてコメントする。

採用された回答

TAB
TAB 2012 年 1 月 27 日
I am not clear what exactly you want to do.
You can stop the simulation from m-file, change your parameter (pi) and start the simulation again.
To start the simulation, use
set_param(gcs,'SimulationCommand','start');
To pause the simulation, use
set_param(gcs,'SimulationCommand','pause');
To resume the simulation, use
set_param(gcs,'SimulationCommand','continue');
and To stop the simulation, use
set_param(gcs,'SimulationCommand','stop');
  5 件のコメント
Krishnendu Mukherjee
Krishnendu Mukherjee 2012 年 1 月 27 日
yes its numerical value.
pi controller is available in simulink.its a musked inbuild block.doubble clicking on it, opens a dialog box,to change the parameter.how i would use a constant bolck.
Krishnendu Mukherjee
Krishnendu Mukherjee 2012 年 1 月 27 日
yes its numerical value.
pi controller is available in simulink.its a musked inbuild block.doubble clicking on it, opens a dialog box,to change the parameter.how i would use a constant bolck.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by