| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → System Identification Toolbox |
| Contents | Index |
| Learn more about System Identification Toolbox |
| On this page… |
|---|
How Frequency Response Helps to Validate Models What Does a Frequency-Response Plot Show? |
Frequency response plots show the complex values of a transfer function as a function of frequency.
In the case of linear dynamic systems, the transfer function G is essentially 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
.
You can plot the frequency response of a model to gain insight into the characteristics of linear model dynamics, including the frequency of the peak response and stability margins. Frequency-response plots are available for all linear parametric models and spectral analysis (nonparametric) models.
Note Frequency-response plots are not available for nonlinear models. In addition, Nyquist plots do not support time-series models that have no input. |
The frequency response of a linear dynamic model describes how the model reacts to sinusoidal inputs. If the input u(t) is a sinusoid of a certain frequency, then the output y(t) is also a sinusoid of the same frequency. However, the magnitude of the response is different from the magnitude of the input signal, and the phase of the response is shifted relative to the input signal.
Frequency response plots provide insight into linear systems dynamics, such as frequency-dependent gains, resonances, and phase shifts. Frequency response plots also contain information about controller requirements and achievable bandwidths. Finally, frequency response plots can also help you validate how well a linear parametric model, such as a linear ARX model or a state-space model, captures the dynamics.
One example of how frequency-response plots help validate other models is that you can estimate a frequency response from the data using spectral analysis (nonparametric model), and then plot the spectral analysis result on top of the frequency response 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.
System Identification Tool GUI supports the following types of frequency-response plots for linear parametric models, linear state-space models, and nonparametric frequency-response models:
Bode plot of the model response. A Bode plot consists
of two plots. The top plot shows the magnitude
by which the transfer function G magnifies
the amplitude of the sinusoidal input. The bottom plot shows the phase
by which the transfer function
shifts the input. The input to the system is a sinusoid, and the output
is also a sinusoid with the same frequency.
Bode plot of the disturbance model, called noise spectrum. This plot is the same as a Bode plot of the model response, but it shows the frequency response of the noise model instead. For more information, see Noise Spectrum Plots.
(Only in the MATLAB Command Window)
Nyquist
plot. Plots the imaginary versus the real part of the transfer function.
The following figure shows a sample Bode plot of the model dynamics, created in the System Identification Tool GUI.

To create a frequency-response plot for parametric linear models in the System Identification Tool GUI, select the Frequency 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.
In addition to the frequency-response curve, you can display a confidence interval on the plot. 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.
The following table summarizes the Frequency Function plot settings.
Frequency Function Plot Settings
| Action | Command |
|---|---|
Display the confidence interval. |
|
Change the frequency values for computing the noise spectrum. The default frequency vector is 128 linearly distributed values, greater than zero and less than or equal to the Nyquist frequency. | Select Options > Frequency range and specify a new frequency vector in units of rad/s. Enter the frequency vector using any one of following methods:
|
| Change frequency units between hertz and radians per second. | Select Style > Frequency (Hz) or Style > Frequency (rad/s). |
| Change frequency scale between linear and logarithmic. | Select Style > Linear frequency scale or Style > Log frequency scale. |
| Change amplitude scale between linear and logarithmic. | Select Style > Linear amplitude scale or Style > Log amplitude scale. |
(Multiple-output system only) | Select the output by name in the Channel menu. |
You can plot Bode and Nyquist plots for linear models using the bode, ffplot, and nyquist commands.
All plot commands have the same basic syntax, as follows:
To plot one model, use the syntax command(model).
To plot several models, use the syntax command(model1,model2,...,modelN).
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 Bode and Nyquist plots for linear models. For detailed information about each command and how to specify the frequency values for computing the response, see the corresponding reference page.
| Command | Description | Example |
|---|---|---|
| bode | Plots the magnitude and phase of the frequency response on a logarithmic frequency scale. | To create the bode plot of the model mod, use the following command: bode(mod) |
| ffplot | Plots the magnitude and phase of the frequency response on a linear frequency scale (hertz). | To create the bode plot of the model mod, use the following command: ffplot(mod) |
| nyquist | Plots the imaginary versus real part of the transfer function. | To plot the frequency response of the model mod, use the following command: nyquist(mod) |
![]() | Impulse and Step Response Plots | Noise Spectrum Plots | ![]() |

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 |