Retrieving the first time an enabled subsystem is triggered in Simulink

2 views (last 30 days)
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!

Accepted Answer

Fangjun Jiang
Fangjun Jiang on 5 Aug 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.

More Answers (0)

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!