How to hold the output for 5 seconds if it is TRUE and make it FALSE immediately?

4 ビュー (過去 30 日間)
Karthik P
Karthik P 2016 年 4 月 26 日
編集済み: Robert 2016 年 4 月 26 日
I want to know, how to design following condition in matlab simulink?
If the output of a truth table is TRUE for 5 seconds then my output should be TRUE. During this process whenever the output is FALSE, it has to become FALSE immediately.

採用された回答

Robert
Robert 2016 年 4 月 26 日
編集済み: Robert 2016 年 4 月 26 日
It would be helpful to know what kind of model this is. Continuous or discreet? variable or fixed step size?
In general, I recommend you accumulate the true values with an integrator or counter as is appropriate to your model, and reset that to zero whenever the value is false. You can then test the output of the integrator to see if the truth table output has been true for 5 or more seconds.
See this hastily-concocted model for an example:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by