How can I transform a transfer function to a filter?
Mostrar comentarios más antiguos
Hello,
I am trying to design a filter with the order 2, that equals to this PT2 transfer function:
s
-----------------
s^2 + 4.1 s + 0.4
or as code:
s=tf('s');
pt2 = s/((s+0.1)*(s+4));
You can try
bode(pt2);
to check how it looks (bandpass) - and therefore what I expect the filter to look like.
I have a vector of about 800 freqencies on discrete points, which should be filtered with the given pt2 transfer function (some frequencies more important than others). So that the freqencies will be weighted in the output.
So I am trying to design a filter that looks just as the pt2 tf function (bode plot). Ive read about how to transform a filter to a transfer function, but I didnt figure out if and how to do this the other way round.
What I tried so far:
designedFilter_1 = designfilt('bandpassiir', 'FilterOrder', 2, ...
'PassbandFrequency1', .45, ...
'PassbandFrequency2', .55, ...
'PassbandRipple', 1);
which provides a bandpass that has kind of the same shape as my pt2, but its not the same.
Basically my question is: do I have to try out different options in designfilt, until I get the same shape like my pt2 transfer function. Or can I somehow create a filter directly from my pt2 transfer function?
Any help appreciated.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Digital Filter Design en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!