How can I model the waiting time in Simulink?

조회 수: 12 (최근 30일)
Min ByeongGwan
Min ByeongGwan 2021년 6월 3일
답변: Pavan Guntha 2021년 8월 31일
I'm struggling to model the saved time between 'do something' and 'do nothing'.
More specifically, I'm making a model that shows how much we can save the time after we equip something. I used 'Entity Generator' module to make entities randomly. At this circumstance, how can I model the reduced time of 'do something', compare to 'do nothing' of each entity? I have no idea about which module i can use and how to do this...
I use version of 2021.

답변 (1개)

Pavan Guntha
Pavan Guntha 2021년 8월 31일
Hello Min,
You could make use of 'Enabled subsystem' for modelling waiting time. The following example illustrates the idea:
1) The 'Enabled subsystem' contains the logic which needs to wait until a particular condition is met in order to execute.
2) The condition is modelled here using a 'MATLAB Function' block whose output decides when to enable the subsystem. The attached model illustrates that the MATLAB Function considers the value of 'Constant' block which changes upon clicking a 'Push Button' to decide the output.
In a similar manner, you could modify the logic within 'MATLAB Function' block to appropriately control the enabling/ disabling of subsystem and hence model the waiting time functionality. The simulink model is attached for your reference. For information about 'Enabled Subsystems' you could have a look at the documentation page: Using Enabled Subsystems
Hope this helps!

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by