You are here

Routine calc_freq_resp

Compute the frequency response of an LTI system.

Description

This routine computes the frequency response of a continuous-time LTI system on a frequency grid with respect to either the imaginary axis or the boundary of a truncated sector. When handling a sector, the frequency response associated to the kth grid point $\omega_k$ is computed at the point $s_k$ of the sector boundary which satisfies $\mathop{\mathrm{Im}} (s_k)=\omega_k$.

Syntax

M=calc_freq_resp(sys,grid{,sector})

Input arguments

sys LTI object.
grid Frequency grid in rad/s.
sector Vector $[\alpha\ \xi]$ or $[\alpha\ \xi\ \omega_c]$ characterizing the considered truncated sector (see display_sector for a complete description). This parameter is optional and the default value is sector=[0 0], which means that the left half plane is considered.

Output argument

M 3-D array where M(:,:,k) is the frequency response associated to grid(k).

Example

sys=rss(10,2,2);
grid=1:20;
sector=[-1 0.2 3];
M=calc_freq_resp(sys,grid,sector)

See also

display_sector