|On this page…|
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.
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)
where y, u, and Ts are 1-by-N cell arrays containing data from the different experiments. Similarly, when you specify Tstart, Period, InterSample, and SamplingInstants properties of the iddata object, you must assign their values as 1-by-N cell arrays.
Create a multiexperiment iddata object by merging iddata objects, where each contains data from a single experiment or is a multiexperiment data set. For example, you can use the following syntax to merge data:
load iddata1 % Loads iddata object z1 load iddata3 % Loads iddata object z3 z = merge(z1,z3) % Merges experiments z1 and z3 into % the iddata object z
These commands create an iddata object that conatains two experiments, where the experiments are assigned default names 'Exp1' and 'Exp2', respectively.
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 iddata object dat4 to data, use the following syntax:
data(:,:,:,'Run4') = dat4
This syntax explicitly assigns the experiment name 'Run4' to the new experiment. The Experiment property of the iddata object stores experiment names.
For more information about subreferencing experiments in a multiexperiment data set, see Subreferencing Experiments.