check if a condition is true for a certain time (Simulink)

31 visualizaciones (últimos 30 días)
Marco Bellusci
Marco Bellusci el 10 de Mzo. de 2020
Comentada: Alberto Boñal Bravo el 23 de Nov. de 2021
I have a simple problem but i can't find a solution.
I have the following model:
and I would like to get 1 as output of this model when the condition is respect for 0.8 consecutive seconds.
How can i do it?

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 10 de Mzo. de 2020
Connect this condition to an integrator. If the condition is true, the integration will increase. Compare it to 0.8, you will get the result. Specify the integrator to be reset by external source. Use the fall edge or low level of your condition to reset it.
  4 comentarios
ibrahim alzoubi
ibrahim alzoubi el 9 de Dic. de 2020
Fengjun Jiang.. You are such a genius
Thank you 10 times per second for 50 years.

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by