Discrete Transfer Function Estimator

Compute estimate of frequency-domain transfer function of system

Library

Estimation / Power Spectrum Estimation

dspspect3

Description

The Discrete Transfer Function Estimator block estimates the frequency-domain 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 Pxx which is the square magnitude of the FFT, X. The block then calculates Pyx which is X multiplied by the conjugate of Y. The output transfer function estimate, H, is calculated by dividing Pyx by Pxx.

Dialog Box

Parameters

Number of spectral averages

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.

Source of the FFT length value

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.

FFT length

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.

Window function

Specify a window function for the Transfer Function Estimator block. Possible values are:

  • Hann (default)

  • Rectangular

  • Chebyshev

  • Flat Top

  • Hamming

  • Kaiser

Sidelobe attenuation of window

Specify the sidelobe attenuation of the window. It can be any real positive scalar value in decibels (dB).

    Note:   This parameter is visible only when Window function is set to Kaiser or Chebyshev.

Frequency range

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 two-sided 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 one-sided 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 two-sided transfer function of the real or complex input signals, x and y.

Simulate Using

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 pre-compiled MATLAB® code.

Supported Data Types

The Discrete Transfer Function Estimator block supports real and complex inputs.

PortSupported Data Type

x

  • Double-precision floating point

  • Single-precision floating point

y

  • Double-precision floating point

  • Single-precision floating point

Output, H

  • Double-precision floating point

  • Single-precision floating point

Examples

This example shows how to use the Discrete Transfer Function Estimator block to estimate the frequency-domain 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 low-pass 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 low-pass filter that matches the frequency response of the Discrete FIR Filter block.

Was this topic helpful?