How to give initial value to the subsystem to use for the first time step and then use values from the loop?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Anup
le 22 Déc 2022
Réponse apportée : Mark McBroom
le 29 Déc 2022
I have multiple subsystem in a simulink interconnected with each other. The output of first subsystem is input to second while to obtain ouput from the first subsystem ouput from second subsystem is necessary as input. This is causing problem.
I want to assign some initial value to the first subsystem as input to calculate output for the first time, then it can take input from ouput of second subsytem. Initial value will be used only one time.
I know about unit delay block, is there other way of actually giving initial values? Plus, how does unit delay work, matlab documentation doesn't give full picture about it, what input is taken by first subsystem to calculate initial ouput for the first time if output of second subsystem is delayed by one time step?
0 commentaires
Réponse acceptée
Mark McBroom
le 29 Déc 2022
The unit delay block is probably the best approach. This block lets you specify initial output. You might also want to examine execution order to make sure the subsystems are executing in the order you think they are: https://www.mathworks.com/help/simulink/ug/controlling-and-displaying-the-sorted-order.html
Thanks.
Mark.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Subsystems dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!