Working with System Identification App

Starting and Managing Sessions

What Is a System Identification Session?

A session represents the total progress of your identification process, including any data sets and models in the System Identification app.

You can save a session to a file with a .sid extension. For example, you can save different stages of your progress as different sessions so that you can revert to any stage by simply opening the corresponding session.

To start a new session, see Starting a New Session in the App.

For more information about the steps for using the System Identification app, see Steps for Using the System Identification App.

Starting a New Session in the App

To start a new session in the System Identification app, type systemIdentification in the MATLAB® Command Window:

systemIdentification

Alternatively, you can start a new session by selecting the Apps tab of MATLAB desktop. In the Apps section, click System Identification. This action opens the System Identification app.

    Note:   Only one session can be open at a time.

You can also start a new session by closing the current session using File > Close session. This toolbox prompts you to save your current session if it is not already saved.

Description of the System Identification App Window

The following figure describes the different areas in the System Identification app.

The layout of the window organizes tasks and information from left to right. This organization follows a typical workflow, where you start in the top-left corner by importing data into the System Identification app using the Import data menu and end in the bottom-right corner by plotting the characteristics of your estimated model on model plots. For more information about using the System Identification app, see Steps for Using the System Identification App.

The Data Board area, located below the Import data menu in the System Identification app, contains rectangular icons that represent the data you imported into the app.

The Model Board, located to the right of the <--Preprocess menu in the System Identification app, contains rectangular icons that represent the models you estimated or imported into the app. You can drag and drop model icons in the Model Board into open dialog boxes.

Opening a Saved Session

You can open a previously saved session using the following syntax:

systemIdentification(session,path)

session is the file name of the session you want to open and path is the location of the session file. Session files have the extension .sid. When the session file in on the matlabpath, you can omit the path argument.

If the System Identification app is already open, you can open a session by selecting File > Open session.

    Note:   If there is data in the System Identification app, you must close the current session before you can open a new session by selecting File > Close session.

Saving, Merging, and Closing Sessions

The following table summarizes the menu commands for saving, merging, and closing sessions in the System Identification app.

TaskCommandComment
Close the current session and start a new session.File > Close sessionYou are prompted to save the current session before closing it.
Merge the current session with a previously saved session.File > Merge sessionYou must start a new session and import data or models before you can select to merge it with a previously saved session. You are prompted to select the session file to merge with the current. This operation combines the data and the models of both sessions in the current session.
Save the current session.File > SaveUseful for saving the session repeatedly after you have already saved the session once.
Save the current session under a new name.File > Save AsUseful when you want to save your work incrementally. This command lets you revert to a previous stage, if necessary.

Deleting a Session

To delete a saved session, you must delete the corresponding session file.

Managing Models

Importing Models into the App

You can import System Identification Toolbox™ models from the MATLAB workspace into the System Identification app. If you have Control System Toolbox™ software, you can also import any models (LTI objects) you created using this toolbox.

The following procedure assumes that you begin with the System Identification app already open. If this window is not open, type the following command at the prompt:

systemIdentification

To import models into the System Identification app:

  1. Select Import from the Import models list to open the Import Model Object dialog box.

  2. In the Enter the name field, type the name of a model object. Press Enter.

  3. (Optional) In the Notes field, type any notes you want to store with this model.

  4. Click Import.

  5. Click Close to close the Import Model Object dialog box.

Viewing Model Properties

You can get information about each model in the System Identification app by right-clicking the corresponding model icon.

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

    Tip   To view or modify properties for several models, keep this window open and right-click each model in the System Identification app. The Data/model Info dialog box updates when you select each model.

Renaming Models and Changing Display Color

You can rename a model and change its display color by double-clicking the model icon in the System Identification app.

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

To rename the model, enter a new name in the Model 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 App.

    Tip   As an alternative to using three RGB values, you can enter any one of the following letters in single quotes:

    'y' 'r' 'b' 'c' 'g' 'm' 'k'

    These strings represent yellow, red, blue, cyan, green, magenta, and black, respectively.

Finally, you can enter comments about the origin and state of the model in the Diary And Notes area.

To view model properties in the MATLAB Command Window, click Present.

Organizing Model Icons

You can rearrange model icons in the System Identification app by dragging and dropping the icons to empty Model Board rectangles.

    Note:   You cannot drag and drop a model icon into the data area on the left.

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

    Tip   When you import or estimate models and there is insufficient space for the icons, an additional session window opens automatically.

You can drag and drop model icons between the main System Identification app and any extra session windows.

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

Deleting Models in the App

To delete models in the System Identification app, drag and drop the corresponding icon into Trash. You can also use the Delete key on your keyboard to move items to the Trash. Moving items to Trash does not permanently delete these items.

To restore a model from Trash, drag its icon from Trash to the Model Board in the System Identification app. You can view the Trash contents by double-clicking the Trash icon.

    Note:   You must restore a model to the Model Board; you cannot drag model icons to the Data Board.

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

Exiting a session empties Trash automatically.

Exporting Models from the App to the MATLAB Workspace

The models you create in the System Identification app are not available in the MATLAB workspace until you export them. Exporting is necessary when you need to perform an operation on the model that is only available at the command line. Exporting models to the MATLAB workspace also makes them available to the Simulink® software or another toolbox, such as the Control System Toolbox product.

To export a model to the MATLAB workspace, do one of the following:

  • Drag and drop the corresponding icon to the To Workspace rectangle.

  • Right-click the icon to open the Data/model Info dialog box. Click Export to export the model.

When you export models to the MATLAB workspace, the resulting variables have the same name as in the System Identification app.

Working with Plots

Identifying Data Sets and Models on Plots

