Recommended method for importing data in bus object format into a Rapid Accelerator simulation.
2 ビュー (過去 30 日間)
古いコメントを表示
Would very much appreciate recommendations / guidance on the below.
I wish to do the following:
- Run model1 (a physical system), log the simulation results.
- Run model2 (a monitoring system), importing the model1 results into model2
I would like model2 to run in rapid accelerator mode as I have many different tests scenarios from model1 to run through model2. The data being imported from model1 is always of the same format, but can be of different lengths (i.e. simulation times).
The model1 data is logged as a bus object and logged using signal logging + the dataset method (to logsout).
In model2, I import the logged data using the "Data Import/Export / load from workspace / input" field of the Configuration Parameters window using a command
logsout.getElement('myData');
I then import using a root level inport - which works fine in normal and accel, but not rapid accel mode. In rapid accel mode, I receive the error "Rapid accelerator only supports array or structure format".
I have also tried changing the root level inport to a "from workspace" block, but any changes to the length of the data it is pointing at trigger a rebuild, which I would like to avoid!
Comments and suggestions most welcome.
Martin.
0 件のコメント
採用された回答
Andrew Schenk
2015 年 6 月 19 日
A From File block supports reading a MAT file that is a struct of Timeseries as a bus array. Note that you will need to save the bus output from model1 in the v7.3 format:
myData = logsout.getElement('myData').Values;
save mydata.mat -v7.3 myData
Then in model2, replace the From Workspace with the From File block being sure to specify the appropriate bus object as the output data type.
I work at MathWorks and will pass along your feature request for Timeseries support of root level input ports in Rapid Accelerator mode.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Load Signal Data for Simulation についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!