Compare data at consecutive timesteps during runtime in Simulink

Hi all,
I'm trying to create a parachute model system for a rocket that will deploy when the altitude begins to decrease i.e. altitude at timestep n < altitude at timestep n-1.
I'm not entirely sure what the best way is to do this. I've played around with setting the altitude as a parameter of a masked subsystem but this didn't really work and made the simulation run significantly slower. Is there a fast way to extract a previous value of a logged signal?
Thanks!

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2020년 8월 26일

0 개 추천

Use a Unit Delay block, the input is altitude, the output is the "previous value" of the altitude.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

2020년 8월 26일

답변:

2020년 8월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by