How can I use a triggered subsystem in a loop?

In order to simulate a tracking problem for two robots with event-triggered control I think I need to use a Triggered Subsystem. Actually, the problem is that the trigger for the Subsystem depends on the output of the Triggered Subsystem. If I want to simulate the model it gives a loop error.
It is not possible for me to use the Latch option, otherwise the model isn't appropriate anymore. Also it is not possible to put a unit delay in the model, because otherwise the controlling of the robots is executed a step to late.
I tried some things with the option 'state output' of the integrator block to avoid loop errors, but then there is the problem that everytime the trigger occurs the sample of the state has to be kept constant until the next trigger occurs.
Are there any alternatives to deal with this situation?

답변 (2개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 12월 2일
편집: Azzi Abdelmalek 2012년 12월 2일

1 개 추천

You said that the trigger for the Subsystem depends on the output of the Triggered Subsystem, which requires a unit delay block. Your subsystem can't do two calculus at the same step. When your subsystem calculate an output, this one will be a trigger for your subsystem which will calculate another output, if there is no any block with memory, can you tell Matlab, what is the beginning and the end of calculation? If there is any, it should be precised with for example a unit delay block

댓글 수: 2

Erick Wang
Erick Wang 2017년 9월 9일
Great! I totally agree with you.
I am having a similar problem. and despite having the memory element inside the triggered subsytem the issue remains there. From HW or logical point of view, the loop is broken, however Simulink is still bothered with the loop around the triggered subsystem.

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

Erick Wang
Erick Wang 2017년 9월 9일

0 개 추천

Hello, perhaps, you can use a Function-call to trigger a subsystem.

카테고리

도움말 센터File Exchange에서 Schedule Model Components에 대해 자세히 알아보기

질문:

2012년 12월 2일

댓글:

2021년 11월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by