フィルターのクリア

Log simulink (variable step) data with with one sample time!

3 ビュー (過去 30 日間)
youjarr
youjarr 2021 年 5 月 4 日
編集済み: youjarr 2021 年 5 月 4 日
Hello guys,
is there a way to log signals with one sample time?
I habe an system model which works with variable steps. Form 1e-3s to 50e-6s.
For the post-processing i would like to save all data to an Excel or plot data wih origins have different sample times.
At the moment my ways is to youse a rate transition block.
Is there a more elegant way?
Thanks in advance.

採用された回答

Fangjun Jiang
Fangjun Jiang 2021 年 5 月 4 日
You can always specify the sample time of the data logging (ToWorkspace block or signal logging). Keep in mind though that this actually force the simulation steps to be changed, even when you specify variable step and variable step solver. But if you don't mind the effect, you can go ahead.
Another way is to log the data using inherited sample time and run resample() to do post data processing.
  2 件のコメント
youjarr
youjarr 2021 年 5 月 4 日
編集済み: youjarr 2021 年 5 月 4 日
The ToWorkspace variant i do know but how do you specify it in signal logging?
Edit: Ah I got it right click on the logging sign and then on properties.
Thanks for hat.
Fangjun Jiang
Fangjun Jiang 2021 年 5 月 4 日
right click the signal line, properties, give it a name, check "log signal data" and specify the sample time

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

その他の回答 (2 件)

J Chen
J Chen 2021 年 5 月 4 日
編集済み: J Chen 2021 年 5 月 4 日
Uee the To Workspace block in the Simulink Sink category and specify the Sample time in the block parameters.

youjarr
youjarr 2021 年 5 月 4 日
Thanks for the quick response.
I am also logging data from simscape models (e.g.) which is internally in the blocks.
How to handle with that?

カテゴリ

Help Center および File ExchangeData Logging についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by