Products & Services Solutions Academia Support User Community Company

Learn more about System Identification Toolbox   

Impulse and Step Response Plots

Supported Models

You can plot the simulated response of a model using impulse and step signals as the input for all linear parametric models and correlation analysis (nonparametric) models.

You can also create step-response plots for nonlinear models. These step and impulse response plots, also called transient response plots, provide insight into the characteristics of model dynamics, including peak response and settling time.

How Transient Response Helps to Validate Models

Transient response plots provide insight into the basic dynamic properties of the model, such as response times, static gains, and delays.

Transient response plots also help you validate how well a linear parametric model, such as a linear ARX model or a state-space model, captures the dynamics. For example, you can estimate an impulse or step response from the data using correlation analysis (nonparametric model), and then plot the correlation analysis result on top of the transient responses of the parametric models.

Because nonparametric and parametric models are derived using different algorithms, agreement between these models increases confidence in the parametric model results.

What Does a Transient Response Plot Show?

Transient response plots show the value of the impulse or step response on the vertical axis. The horizontal axis is in units of time you specified for the data used to estimate the model.

The impulse response of a dynamic model is the output signal that results when the input is an impulse. That is, u(t) is zero for all values of t except at t=0, where u(0)=1. In the following difference equation, you can compute the impulse response by setting y(-T)=y(-2T)=0, u(0)=1, and u(t>0)=0.

The step response is the output signal that results from a step input, where u(t<0)=0 and u(t>0)=1.

If your model includes a noise model, you can display the transient response of the noise model associated with each output channel. For more information about how to display the transient response of the noise model, see How to Plot Impulse and Step Response Using the GUI.

The following figure shows a sample Transient Response plot, created in the System Identification Tool GUI.

How to Plot Impulse and Step Response Using the GUI

To create a transient analysis plot in the System Identification Tool GUI, select the Transient resp check box in the Model Views area. For general information about creating and working with plots, see Working with Plots in the System Identification Tool GUI.

To include or exclude a model on the plot, click the corresponding model icon in the System Identification Tool GUI. Active models display a thick line inside the Model Board icon.

The following table summarizes the Transient Response plot settings.

Transient Response Plot Settings

ActionCommand
Display step response for linear or nonlinear model.

Select Options > Step response.

Display impulse response for linear model.

Select Options > Impulse response.

    Note   Not available for nonlinear models.

Display the confidence interval.

    Note   Only available for linear models.

  • To display the dashed lines on either side of the nominal model curve, select Options > Show confidence intervals. Select this option again to hide the confidence intervals.

  • To change the confidence value, select Options > Set % confidence level, and choose a value from the list.

  • To enter your own confidence level, select Options > Set confidence level > Other. Enter the value as a probability (between 0 and 1) or as the number of standard deviations of a Gaussian distribution.

Change time span over which the impulse or step response is calculated. For a scalar time span T, the resulting response is plotted from -T/4 to T.

    Note   To change the time span of models you estimated using correlation analysis models, select Estimate > Correlation models and reestimate the model using a new time span.

  • Select Options > Time span (time units), and choose a new time span in units of time you specified for the model.

  • To enter your own time span, select Options > Time span (time units) > Other, and enter the total response duration.

  • To use the time span based on model dynamics, type [] or default.

    The default time span is computed based on the model dynamics and might be different for different models. For nonlinear models, the default time span is 10.

Toggle between line plot or stem plot.

    Tip   Use a stem plot for displaying impulse response.

Select Style > Line plot or Style > Stem plot.

(Multiple-output system only)
Select an input-output pair to view the noise spectrum corresponding to those channels.

Select the output by name in the Channel menu.

If the plotted models include a noise model, you can display the transient response properties associated with each output channel. The name of the channel has the format e@OutputName, where OutputName is the name of the output channel corresponding to the noise model.

(Step response for nonlinear models only)
Set level of the input step.

    Note   For multiple-input models, the input-step level applies only to the input channel you selected to display in the plot.

Select Options > Step Size, and then chose from two options:

  • 0–>1 sets the lower level to 0 and the upper level to 1.

  • Other opens the Step Level dialog box, where you enter the values for the lower and upper level values.

Displaying the Confidence Interval

In addition to the transient-response curve, you can display a confidence interval on the plot. To learn how to show or hide confidence interval, see the description of the plot settings in How to Plot Impulse and Step Response Using the GUI.

The confidence interval corresponds to the range of response values with a specific probability of being the actual response of the system. The toolbox uses the estimated uncertainty in the model parameters to calculate confidence intervals and assumes the estimates have a Gaussian distribution.

For example, for a 95% confidence interval, the region around the nominal curve represents the range of values that have a 95% probability of being the true system response. You can specify the confidence interval as a probability (between 0 and 1) or as the number of standard deviations of a Gaussian distribution. For example, a probability of 0.99 (99%) corresponds to 2.58 standard deviations.

How to Plot Impulse and Step Response at the Command Line

You can plot impulse- and step-response plots using the impulse and step commands, respectively.

All plot commands have the same basic syntax, as follows:

In this case, command represents any of the plotting commands.

To display confidence intervals for a specified number of standard deviations, use the following syntax:

command(model,'sd',sd)

where sd is the number of standard deviations of a Gaussian distribution. For example, a confidence value of 99% for the nominal model curve corresponds to 2.58 standard deviations.

To display a filled confidence region, use the following syntax:

command(model,'sd',sd,'fill')

The following table summarizes commands that generate impulse- and step-response plots. For detailed information about each command, see the corresponding reference page.

CommandDescriptionExample
impulse

Plots impulse response for idpoly, idproc, idarx, idss, and idgrey model objects. Estimates and plots impulse response models for iddata objects.

    Note   Does not support nonlinear models.

To plot the impulse response of the model mod, type the following command:

impulse(mod)
step

Plots the step response of all linear and nonlinear models.

Estimates and plots step response models for iddata objects.

To plot the step response of the model mod, type the following command:

step(mod)

To specify step levels for a nonlinear model, type the following command:

step(mod,
'InputLevel',[u1;u2])

  


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