Main Content

이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

시뮬레이션에서 런타임 데이터 저장하기

시뮬레이션 데이터를 MATLAB® 작업 공간에 저장하기, 신호 기록하기, 신호, 시간, 출력 및 상태 데이터 내보내기

나중에 가져오고 후처리할 수 있도록 시뮬레이션 중에 신호 값을 MATLAB 작업 공간이나 MLDATX 파일, MAT 파일 또는 Excel®에 저장할 수 있습니다. 시뮬레이션 데이터 저장은 시뮬레이션 데이터 기록 또는 내보내기라고도 합니다.

시뮬레이션 데이터를 Dataset 형식으로 저장하면 다양한 기록 기법의 결과에 대해 공통된 형식을 제공함으로써 후처리가 단순화됩니다. Dataset 형식을 사용하면 데이터가 MATLAB timeseries 객체로 저장되며, 이 객체는 MATLAB을 사용하여 처리할 수 있습니다.

  • 신호 기록 및 데이터 저장소에는 Dataset 형식이 사용됩니다.

  • 출력 및 상태 기록에는 디폴트 형식으로 Dataset이 사용됩니다.

  • To File 블록 및 To Workspace 블록의 디폴트 저장 형식은 Timeseries입니다.

Simulink®기록된 데이터를 Dataset 형식으로 변환하기 위한 툴을 제공합니다.

신호 데이터를 기록하는 데 어떤 접근 방식을 사용할지 결정하려면 Export Simulation Data 항목을 참조하십시오.

블록

OutportCreate output port for subsystem or external output
RecordLog data to the workspace, to a file, or both
To FileWrite data to file
To WorkspaceWrite data to workspace

함수

모두 확장

Simulink.sdi.markSignalForStreamingTurn logging on or off for a signal
Simulink.sdi.getSignalInputProcessingModeGet setting of Input Processing signal property
Simulink.sdi.setSignalInputProcessingModeSpecify value for Input Processing signal property
Simulink.SimulationData.signalLoggingSelectorOpen Signal Logging Selector

기록된 데이터의 크기 제한 구성하기

Simulink.sdi.setMaxDiskUsageSpecify maximum size for data logged to disk
Simulink.sdi.getMaxDiskUsageGet configured maximum size for data logged to disk
Simulink.sdi.setRequiredFreeSpaceSpecify minimum disk space to leave free when logging data
Simulink.sdi.getRequiredFreeSpaceGet configured minimum disk space requirement for logging
Simulink.sdi.setDeleteRunsOnLowSpaceSpecify behavior when logged data size approaches configured limits
Simulink.sdi.getDeleteRunsOnLowSpaceGet configured behavior when size of logged data approaches configured limits
Simulink.sdi.setRecordDataSpecify record mode for logging
Simulink.sdi.getRecordDataCheck record mode for logging

시뮬레이션 데이터 인스펙터 아카이브 구성하기

Simulink.sdi.setArchiveRunLimitSpecify a limit for the number of runs stored in the Simulation Data Inspector archive
Simulink.sdi.setAutoArchiveModeSpecify whether the Simulation Data Inspector automatically archives simulation runs
Simulink.sdi.getArchiveRunLimitDetermine configured run limit for Simulation Data Inspector archive
Simulink.sdi.getAutoArchiveModeDetermine if the Simulation Data Inspector is configured to automatically archive
Simulink.sdi.setStorageLocationSpecify location for logged data on disk
Simulink.sdi.getStorageLocationGet path to custom storage location for data logged to disk
Simulink.sdi.setStorageModeSpecify whether to log data to disk or memory
Simulink.sdi.getStorageModeCheck if logging is configured to log data to disk or memory
Simulink.SimulationData.createStructOfTimeseriesCreate structure of timeseries data to load as simulation input for bus
Simulink.SimulationData.forEachTimeseriesCall function on each timeseries object
Simulink.SimulationData.DatasetRef.getDatasetVariableNamesList names of Dataset variables in MAT-file
getAsDatastoreGet matlab.io.datastore.SimulationDatastore representation of element from referenced Dataset object
Simulink.ModelDataLogs.convertToDatasetConvert logging data from Simulink.ModelDataLogs format to Simulink.SimulationData.Dataset format
Simulink.SimulationData.updateDatasetFormatLoggingConvert model and its referenced models to use Dataset format for signal logging

