Effacer les filtres
Effacer les filtres

IIR Filter with given transfer function

11 vues (au cours des 30 derniers jours)
Flavio Orsolato
Flavio Orsolato le 17 Août 2018
Commenté : Naman Chaturvedi le 24 Août 2018
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?

Réponses (1)

Naman Chaturvedi
Naman Chaturvedi le 20 Août 2018
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 commentaires
Flavio Orsolato
Flavio Orsolato le 20 Août 2018
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 le 24 Août 2018
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.

Connectez-vous pour commenter.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by