Products & Services Solutions Academia Support User Community Company

Learn more about System Identification Toolbox   

Importing Data into the GUI

Types of Data You Can Import into the GUI

You can import the following types of data from the MATLAB workspace into the System Identification Tool GUI:

To open the GUI, type the following command in the MATLAB Command Window:

ident

In the Import data list, select the type of data to import from the MATLAB workspace, as shown in the following figure.

For an example of importing data into the System Identification Tool GUI, see the Getting Started documentation.

Importing Time-Domain Data into the GUI

Before you can import time-domain data into the System Identification Tool GUI, you must import the data into the MATLAB workspace, as described in Importing Time-Domain Data into MATLAB.

To import data into the GUI:

  1. Type the following command in the MATLAB Command Window to open the GUI:

    ident
  2. In the System Identification Tool window, select Import data > Time domain data. This action opens the Import Data dialog box.

  3. Specify the following options:

      Note   For time series, only import the output signal and enter [] for the input.

    • Input — Enter the MATLAB variable name (column vector or matrix) or a MATLAB expression that represents the input data. The expression must evaluate to a column vector or matrix.

    • Output — Enter the MATLAB variable name (column vector or matrix) or a MATLAB expression that represents the output data. The expression must evaluate to a column vector or matrix.

    • Data name — Enter the name of the data set, which appears in the System Identification Tool window after the import operation is completed.

    • Starting time — Enter the starting value of the time axis for time plots.

    • Sampling interval — Enter the actual sampling interval in the experiment. For more information about this setting, see Specifying the Data Sampling Interval.

        Tip   The System Identification Toolbox product uses the sampling interval during model estimation and to set the horizontal axis on time plots. If you transform a time-domain signal to a frequency-domain signal, the Fourier transforms are computed as discrete Fourier transforms (DFTs) using this sampling interval.

  4. (Optional) In the Data Information area, click More to expand the dialog box and enter the following settings:

    Input Properties

    • InterSample — This options specifies the behavior of the input signals between samples during data acquisition. It is used when transforming models from discrete-time to continuous-time and when resampling the data.

      • zoh (zero-order hold) indicates that the input was piecewise-constant during data acquisition.

      • foh (first-order hold) indicates that the output was piecewise-linear during data acquisition.

      • bl (bandwidth-limited behavior) specifies that the continuous-time input signal has zero power above the Nyquist frequency (equal to the inverse of the sampling interval).

        Note   See the d2c and c2d reference pages for more information about transforming between discrete-time and continuous-time models.

    • Period — Enter Inf to specify a nonperiodic input. If the underlying time-domain data was periodic over an integer number of periods, enter the period of the input signal.

        Note   If your data is periodic, always include a whole number of periods for model estimation.

    Channel Names

    • Input — Enter a string to specify the name of one or more input channels.

        Tip   Naming channels helps you to identify data in plots. For multivariable input-output signals, you can specify the names of individual Input and Output channels, separated by commas.

    • Output — Enter a string to specify the name of one or more output channels.

    Physical Units of Variables

    • Input — Enter a string to specify the input units.

        Tip   When you have multiple inputs and outputs, enter a comma-separated list of Input and Output units corresponding to each channel.

    • Output — Enter a string to specify the output units.

    Notes — Enter comments about the experiment or the data. For example, you might enter the experiment name, date, and a description of experimental conditions. Models you estimate from this data inherit your data notes.

  5. Click Import. This action adds a new data icon to the System Identification Tool window.

  6. Click Close to close the Import Data dialog box.

Importing Frequency-Domain Data into the GUI

Frequency-domain data consists of Fourier transforms of time-domain data (a function of frequency).

Before you can import frequency-domain data into the System Identification Tool GUI, you must import the data into the MATLAB workspace, as described in Importing Frequency-Domain Data into MATLAB.

