## Documentation Center |

Estimate frequency response and spectrum using spectral analysis with frequency-dependent resolution

g = spafdr(data) g = spafdr(data,Resol,w)

`spafdr` estimates the `idfrd` object
containing transfer function and the noise spectrum *Φ _{υ}* of
the general linear model

where *Φ _{υ}*(

`data` contains the output-input data as an `iddata` object.
The data can be complex valued, and either time or frequency domain.
It can also be an `idfrd` object containing frequency-response
data.

`g` is returned as an `idfrd` object
(see `idfrd`)
with the estimate of
at the frequencies *ω* specified
by row vector `w`. `g` also includes
information about the spectrum estimate of *Φ _{υ}*(

The frequency variable `w` is either specified
as a row vector of frequencies, or as a cell array `{wmin,wmax}`.
In the latter case the covered frequencies will be 50 logarithmically
spaced points from `wmin` to `wmax`.
You can change the number of points to `NP` by entering `{wmin,wmax,NP}`.

Omitting `w` or entering it as an empty matrix
gives the default value, which is 100 logarithmically spaced frequencies
between the smallest and largest frequency in data. For time-domain
data, this means from `1/N*Ts` to `pi*Ts`,
where `Ts` is the sampling interval of data and `N` is
the number of data.

The argument `Resol` defines the frequency
resolution of the estimates. The resolution (measured in rad/s) is
the size of the smallest detail in the frequency function and the
spectrum that is resolved by the estimate. The resolution is a tradeoff
between obtaining estimates with fine, reliable details, and suffering
from spurious, random effects: The finer the resolution, the higher
the variance in the estimate. `Resol` can be entered
as a scalar (measured in rad/s), which defines the resolution over
the whole frequency interval. It can also be entered as a row vector
of the same length as `w`. Then `Resol(k)` is
the local, frequency-dependent resolution around frequency `w(k)`.

The default value of `Resol`, obtained by omitting
it or entering it as the empty matrix, is `Resol(k) = 2(w(k+1)-w(k))`,
adjusted upwards, so that a reasonable estimate is guaranteed. In
all cases, the resolution is returned in the variable `g.Report.WindowSize`.

Was this topic helpful?