Documentation 
Compute estimate of frequencydomain transfer function of system
The Discrete Transfer Function Estimator block estimates the frequencydomain transfer function of a system using the Welch algorithm and the Periodogram method.
The block takes two inputs, x and y. x is the system input signal and y is the system output signal. x and y must have the same dimensions. For 2D inputs, the block treats each column as an independent channel. The first dimension is the length of the channel. The second dimension is the number of channels. The block treats 1D inputs as one channel. The sample rate of the block is equal to 1/T. T is the sample time of the inputs to the block.
The block first applies a window function to the two inputs, x and y, and then scales them by the window power. It takes the FFT of each signal, calling them X and Y. The block calculates P_{xx} which is the square magnitude of the FFT, X. The block then calculates P_{yx} which is X multiplied by the conjugate of Y. The output transfer function estimate, H, is calculated by dividing P_{yx} by P_{xx}.
Parameters
Specify the number of spectral averages. The Transfer Function Estimator block computes the current estimate by averaging the last N estimates. N is the number of spectral averages. It can be any positive integer scalar, and the default is 8.
Specify the source of the FFT length value. It can be one of Auto (default) or Property. When the source of the FFT length is set to Auto, the Transfer Function Estimator block sets the FFT length to the input frame size. When the source of the FFT length is set to Property, you specify the FFT length in the FFT length parameter.
Specify the length of the FFT that the Transfer Function Estimator block uses to compute spectral estimates. It can be any positive integer scalar, and the default is 128.
Specify a window function for the Transfer Function Estimator block. Possible values are:
Hann (default)
Rectangular
Chebyshev
Flat Top
Hamming
Kaiser
Specify the sidelobe attenuation of the window. It can be any real positive scalar value in decibels (dB).
Specify the frequency range of the transfer function estimate.
twosided (default)
When you set the frequency range to twosided, the Transfer Function Estimator block computes the twosided transfer function of the real or complex input signals, x and y.
onesided
When you set the frequency range to onesided, the Transfer Function Estimator block computes the onesided transfer function of real input signals, x and y.
centered
When you set the frequency range to centered, the Transfer Function Estimator block computes the centered twosided transfer function of the real or complex input signals, x and y.
Choose whether you want to simulate using Code generation or Interpreted execution.
The Simulate using field determines the type of simulation to run. When Code generation is selected, the model simulates with generated C code. When Interpreted execution is selected, the model simulates using precompiled MATLAB^{®} code.
The Discrete Transfer Function Estimator block supports real and complex inputs.
Port  Supported Data Type 

x 

y 

Output, H 

This example shows how to use the Discrete Transfer Function Estimator block to estimate the frequencydomain transfer function of a system.
The Random Source block represents the system input signal. The sample rate of the system input is 44.1 KHz. The Random Source input passes through a lowpass filter with a normalized cutoff frequency of 0.3. The filtered signal represents the system output signal. Because the Discrete Transfer Function Estimator block outputs complex values, take the magnitude of the output to see a plot of the transfer function estimate.
The transfer function plot displays the system transfer function, a lowpass filter that matches the frequency response of the Discrete FIR Filter block.