To import data into the GUI:

  1. Type the following command in the MATLAB Command Window to open the GUI:

    ident
  2. In the System Identification Tool window, select Import data > Freq. domain data. This action opens the Import Data dialog box.

  3. Specify the following options:

    • Input — Enter the MATLAB variable name (column vector or matrix) or a MATLAB expression that represents the input data. The expression must evaluate to a column vector or matrix.

    • Output — Enter the MATLAB variable name (column vector or matrix) or a MATLAB expression that represents the output data. The expression must evaluate to a column vector or matrix.

    • Frequency — Enter the MATLAB variable name of a vector or a MATLAB expression that represents the frequencies. The expression must evaluate to a column vector.

      The frequency vector must have the same number of rows as the input and output signals.

    • Data name — Enter the name of the data set, which appears in the System Identification Tool window after the import operation is completed.

    • Frequency unit — Enter Hz for Hertz or keep the rad/s default value.

    • Sampling interval — Enter the actual sampling interval in the experiment. For continuous-time data, enter 0. For more information about this setting, see Specifying the Data Sampling Interval.

  4. (Optional) In the Data Information area, click More to expand the dialog box and enter the following optional settings:

    Input Properties

    • InterSample — This options specifies the behavior of the input signals between samples during data acquisition. It is used when transforming models from discrete-time to continuous-time and when resampling the data.

      • zoh (zero-order hold) indicates that the input was piecewise-constant during data acquisition.

      • foh (first-order hold) indicates that the output was piecewise-linear during data acquisition.

      • bl (bandwidth-limited behavior) specifies that the continuous-time input signal has zero power above the Nyquist frequency (equal to the inverse of the sampling interval).

        Note   See the d2c and c2d reference page for more information about transforming between discrete-time and continuous-time models.

    • Period — Enter Inf to specify a nonperiodic input. If the underlying time-domain data was periodic over an integer number of periods, enter the period of the input signal.

        Note   If your data is periodic, always include a whole number of periods for model estimation.

    Channel Names

    • Input — Enter a string to specify the name of one or more input channels.

        Tip   Naming channels helps you to identify data in plots. For multivariable input and output signals, you can specify the names of individual Input and Output channels, separated by commas.

    • Output — Enter a string to specify the name of one or more output channels.

    Physical Units of Variables

    • Input — Enter a string to specify the input units.

        Tip   When you have multiple inputs and outputs, enter a comma-separated list of Input and Output units corresponding to each channel.

    • Output — Enter a string to specify the output units.

    Notes — Enter comments about the experiment or the data. For example, you might enter the experiment name, date, and a description of experimental conditions. Models you estimate from this data inherit your data notes.

  5. Click Import. This action adds a new data icon to the System Identification Tool window.

  6. Click Close to close the Import Data dialog box.

Importing Frequency-Response Data into the GUI

Prerequisite

Before you can import frequency-response data into the System Identification Tool GUI, you must import the data into the MATLAB workspace, as described in Importing Frequency-Response Data into MATLAB.

Importing Complex-Valued Frequency-Response Data

To import frequency-response data consisting of complex-valued frequency values at specified frequencies:

  1. Type the following command in the MATLAB Command Window to open the GUI:

    ident
  2. In the System Identification Tool window, select Import data > Freq. domain data. This action opens the Import Data dialog box.

  3. In the Data Format for Signals list, select Freq. Function (Complex).

  4. Specify the following options:

    • Freq. Func. — Enter the MATLAB variable name or a MATLAB expression that represents the complex frequency-response data G(eiw).

    • Frequency — Enter the MATLAB variable name of a vector or a MATLAB expression that represents the frequencies. The expression must evaluate to a column vector.

    • Data name — Enter the name of the data set, which appears in the System Identification Tool window after the import operation is completed.

    • Frequency unit — Enter Hz for Hertz or keep the rad/s default value.

    • Sampling interval — Enter the actual sampling interval in the experiment. For continuous-time data, enter 0. For more information about this setting, see Specifying the Data Sampling Interval.

  5. (Optional) In the Data Information area, click More to expand the dialog box and enter the following optional settings:

    Channel Names

    • Input — Enter a string to specify the name of one or more input channels.

        Tip   Naming channels helps you to identify data in plots. For multivariable input and output signals, you can specify the names of individual Input and Output channels, separated by commas.

    • Output — Enter a string to specify the name of one or more output channels.

    Physical Units of Variables

    • Input — Enter a string to specify the input units.

        Tip   When you have multiple inputs and outputs, enter a comma-separated list of Input and Output units corresponding to each channel.

    • Output — Enter a string to specify the output units.

    Notes — Enter comments about the experiment or the data. For example, you might enter the experiment name, date, and a description of experimental conditions. Models you estimate from this data inherit your data notes.

  6. Click Import. This action adds a new data icon to the System Identification Tool window.

  7. Click Close to close the Import Data dialog box.

Importing Amplitude and Phase Frequency-Response Data

