Signal is not getting filtered properly
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I am trying to implement 4th order high pass elliptical filter with cut-off frequency at 500/510 Hz at 20 dB passband and 25 dB stopband attenuation. I have attached the plot for my original data and data after filtering. But if you see the filtered data, there is almost no data after 500
[b,a]=ellip(4,20,25,500/510,'high');
fvtool(b,a)
y2=audioread('fr1.mp3');
y_b2=filter(b,a,y2);
fs=44100;
N=length(y_b2);
time=N/fs;
t = linspace(0, time, N);
referenceLength=length(y_b2);
fref=fs*(1:referenceLength)/referenceLength;
R=fft(y_b2,referenceLength);
stor=R(1);
R(1)=0;
absR=abs(R);
plot(fref,absR);
xlim([0 2000]);
ylim([0 200]);
xticks([0 200 400 600 800 1000 1200 1400 1600 1800 2000]);
yticks([0 25 50 75 100 125 150 175 200 300 400 500 600 700 800 900 1000]);
grid on;
xlabel('Frequency(Hz)');
ylabel('Amplitude');
5 件のコメント
採用された回答
Chunru
2021 年 7 月 23 日
Try design the filters as follows. The filter will attenuate the frequency content below 500Hz. When plotting spectrum, you may consider log scale of the ampiltude (20*log10(abs(filtered_date))).
fs=44100;
% The filter to have 1dB ripples in passband, 40 dB attenuation in stop
% band, the cut-off freq of 500Hz. (you may adjust the value as you want)
[b,a]=ellip(4, 1, 40, 500/(fs/2),'high');
%fvtool(b,a)
freqz(b, a, 8192, fs);
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Filter Design についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!