フィルターのクリア

Two Step functions in Different Times , or reset a subsystem block

7 ビュー (過去 30 日間)
Safiya
Safiya 2012 年 2 月 15 日
コメント済み: Stephen23 2015 年 5 月 28 日
I have a simple model with two Step functions , one enabled subsystem. one step is outside subsystem with a value of 1, and another step is inside the subsystem with value 1. I am monitoring both steps in scope. When i run simulation output becomes 1 at 1 sec in both steps. But I need to do that after first step executes in 1 seconds , the second step inside the block should execute so the output from 2nd step will be 2 secs delayed. (why the both steps execute at the same time , even in enabled-subsystem )
  1 件のコメント
Stephen23
Stephen23 2015 年 5 月 28 日
Here is the text of the original question, just in case Safiya decides to delete the text of this question too (like this one):
I have a simple model with two Step functions , one enabled subsystem. one step is outside subsystem with a value of 1, and another step is inside the subsystem with value 1. I am monitoring both steps in scope. When i run simulation output becomes 1 at 1 sec in both steps. But I need to do that after first step executes in 1 seconds , the second step inside the block should execute so the output from 2nd step will be 2 secs delayed. (why the both steps execute at the same time , even in enabled-subsystem )

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

採用された回答

Shiva Arun Kumar
Shiva Arun Kumar 2012 年 2 月 15 日
The step time parameter is with reference to the simulation time and not from the time the subsystem is enabled.
For example if you change the step time for source (S1) outside the subsystem to 2sec and retain the step time for the source (S2) within the subsystem at 1 sec you will notice that both signals will transition to 1 at 2 sec.
Similarly if you make the step time of S1 to be 1 and S2 as 2 you will see that S2 will transition to a value of 1 at 2 sec even though the subsystem has been enable at 1 sec. (notice it will not transition to 1 at 3 sec either)
Hope that helps,
  3 件のコメント
Shiva Arun Kumar
Shiva Arun Kumar 2012 年 2 月 16 日
Hi Haider,
The solution would depend on what you are trying to model in your system and the configuration. For example, if I assume you want the input within your subsystem to transition to 1, one time step after it has been enabled and assuming your sample time is 1, the easiest solution I can think of is to not use a step source within the subsystem. Rather click on the Enable block in your subsystem and check show outport. Connect this outport to delay. This should give the desired result (Assuming that is what you want).
Hope that helps.
Safiya
Safiya 2012 年 2 月 18 日
yes , good idea: it will help me

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

その他の回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2012 年 2 月 15 日
Perhaps your control signal to the Enabled Subsystem enables it immediately? Make sure that the control signal is enabled only after 2 secs.
  1 件のコメント
Safiya
Safiya 2012 年 2 月 16 日
even with control signal enables it at 2 secs

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

カテゴリ

Help Center および File ExchangeSchedule Model Components についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by