How can we obtain whether a block output remains high for say 5 milli seconds in Simulink
4 ビュー (過去 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.
0 件のコメント
回答 (1 件)
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.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!