To import frequency-response data consisting of amplitude and phase values at specified frequencies:

  1. Type the following command in theMATLAB Command Window to open the GUI:

    ident
  2. In the System Identification Tool window, select Import data > Freq. domain data. This action opens the Import Data dialog box.

  3. In the Data Format for Signals list, select Freq. Function (Amp/Phase).

  4. Specify the following options:

    • Amplitude — Enter the MATLAB variable name or a MATLAB expression that represents the amplitude .

    • Phase (deg) — Enter the MATLAB variable name or a MATLAB expression that represents the phase .

    • Frequency — Enter the MATLAB variable name of a vector or a MATLAB expression that represents the frequencies. The expression must evaluate to a column vector.

    • Data name — Enter the name of the data set, which appears in the System Identification Tool window after the import operation is completed.

    • Frequency unit — Enter Hz for Hertz or keep the rad/s default value.

    • Sampling interval — Enter the actual sampling interval in the experiment. For continuous-time data, enter 0. For more information about this setting, see Specifying the Data Sampling Interval.

  5. (Optional) In the Data Information area, click More to expand the dialog box and enter the following optional settings:

    Channel Names

    • Input — Enter a string to specify the name of one or more input channels.

        Tip   Naming channels helps you to identify data in plots. For multivariable input and output signals, you can specify the names of individual Input and Output channels, separated by commas.

    • Output — Enter a string to specify the name of one or more output channels.

    Physical Units of Variables

    • Input — Enter a string to specify the input units.

        Tip   When you have multiple inputs and outputs, enter a comma-separated list of Input and Output units corresponding to each channel.

    • Output — Enter a string to specify the output units.

    Notes — Enter comments about the experiment or the data. For example, you might enter the experiment name, date, and a description of experimental conditions. Models you estimate from this data inherit your data notes.

  6. Click Import. This action adds a new data icon to the System Identification Tool window.

  7. Click Close to close the Import Data dialog box.

Importing Data Objects into the GUI

You can import the System Identification Toolbox iddata and idfrd data objects into the System Identification Tool GUI.

Before you can import a data object into the System Identification Tool GUI, you must create the data object in the MATLAB workspace, as described in Representing Time- and Frequency-Domain Data Using iddata Objects or Representing Frequency-Response Data Using idfrd Objects.

Select Import data > Data object to open the Import Data dialog box.

Import iddata, idfrd, or frd data object in the MATLAB workspace.

To import a data object into the GUI:

  1. Type the following command in the MATLAB Command Window to open the GUI:

    ident
  2. In the System Identification Tool window, select Import data > Data object.

    This action opens the Import Data dialog box. IDDATA or IDFRD/FRD is already selected in the Data Format for Signals list.

  3. Specify the following options:

    • Object — Enter the name of the MATLAB variable that represents the data object in the MATLAB workspace. Press Enter.

    • Data name — Enter the name of the data set, which appears in the System Identification Tool window after the import operation is completed.

    • (Only for time-domain iddata object) Starting time — Enter the starting value of the time axis for time plots.

    • (Only for frequency domain iddata or idfrd object) Frequency unit — Enter the frequency unit for response plots.

    • Sampling interval — Enter the actual sampling interval in the experiment. For more information about this setting, see Specifying the Data Sampling Interval.

        Tip   The System Identification Toolbox product uses the sampling interval during model estimation and to set the horizontal axis on time plots. If you transform a time-domain signal to a frequency-domain signal, the Fourier transforms are computed as discrete Fourier transforms (DFTs) using this sampling interval.

  4. (Optional) In the Data Information area, click More to expand the dialog box and enter the following optional settings:

    (Only for iddata object) Input Properties

    • InterSample — This options specifies the behavior of the input signals between samples during data acquisition. It is used when transforming models from discrete-time to continuous-time and when resampling the data.

      • zoh (zero-order hold) indicates that the input was piecewise-constant during data acquisition.

      • foh (first-order hold) indicates that the input was piecewise-linear during data acquisition.

      • bl (bandwidth-limited behavior) specifies that the continuous-time input signal has zero power above the Nyquist frequency (equal to the inverse of the sampling interval).

        Note   See the d2c and c2d reference page for more information about transforming between discrete-time and continuous-time models.

    • Period — Enter Inf to specify a nonperiodic input. If the underlying time-domain data was periodic over an integer number of periods, enter the period of the input signal.

        Note   If your data is periodic, always include a whole number of periods for model estimation.

    Channel Names

    • Input — Enter a string to specify the name of one or more input channels.

        Tip   Naming channels helps you to identify data in plots. For multivariable input and output signals, you can specify the names of individual Input and Output channels, separated by commas.

    • Output — Enter a string to specify the name of one or more output channels.

    Physical Units of Variables

    • Input — Enter a string to specify the input units.

        Tip   When you have multiple inputs and outputs, enter a comma-separated list of Input and Output units corresponding to each channel.

    • Output — Enter a string to specify the output units.

    Notes — Enter comments about the experiment or the data. For example, you might enter the experiment name, date, and a description of experimental conditions. Models you estimate from this data inherit your data notes.

  5. Click Import. This action adds a new data icon to the System Identification Tool window.

  6. Click Close to close the Import Data dialog box.

