simulationEnsembleDatastore
Manage ensemble data generated by generateSimulationEnsemble
or by logging simulation data in Simulink
Description
A simulationEnsembleDatastore
object is a datastore
specialized for use in developing algorithms for condition monitoring and predictive
maintenance using simulated data.
This object specifies the data variables, independent variables, and condition
variables stored in a collection of MATLAB® data files (MAT files). The data files contain
Simulink.SimulationData.Dataset
variables that are the result of
logging data during Simulink® model simulation.
For a detailed example illustrating the use of a simulated ensemble datastore, see Generate and Use Simulated Data Ensemble. For general information about data ensembles in Predictive Maintenance Toolbox™, see Data Ensembles for Condition Monitoring and Predictive Maintenance.
Creation
To create a simulationEnsembleDatastore
object:
Generate and log simulation data from a Simulink model. You can do so using
generateSimulationEnsemble
or any other means of logging simulation to disk.Create a
simulationEnsembleDatastore
object that points to the generated simulation data using thesimulationEnsembleDatastore
command (described below).
If you have simulation data previously generated with
generateSimulationEnsemble
or other means, you can use the
creation function simulationEnsembleDatastore
to create a new
simulation ensemble datastore object at any time.
Syntax
Description
creates a simulation ensemble from data previously generated using
ensemble
= simulationEnsembleDatastore(location
)generateSimulationEnsemble
in the folder specified by
location
. The function identifies ensemble variables in
the generated data from information stored in the generated MAT files. The
function populates the DataVariables
and
SelectedVariables
properties of
ensemble
with the names of these ensemble
variables.
uses ensemble
= simulationEnsembleDatastore(location
,signallog
)signallog
to determine which variable in the MAT files
contains logged signals. Use the variable name specified in the Signal
logging
configuration parameter of the Simulink model from which the data is generated. Specifying this variable
allows the ensemble to treat those signals as ensemble data variables, rather
than the signallog
variable itself. The other variables in
the MAT file are also returned as ensemble data variables.
specifies additional properties of the object using one or more name-value pair
arguments. For example, using
ensemble
= simulationEnsembleDatastore(location
,signallog
,Name,Value
)'IndependentVariables',["Age";"ID"]
specifies the
independent variables when you create the object.
Input Arguments
Properties
Object Functions
The read
and writeToLastMemberRead
functions
are specialized for Predictive Maintenance Toolbox ensemble data. Other functions, such as reset
and
hasdata
, are identical to those used with
datastore
objects in MATLAB. To extract specific ensemble members into a smaller or more specialized
ensemble datastore, use subset
. To transfer all the member data into a table or cell array with a
single command, use readall
. To partition an ensemble
datastore, use the partition(ds,n,index)
syntax of the
partition
function.
read | Read member data from an ensemble datastore |
writeToLastMemberRead | Write data to member of an ensemble datastore |
subset | Create new ensemble datastore from subset of existing ensemble datastore |
reset | Reset datastore to initial state |
hasdata | Determine if data is available to read |
progress | Determine how much data has been read |
readall | Read all data in datastore |
numpartitions | Number of datastore partitions |
partition | Partition a datastore |
tall | Create tall array |
transform | Transform datastore |
isPartitionable | Determine whether datastore is partitionable |
isShuffleable | Determine whether datastore is shuffleable |
Examples
Version History
Introduced in R2018a