You can create
iddata objects that contain several experiments.
Identifying models for an
iddata object with multiple experiments
results in an average model.
In the System Identification Toolbox™ product, experiments can either mean data collected
during different sessions, or portions of the data collected during a single session. In the
latter situation, you can create a multiexperiment
iddata object by
splitting the data from a single session into multiple segments to exclude bad data, and
merge the good data portions.
idfrd object does not support the
equivalent of multiexperiment data.
You can only merge data sets that have all of the following characteristics:
Same number of input and output channels.
Same input and output channel names.
Same data domain (that is, time-domain data or frequency-domain data).
To construct an
iddata object that includes N
data sets, you can use this syntax:
data = iddata(y,u,Ts)
1-by-N cell arrays containing data from the different experiments.
Similarly, when you specify
SamplingInstants properties of the
iddata object, you must assign their values as
1-by-N cell arrays.
This example shows how to create a multiexperiment
iddata object by merging
iddata objects, where each contains data from a single experiment or is a multiexperiment data set.
Load iddata objects
load iddata1 load iddata3
z3 into the iddata object
z = merge(z1,z3)
z = Time domain data set containing 2 experiments. Experiment Samples Sample Time Exp1 300 0.1 Exp2 300 1 Outputs Unit (if specified) y1 Inputs Unit (if specified) u1
These commands create an
iddata object that contains two experiments, where the experiments are assigned default names
You can add experiments individually to an
iddata object as an
alternative approach to merging data sets.
For example, to add the experiments in the
data, use the following syntax:
data(:,:,:,'Run4') = dat4
This syntax explicitly assigns the experiment name
'Run4' to the new
Experiment property of the
object stores experiment names.
For more information about subreferencing experiments in a multiexperiment data set, see Subreferencing Experiments.