Guardar datos en tiempo de ejecución de la simulación
Puede guardar los valores de la señal en el espacio de trabajo de MATLAB, o en un archivo MLDATX, MAT o Excel® durante la simulación para su posterior recuperación y procesamiento. Guardar los datos de la simulación también se conoce como registrar o exportar los datos de la simulación.
Guardar los datos de simulación en formato Dataset
simplifica el procesamiento posterior proporcionando un formato común a los resultados de una variedad de técnicas de registro. El uso del formato Dataset
almacena los datos como objetos timeseries
de MATLAB, que puede procesar con MATLAB.
El registro de señales y los almacenes de datos utilizan el formato
Dataset
.La salida y el registro de estado utilizan
Dataset
como formato predeterminado.El formato predeterminado para guardar los bloques To File o y To Workspace es
Timeseries
.
Simulink® proporciona herramientas para convertir los datos registrados en formato Dataset
.
Para determinar qué enfoque utilizar para registrar los datos de las señales, consulte Save Simulation Data.
Bloques
Outport | Create output port for subsystem or external output |
Record, XY Graph | Log data to the workspace, to a file, or both |
To File | Write data to file |
To Workspace | Log data to workspace from Simulink model |
Herramientas
Instrumentation Properties | View and edit logging and visualization properties for logged signal |
Signal Properties | View and edit signal properties |
Simulation Data Inspector | Inspect and compare data and simulation results to validate and iterate model designs |
Funciones
Objetos
Ajustes de modelos
Temas
Datos de simulación
- Save Simulation Data
Save simulation data for analyzing and debugging a model. - Data Format for Logged Simulation Data
You can use many formats for logged data, includingDataset
, MATLABtimeseries
, arrays, and structures. Supported data formats vary between different logging techniques. However,Dataset
format is available for all logging techniques. - Convert Data to Dataset Format
To convert a workspace variable that contains data that was logged in a format other thanDataset
format to useDataset
format, use aSimulink.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. - 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.
Estado de simulación
- Save Block States and Simulation Operating Points
Learn how you can use state information logged from simulation and decide how to log states and operating points. - Save State Information
Save state information for logged states for each simulation step during a simulation.
Registro de señales
- Save Signal Data Using Signal Logging
Capture signal data from a simulation by marking signals you want to log in the model. - Mark Signals for Logging
- View the Signal Logging Configuration
View the signals that are marked for signal logging. - Enable Signal Logging for Model
- 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 timeseries object to Dataset object
- Log Signals in For-Each Subsystems
Use signal logging in For Each subsystems.
Almacenes de datos
- Log Data Stores
Configure a data store for logging so that you can view the data stored in a simulation run.