How can we obtain whether a block output remains high for say 5 milli seconds in Simulink

4 vues (au cours des 30 derniers jours)
Hello all,
I have simulink logic to detect the rising edge, but I want see whether the rising edge remains high for more than 5 milli seconds. Can logic can be implimented to obtain the requirements.
Thanks in advance.

Réponses (1)

Fangjun Jiang
Fangjun Jiang le 18 Juil 2025
If you have the Simulink Test toolbox, there is a "Temporal Assessment" called "must stay true for at least"
If not, you can design your own. At the rising edge, compare this signal to "high", the output is either 1 or 0. Feed this output to an Integrator. The output of the Integrator is an indicator of how long the signal stay high. Compare the output of the integrator to 0.5 milli seconds, you get what you want.
Of course, you need to deal with how to reset the output of the integrator.

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by