Retrieving the first time an enabled subsystem is triggered in Simulink

1 次查看(过去 30 天)
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!

采纳的回答

Fangjun Jiang
Fangjun Jiang 2020-8-5
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Subsystems 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by