You must have already imported your data into the app, as described in Preparing Time-Series Data.

To estimate time series spectral models in the System Identification app:

In the System Identification app, select

**Estimate**>**Spectral Models**to open the Spectral Model dialog box.In the

**Method**list, select the spectral analysis method you want to use. For information about each method, see Selecting the Method for Computing Spectral Models.Specify the frequencies at which to compute the spectral model in either of the following ways:

In the

**Frequencies**field, enter either a vector of values, a MATLAB^{®}expression that evaluates to a vector, or a variable name of a vector in the MATLAB workspace. For example,`logspace(-1,2,500)`

.Use the combination of

**Frequency Spacing**and**Frequencies**to construct the frequency vector of values:In the

**Frequency Spacing**list, select`Linear`

or`Logarithmic`

frequency spacing.### Note

For

`etfe`

, only the`Linear`

option is available.In the

**Frequencies**field, enter the number of frequency points.

For time-domain data, the frequency ranges from 0 to the Nyquist frequency. For frequency-domain data, the frequency ranges from the smallest to the largest frequency in the data set.

In the

**Frequency Resolution**field, enter the frequency resolution, as described in Controlling Frequency Resolution of Spectral Models. To use the default value, enter`default`

or leave the field empty.In the

**Model Name**field, enter the name of the correlation analysis model. The model name should be unique in the Model Board.Click

**Estimate**to add this model to the Model Board in the System Identification app.In the Spectral Model dialog box, click

**Close**.To view the estimated disturbance spectrum, select the

**Noise spectrum**check box in the System Identification app. For more information about working with this plot, see Noise Spectrum Plots.

To export the model to the MATLAB workspace, drag it to the **To Workspace** rectangle
in the System Identification app. You can view the power spectrum and the confidence
intervals of the resulting `idfrd`

model object using the
`bode`

command.

You can use the `etfe`

, `spa`

, and `spafdr`

commands to estimate power
spectra of time series for both time-domain and frequency-domain data. The following
table provides a brief description of each command.

You must have already prepared your data, as described in Preparing Time-Series Data.

The resulting models are stored as an `idfrd`

model object, which contains
`SpectrumData`

and its variance. For multiple-output data,
`SpectrumData`

contains power spectra of each output and the
cross-spectra between each output pair.

**Estimating Frequency Response of Time Series**

For example, suppose `y`

is time series data. The following
commands estimate the power spectrum `g`

and the periodogram
`p`

, and plot both models with three standard deviation
confidence intervals:

g = spa(y); p = etfe(y); spectrum(g,p);

For detailed information about these commands, see the corresponding reference pages.