How do I reset the time in Signal Editor block?

1 回表示 (過去 30 日間)
Preetham Jonnalagadda
Preetham Jonnalagadda 2019 年 1 月 17 日
回答済み: Jordan Olson 2023 年 3 月 7 日
I have designed a signal using signal editor and it is placed in an enabled subsystem. During the run of my simulation, the sub system is usually enabled after certain time(t) depending on the satisfaction of a condition. The output from the signal editor is not from time zero but rather it is from time 't'. How do I make this signal editor run from time 0 when the subsystem is enabled?

回答 (1 件)

Jordan Olson
Jordan Olson 2023 年 3 月 7 日
You can achieve this by using an "Integrator" block with a constant input feeding into a "1-D Lookup Table" where the breakpoints are the time axis. This is especially useful if you have a full timeseries before simulation. This method allows you to leverage the integrator's reset port to "reset" the signal by returning to index 1 in the table. Be sure to pick an interpolation setting appropriate for your system. For instance, if "linear" causes discontinuities in the signal slope, you can try "cubic spline" instead.

カテゴリ

Help Center および File ExchangeSignal Attributes and Indexing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by