apply initial conditions to a subsystem

I want to apply an external initial condition to my resettable system, just like how it is possible with a integrator block. Anyone know how to do that?

2 件のコメント

Fangjun Jiang
Fangjun Jiang 2019 年 11 月 4 日
What MATLAB release?
ariel bintang
ariel bintang 2019 年 11 月 4 日
2018b

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

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2019 年 11 月 4 日

0 投票

Use "Initialize Function" in library Simulink\User-Defined Functions.

4 件のコメント

ariel bintang
ariel bintang 2019 年 11 月 4 日
But the state writer only works for discrete state space state owner. Is there any that works for continuous state space?
Fangjun Jiang
Fangjun Jiang 2019 年 11 月 4 日
Integrator is supported. Not sure why continuous State-Space is not supported. If dropping a continuous State-Space block, the StateWriter block seems to "see" it. I didn't try to see if it actually works.
ariel bintang
ariel bintang 2019 年 11 月 4 日
編集済み: ariel bintang 2019 年 11 月 4 日
would this be the correct way to implement it? The state space will reset when the resettable subsystem experiences a reset event (its "either" input becomes true)
Fangjun Jiang
Fangjun Jiang 2019 年 11 月 5 日
編集済み: Fangjun Jiang 2019 年 11 月 5 日
No longer need to use "Resettable Subsyhstem"
  1. Construct your regular Subsystem with states
  2. Construct your reset logic to send a "reset" event, which trigs the "Reset Function"
  3. Inside your "Reset Function", construct those reset values and write to the states.
Take a look at the built-in demo models.

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

カテゴリ

ヘルプ センター および File ExchangeEvent Functions についてさらに検索

製品

質問済み:

2019 年 11 月 4 日

編集済み:

2019 年 11 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by