How can we obtain whether a block output remains high for say 5 milli seconds in Simulink
    5 views (last 30 days)
  
       Show older comments
    
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 Comments
Answers (1)
  Fangjun Jiang
      
      
 on 18 Jul 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. 
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
