System Identification Toolbox    
freqresp

Compute the frequency function for a model.

Syntax

Description

m is any idmodel or idfrd object.

H = freqresp(m,w) computes the frequency response H of the idmodel model m at the frequencies specified by the vector w. These frequencies should be real and in radians/second.

If m has ny outputs and nu inputs, and w contains Nw frequencies, the output H is a ny-by-nu-by-Nw array such that H(:,:,k) gives the complex valued response at the frequency w(k).

For a SISO model, H(:) to obtain a vector of the frequency response.

If w is not specified, a default choice is made. For a discrete-time model w will be 128 equally spaced frequency points from 0 (excluded) to the Nyquist frequency. For a continuous-time model, the default is

where Ts is the sampling interval of the data from which the model was estimated. If the model is not estimated, Ts is taken as 1, which may make it necessary to specify w as in input argument in this case.

also returns the frequencies w and the covariance covH of the response. covH is a 5-D array where covH(ky,ku,k,:,:) is the 2-by-2 covariance matrix of the response from input ku to output ky at frequency w(k). The 1,1 element is the variance of the real part, the 2,2 element the variance of the imaginary part and the 1,2 and 2,1 elements the covariance between the real and imaginary parts. squeeze(covH(ky,ku,k,:,:)) gives the covariance matrix of the corresponding response.

If m is a time series (no input channels), H is returned as the (power) spectrum of the outputs; an ny-by-ny-by-Nw array. Hence H(:,:,k) is the spectrum matrix at frequency w(k). The element H(k1,k2,k) is the cross spectrum between outputs k1 and k2 at frequency w(k). When k1=k2, this is the real-valued power spectrum of output k1.

covH is then the covariance of the estimated spectrum H, so that covH(k1,k1,k) is the variance of the power spectrum estimate of output k1 at frequency W(k). No information about the variance of the cross spectra is normally given i.e., covH(k1,k2,k) = 0 for k1 not equal to k2.)

If the model m is not a time series, use freqresp(m('n')) to obtain the spectrum information of the noise (output disturbance) signals.

Note that idfrd computes the same information as freqresp, and stores it in the idfrd object.

See Also

bode, idfrd, nyquist


  ffplot fpe