How can I reset the time reference in a triggered subsystem in Simulink?

10 ビュー (過去 30 日間)
Yuval Boneh
Yuval Boneh 2021 年 5 月 7 日
編集済み: Fangjun Jiang 2021 年 5 月 12 日
I'm using a 'From Workspace' block in a triggered subsystem as input to a model. When the model responds to the input and a condition is met, it triggers the subsystem again. The problem is that simulation time continues so the 'From Workspace' block doesn't reset per se. Is there a way to make it reference some sort of subsystem local time which resets with the trigger?
  2 件のコメント
Fangjun Jiang
Fangjun Jiang 2021 年 5 月 7 日
Not clear what is the problem. From Workspace data carries time. Put it outside of the triggered subsystem, which will ignore the data if it is not triggered.
Yuval Boneh
Yuval Boneh 2021 年 5 月 7 日
編集済み: Yuval Boneh 2021 年 5 月 7 日
Thanks for the feedback. I'll try to elaborate:
Consider a mass-spring-damper setup.
From Workspace carries x (time) and y (amplitude) data for a single input force.
As is, there would be a single instance of input and the system would oscillate until it comes to rest.
On the first oscillation, when the mass returns to its original postion (zero displacement), I want to trigger the same input force to act on the mass.
The problem is that in using a triggered subsystem, my From Workspace force input doesnt reset.
Edit:
I just used a Resettable Subsystem approach and am having the same problem.

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

採用された回答

Fangjun Jiang
Fangjun Jiang 2021 年 5 月 10 日
編集済み: Fangjun Jiang 2021 年 5 月 12 日
This turns out to be harder that it seems.
Branch and connect the trigger signal to the external reset port of a resetable Integrator block, which takes Constnat value 1 as its input. This will make a resetable time clock in-sync with your triggered subsystem. Connect the output of the Integrator block to a 1-D lookup table,which uses your time and data value as its parameters. This way, you will be able to repeat the customized signal, in-sync with the triggered subsystem.

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by