IIR Filter with given transfer function

11 次查看(过去 30 天)
Hi guys, I have to design an IIR filter using the Impulse Invariance Method from this transfer function in s domain :
s = tf('s');
M = 0.7*fs;
p1 = -M;
p2 = M*exp(i*(3*pi/4));
p3=M*exp(-i*(3*pi/4));
a = -p1*p2*p3;
b = (s-p1)*(s-p2)*(s-p3);
% Laplace Transfer function
F = a/b;
%Apply the inverse Laplace transfer function
i_sys = ilaplace(F);
but after the inverse transfer function, I don't know how apply the sampling theorem and design the digital filter. Can you help me?

回答(1 个)

Naman Chaturvedi
Naman Chaturvedi 2018-8-20
Hello,
From what I understand, you have the numerator and denominator in terms of 's' and the sampling frequency 'fs'. You want to find the digital IIR filter. To do the same, you can use the impinvar function to find the numerator and denominator coefficients of the transfer function. You can proceed with your code as follows:-
s = tf('s');
M = 0.7*fs;
p1 = -M;
p2 = M*exp(i*(3*pi/4));
p3=M*exp(-i*(3*pi/4));
a = -p1*p2*p3;
b = (s-p1)*(s-p2)*(s-p3);
% Laplace Transfer function
F = a/b;
[bz,az] = impinvar(F.Numerator{:,:},F.Denominator{:,:},fs);
Hope this helps.
  2 个评论
Flavio Orsolato
Flavio Orsolato 2018-8-20
Unfortunately I tried, but it doesn't work...This error appear : "Input A in impinvar must be double/single, instead it was tf. " Also if I try with "syms s"
Naman Chaturvedi
Naman Chaturvedi 2018-8-24
Hi Flavio,
Did you use the notation F.Numerator and F.Denominator to access the numerator and denominator of the transfer function, the way I mentioned in the script? It should work this way.
Hope this helps.

请先登录,再进行评论。

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by