Specifying the Data Sampling Interval

When you import data into the GUI, you must specify the data sampling interval.

The sampling interval is the time between successive data samples in your experiment and must be the numerical time interval at which your data is sampled in any units. For example, enter 0.5 if your data was sampled every 0.5 s, and enter 1 if your data was sampled every 1 s.

You can also use the sampling interval as a flag to specify continuous-time data. When importing continuous-time frequency domain or frequency-response data, set the Sampling interval to 0.

The sampling interval is used during model estimation. For time-domain data, the sampling interval is used together with the start time to calculate the sampling time instants. When you transform time-domain signals to frequency-domain signals (see the fft reference page), the Fourier transforms are computed as discrete Fourier transforms (DFTs) for this sampling interval. In addition, the sampling instants are used to set the horizontal axis on time plots.

Sampling Interval in the Import Data dialog box

Specifying Estimation and Validation Data

You should use different data sets to estimate and validate your model for best validation results.

In the System Identification Tool GUI, Working Data refers to estimation data. Similarly, Validation Data refers to the data set you use to validate a model. For example, when you plot the model output, the input to the model is the input signal from the validation data set. This plot compares model output to the measured output in the validation data set. Selecting Model resids performs residual analysis using the validation data.

To specify Working Data, drag and drop the corresponding data icon into the Working Data rectangle, as shown in the following figure.

Similarly, to specify Validation Data, drag and drop the corresponding data icon into the Validation Data rectangle.

Preprocessing Data Using Quick Start

As a preprocessing shortcut for time-domain data, select Preprocess > Quick start to simultaneously perform the following four actions:

Creating Data Sets from a Subset of Signal Channels

You can create a new data set in the System Identification Tool GUI by extracting subsets of input and output channels from an existing data set.

To create a new data set from selected channels:

  1. In the System Identification Tool GUI, drag the icon of the data from which you want to select channels to the Working Data rectangle.

  2. Select Preprocess > Select channels to open the Select Channels dialog box.

    The Inputs list displays the input channels and the Outputs list displays the output channels in the selected data set.

  3. In the Inputs list, select one or more channels in any of following ways:

    • Select one channel by clicking its name.

    • Select adjacent channels by pressing the Shift key while clicking the first and last channel names.

    • Select nonadjacent channels by pressing the Ctrl key while clicking each channel name.

      Tip   To exclude input channels and create time-series data, clear all selections by holding down the Ctrl key and clicking each selection. To reset selections, click Revert.

  4. In the Outputs list, select one or more channels in any of following ways:

    • Select one channel by clicking its name.

    • Select adjacent channels by pressing the Shift key while clicking the first and last channel names.

    • Select nonadjacent channels by pressing the Ctrl key while clicking each channel name.

      Tip   To reset selections, click Revert.

  5. In the Data name field, type the name of the new data set. Use a name that is unique in the Data Board.

  6. Click Insert to add the new data set to the Data Board in the System Identification Tool GUI.

  7. Click Close.

Creating Multiexperiment Data Sets in the GUI

Why Create Multiexperiment Data?

You can create a time-domain or frequency-domain data set in the System Identification Tool GUI that includes several experiments. Identifying models for multiexperiment data results in an average model.

Experiments can mean data that was collected during different sessions, or portions of the data collected during a single session. In the latter situation, you can create multiexperiment data by splitting a single data set into multiple segments that exclude corrupt data, and then merge the good data segments.

Limitations on Data Sets

You can only merge data sets that have all of the following characteristics:

Merging Data Sets

You can merge data sets using the System Identification Tool GUI.

For example, suppose that you want to combine the data sets tdata, tdata2, tdata3, tdata4 shown in the following figure.

GUI Contains Four Data Sets to Merge

