Frequency response over grid
[H,wout]
= freqresp(sys)
H = freqresp(sys,w)
H = freqresp(sys,w,units)
[H,wout,covH]
= freqresp(idsys,...)
[
returns the frequency response of
the dynamic system model H
,wout
]
= freqresp(sys
)sys
at
frequencies wout
. The freqresp
command
automatically determines the frequencies based on the dynamics of sys
.
returns the frequency
response on the real frequency grid specified by the vector H
= freqresp(sys
,w
)w
.
explicitly
specifies the frequency units of H
= freqresp(sys
,w
,units
)w
with units
.
[
also returns
the covariance H
,wout
,covH
]
= freqresp(idsys
,...)covH
of the frequency response
of the identified model idsys
.

Any dynamic system model or model array. 

Vector of real frequencies at which to evaluate the frequency
response. Specify frequencies in units of 

Units of the frequencies in the input frequency vector
Default: 

Any identified model. 

Array containing the frequency response values. If If If 

Vector of frequencies corresponding to the frequency response
values in 

Covariance of the response 
Create the following 2input, 2output system:
sys11 = 0; sys22 = 1; sys12 = tf(1,[1 1]); sys21 = tf([1 1],[1 2]); sys = [sys11,sys12;sys21,sys22];
Compute the frequency response of the system.
[H,wout] = freqresp(sys);
H
is a 2by2by45 array. Each entry H(:,:,k)
in H
is a 2by2 matrix giving the complex frequency response of all inputoutput pairs of sys
at the corresponding frequency wout(k)
. The 45 frequencies in wout
are automatically selected based on the dynamics of sys
.
Create the following 2input, 2output system:
sys11 = 0; sys22 = 1; sys12 = tf(1,[1 1]); sys21 = tf([1 1],[1 2]); sys = [sys11,sys12;sys21,sys22];
Create a logarithmicallyspaced grid of 200 frequency points between 10 and 100 radians per second.
w = logspace(1,2,200);
Compute the frequency response of the system on the specified frequency grid.
H = freqresp(sys,w);
H
is a 2by2by200 array. Each entry H(:,:,k)
in H
is a 2by2 matrix giving the complex frequency response of all inputoutput pairs of sys
at the corresponding frequency w(k)
.
Compute the frequency response and associated covariance for an identified model at its peak response frequency.
load iddata1 z1 model = procest(z1,'P2UZ'); w = 4.26; [H,~,covH] = freqresp(model,w);
Use evalfr
to evaluate
the frequency response at individual frequencies or small numbers
of frequencies. freqresp
is optimized for mediumtolarge
vectors of frequencies.
[1] Laub, A.J., "Efficient Multivariable Frequency Response Computations," IEEE^{®} Transactions on Automatic Control, AC26 (1981), pp. 407408.