Retrieving the first time an enabled subsystem is triggered in Simulink

2 vues (au cours des 30 derniers jours)
Ben Milne
Ben Milne le 5 Août 2020
Commenté : Ben Milne le 6 Août 2020
Hi all,
I'm attempting to model the force of a parachute after it has been deployed. In particular, I am modelling the trajectory of a rocket using a 6DoF block and will use the parachute to add a force in the direction opposing motion.
To model the force I am using an enabled subsystem that will trigger when a condition is met (in this case the parachute is on a rocket so it will be deployed when the altitude begins to decrease).
The drag of the parachute is a function of time after it is deployed i.e. when the parachute subsystem is enabled for the first time. Is there any way to quickly log this time without writing it to a file and reading it again?
The image below is a simplified diagram of what I'm trying to achieve.
Thanks!

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 5 Août 2020
Within your "Parachute drag" enabled subsystem, feeding a constant of 1 to an Integrator block will give you the time since the subsystem is enabled. Then you can use it to generate the force.

Plus de réponses (0)

Catégories

En savoir plus sur Subsystems dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by