How can I determine the time t when a specific value y is reached in SIMULINK?

조회 수: 18 (최근 30일)
Hi everyone,
I'm working on a simulation on SIMULINK which outputs me a value y(t).
I now want to know at what time y(t) reaches a specific value y_1.
So I need to determine t(y_1) = t_1 and somehow display it in SIMULINK?
Also I want to used that value t_1 for further calculations.
Is there any block that I can use for that?
Best regards
Enea

채택된 답변

Timo Dietz
Timo Dietz 2021년 1월 11일
There are multiple ways of doing this. One is to attach the source block "clock" to a triggered subsystem which contains just a connection between in and out. The trigger input is fed by a comparator which checks for y(t) = y_1.
The triggered block now takes over the simulation time input to its output only in case the comparator triggers.
  댓글 수: 12
Enea Baumann
Enea Baumann 2021년 1월 11일
Sorry for that.
I was able to solve it. As you said I put eq1' and eq2 into a enabled subsystem.
The subsystem is enabled as soon as t_1 is reached (calculated by eq1).
The subsystem's input is t_1.
This way, inside the subsystem eq1' is computed feeding its output to eq2 and and t_1 is obtained by eq1.
Thanks for your help!
Timo Dietz
Timo Dietz 2021년 1월 11일
Perfect! This is what I tried to explain. Good luck, furthermore.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 General Applications에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by