iddata
Input-output data and its properties for system identification in the time or frequency domain
Description
Use the iddata
object to encapsulate input and output measurement
data for the system you want to identify. System identification functions use these
measurements to estimate a model. Model validation functions use the input measurements to
provide the input for simulations, and the output measurements to compare how well the
estimated model response fits the original data.
iddata
objects can contain a single set of measurements or multiple sets.
Each set of data corresponds to an experiment. The objects have the
following characteristics, which are encoded in the object properties:
Data can be in the frequency domain or the time domain. You can convert objects from one domain to the other.
In the time domain, the data can be uniformly or nonuniformly sampled. To use the
iddata
object for estimation, however, the data must be uniformly sampled, and the input and output data for each experiment must be recorded at the same time instants.You can specify data properties, such as the sample time, start time, time points, frequency sample points, and intersample behavior.
You can provide labels and comments to differentiate and annotate data components, experiments, and the object as a whole.
To access the object properties, use dot notation. For example, suppose that you create an
iddata
object with the command sys =
iddata(ym,um,Tsamp)
, where ym
is measured output data,
um
is measured input data, and Tsamp
is the sample
time. iddata
stores these variables in the properties
InputData
, OutputData
, and
Ts
, respectively. You can view or modify the data using
sys.InputData
, sys.OutputData
, and
sys.Ts
. For an example of using dot notation to view and modify
properties, see View and Modify Properties.
Creation
Syntax
Description
Use Time-Domain Data
creates an data
= iddata(y
,u
,Ts
)iddata
object containing a time-domain output signal
y
and input signal u
.
Ts
specifies the sample time of the experimental data.
You can use iddata
to create a multiexperiment
iddata
object by specifying y
and
u
as cell arrays. Alternatively, you can create single-experiment
iddata
objects and use merge (iddata)
to combine the objects into one multiexperiment
iddata
object. For more information on multiexperiment
iddata
objects, see Create Multiexperiment Data at the Command Line.
creates an data
= iddata(tt
)iddata
object from the timetable
tt
.
The software extracts the variable names and sample time from
tt
.
By default, the software interprets the last variable in tt
as
the single output channel, and all other variables are input channels. To change this
interpretation, set the 'InputName'
and
'OutputName'
properties using name-value
arguments.
Use Frequency-Domain Data
Configure Additional Properties
sets additional properties using name-value arguments. Specify
data
= iddata(___,Name,Value
)Name,Value
after any of the input argument combinations in the
previous syntaxes.
Input Arguments
Properties
Object Functions
In general, any function applicable to system identification data is applicable to an
iddata
object. These functions are of three general types.
Functions that both operate on and return
iddata
objects enable you to manipulate and processiddata
objects.Use
fft
andifft
to transform existingiddata
objects to and from the time and frequency domains. For example:datafd = fft(Data); datatd = ifft(Dataf);
Use
merge (iddata)
to mergeiddata
objects into a singleiddata
object containing multiple experiments. To extract an experiment from a multiexperimentiddata
object, usegetexp
. For example:data123 = merge(data1,data2,data3); data2 = getexp(data123,2);
For a more detailed example, see Extract and Model Specific Data Segments.
Use preprocessing functions such as
detrend
oridfilt
to filter data iniddata
objects and to remove bad data. For example:data_d = detrend(data); data_f = idfilt(data,filter);
Functions that perform analytical processing on
iddata
objects and create plots or return specific parameters or values let you analyze data and determine inputs to use for estimation.Functions that use the data in
iddata
objects to estimate, simulate, and validate models let you create dynamic models and evaluate how closely the model response matches validation data.The following lists contain a representative subset of the functions you can use with
iddata
objects.