How can I transform a transfer function to a filter?
55 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Michael Brehmer
am 5 Dez. 2020
Beantwortet: Ameer Hamza
am 5 Dez. 2020
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.
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 5 Dez. 2020
Filtering through a transfer function is equivalent to simulating the dynamic control system with an unfiltered signal at the input and getting the filtered output. Therefore, you can use lsim(): https://www.mathworks.com/help/control/ref/lti.lsim.html
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Analog Filters finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!