Simulink: Switching for a duration less than the discrete sample time

2 ビュー (過去 30 日間)
David Reilly
David Reilly 2011 年 3 月 1 日
Hi, I'm relatively new to Simulink. Is there a way to close a switch(es) for a duration less than the sample time of my simulink model? My model has a fixed sample time of 5ms and I'd like to close a switch for part of that time (eg 2ms). Any information would be greatly appreciated. Is there a block that can assist with this requirement?
Put another way: is there a way to pass a vector (representing on/off time) to a block which then makes an output signal high for the stipulated time T (when T is less than the sample time Ts).
  1 件のコメント
Kaustubha Govind
Kaustubha Govind 2011 年 3 月 1 日
Since your model sample-time is 5ms, the output of this switch block is only sampled every 5ms. Therefore, any change that occurs in between those times is not taken note of. Is there a reason that you want to achieve this? Also, why not use a variable-step solver or a smaller time-step?

サインインしてコメントする。

採用された回答

David Reilly
David Reilly 2011 年 3 月 5 日
Kaustubha,
Thank you for your answer.

その他の回答 (0 件)

カテゴリ

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