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

조회 수: 3 (최근 30일)
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.

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2025년 7월 18일
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.

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by