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

4 ビュー (過去 30 日間)
Binto
Binto 2025 年 7 月 18 日
回答済み: Fangjun Jiang 2025 年 7 月 18 日
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 Center および File ExchangeSimulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by