필터 지우기
필터 지우기

Remove unwanted narrowband interference

조회 수: 5 (최근 30일)
clement Ang
clement Ang 2019년 10월 17일
답변: Kaashyap Pappu 2019년 10월 22일
I have this corrupted audio with the sound of a human lung, and would need to remove its interference.
I have attempted both high pass filter and passband filter, would appreciate if someone can help take a look at my code, and see where I should edit to get a clearer sound.
Corrupted Audio:
https://drive.google.com/file/d/15xrvx8pynmhCd86MY-1Zfc7EmDMv-MwP/view?usp=sharing
My current code:
[y,fs]=audioread('lungaudio.wav'); %y=samples, fs = sampling frequency
Ts=1/fs; %Sampling period
nfft=length(y);
nfft2=2^nextpow2(nfft);
ff=fft(y,nfft2);
fff=ff(1:nfft2/2);
plot(abs(fff));
xfft=fs*(0:nfft2/2-1)/nfft2;
plot(xfft,abs(fff));
xlabel('Frequency/Hz');
ylabel('Normalized Amplitude');
title('Frequency Domain Signal');
fc=550;
[b,a]=butter(6,fc/(fs/2), 'high'); %lowpass filter to only get 60hz
y_filtered=filter(b,a,y);
plot(y_filtered)
% sound(y_filtered,fs);
Graph Obtained:
  댓글 수: 1
Daniel M
Daniel M 2019년 10월 17일
I think you mean to use 'low' in your call to butter.
See this recent question also regarding audio of a lung (perhaps a classmate?)

댓글을 달려면 로그인하십시오.

답변 (1개)

Kaashyap Pappu
Kaashyap Pappu 2019년 10월 22일
Increasing the order of the Butterworth filter could help improve the response. Alternatively, the buttord function can be used to get the optimal order and cutoff frequency values to give to the “butter” function.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Digital Filter Design에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by