Estimate empirical transfer functions and periodograms
data contains time- or frequency-domain input-output
data or time-series data:
datais time-domain input-output signals,
gis the ratio of the output Fourier transform to the input Fourier transform for the data.
For nonperiodic data, the transfer function is estimated at 128 equally-spaced frequencies
For periodic data that contains a whole number of periods (
data.Period = integer), the response is computed at the frequencies
k = 0up to the Nyquist frequency.
datais frequency-domain input-output signals,
gis the ratio of output to input at all frequencies, where the input is nonzero.
datais time-series data (no input channels),
gis the periodogram, that is the normed absolute square of the Fourier transform, of the data. The corresponding spectral estimate is normalized, as described in Spectrum Normalization and differs from the
spectrumnormalization in the Signal Processing Toolbox™ product.
a smoothing operation on the raw spectral estimates using a Hamming
Window that yields a frequency resolution of about
g = etfe(
The effect of
M is similar to the effect of
M is ignored for
periodic data. Use this syntax as an alternative to
narrowband spectra and systems that require large values of
For nonperiodic time-domain data,
Nspecifies the frequency grid
[1:N]/N*pi/Tsrad/TimeUnit. When not specified,
For periodic time-domain data,
For frequency-domain data, the
[fmin fmax]is the range of frequencies in
(fmax-fmin)/(N-1)rad/TimeUnit. When not specified, the response is computed at the frequencies contained in data where input is nonzero.
Compare an Empirical Transfer Function to a Smoothed Spectral Estimate
Load estimation data.
load iddata1 z1;
Estimate empirical transfer function and smoothed spectral estimate.
ge = etfe(z1); gs = spa(z1);
Compare the two models on a Bode plot.
Generate Empirical Transfer Function Using Periodic Input
Generate a periodic input, simulate a system with it, and compare the frequency response of the estimated model with the original system at the excited frequency points.
Generate a periodic input signal and output signal using simulation.
m = idpoly([1 -1.5 0.7],[0 1 0.5]); u = iddata(,idinput([50,1,10],'sine')); u.Period = 50; y = sim(m,u);
Estimate an empirical transfer function.
me = etfe([y u]);
Compare the empirical transfer function with the original model.
Apply Smoothing Operation on Empirical Transfer Function Estimate
Perform a smoothing operation on raw spectral estimates using a Hamming Window and compare the responses.
Estimate empirical transfer functions with and without the smoothing operation.
ge1 = etfe(z1); ge2 = etfe(z1,32);
Compare the models on a Bode plot.
ge2 is smoother than
ge1 because of the effect of the smoothing operation.
Compare Effect of Frequency Spacing on Empirical Transfer Function Estimate
Estimate empirical transfer functions with low- and high-frequency spacings and compare the responses.
Estimate empirical transfer functions with low and high frequency spacings.
ge1 = etfe(z9,,32); ge2 = etfe(z9,,512);
Plot the output power spectrum of the two models.
data — Estimation data
Estimation data, specified as an
The data can be time- or frequency-domain input/output signals or
M — Frequency resolution
 (default) | positive scalar
Frequency resolution, specified as a positive scalar.
N — Frequency spacing
128 for nonperiodic time-domain data (default) | positive scalar
Frequency spacing, specified as a positive scalar. For frequency-domain data, the default frequency spacing is the spacing inherent in the estimation data.
g — Transfer function estimate
Transfer function estimate, returned as an
Information about the estimation results and options used is
stored in the model's
the following fields:
Summary of the model status, which indicates whether the model was created by construction or obtained by estimation.
Estimation command used.
Size of the Hamming window.
Attributes of the data used for estimation, returned as a structure with the following fields.
For more information on using
Report, see Estimation Report.