Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help with Filtering an Interference Signal

Status
Not open for further replies.

~farah_r~

Newbie level 2
Joined
Nov 19, 2007
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,312
Hi All,

I have this one small audio file which is corrupted by an unknown interference signal which needs to be filtered out.

I loaded the file in matlab and found that its sampling frequency is 44.1kHz...I then plotted its FFT and found two peaks at + and - 21.99 kHz...So, I figured that I need to design a filter to remove the interference at this frequency.

I first designed a IIR notch filter with cut-off at 21.99k and filtered the sound signal through this filter using the filter command, but my sound file got worse instead of better.

I then designed a low pass filter, but the results were equally worse. I have no idea what I'm doing wrong.

Below is the code I used and the 3 filters I designed. I plotted the frequency response of all the three filters and found that my filters have the correct cut-off freq., pass band, and so on...so, there can be nothing wrong with the filters that I can think of ;(

Could someone please tell me what I'm doing wrong? The only thing I can think of now is that my conclusion that the interference signal is at 21.99 kHz is wrong? If that's the case, then how do I figure out what the interference band is from loading the file in matlab and plotting it's FFT? I'm really lost here ;(

Thanks,
Farah.
P.S. I did attach the corrupted audio file in the zipped extension added...it's a wav audio file, if it helps...

matlab code:

[y, fs] = wavread('corrupt_audio.wav'); % loading file in matlab
soundsc(y,fs)
Y = fft(y); % FFT of the signal
f = -fs/2 : fs/(length(Y)-1) : fs/2; % frequency scale
figure
plot(f,abs(Y));

% NOTCH FILTER
wo=21.99e3/(fs/2); bw = 0.6; % with cut-off at 21.99 kHz
[b,a]=iirnotch(wo,bw);
zplane(b,a); % pole-zero plot
fvtool(b,a); % freq response of filter
filtered_audio = filter(b, a, y); % filtering the signal
norm_audio = filtered_audio/max(abs(filtered_audio));
norm = fft(norm_audio); % FFT of the filtered signal
f1 = -fs/2 : fs/(length(norm)-1) : fs/2; % frequency scale
figure
plot(f1,abs(norm));
soundsc(norm,fs)

% IIR Butterworth LPF
p=[-0.3360346+i*0.3737106, -0.3360346-i*0.3737106]; %poles of filter
z=-1+i*1e-50; % zeros of filter
[b,a] = zp2tf(z, p, 1); % converting poles and zeros to transfer function of filter
zplane(b,a);
fvtool(b,a);

% IIR Butterworth NOTCH FILTER
p=[-0.3360346+i*0.3737106, -0.3360346-i*0.3737106];%poles of filter
z=-1+i*1e-50;% zeros of filter
[b,a] = zp2tf(z, p, 1);% converting poles and zeros to transfer function of filter
zplane(b,a);
fvtool(b,a);
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top