Estimate transfer function
The dsp.TransferFunctionEstimator
computes
the transfer function of a system, using the Welch algorithm and the
Periodogram method.
To implement the transfer function estimation object:
Define and set up your transfer function estimator object. See Construction.
Call step
to implement
the estimator according to the properties of dsp.TransferFunctionEstimator
.
The behavior of step
is specific to each object in
the toolbox.
Starting in R2016b, instead of using the step
method
to perform the operation defined by the System
object™, you can
call the object with arguments, as if it were a function. For example, y
= step(obj,x)
and y = obj(x)
perform
equivalent operations.
tfe = dsp.TransferFunctionEstimator
returns
a System
object, tfe
, that computes the transfer
function of real or complex signals. This System
object uses the
periodogram method and Welch’s averaged, modified periodogram
method.
tfe = dsp.TransferFunctionEstimator('
returns a PropertyName
', PropertyValue
,...)Transfer Function Estimator
System
object, tfe
, with each specified property set
to the specified value. You can specify additional namevalue pair arguments in any
order as (Name1,Value1,...,NameN,ValueN).

Number of spectral averages Specify the number of spectral averages as a positive, integer
scalar. The Transfer Function Estimator computes the current estimate
by averaging the last 

Source of the FFT length value Specify the source of the FFT length value as one of 

FFT Length Specify the length of the FFT that the Transfer Function Estimator
uses to compute spectral estimates as a positive, integer scalar.
This property applies when you set the 

Window function Specify a window function for the Transfer Function estimator
as one of 

Side lobe attenuation of window Specify the side lobe attenuation of the window as a real, positive
scalar, in decibels (dB). This property applies when you set the 

Frequency range of the transfer function estimate Specify the frequency range of the transfer function estimator
as one of If you set the If If you set the 

Magnitude squared coherence estimate Specify 
getFrequencyVector  Get vector of frequencies at which transfer function is estimated 
getRBW  Get resolution bandwidth of transfer function 
reset  Reset internal states of transfer function estimator 
step  Estimate transfer function of system 
Common to All System Objects  

clone  Create System object with same property values 
getNumInputs  Expected number of inputs to a System object 
getNumOutputs  Expected number of outputs of a System object 
isLocked  Check locked states of a System object (logical) 
release  Allow System object property value changes 
Given two signals x
and y
as
inputs. We first window the two inputs, and scale them by the window
power. We then take FFT of the signals, calling them X
and Y
.
This is followed by calculating P_{xx}
which
is the square magnitude of the FFT, X
, and P_{yx}
which
is X
multiplied by the conjugate of Y
.
The transfer function estimate is calculated by dividing P_{yx}
by P_{xx}
.
For further information refer to the Algorithms section in Spectrum Analyzer, which uses the same algorithm.
The magnitude squared coherence, C_{xy}
,
is defined as
$${C}_{xy}=\frac{\left(abs\left({P}_{xy}\right).^2\right)}{\left(P{}_{xx}.*{P}_{yy}\right)}$$
x
and y
are
input signals. P_{xx}
and P_{yy}
are
the power spectral density (PSD) estimates of x
and y
,
respectively. P_{xy} is the cross power spectral
density (CPSD) estimate of x
and y
.[1] Hayes, Monson H. Statistical Digital Signal Processing and Modeling. Hoboken, NJ: John Wiley & Sons, 1996
[2] Kay, Steven M. Modern Spectral Estimation: Theory and Application. Englewood Cliffs, NJ: Prentice Hall, 1999
[3] Stoica, Petre and Randolph L. Moses. Spectral Analysis of Signals. Englewood Cliffs, NJ: Prentice Hall, 2005
[4] Welch, P. D. ``The use of fast Fourier transforms for the estimation of power spectra: A method based on time averaging over short modified periodograms,'' IEEE Transactions on Audio and Electroacoustics, Vol. 15, pp. 70–73, 1967.