How can I use a triggered subsystem in a loop?
Afficher commentaires plus anciens
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?
Réponses (2)
Azzi Abdelmalek
le 2 Déc 2012
Modifié(e) : Azzi Abdelmalek
le 2 Déc 2012
1 vote
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 commentaires
Erick Wang
le 9 Sep 2017
Great! I totally agree with you.
Ahmed Fahmy
le 8 Nov 2021
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
le 9 Sep 2017
0 votes
Hello, perhaps, you can use a Function-call to trigger a subsystem.
Catégories
En savoir plus sur Create Large-Scale Model Components dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!