Vous êtes sur la page 1sur 1

Computing a value of the frequency response.

Say the transfer function of a discrete-time LTI system is

b0 + b1 z −1 + b2 z −2 + b3 z −3
H(z) = . (1)
1 + a1 z −1 + a2 z −2
Then the frequency response is

b0 + b1 e−jω + b2 e−2jω + b3 e−3jω


H f (ω) = H(ejω ) = . (2)
1 + a1 e−jω + a2 e−2jω
But we can also write
b0 z 3 + b1 z 2 + b2 z + b3 P (z)
H(z) = z −1 2
= z −1 (3)
z + a1 z + a2 Q(z)

where P (z) and Q(z) are the polynomials

P (z) = b0 z 3 + b1 z 2 + b2 z + b3 , Q(z) = z 2 + a1 z + a2 . (4)

So, the frequency response can be written as

P (ejω )
H f (ω) = H(ejω ) = e−jω . (5)
Q(ejω )

In Matlab, the value of the polynomial P (z) can be found using the polyval function:

>> polyval([b0 b1 b2 b3], z)

Similarly, Q(z) can be computed.

So the frequency response at the frequency ω1 , i.e., H(ω1 ), can be computed as:

>> b = [b0 b1 b2 b3];


>> a = [1 a1 a2];
>> z1 = exp(1j * om1);
>> H_om1 = z1^(-1) * polyval(b, z1) ./ polyval(a, z1);

This is illustrated in the accompanying Matlab example file.

Vous aimerez peut-être aussi