how to design a high-pass IIR filter having the transfer funciton ?

4 ビュー (過去 30 日間)
Giorgia Fusaroli
Giorgia Fusaroli 2021 年 6 月 24 日
コメント済み: Mathieu NOE 2021 年 6 月 24 日
Hi everyone,
i need to filter a signal with a high-pass IIR filter characterized by a transfer function as follow:
H(z) = 1-z^-1 / 1- a * z^-1
i know a = 0.995 and cut off frequency f = 0.25 Hz
i need to filter the sequence one time in forward direction and then in reversed.
Someone can help me ?
Thank you a lot :)

採用された回答

Mathieu NOE
Mathieu NOE 2021 年 6 月 24 日
Here you are my friend
I don't know what sequence was supposed to be filtered , so the demo is on random signal
% IIr filter
fc = 0.25;
a = 0.995;
numd = [1 -1];
dend = [1 -a];
Fs = fc/(1-a)*2*pi;
% signal (random)
dt = 1/Fs;
samples = 3000;
t = (0:samples-1)'*dt;
x = randn(samples,1);
figure(1)
dbode(numd,dend,dt); % bode plot
y = filtfilt(numd,dend,x); % Zero-phase forward and reverse digital IIR filtering.
% y = filter(numd,dend,x); % forward digital IIR filtering.
figure(2) % time plot
plot(t,x,t,y);
legend('input signal','output signal');
  6 件のコメント
Giorgia Fusaroli
Giorgia Fusaroli 2021 年 6 月 24 日
Okok, i understood and thank you so much for the helping !
I'm trying to replicate a filter so fc = 0.25 and a = 0.995 and the transfer function were given to me.
The original filter is applied to a signal acquired at 200 Hz, this is why it doesn't work for me ?
And to work in my case, what and how should do i change the parameters of the filter ?
Mathieu NOE
Mathieu NOE 2021 年 6 月 24 日
well , now if fc and Fs are given , you can easily compute the a value :
a = 1 - 2*pi*fc/Fs;

サインインしてコメントする。

その他の回答 (1 件)

Giorgia Fusaroli
Giorgia Fusaroli 2021 年 6 月 24 日
編集済み: Giorgia Fusaroli 2021 年 6 月 24 日
I have to day, the filter seems to only tranlsate the signal without modify it :(
  1 件のコメント
Mathieu NOE
Mathieu NOE 2021 年 6 月 24 日
no surprise
this is a low frequency high pass filter
it will only remove the mean (DC) value of the signal , which appears on your graph as a vertical shift; the "dynamic" portion of the signal remains unchanged as the filter has no effect above 0.25 Hz

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeFilter Design についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by