Products & Services Solutions Academia Support User Community Company

Learn more about System Identification Toolbox   

Importing Data into the MATLAB Workspace

Importing Time-Domain Data into MATLAB

Time-domain data consists of one or more input variables u(t) and one or more output variables y(t), sampled as a function of time. If there is no output data, see Importing Time-Series Data into MATLAB.

You must import your time-domain data into the MATLAB workspace as the following variables:

For more information about importing data into the MATLAB workspace, see MATLAB Data Import and Export.

After you import data, you can import it into the System Identification Tool GUI or create a data object for working at the command line. For more information about importing data into the GUI, see Importing Time-Domain Data into the GUI. To learn more about creating a data object, see Representing Time- and Frequency-Domain Data Using iddata Objects.

Importing Time-Series Data into MATLAB

Time-series data is time-domain or frequency-domain data that consist of one or more outputs y(t) with no corresponding input.

You must import your time-series data into the MATLAB workspace as the following variables:

For more information about importing data into the MATLAB workspace, see MATLAB Data Import and Export.

After you import data, you can import it into the System Identification Tool GUI or create a data object for working at the command line. For more information about importing data into the GUI, see Importing Time-Domain Data into the GUI. To learn more about creating a data object, see Representing Time- and Frequency-Domain Data Using iddata Objects.

For information about estimating time-series model parameters, see Time Series Identification.

Importing Frequency-Domain Data into MATLAB

What Is Frequency-Domain Data?

Frequency-domain data is the Fourier transform of the input and output time-domain signals. For continuous-time signals, the Fourier transform over the entire time axis is defined as follows:

In the context of numerical computations, continuous equations are replaced by their discretized equivalents to handle discrete data values. For a discrete-time system with a sampling interval T, the frequency-domain output Y(eiw) and input U(eiw) is the time-discrete Fourier transform (TDFT):

In this example, k = 1,2,...,N, where N is the number of samples in the sequence.

In practice, the Fourier transform cannot be handled for all continuous frequencies and you must specify a finite number of frequencies. The discrete Fourier transform (DFT) of time-domain data for N equally spaced frequencies between 0 and the sampling frequency 2π/N is:

The DFT is useful because it can be calculated very efficiently using the fast Fourier transform (FFT) method. Fourier transforms of the input and output data are complex numbers.

How to Import Frequency-Domain Data into MATLAB

You must import your frequency-domain data as the following variables:

For more information about importing data into the MATLAB workspace, see MATLAB Data Import and Export.

After you import data, you can import it into the System Identification Tool GUI or create a data object for working at the command line. For more information about importing data into the GUI, see Importing Frequency-Domain Data into the GUI. To learn more about creating a data object, see Representing Time- and Frequency-Domain Data Using iddata Objects.

Importing Frequency-Response Data into MATLAB

What Is Frequency-Response Data?

Frequency-response data, also called frequency-function data, consists of complex frequency-response values for a linear system characterized by its transfer function G. Frequency-response data tells you how the system handles sinusoidal inputs. You can measure frequency-response data values directly using a spectrum analyzer, for example, which provides a compact representation of the input-output relationship (compared to storing input and output independently).

The transfer function G is an operator that takes the input u of a linear system to the output y:

For a continuous-time system, the transfer function relates the Laplace transforms of the input U(s) and output Y(s):

In this case, the frequency function G(iw) is the transfer function evaluated on the imaginary axis s=iw.

For a discrete-time system sampled with a time interval T, the transfer function relates the Z-transforms of the input U(z) and output Y(z):

In this case, the frequency function G(eiwT) is the transfer function G(z) evaluated on the unit circle. The argument of the frequency function G(eiwT) is scaled by the sampling interval T to make the frequency function periodic with the sampling frequency .

When the input to the system is a sinusoid of a specific frequency, the output is also a sinusoid with the same frequency. The amplitude of the output is times the amplitude of the input. The phase of the shifted from the input by . G is evaluated at the frequency of the input sinusoid.

Frequency-response data represents a (nonparametric) model of the relationship between the input and the outputs as a function of frequency. You might use such a model, which consists of a table or plot of values, to study the system frequency response. However, this model is not suitable for simulation and prediction. You should create parametric model from the frequency-response data.

How to Import Frequency-Response Data into the Software

There are two ways to represent frequency-response data for system identification. The first approach lets you manipulate the data using both System Identification Tool GUI and the command line. The second approach is only used for working with data in the System Identification Tool GUI.

You must import your frequency-response data into the MATLAB workspace as the following variables:

For more information about importing data into the MATLAB workspace, see MATLAB Data Import and Export.

After you import data into the MATLAB workspace, you can import it into the System Identification Tool GUI or create a data object for working at the command line. For more information about importing data into the GUI, see Importing Frequency-Response Data into the GUI. To learn more about creating a data object, see Representing Frequency-Response Data Using idfrd Objects.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS