Is it possible to run simulation of a model in parts while checking for certain conditions after a particular time?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Suvrat Ramasubramanian
el 18 de Sept. de 2018
Comentada: Rishabh Gupta
el 25 de Sept. de 2018
I am trying to simulate a model from a set of generated data consisting of repeated data set in sequence to emulate a real situation. However I want to check a condition after the simulation of each data set to switch between the subsystems. Is it possible to do so without using m file?
Thanks in advance.
0 comentarios
Respuestas (1)
Rishabh Gupta
el 24 de Sept. de 2018
Hi Suvrat,
To switch between the subsystem based on some condition, you could use "IF- Block" and "If Action Subsystem".
Please refer to the below documentations of both the blocks to understand how to define the condition in "If Block" and how to switch between the subsystems.
IF Action Subsystem documentation : https://www.mathworks.com/help/simulink/slref/ifactionsubsystem.html
I would suggest to use "MATLAB function block" in case of "IF-Block", if the conditions that needs to be checked are complex.
2 comentarios
Rishabh Gupta
el 25 de Sept. de 2018
According to the use case you mentioned, it might be possible.
I am not sure how exactly is your model designed but, if it is possible to use a sum block to sum up the error while simulation, then you can use the sum block output at the end of one dataset simulation and apply appropriate condition in IF block to switch between subsystems
Ver también
Categorías
Más información sobre Subsystems en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!