To merge data sets in the GUI:

  1. In the Operations area, select <--Preprocess > Merge experiments from the drop-down menu to open the Merge Experiments dialog box.

  2. In the System Identification Tool window, drag a data set icon to the Merge Experiments dialog box (to the drop them here to be merged rectangle).

    The name of the data set is added to the List of sets.

    tdata and tdata2 to Be Merged

      Tip   To empty the list, click Revert.

  3. Repeat step 2 for each data set you want to merge. Go to the next step after adding data sets.

  4. In the Data name field, type the name of the new data set. This name must be unique in the Data Board.

  5. Click Insert to add the new data set to the Data Board in the System Identification Tool window.

    Data Board Now Contains tdatam with Merged Experiments

  6. Click Close to close the Merge Experiments dialog box.

Extracting Specific Experiments from a Multiexperiment Data Set into a New Data Set

When a data set already consists of several experiments, you can extract one or more of these experiments into a new data set, using the System Identification Tool GUI.

For example, suppose that tdatam consists of four experiments.

To create a new data set that includes only the first and third experiments in this data set:

  1. In the System Identification Tool window, drag and drop the tdatam data icon to the Working Data rectangle.

    tdatam Is Set to Working Data

  2. In the Operations area, select Preprocess > Select experiments from the drop-down menu to open the Select Experiment dialog box.

  3. In the Experiments list, select one or more data sets in either of the following ways:

    • Select one data set by clicking its name.

    • Select adjacent data sets by pressing the Shift key while clicking the first and last names.

    • Select nonadjacent data sets by pressing the Ctrl key while clicking each name.

  4. In the Data name field, type the name of the new data set. This name must be unique in the Data Board.

  5. Click Insert to add the new data set to the Data Board in the System Identification Tool GUI.

  6. Click Close to close the Select Experiment dialog box.

Viewing Data Properties

You can get information about each data set in the System Identification Tool GUI by right-clicking the corresponding data icon.

The Data/model Info dialog box opens. This dialog box describes the contents and the properties of the corresponding data set. It also displays any associated notes and the command-line equivalent of the operations you used to create this data.

To displays the data properties in the MATLAB Command Window, click Present.

Renaming Data and Changing Display Color

You can rename data and change its display color by double-clicking the data icon in the System Identification Tool GUI.

The Data/model Info dialog box opens. This dialog box describes both the contents and the properties of the data. The object description area displays the syntax of the operations you used to create the data in the GUI.

The Data/model Info dialog box also lets you rename the data by entering a new name in the Data name field.

You can also specify a new display color using three RGB values in the Color field. Each value is between 0 to 1 and indicates the relative presence of red, green, and blue, respectively. For more information about specifying default data color, see Customizing the System Identification Tool GUI.

Information About the Data

You can enter comments about the origin and state of the data in the Diary And Notes area. For example, you might want to include the experiment name, date, and the description of experimental conditions. When you estimate models from this data, these notes are associated with the models.

Clicking Present display portions of this information in the MATLAB Command Window.

Distinguishing Data Types in the GUI

The background color of a data icon is color-coded, as follows:

Colors Representing Type of Data

Organizing Data Icons

You can rearrange data icons in the System Identification Tool GUI by dragging and dropping the icons to empty Data Board rectangles in the GUI.

When you need additional space for organizing data or model icons, select Options > Extra model/data board in the System Identification Tool GUI. This action opens an extra session window with blank rectangles for data and models. The new window is an extension of the current session and does not represent a new session.

You can drag and drop data between the main System Identification Tool GUI and any extra session windows.

Type comments in the Notes field to describe the data sets. When you save a session, as described in Saving, Merging, and Closing Sessions, all additional windows and notes are also saved.

Deleting Data Sets in the GUI

To delete data sets in the System Identification Tool GUI, drag and drop the corresponding icon into Trash. Moving items to Trash does not permanently delete these items.

To restore a data set from Trash, drag its icon from Trash to the Data or Model Board in the System Identification Tool window. You can view the Trash contents by double-clicking the Trash icon.

To permanently delete all items in Trash, select Options > Empty trash.

Exiting a session empties the Trash automatically.

Exporting Data from the GUI to the MATLAB Workspace

The data you create in the System Identification Tool GUI is not available in the MATLAB workspace until you export the data set. Exporting to the MATLAB workspace is necessary when you need to perform an operation on the data that is only available at the command line.

To export a data set to the MATLAB workspace, drag and drop the corresponding icon to the To Workspace rectangle.

When you export data to the MATLAB workspace, the resulting variables have the same name as in the System Identification Tool GUI. For example, the following figure shows how to export the time-domain data object datad.

Exporting Data to the MATLAB Workspace

In this example, the MATLAB workspace contains a variable named data after export.

  


Recommended Products

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

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