필터 지우기
필터 지우기

Logsout variable class is datasetRef for long simulations

조회 수: 4 (최근 30일)
Tom Groves
Tom Groves 2020년 6월 23일
댓글: Fraser Macmillen 2020년 9월 3일
Afternoon,
I have a set of models that I've been using to simulate a power system. Usually I aim to run fairly short scenarios (usually 30 - 100 second scenarios) as the model time step is small and there's quite a bit for it to chrun through so simulating long scenarios (more than 100 seconds) is a rarity.
When running the standard shorter scenarios a logsout variable is created in the workspace that I then undertake post processing on to calculate THD etc. when this variable is created for shorter scenarios it is of the dataset class and I can then easily interrogate this - logsout{1}.values.logged_data. However, when running longer scenarios (300 second scenarios) the logsout varible is of the datasetRef class and does not appear to provide me with any useful data that I can interrogate, just things like the time that the run was started at etc.
My question is: is there a set maximum size for a variable of the dataset class and if this size is exceeded does matlab just create a datasetRef automatically instead? If this is the case is there a way that the datasetRef can be converted into the standard dataset class that's expected for logsout or can the datasetRef be used to point the the actual logsout dataset?

답변 (1개)

Fraser Macmillen
Fraser Macmillen 2020년 9월 3일
Hello Tom
Your suspicion is correct: Simulink will automatically save log data to file and output DatasetRef if the total size of the Dataset is > 5 GB to avoid memory issues. You should find a .mat file is created and one should be able to access the data using standard commands such as getElement (see doc referenced below). If memory is not a problem one can simply load the .mat file and you'll have the dataset.
Hope this helps
Fraser
  댓글 수: 1
Fraser Macmillen
Fraser Macmillen 2020년 9월 3일
Just to add - when Simulink does this it should issue a warning which explains what is happening - please raise a technical support case if this is not the case. Best Regards, Fraser

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Prepare Model Inputs and Outputs에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by