클래스

모두 확장

Simulink.SimulationOutputAccess simulation results
Simulink.SimulationData.DatasetAccess logged simulation data or group simulation input data
Simulink.SimulationData.SignalContainer for signal logging information
Simulink.SimulationData.DatasetRefCreate Simulink.SimulationData.DatasetRef object
matlab.io.datastore.SimulationDatastoreDatastore for inputs and outputs of Simulink models
Simulink.SimulationData.BlockPathFully specified Simulink block path
Simulink.SimulationData.StateState logging element
Simulink.SimulationData.UnitStore units for simulation data
Simulink.SimulationData.LoggingInfoSignal logging override settings
Simulink.SimulationData.ModelLoggingInfoSignal logging override settings for a model
Simulink.SimulationData.SignalLoggingInfoSignal logging override settings for signal
Simulink.SimulationMetadataAccess metadata of simulation runs

도움말 항목

시뮬레이션 데이터

Export Simulation Data

Export (log) simulation data as a baseline for analyzing and debugging a model.

Data Format for Logged Simulation Data

You can use many formats for logged data, including Dataset, MATLAB timeseries, arrays, and structures. Supported data formats vary between different logging techniques. However, Dataset format is available for all logging techniques.

Dataset Conversion for Logged Data

To convert a workspace variable that contains data that was logged in a format other than Dataset format to use Dataset format, use a Simulink.SimulationData.Dataset constructor.

Work with Big Data for Simulations

Log, load, and analyze big data for simulations.

Limit the Size of Logged Data

Choose among several strategies to limit the size of logged data.

Specify Signal Values to Log

Specify which signal values to log during simulation.

Log Data to Persistent Storage

Store logged simulation data to persistent storage in a MAT-file.

Load Big Data for Simulations

Load big data as simulation input.

Analyze Big Data from a Simulation

Access simulation data logged to persistent storage for analysis in MATLAB.

Log Signal Data That Uses Units

Log signal data that uses units by using Dataset or Timeseries logging format for signal logging, the To File block, and the To Workspace block.

Samples to Export for Variable-Step Solvers

Control how much output the simulation generates when your model uses a variable-step solver. Use the Output options configuration parameter.

Log Data to the Workspace and a File Using the Record Block

Use the Record block to log data to the workspace, to a file, or to both the workspace and a file.

시뮬레이션 상태

State Information

How blocks use the state information for calculating the output signal value for the current simulation step.

Save State Information

Save state information for logged states for each simulation step during a simulation.

신호 기록

Export Signal Data Using Signal Logging

To capture signal data from a simulation, you can use signal logging. Mark the signals that you want to log and enable signal logging for the model.

Configure a Signal for Logging

Mark the signals that you want to log simulation data for.

View the Signal Logging Configuration

View the signals that are marked for signal logging.

Enable Signal Logging for a Model

To log signals marked for signal logging, set the Signal logging configuration parameter.

Override Signal Logging Settings

For a specific simulation run, override the signal logging settings for individual signals marked for logging.

View and Access Signal Logging Data

View and access the signal logging data for a completed or paused simulation.

Convert Logged Data to Dataset Format

To convert a workspace variable that contains data that was logged in a format other than Dataset format to use Dataset format, use a Simulink.SimulationData.Dataset constructor.

Log Signals in For Each Subsystems

Use signal logging in For Each subsystems.

데이터 저장소

Log Data Stores

Configure a data store for logging so that you can view the data stored in a simulation run.

추천 예제