Signal Processing Toolbox Help Desk

tfe

Purpose

Transfer function estimate from input and output.

Syntax

Description

Txy = tfe(x,y) finds a transfer function estimate Txy given input signal vector x and output signal vector y. The transfer function is the quotient of the cross spectrum of x and y and the power spectrum of x:

The relationship between the input x and output y is modeled by the linear, time-invariant transfer function Txy.

Vectors x and y must be the same length. Txy = tfe(x,y) uses the following default values:

nfft specifies the FFT length that tfe uses. This value determines the frequencies at which the power spectrum is estimated. Fs is a scalar that specifies the sampling frequency. window specifies a windowing function and the number of samples tfe uses in its sectioning of the x and y vectors. noverlap is the number of samples by which the sections overlap. Any arguments that omitted from the end of the parameter list use the default values shown above.

If x is real, tfe estimates the transfer function at positive frequencies only; in this case, the output Txy is a column vector of length nfft/2+1 for nfft even and (nfft+1)/2 for n odd. If x or y is complex, tfe estimates the transfer function for both positive and negative frequencies and Txy has length nfft.

Txy = tfe(x,y,nfft) uses the specified FFT length nfft in estimating the transfer function. Specify nfft as a power of 2 for fastest execution.

[Txy,f] = tfe(x,y,nfft,Fs) returns a vector f of frequencies at which tfe estimates the transfer function. Fs is the sampling frequency. f is the same size as Txy, so plot(f,Txy) plots the transfer function estimate versus properly scaled frequency. Fs has no effect on the output Txy; it is a frequency scaling multiplier.

Txy = tfe(x,y,nfft,Fs,window) specifies a windowing function and the number of samples per section of the x vector. If you supply a scalar for window, Txy uses a Hanning window of that length. The length of the window must be less than or equal to nfft; tfe zero pads the sections if the length of the window exceeds nfft.

Txy = tfe(x,y,nfft,Fs,window,noverlap) overlaps the sections of x by noverlap samples.

You can use the empty matrix [] to specify the default value for any input argument except x or y. For example,

uses 256 as the value for nfft and 2 as the value for Fs.

Txy = tfe(x,y,...,'dflag') specifies a detrend option, where dflag is

The dflag parameter must appear last in the list of input arguments. tfe recognizes a dflag string no matter how many intermediate arguments are omitted.

tfe with no output arguments plots the magnitude of the transfer function estimate in decibels versus frequency in the current figure window.

Example

Compute and plot the transfer function estimate between two colored noise sequences x and y:

Algorithm

tfe uses a four-step algorithm:

  1. It multiplies the detrended sections by window.
  2. It takes the length nfft FFT of each section.
  3. It averages the squares of the spectra of the x sections to form Pxx and averages the products of the spectra of the x and y sections to form Pxy.
  4. It calculates Txy:

Diagnostics

An appropriate diagnostic message is displayed when incorrect arguments are used:

See Also

etfe

Compute empirical transfer function estimate and periodogram (see System Identification Toolbox User's Guide).

cohere

Estimate magnitude squared coherence function between two signals.

csd

Estimate the cross spectral density (CSD) of two signals.

psd

Estimate the power spectral density (PSD) of a signal.

spa

Perform spectral analysis for input-output data (see System Identification Toolbox User's Guide).



[ Previous | Help Desk | Next ]