Signal is not getting filtered properly
조회 수: 2 (최근 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!