You can identify data sets and models on a plot by color: the color of the line in the data or model icon in the System Identification app matches the line color on the plots.

You can also display data tips for each line on the plot by clicking a plot curve and holding down the mouse button.

    Note:   You must disable zoom by selecting Style > Zoom before you can display data tips. For more information about enabling zoom, see Magnifying Plots.

The following figure shows an example of a data tip, which contains the name of the data set and the coordinates of the data point.

Data Tip on a Plot

Changing and Restoring Default Axis Limits

There are two ways to change which portion of the plot is currently in view:

Magnifying Plots.  Enable zoom by selecting Style > Zoom in the plot window. To disable zoom, select Style > Zoom again.

    Tip   To verify that zoom is active, click the Style menu. A check mark should appear next to Zoom.

You can adjust magnification in the following ways:

  • To zoom in default increments, left-click the portion of the plot you want to center in the plot window.

  • To zoom in on a specific region, click and drag a rectangle that identifies the region for magnification. When you release the mouse button, the selected region is displayed.

  • To zoom out, right-click on the plot.

    Note:   To restore the full range of the data in view, select Options > Autorange in the plot window.

Setting Axis Limits.  You can change axis limits for the vertical and the horizontal axes of the input and output channels that are currently displayed on the plot.

  1. Select Options > Set axes limits to open the Limits dialog box.

  2. Specify a new range for each axis by editing its lower and upper limits. The limits must be entered using the format [LowerLimit UpperLimit]. Click Apply. For example:

    [0.1 100]

      Note:   To restore full axis limits, select the Auto check box to the right of the axis name, and click Apply.

  3. To plot data on a linear scale, clear the Log check box to the right of the axis name, and click Apply.

      Note:   To revert to base-10 logarithmic scale, select the Log check box to the right of the axis name, and click Apply.

  4. Click Close.

    Note:   To view the entire data range, select Options > Autorange in the plot window.

Selecting Measured and Noise Channels in Plots

Model inputs and outputs are called channels. When you create a plot of a multivariable input-output data set or model, the plot only shows one input-output channel pair at a time. The selected channel names are displayed in the title bar of the plot window.

    Note:   When you select to plot multiple data sets, and each data set contains several input and output channels, the Channel menu lists channel pairs from all data sets.

You can select a different input-output channel pair from the Channel menu in any System Identification Toolbox plot window.

The Channel menu uses the following notation for channels: u1->y2 means that the plot displays a transfer function from input channel u1 to output channel y2. System Identification Toolbox estimates as many noise sources as there are output channels. In general, e@ynam indicates that the noise source corresponds to the output with name ynam.

For example, e@y3->y1 means that the transfer function from the noise channel (associated with y3) to output channel y2 is displayed. For more information about noise channels, see Separation of Measured and Noise Components of Models.

    Tip   When you import data into the System Identification app, it is helpful to assign meaningful channel names in the Import Data dialog box. For more information about importing data, see Represent Data.

Grid and Line Styles in Plots

There are several Style options that are common to all plot types. These include the following:

Grid Lines.  To toggle showing or hiding grid lines, select Style > Grid.

Solid or Dashed Lines.  To display currently visible lines as a combination of solid, dashed, dotted, and dash-dotted line style, select Style > Separate linestyles.

To display all solid lines, select Style > All solid lines. This choice is the default.

All line styles match the color of the corresponding data or model icon in the System Identification app.

Opening a Plot in a MATLAB Figure Window

The MATLAB Figure window provides editing and printing commands for plots that are not available in the System Identification Toolbox plot window. To take advantage of this functionality, you can first create a plot in the System Identification app, and then open it in a MATLAB Figure window to fine-tune the display.

After you create the plot, as described in Plotting Models in the App, select File > Copy figure in the plot window. This command opens the plot in a MATLAB Figure window.

Printing Plots

To print a System Identification Toolbox plot, select File > Print in the plot window. In the Print dialog box, select the printing options and click OK.

Customizing the System Identification App

Types of App Customization

The System Identification app lets you customize the window behavior and appearance. For example, you can set the size and position of specific dialog boxes and modify the appearance of plots.

You can save the session to save the customized app state.

You might choose to edit the file that controls default settings, as described in Modifying idlayout.m (advanced usage).

Saving Session Preferences

Use Options > Save preferences to save the current state of the System Identification app. This command saves the following settings to a preferences file, idprefs.mat:

  • Size and position of the System Identification app

  • Sizes and positions of dialog boxes

  • Four recently used sessions

  • Plot options, such as line styles, zoom, grid, and whether the input is plotted using zero-order hold or first-order hold between samples

You can only edit idprefs.mat by changing preferences in the app.

The idprefs.mat file is located in the same folder as startup.m, by default. To change the location where your preferences are saved, use the midprefs command with the new path as the argument. For example:

midprefs('c:\matlab\toolbox\local\')

You can also type midprefs and browse to the desired folder.

To restore the default preferences, select Options > Default preferences.

Modifying idlayout.m

You might want to customize the default plot options by editing idlayout.m (advanced usage).

To customize idlayout.m defaults, save a copy of idlayout.m to a folder in your matlabpath just above the ident folder level.

    Caution   Do not edit the original file to avoid overwriting the idlayout.m defaults shipped with the product.

You can customize the following plot options in idlayout.m:

  • Order in which colors are assigned to data and model icons

  • Line colors on plots

  • Axis limits and tick marks

  • Plot options, set in the plot menus

  • Font size

    Note:   When you save preferences using Options > Save preferences to idprefs.mat, these preferences override the defaults in idlayout.m. To give idlayout.m precedence every time you start a new session, select Options > Default preferences.

Was this topic helpful?