데이터 기록
디버그 및 검증을 위해 시뮬레이션 데이터를 작업 공간 또는 디스크의 임시 파일에 기록할 수 있습니다. 데이터 기록을 통해 시뮬레이션 중에 시간에 따라 내부 블록 변수가 어떻게 변경되는지 분석할 수 있습니다. 예를 들어 유압 실린더의 압력이 최솟값을 초과하는지 확인하거나 해당 압력을 펌프 압력과 비교하고 싶을 수 있습니다. 시뮬레이션 데이터를 기록하면 시뮬레이션을 다시 실행하지 않고도 나중에 이를 쿼리, 플로팅 및 분석할 수 있습니다.
Simscape™ 결과 탐색기는 시뮬레이션 데이터 기록 결과를 탐색하고 플로팅할 수 있도록 해주는 대화형 툴입니다. 모델에 센서와 스코프를 추가하는 대신 데이터 기록과 Simscape 결과 탐색기를 사용하여 시뮬레이션 결과를 볼 수 있습니다.
툴
Simscape 결과 탐색기 | Navigate and plot simulation data logging results |
함수
simscape.logging.export | Save logged simulation data in MLDATX file |
simscape.logging.import | Create simulation log variable to access data in MLDATX file |
simscape.logging.plot | Plot logged simulation data for Node or Series |
simscape.logging.plotxy | Plot logged simulation data for one node or series against another |
simscape.logging.findNode | Find Node object corresponding to block or subsystem (R2020a 이후) |
simscape.logging.sli.findNode | (To be removed) Find Node object corresponding to block or
subsystem |
simscape.logging.findPath | Find path to node in logged simulation data tree (R2020a 이후) |
simscape.logging.sli.findPath | (To be removed) Find path to node in logged simulation data tree |
simscape.logging.timestamp | Determine whether simulation log is current or stale (R2021a 이후) |
sscexplore | Open Simscape Results Explorer to interact with logged simulation data |
sscprintzcs | Print zero crossing information for logged simulation data |
객체
simscape.logging.Node | Hierarchy tree for simulation data |
simscape.logging.Series | Time-value series for simulation data |
도움말 항목
- About Simulation Data Logging
You can log simulation data to the workspace, or to a temporary file on disk, for debugging and verification.
- Enable Data Logging for the Whole Model
Using data logging for the whole model is a best practice.
- Log Data for Selected Blocks Only
Instead of logging the simulation data for the whole model, you can log data just for the selected blocks.
- Data Logging Options
Additional options for logging and displaying the simulation data.
- Stream Logging Data to Disk
When you log simulation data, you can stream the data to a temporary file on disk and have the workspace variable point to that temporary file.
- Saving and Retrieving Logged Simulation Data
Methods of storing logged simulation data for future use and retrieving it at a later time.
- Log, Navigate, and Plot Simulation Data
This example shows the basic workflow for logging simulation data for the whole model and then navigating and plotting the logged data using Simscape Results Explorer.
- Log and Plot Simulation Data
This example shows how you can log and plot simulation data instead of adding sensors to your model.
- Log Simulation Statistics
This example shows how you can access and analyze information on zero crossings during simulation.
- Log and View Simulation Data for Selected Blocks
This example shows how you can set your model to log simulation data for selected blocks only and how to view simulation data using Simscape Results Explorer.
- Plot Simulation Data in Different Units
When you display logged simulation data in Simscape Results Explorer, you can change the
y
-axis units directly on the plot. - Use Custom Units to Plot Simulation Data
This example shows how you can change to a custom unit display of logged simulation data.
- View Sparkline Plots of Simulation Data
This example shows the basic workflow for viewing sparkline plots of logged simulation data for selected blocks and variables directly on the model canvas.
- Indexing into Component Arrays
You can use command-line interface to index into an array of components, for example, to get or set operating point targets for a particular array member, or to plot simulation data.