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 Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!